Commit Graph

73 Commits (8d335f63f00755c33721b656f289357d3bd5dfb7)

Author SHA1 Message Date
Erin van der Veen 9616477197
Add Nickel language (#2173) 2 years ago
Danillo Melo be656c14e3
Ruby TextObjects and more file extensions (#2143) 2 years ago
Thomas 2eca2901f3
Pipe typable command (#1972)
Co-authored-by: DeviousStoat <devious@stoat.com>
2 years ago
EmmChriss 50df924811
gdscript support (#1985) 2 years ago
Jared Ramirez 460e6a857b
feat(languages): SQL (#2097) 2 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.
2 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.
2 years ago
Omnikar 660e0e44b2
Add `:write!` to create nonexistent subdirectories (#1839)
* Make `:write` create nonexistent subdirectories

Prompting as to whether this should take place remains a TODO.

* Move subdirectory creation to new `w!` command
2 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.
2 years ago
Kurenshe Nurdaulet 0b410b0a16
Add default language server for Vue (#2043) 2 years ago
unrelentingtech 7f461895b0
Add language server command for OCaml (#2035) 2 years ago
Aaron Housh 9caf7c0d5a
Add swift language (#2033) 2 years ago
Karl Grasegger 8e12fd5290
PHP roots and languageserver improvements (#2031)
Co-authored-by: Karl Grasegger <karl.grasegger@gebruederheitz.de>
2 years ago
David 61d1684a32
Add default language server for CSS (#2025) 2 years ago
David 22629ca211
Add default language server for JSON (#2024) 2 years ago
David b5efb9d66c
Add default language server for HTML (#2018) 2 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
2 years ago
VuiMuich eb84d9493c
add language `ron` (#1925) 2 years ago
Roland Kovacs d962e06e91
Add runtime language configuration (#1794) (#1866)
* Add runtime language configuration (#1794)

* Add set-language typable command to change the language of current buffer.
* Add completer for available language options.

* Update set-language to refresh language server as well

* Add language id based config lookup on `syntax::Loader`.
* Add `Document::set_language3` to set programming language based on language
  id.
* Update `Editor::refresh_language_server` to try language detection only if
  language is not already set.

* Remove language detection from Editor::refresh_language_server

* Move document language detection to where the scratch buffer is saved.
* Rename Document::set_language3 to Document::set_language_by_language_id.

* Remove unnecessary clone in completers::language
2 years ago
Dr. David A. Kunz 9782204f73
Add typed commands buffer-next and buffer-previous (#1940) 2 years ago
Lauri Gustafsson e4561d1dde
Add texlab language server for latex (#1922) 2 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`.
2 years ago
Michael Davis 7cd6050235 add tree-sitter-gleam 2 years ago
Michael Davis e2a50711d5 update tree-sitter-erlang
changes:

- typed fields within records which do not declare a default
  value are now correctly highlighted as record fields
- the EEP49 'maybe' form is now parsed
- fixes for highlights for 'begin' and 'after' tokens
2 years ago
Joe bee05dd32a
Add refresh-config and open-config command (#1803)
* Add refresh-config and open-config command

* clippy

* Use dynamic dispatch for editor config

* Refactor Result::Ok to Ok

* Remove unused import

* cargo fmt

* Modify config error handling

* cargo xtask docgen

* impl display for ConfigLoadError

* cargo fmt

* Put keymaps behind dyn access, refactor config.load()

* Update command names

* Update helix-term/src/application.rs

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* Switch to unbounded_channel

* Remove --edit-config command

* Update configuration docs

* Revert "Put keymaps behind dyn access", too hard

This reverts commit 06bad8cf492b9331d0a2d1e9242f3ad4e2c1cf79.

* Add refresh for keys

* Refactor default_keymaps, fix config default, add test

* swap -> store, remove unneeded clone

* cargo fmt

* Rename default_keymaps to default

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Slin Lee 3e78b8fdad
Add syntax highlighting for Solidity (#1854) 2 years ago
Slin Lee 3c79bf5117
Add LSP support for Solidity (#1848)
* Add LSP support for Solidity

This requires a recent version of Solidity 0.8.11+

* Add Solidity to docs

* Update the docs
2 years ago
zetashift 7eb013c6fb
Initial basic Org markup support thanks to tree-sitter-org (#1845) 2 years ago
Joe c0dbd6dc3f
Add horizontal and vertical split scratch buffers (#1763)
Make subcommand name more descriptive

Fix vsplit completer

Run cargo xtask docgen
2 years ago
Aaron Housh 0712eb3e3b
Add csharp lsp support (#1788)
* add csharp lsp support

* remove hostPID

* update docs
2 years ago
Michael Daffin a76e94848a
Add terraform lsp support (#1726)
Using terraform-ls and enables auto-formate support. Also adds tfvars as an extra filetype.
2 years ago
Daniel S Poulin 78d37fd332
Implement bulk buffer closing commands (#1677)
* Implement buffer-close-all

* Implement buffer-close-others

* Refactor all buffer close variants to use shared logic

* Fix clippy lint

* Docgen for new commands

* Shorten error message for attempting to close buffers that don't exist

* Refactor shared buffer methods to pass only editor, not whole compositor

* Switch signature of bulk buffer closing to use slice of DocumentIds

Addresses feedback that accepting an IntoIterator implementor is too
much for an internal. Also possibly saves some moving?
2 years ago
Michael Daffin 93ec42d06e
Add support for HCL language (#1705)
Queries based on the neovims ones: https://github.com/nvim-treesitter/nvim-treesitter/tree/master/queries/hcl and modified for helix support.
2 years ago
Michael Daffin f83843ceba
Add kotlin language (#1689)
* Add kotlin language

Queries taken from https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/kotlin seem to work well enough for my needs though I don't use kotlin heavily.

* Update lang-support doc

* Updates the kotlin highlight query to use helixs scopes

* Updates the queries from PR feedback

* Adds 'shallow = true' to gitmodules

* Removes kotlin locals.scm

* Remove blank line

Co-authored-by: Ivan Tham <pickfire@riseup.net>

Co-authored-by: Ivan Tham <pickfire@riseup.net>
2 years ago
Michael Davis 3a83a764e3
add tree-sitter-erlang (#1657) 2 years ago
Gokul Soumya 59acee308d
Add new dap commands to docs (#1660) 2 years ago
Jared Ramirez f5b95beef6
feat(languages): rescript (#1616)
* Add rescript language support

* cargo xtask docgen

* Add textobjects & file line ending

* Fix text objects & rerun docgen

* Fix textobjects queries
2 years ago
Daniel S Poulin d6b6ad879e
epocsquadron/add tree sitter twig (#1602)
* Add tree-sitter-twig grammer and highlights

The gammar itself is quite basic, but is much better than nothing
for working with real files consisting mostly of html.

* Docgen for newly added grammar
2 years ago
Daniel S Poulin e2833b5853
Add textobjects queries for php (#1601)
* Add textobjects queries for php

* Missing EOL fix

* Update generated docs after adding textobjects to php
2 years ago
Michael Davis 7bce91556a
add tree-sitter-iex (#1576)
* add tree-sitter-iex

* run docgen task

* fix url for iex submodule
2 years ago
Kyra a8e69e12f4
Add haskell-language-server-wrapper --lsp to default `languages.toml` (#1556)
After the changes to upgrade and reenable tree-sitter-haskell #1417
for the purpose of enabling Haskell syntax highlighting #1384, we
might as well take the final step.
2 years ago
Jared Ramirez 0b55b21f30
feat(languages): GraphQL (#1515)
* Add Graphql language support

* Fix docs gen

* Add JS Graphql injection query

* Updates based on PR feedback

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2 years ago
Michael Davis f453f8724d
change show_subtree command into ':tree-sitter-subtree' typable command (#1524)
* add default keymap for show_subtree command

* remove space+t keymap

* add a typable command ':show-subtree'

* generate documentation for ':show-subtree'

* remove non-typable show_subtree command

* ':show-subtree'->':tree-sitter-subtree'
2 years ago
Jared Ramirez b2c8aa1ee7
feat(languages): Elm (#1514)
* Add Elm language support

* Fix docs gen

* Updates based on PR feedback
2 years ago
Anders Christiansen Sørby 8ea5742b08
feat(languages): Lean experimental tree-sitter-lean (#1422)
* Add experimental tree-sitter-lean

* Run docgen

* Copy over the queries from lean.nvim

* Update .gitmodules

Co-authored-by: Ivan Tham <pickfire@riseup.net>

* Update lean highlights and run docgen

* Update runtime/queries/lean/injections.scm

Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>

* Lean: Move variable matcher to bottom

* Update runtime/queries/lean/locals.scm

Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>

Co-authored-by: Ivan Tham <pickfire@riseup.net>
Co-authored-by: Michael Davis <michael.davis@nfiindustries.com>
2 years ago
Kirawi a7b0cc730c
Re-enable haskell in languages.toml (#1520) 2 years ago
Michael Davis e0a99ae51a
add tree-sitter-git-config (#1426)
* add tree-sitter-git-config

* add todo comment for improving filetype check
2 years ago
Eric Crosson 1c6bc6d455 feat: add tree-sitter-make
This commit adds syntax highlighting for GNU Make[^1] makefiles
via tree-sitter-make[^2].

[^1]: https://www.gnu.org/software/make/
[^2]: https://github.com/alemuller/tree-sitter-make
3 years ago
Kevin Sjöberg 5e22694865
Add default language server for JavaScript (#1457)
* Add default language server for JavaScript

* Update lang support documentation
3 years ago
Michael Davis a8fd33ac01
add tree-sitter-regex (#1362)
* add tree-sitter-regex

* adapt regex highlights from upstream

* inject regex into elixir sigil_r/2 and sigil_R/2

* generate lang-support docs

* capture interesting nodes in character-ranges

* make $.character_class captures more consistent

* fix fallthrough behavior for character classes

* capture pattern characters as 'string'

* use latest tree-sitter-regex

* set elixir regex injections as combined

* add link to upstream queries

* inject regex in rust into 'Regex::new' raw string literals
3 years ago