Skip to content

Commit f47cd68

Browse files
authored
fix(svelte): use augroup to avoid creating multiple autocmds #3964
1 parent cf8b8e8 commit f47cd68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lsp/svelte.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ return {
2525
-- See https://github.com/sveltejs/language-tools/issues/2008
2626
vim.api.nvim_create_autocmd('BufWritePost', {
2727
pattern = { '*.js', '*.ts' },
28-
buffer = bufnr,
28+
group = vim.api.nvim_create_augroup('svelte_js_ts_file_watch', {}),
2929
callback = function(ctx)
3030
-- internal API to sync changes that have not yet been saved to the file system
3131
client:notify('$/onDidChangeTsOrJsFile', { uri = ctx.match })

0 commit comments

Comments
 (0)