diff options
| author | numToStr <24727447+numToStr@users.noreply.github.com> | 2022-08-26 18:19:52 +0530 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-26 20:49:52 +0800 |
| commit | 21ab062ffe51ce342c083d1586f5877a4e412ac5 (patch) | |
| tree | 5c04d60368bc6c984b3e047b5c5cabaf0060eca5 /lua | |
| parent | fix: remove the config.commands (#2092) (diff) | |
| download | nvim-lspconfig-21ab062ffe51ce342c083d1586f5877a4e412ac5.tar nvim-lspconfig-21ab062ffe51ce342c083d1586f5877a4e412ac5.tar.gz nvim-lspconfig-21ab062ffe51ce342c083d1586f5877a4e412ac5.tar.bz2 nvim-lspconfig-21ab062ffe51ce342c083d1586f5877a4e412ac5.tar.lz nvim-lspconfig-21ab062ffe51ce342c083d1586f5877a4e412ac5.tar.xz nvim-lspconfig-21ab062ffe51ce342c083d1586f5877a4e412ac5.tar.zst nvim-lspconfig-21ab062ffe51ce342c083d1586f5877a4e412ac5.zip | |
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`.
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/angularls.lua | 6 |
1 files changed, 3 insertions, 3 deletions
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")]], }, }, } |
