diff options
| author | MuntasirSZN2 <shahanazsabuj@gmail.com> | 2024-12-25 16:37:01 +0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-25 18:37:01 +0800 |
| commit | 1240fbbfeb528b303594efde97192435a02bdb29 (patch) | |
| tree | 65034c315d760441e2c7004ed1ff650003c46613 /lua | |
| parent | refactor!: remove public interface of util.path.traverse_parents (diff) | |
| download | nvim-lspconfig-1240fbbfeb528b303594efde97192435a02bdb29.tar nvim-lspconfig-1240fbbfeb528b303594efde97192435a02bdb29.tar.gz nvim-lspconfig-1240fbbfeb528b303594efde97192435a02bdb29.tar.bz2 nvim-lspconfig-1240fbbfeb528b303594efde97192435a02bdb29.tar.lz nvim-lspconfig-1240fbbfeb528b303594efde97192435a02bdb29.tar.xz nvim-lspconfig-1240fbbfeb528b303594efde97192435a02bdb29.tar.zst nvim-lspconfig-1240fbbfeb528b303594efde97192435a02bdb29.zip | |
fix(mdx-analyzer): get dirname of vim.fs.find result (#3527)
* fix: project root variable and root filetype
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/configs/mdx_analyzer.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/lspconfig/configs/mdx_analyzer.lua b/lua/lspconfig/configs/mdx_analyzer.lua index 37948d23..6ae65a2b 100644 --- a/lua/lspconfig/configs/mdx_analyzer.lua +++ b/lua/lspconfig/configs/mdx_analyzer.lua @@ -1,14 +1,14 @@ local util = require 'lspconfig.util' local function get_typescript_server_path(root_dir) - local project_root = vim.fs.find('node_modules', { path = root_dir, upward = true })[1] + local project_root = vim.fs.dirname(vim.fs.find('node_modules', { path = root_dir, upward = true })[1]) return project_root and (project_root .. '/node_modules/typescript/lib') or '' end return { default_config = { cmd = { 'mdx-language-server', '--stdio' }, - filetypes = { 'markdown.mdx' }, + filetypes = { 'mdx' }, root_dir = util.root_pattern 'package.json', single_file_support = true, settings = {}, |
