Skip to content

Commit

Permalink
fix(mdx-analyzer): get dirname of vim.fs.find result (#3527)
Browse files Browse the repository at this point in the history
* fix: project root variable and root filetype
  • Loading branch information
MuntasirSZN2 authored Dec 25, 2024
1 parent c580f34 commit 1240fbb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/lspconfig/configs/mdx_analyzer.lua
Original file line number Diff line number Diff line change
@@ -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 = {},
Expand Down

0 comments on commit 1240fbb

Please sign in to comment.