diff --git a/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua b/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua index a819e96..618a0ab 100644 --- a/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua +++ b/.config/nvim/lua/josean/plugins/lsp/lspconfig.lua @@ -78,8 +78,8 @@ return { -- configure typescript server with plugin lspconfig["tsserver"].setup({ - capabilities = capabilities, - on_attach = on_attach, + capabilities = capabilities, + on_attach = on_attach, }) -- configure css server @@ -97,7 +97,18 @@ return { -- configure svelte server lspconfig["svelte"].setup({ 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