* 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
This commit builds on #1460, #1571, and others, adding the .zshenv
file and all files with the zsh extension to the file-types using
bash syntax-highlighting.
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.
* 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>
* 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>
* add show_subtree command for viewing tree-sitter subtree in Popup
* remove '.slice(..)' from show_subtree command
* name docs and subtree Popups 'hover'
* 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
* Add injection regex for more languages
To support embedding them in other languages like markdown.
* Add llvm-mir highlighting
LLVM Machine IR is dumped as yaml files that can embed LLVM IR and
Machine IR.
To support this, add a llvm-mir-yaml language that uses the yaml
parser, but uses different injections to highlight IR and MIR.
* Update submodule with fixed multiline comments
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Add a tree-sitter grammar and highlights for TableGen files.
TableGen and its grammar are described here:
https://llvm.org/docs/TableGen/index.html
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* add submodule on tree-sitter-rebase, add to languages
* add basic highlights query
* inject bash in execute statements
* update tree-sitter-rebase
* tree-sitter-rebase->tree-sitter-git-rebase
* get injection working with tree-sitter-git-commit
* set scope under source.gitrebase
* unset include-children on commit message injections
* Revert "unset include-children on commit message injections"
This reverts commit 2ecee155ea8e229651920b291062c2ee84b47944.
* fix generated language docs
* use rebase_command scopes from tree-sitter-git-commit
* add submodule on tree-sitter-git-diff
* add git-diff highlights
* inject git-diff into git-commit
* update tree-sitter-git-commit with fix for bad diff case
* add git-diff to language support docs
* include-children in diff injections
This ensures that children nodes of $.message are included in the
injection, such as $.user or issue/pr numbers. Without this change,
diffs containing '#' or '@' characters can trip up the injection and
be parsed separately.
See https://github.com/helix-editor/helix/pull/1373#issuecomment-1001215629
* set diff language's scope as source.diff
Many folks use `.dockerfile` as an extension for dockerfiles in addition to plain `Dockerfile`. This change associates both file extensions with dockerfile syntax highlighting
* allow language.config (in languages.toml) to be passed in as a toml object
* Change config field for languages from json string to toml object
* remove indents on languages.toml config
* fix: remove patch version from serde_json import in helix-core
* Use same tree-sitter-zig as upstream/master
* fix(completion_popup): Fixes#1256
* Update helix-term/src/ui/completion.rs
* feat(languages): Add support for `Dockerfile`s
* docs(cargo-xtask-docgen):
* improvement(langs-dockerfile): Add `injection-regex` to `languages.toml` for
`Dockerfile`
* improvement(langs-dockerfile): Add injections.scm
* Update .gitmodules
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Add language: dart
The setup requires that dart be in the users path, such as:
```
export PATH="$HOME/Android/flutter/bin/cache/dart-sdk/bin/:$PATH"
```
Refactor the dart highlights
* lang: dart: add indents and locals
* lang: dart: corrections to local scope
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
In the PHP community, 4 spaces is widely considered the default, as
it is recommended by the PSR-2 and PSR-12 standards, as well as popular
derivative standards like those for Laravel and Symphony.
* add submodule on tree-sitter/tree-sitter-tsq
mark tsq submodule as shallow
* add tree-sitter-tsq to languages
* add highlight queries for tsq
* Update .gitmodules
Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* allow language.config (in languages.toml) to be passed in as a toml object
* Change config field for languages from json string to toml object
* remove indents on languages.toml config
* fix: remove patch version from serde_json import in helix-core
* Use same tree-sitter-zig as upstream/master
As discussed in #809 ; I also have a [tree-sitter implementation](https://github.com/jamesnvc/tree-sitter-prolog), but for reasons discussed in the linked post, I kind of gave up on that sort of static approach for making a general-purpose Prolog grammar (since it has a very flexible syntax and allows defining new operators with new precedences dynamically).
That being said, the LSP implementation here at least shows documentation and does support the semantic token API, so when Helix supports that, this should also provide highlighting.
* Added option to provide a custom config file to the lsp.
* Simplified lsp loading routine with anyhow
* Moved config to language.toml
* Fixed test case
* Cargo fmt
* Revert now-useless changes
* Renamed custom_config to config
Co-authored-by: Cor <prive@corpeters.nl>