diff --git a/lua/lazyvim/plugins/extras/lang/svelte.lua b/lua/lazyvim/plugins/extras/lang/svelte.lua index 4319b509..cf824dda 100644 --- a/lua/lazyvim/plugins/extras/lang/svelte.lua +++ b/lua/lazyvim/plugins/extras/lang/svelte.lua @@ -27,7 +27,28 @@ return { "neovim/nvim-lspconfig", opts = { servers = { - svelte = {}, + svelte = { + keys = { + { + "co", + function() + vim.lsp.buf.code_action({ + apply = true, + context = { + only = { "source.organizeImports" }, + diagnostics = {}, + }, + }) + end, + desc = "Organize Imports", + }, + }, + capabilities = { + workspace = { + didChangeWatchedFiles = vim.fn.has("nvim-0.10") == 0 and { dynamicRegistration = true }, + }, + }, + }, }, }, }, @@ -45,4 +66,14 @@ return { }) end, }, + + { + "stevearc/conform.nvim", + optional = true, + opts = { + formatters_by_ft = { + ["svelte"] = { "prettier" }, + }, + }, + }, }