diff options
Diffstat (limited to '')
-rw-r--r-- | flake.nix | 1 | ||||
-rw-r--r-- | lsp/biome.lua | 14 | ||||
-rw-r--r-- | lua/config/lsp.lua | 1 | ||||
-rw-r--r-- | lua/config/plugins/formatting.lua | 9 |
4 files changed, 25 insertions, 0 deletions
@@ -152,6 +152,7 @@ ]; typescript = [ + biome typescript-language-server ]; }; diff --git a/lsp/biome.lua b/lsp/biome.lua new file mode 100644 index 0000000..b55de9d --- /dev/null +++ b/lsp/biome.lua @@ -0,0 +1,14 @@ +return { + cmd = { "biome", "lsp-proxy" }, + root_markers = { "package.json", "biome.json", "biome.jsonc" }, + filetypes = { + "json", + "jsonc", + "javascript", + "javascriptreact", + "javascript.jsx", + "typescript", + "typescriptreact", + "typescript.tsx", + }, +} diff --git a/lua/config/lsp.lua b/lua/config/lsp.lua index 3bb36e2..4cbf797 100644 --- a/lua/config/lsp.lua +++ b/lua/config/lsp.lua @@ -12,5 +12,6 @@ vim.lsp.enable({ "rust-analyzer", + "biome", "typescript-language-server", }) diff --git a/lua/config/plugins/formatting.lua b/lua/config/plugins/formatting.lua index 9563905..6efe5d2 100644 --- a/lua/config/plugins/formatting.lua +++ b/lua/config/plugins/formatting.lua @@ -10,6 +10,15 @@ return { lua = { "stylua" }, nix = { "nixfmt" }, rust = { "rustfmt", lsp_format = "fallback" }, + + json = { "biome" }, + jsonc = { "biome" }, + javascript = { "biome" }, + javascriptreact = { "biome" }, + ["javascript.jsx"] = { "biome" }, + typescript = { "biome" }, + typescriptreact = { "biome" }, + ["typescript.jsx"] = { "biome" }, }, }) |