Commit Graph

298 Commits (001e4e304b6177148b8a74a222e0d02b91f53a11)

Author SHA1 Message Date
Michael Davis e61c0b461c
Update tree-sitter-org (#3489)
The update fixes a bug that caused the external scanner to hang during
error recovery.

Looking at the diff, there are no structural changes in this update.
There are a few new fields and it looks like some edge-case fixes
but nothing that breaks compatibility with the current queries.
2 years ago
Alexander Brevig aef00a3ab6
feat: add taskwarrior to languages so `task N edit` is nice (#3468)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
jdrst 9b0fd51318
removes deprecated stdio flag for omnisharp (#3480) 2 years ago
Michael Davis 254d558907
Update tree-sitter-swift (#3461) 2 years ago
Joshua Suskalo d192d59753
Update Clojure language definition (#3387) 2 years ago
Erasin 921027fb32
Update tree-sitter-latex and highlights (#3370)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Kyle L. Davis 4ce5a94552
Add language: beancount (#3297)
Co-authored-by: erasin <erasinoo@gmail.com>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
Co-authored-by: Erasin <erasinoo@gmail.com>
2 years ago
Erasin f09d2bc56b Add slint-ui support
<https://slint-ui.com/>
lsp: <https://github.com/slint-ui/slint/tree/HEAD/tools/lsp>
tree-sitter-slint: <https://github.com/jrmoulton/tree-sitter-slint>
2 years ago
Matthias Deiml ea04220874
Use split_parser branch for markdown grammar (#3108) 2 years ago
PiergiorgioZagaria 219d2c2515
Change default formatter for any language (#2942)
* Change default formatter for any language

* Fix clippy error

* Close stdin for Stdio formatters

* Better indentation and pattern matching

* Return Result<Option<...>> for fn format instead of Option

* Remove unwrap for stdin

* Handle FormatterErrors instead of Result<Option<...>>

* Use Transaction instead of LspFormatting

* Use Transaction directly in Document::format

* Perform stdin type formatting asynchronously

* Rename formatter.type values to kebab-case

* Debug format for displaying io::ErrorKind (msrv fix)

* Solve conflict?

* Use only stdio type formatters

* Remove FormatterType enum

* Remove old comment

* Check if the formatter exited correctly

* Add formatter configuration to the book

* Avoid allocations when writing to stdin and formatting errors

* Remove unused import

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2 years ago
Banst 7e06681413
feat: add cue support (#3262) 2 years ago
Erasin 919edfb323
Add Graphviz Dot lang support (#3241)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Ricardo Silva 2f1d3d0899
Add LSP config for Odin (#3214) 2 years ago
Kirawi 0a2646e720
Improve python highlighting (#3103)
* improve python queries

* update python grammar to `0.20.2`

* fix variadic parameter scope

* add punctuation scopes

* fix order of punctuation scopes

* undo  `embedded` delete
2 years ago
Daniel Longeuay 2ede98c4b4
feat(tree-sitter): add go template support (#3091)
* feat(tree-sitter):  add go template support

* fix(tree-sitter): 🐛 go template highlight scope selectors

* chore(tree-sitter): 🔧 update go template grammar commit
2 years ago
Joe d6fd93788c
Add rabl/jbuilder/jb extensions for Ruby (#3173)
* Add rabl and jbuilder

* Add jb
2 years ago
Andrey Tkachenko 1b3a10d906
Add `vh` verilog header file type to `file-types` (#3158) 2 years ago
Clay e560212ec5
Gleam: add support for built-in language server (#3139)
* Add gleam lsp support

* Docgen gleam lsp support
2 years ago
Joe 43761d426c
Remove .git extension from SCSS tree-sitter repo url (#3089) 2 years ago
Joe 0c9594e41e
Add SCSS language support (#3074) 2 years ago
Philipp Mildenberger e97b8607c1
Added ungrammar language support (#3048) 2 years ago
Austen LeBeau 0cb0c30618
add fortran language (#3025) 2 years ago
Erin van der Veen e0cf19c612
Update tree-sitter-nickel (#2987) 2 years ago
Ivan Tham b612211070
Update tree-sitter-ledger (#2936) 2 years ago
Michael Davis aacd0c8aa5
Update TSQ queries (#2960)
A few changes to make TSQ highlights better:

* A parsing error has been fixed in the grammar itself
    * Previously tree-sitter-tsq did not parse the variables
      in predicates like `(#set! injection.language "javascript")`
* Theme nodes as `tag`
    * The newly added node to the parser (from the above fix) is
      `variable` which takes over the `variable` capture from nodes
* Highlight known predicates as `function` and unsupported
  predicates as `error`
    * This may help when translating queries from nvim-treesitter.
      For example `#any-of?` is a common one used in nvim-treesitter
      queries but not implemented in Helix or tree-sitter-cli.
* Inject tree-sitter-regex into `#match?` predicates
2 years ago
Matthew Toohey d78354c537
add language `idris` (#2971) 2 years ago
0rphee e58d28a972
Add Haskell roots (#2954) 2 years ago
rsteube 4c30a3609a
languages: added elvish (#2948) 2 years ago
Michael Davis c5600c9c01 markdown: limit raw block highlight to code fence content 2 years ago
Michael Davis bf1aa8876c git-commit: fix highlight edge cases
* branch message with current branch and diverged branch has been
  added to the parser
* scissors used in verbose commits are marked as a punctuation
  delimiter
    * we could use comment instead since they're visually the
      same but IMO this works better
2 years ago
Michael Davis a890c4a64d tsq: update parser to fix escaping double quotes
This includes a fix for the new HTML highlights introduced a few
parent commits back:

    ["\"" (attribute_name)] @string

Would get tripped up and the entire line would be highlighted as
a string. Now `\"` is a valid escape.

I'm switching to my fork as the primary repo as the upstream hasn't
been touched in over a year (mostly because stability afaict) but
it has no watchers currently so I'm not hopeful that my PR will
be merged.
2 years ago
Michael Davis d8f036f0a9 erlang: update parser for fix on remote calls 2 years ago
Michael Davis 199a2460ca make: add injection-regex 2 years ago
Michael Davis beb19fe1bd bash: expand injection-regex to common shells 2 years ago
Michael Davis 64cf4c859b
support Bazel languages (#2903) 2 years ago
Kihaya Sugiura 24351c20d4
languages: Fix ruby rakefile and gemfile file type (#2875) 2 years ago
Hekno25 33e6df8707
feat: add wgsl_analyzer as wgsl language server (#2872) 2 years ago
Erin van der Veen b365f2d614
update tree-sitter-nickel to include ' in ident (#2859)
see https://github.com/nickel-lang/tree-sitter-nickel/pull/9
and  https://github.com/tweag/nickel/pull/737
2 years ago
Clay b13e534b92
HEEx: upgrade version and support new special_attribute node (#2800) 2 years ago
Axot 4d604d3b50
Add clojure language support (#2780)
Co-authored-by: Mateusz Ledwoń <mateusz.ledwon@iteo.com>
2 years ago
Ivan 0bc7259672
add prisma tree-sitter and lsp support (#2703)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Clay f37ffaa3a1
elixirLS disable dialyzer by default (#2710)
Not all Elixir projects use dialyzer and it can cause the editor
to slow down quite a bit on large projects if the PLT is not built.

See https://github.com/elixir-lsp/elixir-ls#dialyzer-integration=
2 years ago
Michael Davis 7a9147489e add textobject queries for erlang 2 years ago
farwyler f0d1c85553
support for openscad (#2680)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Michael Davis fd4858c03d
add tree-sitter-jsdoc (#2650) 2 years ago
Michael Davis 42d780b103
add tree-sitter-edoc (#2640)
* add tree-sitter-edoc

* fix escape character capture in markdown queries

* add field negation operator "!" to tsq highlights
2 years ago
Fanda Vacek 8d4c954060
CPON parser supports unsigned int (#2643)
Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>
2 years ago
Timothy DeHerrera eba82250bb
feat(lang): Update Nix grammar & improve queries (#2472) 2 years ago
pancake 7706a4a0d8
Add Vlang tree-sitter in the languages.toml (#2526)
Co-authored-by: pancake <pancake@nopcode.org>
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Michael Davis 82da9bd4f2 update Erlang grammar and queries
The update to the grammar itself covers the case where the document
is a single expression without a trailing newline such as "min(A, B)".
A small change to the parser now parses these expressions correctly
which improves the display of the function head in the signature
help popup.

The update to the queries marks 'andalso', 'orelse', 'not', etc. as
`@keyword.operator` which improves the look - it looks odd to see
operators that are words highlighted the same as tokens like '->'
or '=:='.
2 years ago
Michael Davis 45dd54082e update Gleam grammar and queries
With respect to the queries:

The locals scope for functions was not large enough, so a function's
parameter could outlive the function body. To fix it, we just widen
the scope to the `function` node.

See also https://github.com/gleam-lang/tree-sitter-gleam/issues/25

With respect to the parser:

An external scanner has been added that fixes the parsing of strings.
Previously, a comment inside a string would act like a comment rather
than string contents.

See also https://github.com/gleam-lang/tree-sitter-gleam/issues/14#issuecomment-1129263640

A new constructor node has been added as well which makes type
highlighting more fine grained.

See also https://github.com/gleam-lang/tree-sitter-gleam/pull/29
2 years ago
Andrey Tkachenko 67fe16008e
Basic verilog support (#2552) 2 years ago
Erasin 386dccc84e
Add lua lsp (#2560) 2 years ago
Blaž Hrastnik d25bae844c
Add Scheme support
Skipped scm for now :/ it overlaps with tree-sitter-tsq
2 years ago
Jacob Thompson e8e252648f
Added a default lsp server for Java in languages.toml (#2511)
* Added a default lsp server for Java in languages.toml

* Added a default lsp server for Java in languages.toml cont.

Co-authored-by: Jacob Thompson <a01657923@usu.edu>
2 years ago
midnightexigent 8493b5fca6
Add tree-sitter ssh client config queries (#2498)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
2 years ago
Alexis Geoffrey 595213ca74
Change default Hare tab width to 8 (#2480) 2 years ago
spindlebink af387e6873
Default to tabs instead of spaces for Odin files (#2464) 3 years ago
unrelentingtech 2cb1ea7127
feat(lang): add Meson language support (#2314)
https://mesonbuild.com/Syntax.html
3 years ago
Yt ae19aaf1a6
languages: add inc files to php (#2440) 3 years ago
Fanda Vacek 76d55c0d9e
Cpon support tree sitter version bumped (#2424)
Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>
3 years ago
Robert Walter 495ba40eaf
feat(languages): add odin language (#2399) 3 years ago
Ben Lee-Cohen 2f240b018e
Adding the global gitignore to the default (#2410) 3 years ago
Matthew Toohey a5f4925f53
feat(languages): git-ignore and git-attributes (#2397) 3 years ago
Pavel Borzenkov f1a77370cf
feat(languages): detect 't' as perl (#2395) 3 years ago
Matthew Toohey 25d128b5b3
feat(languages): detect cjs as javascript (#2387) 3 years ago
Fanda Vacek 1668183590
feat(lang): Cpon lang support (#2355)
Co-authored-by: Fanda Vacek <fvacek@elektroline.cz>
3 years ago
Blaž Hrastnik 73879052c1
Add Cairo support 3 years ago
unrelentingtech 8e77e3388c
feat(lang): add devicetree (Flattened Device Tree Source) (#2329) 3 years ago
Erin van der Veen 21487d13fd
feat(lang): Update nickel to include "rec" keyword (#2320) 3 years ago
Alexis Kalabura 2e46961886
feat(lsp): add toml lsp (#2302) 3 years ago
meak 1a3d6252b9
feat(lang): add hare language support (#2289)
Co-authored-by: Mehdi Katranji <hello@mek.yt>
3 years ago
ttys3 a8cb46680d
feat(lsp): add vala language support (#2243) 3 years ago
Lukas 5ca8dfe57c
fix(lsp): divide hcl into seperate languages (#2244) 3 years ago
Lukas 1c1ba006ae
feat(lsp): add yaml lsp (#2234) 3 years ago
Justin Ma 5c2570582b
feat(lang): add nushell language support (#2225)
Co-authored-by: Michael Davis <mcarsondavis@gmail.com>
3 years ago
ttys3 4144c9d2f2
feat(lang): add go.mod and go.work support (#2197) 3 years ago
ttys3 8d335f63f0
chore(filetype): bash and hcl file type add more common used extensions or files (#2201) 3 years ago
Erin van der Veen 9616477197
Add Nickel language (#2173) 3 years ago
Danillo Melo be656c14e3
Ruby TextObjects and more file extensions (#2143) 3 years ago
Michael Davis ad36a024da
Update tree-sitters Erlang and HEEx (#2149) 3 years ago
Evan Lecklider 450f348925
Add make file-type "mk" to languages.toml (#2120) 3 years ago
EmmChriss 50df924811
gdscript support (#1985) 3 years ago
Jared Ramirez 460e6a857b
feat(languages): SQL (#2097) 3 years ago
Michael Davis 4836bb38d3 add tree-sitter-heex
HEEx is a templating engine on top of Elixir's EEx templating
language specific to HTML that is included in Phoenix.LiveView
(though I think the plan is to eventually include it in base
Phoenix). It's a superset of EEx with some additional features
like components and slots.

The injections don't work perfectly because the Elixir grammar is
newline sensitive (the _terminator rule). See
https://github.com/elixir-lang/tree-sitter-elixir/issues/24
for more information.
3 years ago
Michael Davis 9d095e0fdc add tree-sitter-eex
EEx is an templating language for Elixir. Since the incremental
parsing refactor we can used combined injections which allows us
to add EEx support.
3 years ago
Michael Davis 8c3c90198a update tree-sitter-elixir
The new revision handles a case that I come across often: a stab
clause (i.e. '->') with an empty right hand side:

    Enum.map(xs, fn x ->
    end)

The old version would parse the "end" token as an error.

This is technically valid syntax but more importantly it comes up
very often when editing, and the old revision would flicker between
the keyword highlight and the warning highlight.
3 years ago
Michael Davis 3d79c60a1f
Rewrite Language Support docs (#2065) 3 years ago
Michael Davis 494306ad7a
add tree-sitter-embedded-template (erb & ejs) (#2055)
After the incremental parsing rewrite for injections (which was released
in 22.03 https://helix-editor.com/news/release-22-03-highlights/#incremental-injection-parsing-rewrite),
we can now do combined injections which lets us pull in some templating
grammars. The most notable of those is embedded-template - a pretty
straightforward grammar that covers ERB and EJS.

The grammar and highlights queries are shared between the two but they have
different injections.
3 years ago
Kurenshe Nurdaulet 0b410b0a16
Add default language server for Vue (#2043) 3 years ago
unrelentingtech 7f461895b0
Add language server command for OCaml (#2035) 3 years ago
Aaron Housh 9caf7c0d5a
Add swift language (#2033) 3 years ago
Karl Grasegger 8e12fd5290
PHP roots and languageserver improvements (#2031)
Co-authored-by: Karl Grasegger <karl.grasegger@gebruederheitz.de>
3 years ago
David 61d1684a32
Add default language server for CSS (#2025) 3 years ago
David 22629ca211
Add default language server for JSON (#2024) 3 years ago
David b5efb9d66c
Add default language server for HTML (#2018) 3 years ago
Matthew Toohey 31c468ab95
add languages `r` and `rmarkdown` (#1998)
* add languages `r` and `rmarkdown`

* r: fix highlights

* rmarkdown: add eof in queries

* rmarkdown: update lang-support.md

* r: fix highlight query precedence
3 years ago
VuiMuich eb84d9493c
add language `ron` (#1925) 3 years ago
Lauri Gustafsson e4561d1dde
Add texlab language server for latex (#1922) 3 years ago
Michael Davis ffdc2f1793
separate JSX queries from javascript (#1921)
It looks like a24fb17b2a (and
855e438f55) broke the typescript
highlights because typescript

    ; inherits: javascript

but it doesn't have those named nodes in its grammar.

So instead we can separate out JSX into its own language and copy
over everything from javascript and supplement it with the new
JSX highlights. Luckily there isn't too much duplication, just the
language configuration parts - we can re-use the parser with the
languages.toml `grammar` key and most of the queries with `inherits`.
3 years ago