-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Initial Nim language support #6123
Conversation
Hmm, seems alaviss is working on a rewrite. I'm going to port the queries to aMOPel's repository to get a better sense of how they work, and then possibly re-port them back to alaviss's repo once it's done. |
@the-mikedavis This is ready to merge. May I request a review? |
languages.toml
Outdated
injection-regex = "nim" | ||
file-types = ["nim", "nims", "nimble"] | ||
shebangs = [] | ||
roots = ["*.nimble"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't currently support globs or regexes for roots. We might need something more powerful for Nim: from what I can see, Nim uses <projectname>.nimble
for the manifest?
For now you can leave this as roots = []
and Helix will use the .git
directory as the root.
@the-mikedavis I rebased on master and did some refactoring based on changes to upstream. This is now ready to merge (more than before). There are a few known bugs:
But that's it, as far as I've been able to test. Everything else is highlighted correctly. |
Oh - indents are bugged, I think. |
(ping @the-mikedavis) |
Could you add a note on the Nim language server to the language server wiki? https://github.com/helix-editor/helix/wiki/How-to-install-the-default-language-servers |
Supercedes #3492.
I've not been able to find comprehensive tree-sitter documentation: and so the queries are mostly modelled after preexisting schemes of other languages.
Before this PR is merged, I'd like to:
cargo xtask docgen
)After this PR is merged, I'd like to:
Help get alavass/tree-sitter-nim into a more complete stateedit: aMOPel/tree-sitter-nim is now good enoughResources: