Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow LSP to start in absence of a solution file #87

Closed
ppebb opened this issue Nov 19, 2024 · 4 comments
Closed

Allow LSP to start in absence of a solution file #87

ppebb opened this issue Nov 19, 2024 · 4 comments

Comments

@ppebb
Copy link

ppebb commented Nov 19, 2024

This was brought up on the original repository in this issue: jmederosalvarado#7.

Given that this was never implemented, I would like to bring attention to it again. I do not mind doing it myself as long as the feature is welcome, but I wanted to clarify first before submitting a PR.

@seblyng
Copy link
Owner

seblyng commented Nov 19, 2024

I have already been supporting that for months?

mparq added a commit to mparq/roslyn.nvim that referenced this issue Nov 19, 2024
The condition `not sln or not csproj` in sln.utils.root_dir
was causing roslyn not to attach to cs buffer if one of
.csproj or .sln was not found via `vim.fs.root_dir`

This behavior was introduced relatively recently in
d121ca7

The fix updates the condition to allow for only one of these being
found (the rest of the code already seems to account for it). After
updating the condition, find_files_with_extension(sln, ".sln") was
breaking as well, so I wrapped those calls in their own separate
conditions based on if .csproj or .sln root directories were found.

Existing github issue: seblyng#87
@mparq
Copy link

mparq commented Nov 19, 2024

It looks like a recent change may have broken this behavior (I ran into this too). I pushed a PR to fix it - not too familiar with this codebase but the change seems pretty contained.

@seblyng
Copy link
Owner

seblyng commented Nov 19, 2024

Ah of course that makes sense. I just quickly looked at your PR and I made a mistake in my refactoring.

Will check it more out later after work

mparq added a commit to mparq/roslyn.nvim that referenced this issue Nov 19, 2024
The condition `not sln or not csproj` in sln.utils.root_dir
was causing roslyn not to attach to cs buffer if one of
.csproj or .sln was not found via `vim.fs.root_dir`

This behavior was introduced relatively recently in
d121ca7

The fix updates the condition to allow for only one of these being
found (the rest of the code already seems to account for it). After
updating the condition, find_files_with_extension(sln, ".sln") was
breaking as well, so I wrapped those calls in their own separate
conditions based on if .csproj or .sln root directories were found.

Existing github issue: seblyng#87

address pr feedback: early return on no sln
@seblyng
Copy link
Owner

seblyng commented Nov 19, 2024

Sorry for the bug! Should be fixed now

@seblyng seblyng closed this as completed Nov 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants