diff options
| author | Pasi Bergman <pasi.bergman@iki.fi> | 2021-07-17 17:37:01 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-17 07:37:01 -0700 |
| commit | bc1ee597b184ec53aa95b7ce49057d4eceb7bd33 (patch) | |
| tree | 8ebdeb416a68a9bdf3c3880051e6ba643682d88a | |
| parent | [docgen] Update CONFIG.md (diff) | |
| download | nvim-lspconfig-bc1ee597b184ec53aa95b7ce49057d4eceb7bd33.tar nvim-lspconfig-bc1ee597b184ec53aa95b7ce49057d4eceb7bd33.tar.gz nvim-lspconfig-bc1ee597b184ec53aa95b7ce49057d4eceb7bd33.tar.bz2 nvim-lspconfig-bc1ee597b184ec53aa95b7ce49057d4eceb7bd33.tar.lz nvim-lspconfig-bc1ee597b184ec53aa95b7ce49057d4eceb7bd33.tar.xz nvim-lspconfig-bc1ee597b184ec53aa95b7ce49057d4eceb7bd33.tar.zst nvim-lspconfig-bc1ee597b184ec53aa95b7ce49057d4eceb7bd33.zip | |
fix(omnisharp): proritize .sln over .csproj for root detection
| -rw-r--r-- | lua/lspconfig/omnisharp.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/lspconfig/omnisharp.lua b/lua/lspconfig/omnisharp.lua index fcba1be5..335f75f7 100644 --- a/lua/lspconfig/omnisharp.lua +++ b/lua/lspconfig/omnisharp.lua @@ -5,7 +5,9 @@ local server_name = 'omnisharp' configs[server_name] = { default_config = { filetypes = { 'cs', 'vb' }, - root_dir = util.root_pattern('*.csproj', '*.sln'), + root_dir = function(fname) + return util.root_pattern '*.sln'(fname) or util.root_pattern '*.csproj'(fname) + end, init_options = {}, }, -- on_new_config = function(new_config) end; @@ -40,7 +42,7 @@ find /path/to/omnisharp-osx | xargs xattr -r -d com.apple.quarantine ``` ]], default_config = { - root_dir = [[root_pattern(".csproj", ".sln")]], + root_dir = [[root_pattern(".sln") or root_pattern(".csproj")]], }, }, } |
