summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Mora Unie Youer <[email protected]>2025-05-07 17:40:10 +0300
committerLibravatar Mora Unie Youer <[email protected]>2025-05-07 17:40:10 +0300
commitd9fe9f8da33d23c2647ecc4edf73617bf19f50f0 (patch)
tree66d7b4e654e5a45bf096661ae2b3f951e4c6181c
parentfeat: add `typescript-language-server` (diff)
downloadneovim-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
Diffstat (limited to '')
-rw-r--r--flake.nix1
-rw-r--r--lsp/biome.lua14
-rw-r--r--lua/config/lsp.lua1
-rw-r--r--lua/config/plugins/formatting.lua9
4 files changed, 25 insertions, 0 deletions
diff --git a/flake.nix b/flake.nix
index a57f257..65a317a 100644
--- a/flake.nix
+++ b/flake.nix
@@ -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" },
},
})