Add mdx lsp support
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
return {
|
||||
cmd = { "lemminx" },
|
||||
filetypes = { "xml", "xsd", "xsl", "xslt", "svg" },
|
||||
root_markers = { "sfdx-project.json", ".git" },
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
-- LWC LSP: install with `npm i -g @salesforce/lwc-language-server`.
|
||||
-- Attaches only inside SFDX projects via root marker.
|
||||
return {
|
||||
cmd = { "lwc-language-server", "--stdio" },
|
||||
filetypes = { "javascript", "html" },
|
||||
root_markers = { "sfdx-project.json" },
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
local function tsdk()
|
||||
local local_ts = vim.fs.find("node_modules/typescript/lib", {
|
||||
upward = true,
|
||||
path = vim.fn.expand("%:p:h"),
|
||||
type = "directory",
|
||||
})[1]
|
||||
if local_ts then return local_ts end
|
||||
return vim.fn.stdpath("data")
|
||||
.. "/mason/packages/typescript-language-server/node_modules/typescript/lib"
|
||||
end
|
||||
|
||||
return {
|
||||
cmd = { "mdx-language-server", "--stdio" },
|
||||
filetypes = { "mdx", "markdown.mdx" },
|
||||
root_markers = { "package.json", "tsconfig.json", ".git" },
|
||||
init_options = {
|
||||
typescript = { tsdk = tsdk() },
|
||||
},
|
||||
capabilities = {
|
||||
workspace = {
|
||||
didChangeWatchedFiles = { dynamicRegistration = false },
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user