mirror of
https://github.com/kossLAN/nvim-flake.git
synced 2025-11-04 17:59:50 -05:00
feat: svelte language server
This commit is contained in:
parent
33120b06c2
commit
1269c35828
2 changed files with 18 additions and 0 deletions
|
|
@ -111,6 +111,7 @@ with final.pkgs.lib; let
|
||||||
qt6.qtdeclarative # qmlls
|
qt6.qtdeclarative # qmlls
|
||||||
omnisharp-roslyn # c# lsp
|
omnisharp-roslyn # c# lsp
|
||||||
dart # dart lsp
|
dart # dart lsp
|
||||||
|
svelte-language-server # svelte lsp
|
||||||
|
|
||||||
# autoformatters
|
# autoformatters
|
||||||
alejandra # amazing nix autoformatter
|
alejandra # amazing nix autoformatter
|
||||||
|
|
|
||||||
17
nvim/ftplugin/svelte.lua
Normal file
17
nvim/ftplugin/svelte.lua
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
if vim.fn.executable('svelte-language-server') ~= 1 then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local root_files = {
|
||||||
|
'.git',
|
||||||
|
}
|
||||||
|
|
||||||
|
local lsp = require('user.lsp')
|
||||||
|
|
||||||
|
vim.lsp.start {
|
||||||
|
name = 'svelte',
|
||||||
|
cmd = { 'svelte-language-server', '--stdio' },
|
||||||
|
root_dir = vim.fs.dirname(vim.fs.find(root_files, { upward = true })[1]),
|
||||||
|
capabilities = lsp.make_client_capabilities(),
|
||||||
|
on_attach = lsp.on_attach,
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue