diff options
| author | Titouan CREACH <titouancreach@users.noreply.github.com> | 2023-07-26 09:31:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-07-26 15:31:23 +0800 |
| commit | b6091272422bb0fbd729f7f5d17a56d37499c54f (patch) | |
| tree | 2764877bd9b3343fe58506ad9e95c22f41ff6380 /lua | |
| parent | fix(rust_analyzer): check active clients is empty (#2734) (diff) | |
| download | nvim-lspconfig-b6091272422bb0fbd729f7f5d17a56d37499c54f.tar nvim-lspconfig-b6091272422bb0fbd729f7f5d17a56d37499c54f.tar.gz nvim-lspconfig-b6091272422bb0fbd729f7f5d17a56d37499c54f.tar.bz2 nvim-lspconfig-b6091272422bb0fbd729f7f5d17a56d37499c54f.tar.lz nvim-lspconfig-b6091272422bb0fbd729f7f5d17a56d37499c54f.tar.xz nvim-lspconfig-b6091272422bb0fbd729f7f5d17a56d37499c54f.tar.zst nvim-lspconfig-b6091272422bb0fbd729f7f5d17a56d37499c54f.zip | |
feat(omnisharp): find root directory for .csx scripts (#2715)
* feat(omnisharp): find root directory for .csx scripts
* feat(omnisharp): use a table instead of a inlined if
* feat(omnisharp): remove not needed for range loop
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/server_configurations/omnisharp.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/lspconfig/server_configurations/omnisharp.lua b/lua/lspconfig/server_configurations/omnisharp.lua index f86cbddb..8703cc81 100644 --- a/lua/lspconfig/server_configurations/omnisharp.lua +++ b/lua/lspconfig/server_configurations/omnisharp.lua @@ -39,7 +39,8 @@ return { filetypes = { 'cs', 'vb' }, root_dir = function(fname) - return util.root_pattern '*.sln'(fname) or util.root_pattern '*.csproj'(fname) + local root_patterns = { '*.sln', '*.csproj', 'omnisharp.json', 'function.json' } + return util.root_pattern(root_patterns)(fname) end, on_new_config = function(new_config, _) -- Get the initially configured value of `cmd` |
