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

remarkls: make root_dir more restrictive #2405

Merged
merged 3 commits into from
May 6, 2023
Merged

Conversation

Murderlon
Copy link
Contributor

@Murderlon Murderlon commented Jan 18, 2023

  • Make root_dir more restrictive

The problem currently is that every time I type a single character, this message pops up aggressively and it switches focus to the pop-up: https://github.com/unifiedjs/unified-language-server/blob/4380a0ffbab401d42e679d2c620aa5b042cfc319/lib/index.js#L201-L210

There is no way to stop this. I have to run :LspStop remarkls manually in projects that have markdown but don't use remark (which is most projects).

Instead, we look for actual configuration files and only start the LS if they are present. The downside is that remark can also be configured in package.json, which wouldn't work with this change (would have to be documented)

Alternatives

  • Remove the warning in unified-language-server.
  • Only show the warning once. As this warning is triggered in the creation phase of the language server, this probably works correctly in other editors but not in neovim.

@remcohaszing @wooorm thoughts?

@remcohaszing
Copy link
Contributor

#43 is supposed to solve it bu introducing the requireConfig language server option, but I stopped working on it for a while, because I was having problems to resolve the remaining quirks.

If I’m correct, it works, but the tests need to be adjusted. This requires to replay some complex scenarios, like an initial value, and changing it. I would love to pick it up again, but my focus is elsewhere at the moment. Any help is welcome.

I don’t think mdx should be added as a file type (yet), as unified-engine doesn’t currently support differentiating between different file contexts. (unifiedjs/unified-engine#56)

@glepnir glepnir merged commit f3d80d5 into neovim:master May 6, 2023
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

Successfully merging this pull request may close these issues.

4 participants