Skip to content

Commit

Permalink
fix(csharp-ls): csharp-ls uses solution file for project root first
Browse files Browse the repository at this point in the history
  • Loading branch information
rudiejd committed Jan 1, 2024
1 parent 9bedcfe commit ed089fc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 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,10 @@ local util = require 'lspconfig.util'
return {
default_config = {
cmd = { 'csharp-ls' },
root_dir = util.root_pattern('*.sln', '*.csproj', '*.fsproj', '.git'),
root_dir = function (fname)
return util.root_pattern '*.sln' (fname)
or util.root_pattern '*.csproj' (fname)
end,
filetypes = { 'cs' },
init_options = {
AutomaticWorkspaceInit = true,
Expand Down

0 comments on commit ed089fc

Please sign in to comment.