Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: cleanup root patterns #2906

Merged
merged 11 commits into from
Nov 21, 2023

Conversation

emilioziniades
Copy link
Contributor

@emilioziniades emilioziniades commented Nov 19, 2023

Simplify root_dir in multiple language server configurations where root patterns needed to be prioritised. util.root_pattern now prioritises root patterns provided first - see #2885.

Closes #2904

@emilioziniades emilioziniades marked this pull request as draft November 19, 2023 08:27
@emilioziniades emilioziniades force-pushed the feature/cleanup-root-patterns branch from f8fbbf4 to afd6441 Compare November 19, 2023 08:38
@emilioziniades emilioziniades marked this pull request as ready for review November 19, 2023 08:43
@emilioziniades
Copy link
Contributor Author

@glepnir, @justinmk as discussed.

@@ -27,7 +24,7 @@ require'lspconfig'.cairo_ls.setup{}
*cairo-language-server is still under active development, some features might not work yet !*
]],
default_config = {
root_dir = [[root_pattern("package.json", "tsconfig.json", "jsconfig.json", ".git")]],
root_dir = [[root_pattern("Scarb.toml", "cairo_project.toml", ".git")]],
Copy link
Member

@justinmk justinmk Nov 20, 2023

Choose a reason for hiding this comment

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

were the "package.json", "tsconfig.json" entries accidental?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I assume so. The docs didn't match the root_dir field above so I just updated the two to match whilst I was in there.

Copy link
Member

@justinmk justinmk left a comment

Choose a reason for hiding this comment

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

Thank you for driving this topic to the right solution!

@justinmk justinmk merged commit 0d220f9 into neovim:master Nov 21, 2023
9 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cleanup lsp config with new root_dir behaviour
3 participants