neovim: add svelte support
This commit is contained in:
parent
077ce16f56
commit
8c72f9ac9b
|
@ -46,6 +46,9 @@
|
|||
# Vue
|
||||
nodePackages.volar
|
||||
|
||||
# Svelte
|
||||
nodePackages.svelte-language-server
|
||||
|
||||
# YAML
|
||||
yaml-language-server
|
||||
];
|
||||
|
|
|
@ -56,6 +56,7 @@ return {
|
|||
"marksman",
|
||||
"nil_ls",
|
||||
"rust_analyzer",
|
||||
"svelte",
|
||||
"taplo",
|
||||
"tsserver",
|
||||
"volar",
|
||||
|
@ -91,19 +92,28 @@ return {
|
|||
event = { "CursorHold", "CursorHoldI" },
|
||||
-- the rest of the autocmd options (:h nvim_create_autocmd)
|
||||
desc = "Document Highlighting",
|
||||
callback = function() vim.lsp.buf.document_highlight() end,
|
||||
callback = function()
|
||||
vim.lsp.buf.document_highlight()
|
||||
end,
|
||||
},
|
||||
{
|
||||
event = { "CursorMoved", "CursorMovedI", "BufLeave" },
|
||||
desc = "Document Highlighting Clear",
|
||||
callback = function() vim.lsp.buf.clear_references() end,
|
||||
callback = function()
|
||||
vim.lsp.buf.clear_references()
|
||||
end,
|
||||
},
|
||||
},
|
||||
},
|
||||
-- mappings to be set up on attaching of a language server
|
||||
mappings = {
|
||||
n = {
|
||||
gl = { function() vim.diagnostic.open_float() end, desc = "Hover diagnostics" },
|
||||
gl = {
|
||||
function()
|
||||
vim.diagnostic.open_float()
|
||||
end,
|
||||
desc = "Hover diagnostics",
|
||||
},
|
||||
-- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean
|
||||
-- gD = {
|
||||
-- function() vim.lsp.buf.declaration() end,
|
||||
|
|
Loading…
Reference in a new issue