Neovim LSP configuration part is outdated and fails in some cases
Closed this issue · 1 comments
LearnWebGitHub commented
Due to compatibility with npm, there may now be a package.json in the Deno project, so denols and ts_ls may be enabled at the same time.
Neovim LSP configuration
local nvim_lsp = require('lspconfig')
nvim_lsp.denols.setup {
on_attach = on_attach,
root_dir = nvim_lsp.util.root_pattern("deno.json", "deno.jsonc"),
}
nvim_lsp.ts_ls.setup {
on_attach = on_attach,
root_dir = nvim_lsp.util.root_pattern("package.json"),
single_file_support = false
}
LearnWebGitHub commented
Maybe I shouldn't let deno.json and package.json be in the same project.