1
0
forked from extern/nix-config

neovim: Conditionally load denols/tsserver

Makes it possible to use both Deno and Node/Bun projects with the same
config.
This commit is contained in:
Donovan Glover 2023-09-30 11:07:39 -04:00
parent b8c3b2504f
commit 5d12aaacb0
No known key found for this signature in database
GPG Key ID: EA7408A77AE1BE65

View File

@ -228,7 +228,13 @@ in
lspconfig.clangd.setup {}
lspconfig.texlab.setup {}
lspconfig.crystalline.setup {}
lspconfig.tsserver.setup {}
lspconfig.denols.setup {
root_dir = lspconfig.util.root_pattern("deno.json", "deno.jsonc"),
}
lspconfig.tsserver.setup {
root_dir = lspconfig.util.root_pattern("package.json"),
single_file_support = false
}
lspconfig.astro.setup {}
vim.keymap.set('n', '<space>e', vim.diagnostic.open_float)
vim.keymap.set('n', '[d', vim.diagnostic.goto_prev)