From 149c66a3d94cc943815838ca3544d8eef2bfbabc Mon Sep 17 00:00:00 2001 From: id3nom <45928251+id3nom@users.noreply.github.com> Date: Sat, 21 Sep 2024 08:06:23 -0400 Subject: fix(c3): update c3 root pattern (#3309) * fix: add C3 library support fix(c3_lsp): update root directory to be able to handle project in the following order - a C3 project 'project.json', a library '.c3l' dir, and ancestor 'git' repo. --------- Co-authored-by: Justin M. Keyes Co-authored-by: glepnir --- lua/lspconfig/server_configurations/c3_lsp.lua | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/c3_lsp.lua b/lua/lspconfig/server_configurations/c3_lsp.lua index 9c2b15da..e1d84aa4 100644 --- a/lua/lspconfig/server_configurations/c3_lsp.lua +++ b/lua/lspconfig/server_configurations/c3_lsp.lua @@ -4,7 +4,7 @@ return { default_config = { cmd = { 'c3lsp' }, root_dir = function(fname) - return util.root_pattern { 'project.json', '.git' }(fname) + return util.root_patttern { 'project.json', 'manifest.json', '.git' }(fname) end, filetypes = { 'c3', 'c3i' }, }, @@ -13,9 +13,6 @@ return { https://github.com/pherrymason/c3-lsp Language Server for c3. - ]], - default_config = { - root_dir = [[root_pattern("project.json", ".git")]], - }, +]], }, } -- cgit v1.2.3-70-g09d2