Skip to content

Commit

Permalink
fix(csharp_ls): update root directory pattern
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilio Ziniades committed Nov 10, 2023
1 parent b085221 commit d5c1af3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/lspconfig/server_configurations/csharp_ls.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'csharp-ls' },
root_dir = util.root_pattern('*.sln', '*.csproj', '*.fsproj', '.git'),
root_dir = function(startpath)
return util.root_pattern '*.sln'(startpath)
or util.root_pattern '*.csproj'(startpath)
or util.root_pattern '*.fsproj'(startpath)
or util.root_pattern '.git'(startpath)
end,
filetypes = { 'cs' },
init_options = {
AutomaticWorkspaceInit = true,
Expand Down

0 comments on commit d5c1af3

Please sign in to comment.