aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIgor Lacerda <igorlfs@ufmg.br>2025-07-18 22:43:57 -0300
committerGitHub <noreply@github.com>2025-07-18 18:43:57 -0700
commit33898a06457b1074a3846958233d29c9ee191cb5 (patch)
treec262c33fe6c9918cc56d0e0bbba53a842b6e796c
parentdocs: update configs.md (diff)
downloadnvim-lspconfig-33898a06457b1074a3846958233d29c9ee191cb5.tar
nvim-lspconfig-33898a06457b1074a3846958233d29c9ee191cb5.tar.gz
nvim-lspconfig-33898a06457b1074a3846958233d29c9ee191cb5.tar.bz2
nvim-lspconfig-33898a06457b1074a3846958233d29c9ee191cb5.tar.lz
nvim-lspconfig-33898a06457b1074a3846958233d29c9ee191cb5.tar.xz
nvim-lspconfig-33898a06457b1074a3846958233d29c9ee191cb5.tar.zst
nvim-lspconfig-33898a06457b1074a3846958233d29c9ee191cb5.zip
feat(biome): use project-local bin if available #3957
-rw-r--r--lsp/biome.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/lsp/biome.lua b/lsp/biome.lua
index e7c23074..c6975cc5 100644
--- a/lsp/biome.lua
+++ b/lsp/biome.lua
@@ -10,7 +10,14 @@
local util = require 'lspconfig.util'
return {
- cmd = { 'biome', 'lsp-proxy' },
+ cmd = function(dispatchers, config)
+ local cmd = 'biome'
+ local local_cmd = config.root_dir and config.root_dir .. '/node_modules/.bin/biome'
+ if local_cmd and vim.fn.executable(local_cmd) == 1 then
+ cmd = local_cmd
+ end
+ return vim.lsp.rpc.start({ cmd, 'lsp-proxy' }, dispatchers)
+ end,
filetypes = {
'astro',
'css',