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

error shown on every keystroke when file is not included in project #86

Open
joprice opened this issue Aug 1, 2024 · 2 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@joprice
Copy link

joprice commented Aug 1, 2024

Describe the bug

When the LSP has trouble loading a file, for instance when it's not included in one of the discovered projects, an error is shown on every keystroke. Ideally, this would only happen once on initialization, as it makes it difficult to interact with the file or even to exit vim, since even dismissing the error with the escape key will cause it to retrigger.

And example error, where SOME_FILENAME is the fully qualified path:

ionide: -32603: [SOME_FILENAME] in LoadedProjects. Have the projects loaded yet
 or have you tried restoring your project/solution?

I'm hitting this currently while trying out Myriad code generation, which has the more specific problem of the original MyriadFile not being found by fsautocomplete.

To Reproduce

Open a file not included in an fsproj.

Expected behaviour

The error should be shown a single time on initialization to avoid interrupting workflows that are in an intermediate state (adding a new file to a project) or are not currently supported by fsautocomplete for whatever reason (such as the Myriad situation mentioned above).

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • OS: OSX
  • Vim / Neovim version: v0.10.0
  • dotnet SDK version: 8.0.303
@joprice joprice added the bug Something isn't working label Aug 1, 2024
@joprice
Copy link
Author

joprice commented Aug 1, 2024

For the myriad issue I mentioned, I had things misconfigured so don't have a persistent problem with the file not being part of the project, but still curious about whether the error could be made less jarring when trying to add new files or a project is in a temporary broken state.

@cannorin
Copy link
Member

cannorin commented Sep 3, 2024

I think this is difficult to address since it is very natural for Neovim's LSP client to display an error whenever the LSP server reports it. I would have to add a hook to ignore a certain kind of LSP server error (Have the projects loaded yet in this case), which I haven't figured out how.

@cannorin cannorin added enhancement New feature or request and removed bug Something isn't working labels Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants