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

Add required-root-patterns for situational lsp activation #8696

Merged
merged 9 commits into from
Feb 12, 2024

Conversation

ontley
Copy link
Contributor

@ontley ontley commented Nov 2, 2023

Closes #8505

Adds the optional required-root-patterns config option to language-servers,
and only activates the language server if one or more glob patterns from required-root-patterns are found inside the language server's root directory

@kirawi kirawi added the A-helix-term Area: Helix term improvements label Nov 4, 2023
pascalkuthe
pascalkuthe previously approved these changes Jan 8, 2024
@pascalkuthe
Copy link
Member

I don't love having to add another config option but I think the usecase is clearly there in more fragmented ecosystems (Javascript)

@pascalkuthe pascalkuthe added C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much A-language-server Area: Language server client S-waiting-on-review Status: Awaiting review from a maintainer. and removed A-helix-term Area: Helix term improvements labels Jan 8, 2024
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

helix-core/src/syntax.rs Outdated Show resolved Hide resolved
helix-lsp/src/lib.rs Outdated Show resolved Hide resolved
@ontley
Copy link
Contributor Author

ontley commented Feb 9, 2024

Why is cargo fmt --all --check failing? Running locally doesn't output anything, and I ran cargo fmt before the last commit.

@the-mikedavis
Copy link
Member

Are you using the rustfmt from the 1.70.0 toolchain? We have rustfmt and clippy locked on that toolchain: https://github.com/helix-editor/helix/blob/master/rust-toolchain.toml

I believe using rustfmt through rustup should fix the version problem

This reverts commit ca8ce12.
Copy link
Member

@the-mikedavis the-mikedavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@the-mikedavis the-mikedavis changed the title Added required-root-patterns for situational lsp activation Add required-root-patterns for situational lsp activation Feb 9, 2024
@pascalkuthe pascalkuthe merged commit 6a90166 into helix-editor:master Feb 12, 2024
6 checks passed
@ontley ontley deleted the situational-lsp branch February 13, 2024 11:43
cosmikwolf pushed a commit to cosmikwolf/helix that referenced this pull request Feb 26, 2024
…or#8696)

* Added required-root-patterns for situational lsp activation using globbing

* Replaced filter_map with flatten

* updated book to include required-root-patterns option

* fixed wrong function name for path

* Added globset to helix-core. Moved globset building to config parsing.

* Normalize implements AsRef

* cargo fmt

* Revert "cargo fmt"

This reverts commit ca8ce12.
postsolar pushed a commit to postsolar/helix that referenced this pull request Apr 4, 2024
…or#8696)

* Added required-root-patterns for situational lsp activation using globbing

* Replaced filter_map with flatten

* updated book to include required-root-patterns option

* fixed wrong function name for path

* Added globset to helix-core. Moved globset building to config parsing.

* Normalize implements AsRef

* cargo fmt

* Revert "cargo fmt"

This reverts commit ca8ce12.
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 2, 2024
…or#8696)

* Added required-root-patterns for situational lsp activation using globbing

* Replaced filter_map with flatten

* updated book to include required-root-patterns option

* fixed wrong function name for path

* Added globset to helix-core. Moved globset building to config parsing.

* Normalize implements AsRef

* cargo fmt

* Revert "cargo fmt"

This reverts commit ca8ce12.
Vulpesx pushed a commit to Vulpesx/helix that referenced this pull request Jun 7, 2024
…or#8696)

* Added required-root-patterns for situational lsp activation using globbing

* Replaced filter_map with flatten

* updated book to include required-root-patterns option

* fixed wrong function name for path

* Added globset to helix-core. Moved globset building to config parsing.

* Normalize implements AsRef

* cargo fmt

* Revert "cargo fmt"

This reverts commit ca8ce12.
smortime pushed a commit to smortime/helix that referenced this pull request Jul 10, 2024
…or#8696)

* Added required-root-patterns for situational lsp activation using globbing

* Replaced filter_map with flatten

* updated book to include required-root-patterns option

* fixed wrong function name for path

* Added globset to helix-core. Moved globset building to config parsing.

* Normalize implements AsRef

* cargo fmt

* Revert "cargo fmt"

This reverts commit ca8ce12.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-server Area: Language server client C-enhancement Category: Improvements E-easy Call for participation: Experience needed to fix: Easy / not much S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Situational LSP on same file extension
4 participants