Commit Graph

91 Commits (6c11708fb30cd394f136d7ed2807bc92bd67dfad)

Author SHA1 Message Date
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
Michael Davis 7bce91556a
add tree-sitter-iex (#1576)
* add tree-sitter-iex

* run docgen task

* fix url for iex submodule
2 years ago
Eric Crosson 0ad7561135
Enable tree-sitter for .zshenv and zsh files (#1574)
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.
2 years ago
chunghha a4fffaed9f
Enable tree-sitter for .bash_profile (#1571) 2 years ago
Blaž Hrastnik 7d510429c5 Enable tree-sitter for .zshrc and .bashrc
Closes #1460
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
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
Michael Davis 64d3e7b705
add show_subtree command for viewing tree-sitter subtree in Popup (#1453)
* add show_subtree command for viewing tree-sitter subtree in Popup

* remove '.slice(..)' from show_subtree command

* name docs and subtree Popups 'hover'
2 years ago
Kirawi a7b0cc730c
Re-enable haskell in languages.toml (#1520) 2 years ago
Kevin Sjöberg 3a34036310
Use the correct language ID for JavaScript & TypeScript (#1466)
* Use correct language ID for JavaScript/TypeScript

* Add missing slash

* Only calculate fallback when needed
2 years ago
Matouš Dzivjak ac6b2de0fd
feat(languages): enable css tree-sitter for scss files (#1507)
The grammer works fine for scss files to and it is better than no hihglighting at all
2 years ago
Alexis Mousset f80da7b4de
Add pom.xml as maven root directory marker (#1496) 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
Sebastian Neubauer 641255ccc8
Add llvm-mir highlighting (#1398)
* 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>
3 years ago
Sebastian Neubauer 8f2af71340
Add LLVM TableGen highlighting (#1409)
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>
3 years ago
Alexis Mousset 8a019b423f
Detect workspace root using language markers (#1370)
* Detect workspace root using language markers

* Avoid allocating root_markers

* Update helix-core/src/lib.rs

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

* Update helix-core/src/lib.rs

Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Kirawi <67773714+kirawi@users.noreply.github.com>
3 years ago
Michael Davis 8fda87af2b
add tree-sitter-git-rebase (#1402)
* 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 2ecee155ea.

* fix generated language docs

* use rebase_command scopes from tree-sitter-git-commit
3 years ago
Michael Davis bcf3808e97
Add tree-sitter-git-diff (#1373)
* 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
3 years ago
Michael Davis c3fb86cbaa tree-sitter-gitcommit->tree-sitter-git-commit 3 years ago
Michael Davis fd31662b70 add gitcommit grammar and language configuration 3 years ago
Laurențiu Nicola 13d804418f
Enable Rust proc macro support (#1350) 3 years ago
Dylan Richardson 34766e242a
languages: add .dockerfile extension (#1330)
Many folks use `.dockerfile` as an extension for dockerfiles in addition to plain `Dockerfile`. This change associates both file extensions with dockerfile syntax highlighting
3 years ago
Midnight Exigent dba22c60ed
Support dockerfiles (#1303)
* 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>
3 years ago
Sebastian Neubauer 205dc8776b
Add fish highlighting (#1308)
The highlights were copied and modified from
https://github.com/nvim-treesitter/nvim-treesitter/blob/master/queries/fish/highlights.scm
3 years ago
Michael Davis e72786df8e
Add tree-sitter-comment (#1300)
* Add tree-sitter-comment

Fix #1164

* fix precedence in tree-sitter-comment highlights

connects https://github.com/helix-editor/helix/pull/1170

* set injection-regex for comment language

* remove comment filetype

* fix comment injections for neovim-style injections tags

* add comment injections for elixir

* remove f.comment

* fix spacing in .gitmodules

* run 'cargo xtask docgen'

Co-authored-by: Ivan Tham <pickfire@riseup.net>
3 years ago
Luke Jones edf3c70c30
Add dart lsp config and queries (#1250)
* 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>
3 years ago
Oliver Hechtl 0683f0a20a
Add scala syntax highlights (#1278)
* add partial scala syntax highlights

* ran cargo xtask docgen

* updated tree-sitter-scala, fixed highlights

* fix comments

* move identifier to the end of the highlights

* add indents
3 years ago
Blaž Hrastnik 49e0678741 Add markdown grammar
Fixes #215
3 years ago
Blaž Hrastnik 4527d63a65 fix: rust: disable unresolved-proc-macro
Since we disabled proc macro expansion, disable the related info
level lint:

https://users.rust-lang.org/t/how-to-disable-rust-analyzer-proc-macro-warnings-in-neovim/53150/3
3 years ago
Gokul Soumya d08bdfa838 Use same name used in config files for langs in docs 3 years ago
Gokul Soumya a78b789406 Auto generate docs for language support 3 years ago
Kirawi 6f1a7b1220
Add llvm grammar (#1167) 3 years ago
Kirawi 4ec20eaeff
Add language support for WGSL (#1166) 3 years ago
shenlebantongying 1eecd9a2ac
Add language: racket (#1143) 3 years ago
Blaž Hrastnik f804ed3192 Make shebangs optional, they don't make sense outside of scripts 3 years ago
Curiosidad-Racional 41fc326325
Fix panicked missing field `shebangs` (#1025)
Fix the error:
```
thread 'main' panicked at 'Could not parse merged (built-in + user) languages.toml: Error { inner: ErrorInner { kind: Custom, line: None, col: 0, at: None, message: "missing field `shebangs`", key: ["language"] } }', helix-term/src/application.rs:87:14
```
3 years ago
Mateusz S. Szczygieł 3f0345ff58
glsl support (#993)
* add glsl language support

* glsl: use indents.toml file
3 years ago
ath3 77dbbc73f9
Detect filetype from shebang line (#1001) 3 years ago
ath3 30744646cb
Perl support (#978) 3 years ago
jgart 4010b327e2
Adds mint language server (#974) 3 years ago
Daniel Poulin 924b7d3b19 Adjust PHP indentation defaults to 4 spaces
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.
3 years ago
kabirz 592fba1100 add cmake-language-server as cmake language server 3 years ago
ath3 787ba4f233
CMake support (#888) 3 years ago
Michael Davis e216e9621e
Enable c-sharp language and highlights (#861) 3 years ago
Michael Davis e069fb9dea
Add highlight support for tree-sitter-query language (tsq) (#845)
* 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>
3 years ago