add svelte BufWritePost notify autocmd

This commit is contained in:
2025-07-11 23:43:34 +02:00
parent 78f42f8523
commit 32d8426cb2

View File

@@ -185,4 +185,13 @@ vim.lsp.config.svelte = {
didChangeWatchedFiles = { dynamicRegistration = true },
},
},
on_attach = function(client)
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = { "*.svelte", "*.js", "*.ts" },
group = vim.api.nvim_create_augroup("svelte_ondidchangetsorjsfile", { clear = true }),
callback = function(ctx)
client.notify(client, "$/onDidChangeTsOrJsFile", { uri = ctx.match })
end,
})
end
}