From 21ab062ffe51ce342c083d1586f5877a4e412ac5 Mon Sep 17 00:00:00 2001 From: numToStr <24727447+numToStr@users.noreply.github.com> Date: Fri, 26 Aug 2022 18:19:52 +0530 Subject: fix(angularls): remove `.git` from `root_dir` (#2091) Having `.git` as a pattern also enables `angularls` for non-angular projects which is not desired. Checking for only `angular.json` should be enough as every angular project must have a `angular.json`. --- lua/lspconfig/server_configurations/angularls.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lua') diff --git a/lua/lspconfig/server_configurations/angularls.lua b/lua/lspconfig/server_configurations/angularls.lua index 4d30de71..32507350 100644 --- a/lua/lspconfig/server_configurations/angularls.lua +++ b/lua/lspconfig/server_configurations/angularls.lua @@ -30,10 +30,10 @@ return { default_config = { cmd = cmd, filetypes = { 'typescript', 'html', 'typescriptreact', 'typescript.tsx' }, - -- Check for angular.json or .git first since that is the root of the project. + -- Check for angular.json since that is the root of the project. -- Don't check for tsconfig.json or package.json since there are multiple of these -- in an angular monorepo setup. - root_dir = util.root_pattern('angular.json', '.git'), + root_dir = util.root_pattern 'angular.json', }, on_new_config = function(new_config, new_root_dir) local new_probe_dir = get_probe_dir(new_root_dir) @@ -69,7 +69,7 @@ require'lspconfig'.angularls.setup{ ``` ]], default_config = { - root_dir = [[root_pattern("angular.json", ".git")]], + root_dir = [[root_pattern("angular.json")]], }, }, } -- cgit v1.2.3-70-g09d2