add bcr specific vtsls config

This commit is contained in:
Thomas Ruoff
2025-05-28 23:49:30 +02:00
parent 274af8ef0a
commit 3e51ed0ad9

View File

@@ -201,6 +201,26 @@ return {
-- ts_ls = {}, -- ts_ls = {},
-- --
vtsls = {
root_dir = function(bufnr, cb)
local fname = vim.api.nvim_buf_get_name(bufnr)
if fname:find 'frontend%-apps/bcr/core/public' then
-- yes, so use the core root
local root = vim.fs.root(fname, { 'apps/core/public/' })
cb(root)
elseif fname:find 'frontend%-apps/bcr' then
-- am I in core?
local root = vim.fs.root(fname, { 'apps/' })
cb(root)
else
local default_markers = { 'tsconfig.json', 'package.json', 'jsconfig.json', '.git' }
local root = vim.fs.root(fname, default_markers)
cb(root)
end
end,
},
lua_ls = { lua_ls = {
-- cmd = { ... }, -- cmd = { ... },
-- filetypes = { ... }, -- filetypes = { ... },