helix icon indicating copy to clipboard operation
helix copied to clipboard

Initial Ada language support

Open tomekw opened this issue 11 months ago • 5 comments

Tree-Sitter grammar and queries from: https://github.com/briot/tree-sitter-ada

Language server from: https://github.com/AdaCore/ada_language_server

Ada build tool: https://alire.ada.dev

tomekw avatar Jul 31 '23 14:07 tomekw

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

tomekw avatar Jul 31 '23 14:07 tomekw

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.

archseer avatar Jul 31 '23 14:07 archseer

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

tomekw avatar Jul 31 '23 14:07 tomekw

I just did a quick check:

cargo clean ❯ time cargo build    Compiling memchr v2.5.0    Compiling cc v1.0.73    Compiling regex-syntax v0.6.27    Compiling tree-sitter v0.20.9    Compiling tree-sitter-ada v0.0.1 (/home/briot/tree-sitter-ada)    Compiling aho-corasick v0.7.19    Compiling regex v1.6.0     Finished dev [unoptimized + debuginfo] target(s) in 3.14s cargo build  10.27s user 1.09s system 357% cpu 3.179 total

So 3s total, when all packages have been downloaded already (and these are dependencies from tree-sitter itself, so would apply to all languages that you want to support).

I have not investigated the indentation queries (not sure that neovim, which is my editor of choice) supports them properly yet.

Emmanuel

briot avatar Jul 31 '23 14:07 briot

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.

the-mikedavis avatar Jul 31 '23 22:07 the-mikedavis

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

KhazAkar avatar Mar 12 '24 20:03 KhazAkar

closed by https://github.com/helix-editor/helix/pull/9908

pascalkuthe avatar Apr 08 '24 02:04 pascalkuthe