helix-editor / helix

A post-modern modal text editor.
https://helix-editor.com
Mozilla Public License 2.0
34.03k stars 2.52k forks source link

Support spade-lang #9438

Open nyabinary opened 10 months ago

nyabinary commented 10 months ago

Spade is a relatively new hardware description language that is inspired by Rust & Clash. Homepage: https://spade-lang.org/ Gitlab: https://gitlab.com/spade-lang/spade

kirawi commented 10 months ago

The tree-sitter repository is at https://gitlab.com/spade-lang/tree-sitter-spade

TheZoq2 commented 10 months ago

:wave: Spade author here

I used helix for a few weeks before I moved back to nvim, but this means I have a config that works and I never upstreamed. I should probably change that

[[language]]
name = "spade"
scope = "source.spade"
roots = ["swim.toml"]
file-types = ['spade']
comment-token = "//"

[[grammar]]
name = "spade"
source = {path = "/home/frans/Documents/spade/tree-sitter-spade"}

and the queries are here:

https://github.com/TheZoq2/helix/commit/71a2beaeee5db9dba989dbc43663a6462ab6ed78

(though now that helix and nvim queries are more similar to each other, it might be better to take the queries from https://gitlab.com/spade-lang/spade-vim/-/blob/master/queries/spade/highlights.scm?ref_type=heads which I'm more actively maintaining)

adsnaider commented 4 days ago

Would love to get some basic language support with syntax highlighting. Anything I can do to help?

TheZoq2 commented 2 days ago

My PR for this was merged last week, so I guess it should be included in the next release :) https://github.com/helix-editor/helix/pull/11448