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

Initial Ada language support #7791

Closed
wants to merge 4 commits into from

Conversation

tomekw
Copy link

@tomekw tomekw commented Jul 31, 2023

languages.toml Show resolved Hide resolved
@tomekw
Copy link
Author

tomekw commented Jul 31, 2023

☝️ @briot ty for the grammar! Any ideas how to add the indent queries as well?

@archseer
Copy link
Member

What's the compile time on this? We had to drop the old tree-sitter-ada grammar that was under the official tree-sitter org because it took too long to compile and had various issues.

@tomekw
Copy link
Author

tomekw commented Jul 31, 2023

@archseer I’ve no idea TBH. How can I check this?

@briot
Copy link

briot commented Jul 31, 2023 via email

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.

The links to nvim documentation should also be removed, that could be confusing for anyone reading the files

languages.toml Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

The captures here should be adjusted to the ones that Helix uses: https://docs.helix-editor.com/master/themes.html#syntax-highlighting

For example @conditional should become @keyword.control.conditional, @number should become @constant.numeric, etc.

runtime/queries/ada/highlights.scm Outdated Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

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

The captures here should follow tree-sitter's locals capture names: @local.scope, @local.reference and @local.definition https://tree-sitter.github.io/tree-sitter/syntax-highlighting#local-variables

Copy link
Author

Choose a reason for hiding this comment

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

Oh, I don't think I know that much, or anything really, about Tree Sitter to do that properly. I need to do some reading and find some time to do it. Unless there is someone else willing to chip in.

Copy link
Member

Choose a reason for hiding this comment

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

See the textobjects docs, Helix has a different set of textobject captures than nvim: https://docs.helix-editor.com/master/guides/textobject.html

@the-mikedavis
Copy link
Member

Looking at the state counts in the parser.c, this grammar seems larger than average but not as huge as something like tree-sitter-elixir. On-disk I see the so as 327kb and the compilation time of hx -g build of just the ada grammar seems very normal to me.

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.

Running cargo xtask docgen and committing the changes will fix the docs CI

languages.toml Outdated Show resolved Hide resolved
tomekw and others added 3 commits August 1, 2023 10:07
@swork1 swork1 mentioned this pull request Aug 7, 2023
@the-mikedavis the-mikedavis added S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. A-language-support Area: Support for programming/text languages labels Feb 10, 2024
@KhazAkar
Copy link
Contributor

Would this PR also take into consideration .gpr file support with ada language-server running with --language-gpr flag?

@pascalkuthe
Copy link
Member

closed by #9908

@pascalkuthe pascalkuthe closed this Apr 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants