diff options
| author | 2025-05-07 17:40:10 +0300 | |
|---|---|---|
| committer | 2025-05-07 17:40:10 +0300 | |
| commit | d9fe9f8da33d23c2647ecc4edf73617bf19f50f0 (patch) | |
| tree | 66d7b4e654e5a45bf096661ae2b3f951e4c6181c | |
| parent | feat: add `typescript-language-server` (diff) | |
| download | neovim-configuration-d9fe9f8da33d23c2647ecc4edf73617bf19f50f0.tar.gz neovim-configuration-d9fe9f8da33d23c2647ecc4edf73617bf19f50f0.tar.bz2 neovim-configuration-d9fe9f8da33d23c2647ecc4edf73617bf19f50f0.tar.lz neovim-configuration-d9fe9f8da33d23c2647ecc4edf73617bf19f50f0.tar.xz neovim-configuration-d9fe9f8da33d23c2647ecc4edf73617bf19f50f0.tar.zst neovim-configuration-d9fe9f8da33d23c2647ecc4edf73617bf19f50f0.zip | |
feat: add `biome` as LSP client and formatter
| -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" }, }, }) |
