diff --git a/modules/capabilities/neovim/default.nix b/modules/capabilities/neovim/default.nix index 745d3b6..3f66871 100644 --- a/modules/capabilities/neovim/default.nix +++ b/modules/capabilities/neovim/default.nix @@ -47,8 +47,6 @@ in nixd nixfmt dafny - prettier - prettierd vscode-langservers-extracted tailwindcss-language-server rust-analyzer @@ -64,6 +62,7 @@ in oxlint oxfmt emmet-language-server + svelte-language-server ]; specs = { diff --git a/modules/capabilities/neovim/lua-config/lua/plugins/formatting.lua b/modules/capabilities/neovim/lua-config/lua/plugins/formatting.lua index f99ad75..2b1ee8e 100644 --- a/modules/capabilities/neovim/lua-config/lua/plugins/formatting.lua +++ b/modules/capabilities/neovim/lua-config/lua/plugins/formatting.lua @@ -14,7 +14,9 @@ require("lz.n").load({ }, }, after = function() - local prettier = { "prettierd", "prettier", stop_after_first = true } + -- Conform's built-in oxfmt formatter searches upwards for + -- node_modules/.bin/oxfmt before falling back to the wrapped binary. + local oxfmt = { "oxfmt" } require("conform").setup({ notify_on_error = true, @@ -30,17 +32,18 @@ require("lz.n").load({ end end, formatters_by_ft = { - javascript = prettier, - javascriptreact = prettier, - typescript = prettier, - typescriptreact = prettier, - json = prettier, - jsonc = prettier, - css = prettier, - scss = prettier, - less = prettier, - html = prettier, - markdown = prettier, + javascript = oxfmt, + javascriptreact = oxfmt, + typescript = oxfmt, + typescriptreact = oxfmt, + json = oxfmt, + jsonc = oxfmt, + css = oxfmt, + scss = oxfmt, + less = oxfmt, + html = oxfmt, + markdown = oxfmt, + svelte = oxfmt, lua = { "stylua" }, python = { "ruff_fix", "ruff_format", "ruff_organize_imports" }, toml = { "taplo" }, diff --git a/modules/capabilities/neovim/lua-config/lua/plugins/lsp.lua b/modules/capabilities/neovim/lua-config/lua/plugins/lsp.lua index 0210edd..9ee2ed9 100644 --- a/modules/capabilities/neovim/lua-config/lua/plugins/lsp.lua +++ b/modules/capabilities/neovim/lua-config/lua/plugins/lsp.lua @@ -228,6 +228,7 @@ require("lz.n").load({ vim.lsp.enable("ty") vim.lsp.enable("ruff") vim.lsp.enable("astro") + vim.lsp.enable("svelte") vim.lsp.config("tinymist", { settings = {