mirror of
https://github.com/josean-dev/dev-environment-files.git
synced 2025-01-08 01:11:12 +01:00
Added autocmd for svelte lsp to fix problem with ts file changes
This commit is contained in:
parent
b58f100b2b
commit
98892b75ad
1 changed files with 14 additions and 3 deletions
|
@ -78,8 +78,8 @@ return {
|
||||||
|
|
||||||
-- configure typescript server with plugin
|
-- configure typescript server with plugin
|
||||||
lspconfig["tsserver"].setup({
|
lspconfig["tsserver"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = on_attach,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure css server
|
-- configure css server
|
||||||
|
@ -97,7 +97,18 @@ return {
|
||||||
-- configure svelte server
|
-- configure svelte server
|
||||||
lspconfig["svelte"].setup({
|
lspconfig["svelte"].setup({
|
||||||
capabilities = capabilities,
|
capabilities = capabilities,
|
||||||
on_attach = on_attach,
|
on_attach = function(client, bufnr)
|
||||||
|
on_attach(client, bufnr)
|
||||||
|
|
||||||
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
||||||
|
pattern = { "*.js", "*.ts" },
|
||||||
|
callback = function(ctx)
|
||||||
|
if client.name == "svelte" then
|
||||||
|
client.notify("$/onDidChangeTsOrJsFile", { uri = ctx.file })
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
-- configure prisma orm server
|
-- configure prisma orm server
|
||||||
|
|
Loading…
Reference in a new issue