Commit graph

206 commits

Author SHA1 Message Date
Philipp Mildenberger
66afbc9fff
Fix null and boolean constants in tree-sitter-nix highlights queries (#1428) 2022-01-06 11:04:55 +09:00
Sebastian Neubauer
5b1a628e81
Add textobjects and indents to c and cpp (#1293)
Indentation of single line statements doesn't work, i.e.

  for (;;)<hit enter>
leads to
  for(;;)
  <cursor here>

Only blocks with curly braces are indented.
2022-01-04 10:53:04 +09:00
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>
2022-01-04 10:52:34 +09:00
WindSoilder
609f7363a1
Add everforest_light, change everforest_dark string color (#1412) 2022-01-03 11:32:47 +09:00
Triton171
4da050b4bb
Add basic indentation for languages without treesitter-based indentation rules (always use the indent of the current line for a new line). (#1341)
Fix several bugs in the treesitter indentation calculation.

Co-authored-by: Triton171 <triton0171@gmail.com>
2022-01-03 11:03:57 +09:00
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>
2022-01-03 10:57:55 +09:00
Martin Junghanns
aaa42e1a69
Underline diagnostics in bogster theme (#1399) 2022-01-02 13:45:22 +09:00
Flakebi
0dab6c8c17 Fix markdown code-block highlighting
Markdown code blocks should be highlighted as a single block, so set
injection.include-children.
2022-01-01 17:36:12 +08:00
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 2ecee155ea8e229651920b291062c2ee84b47944.

* fix generated language docs

* use rebase_command scopes from tree-sitter-git-commit
2021-12-31 06:58:47 +08:00
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
2021-12-30 00:31:23 +09:00
Sebastian Neubauer
8c29b76bcc
Improve llvm highlighting and queries (#1388)
* Improve llvm highlighting and queries

The llvm tree-sitter parser was updated to support scopes and more
accurate highlighting.

* Group highlight expressions better
2021-12-29 18:30:44 +09:00
Stuart Hinson
7001665342
Add ruby indents (#1372)
* Add ruby indents

* Include ruby in generated docs
2021-12-27 13:07:09 +09:00
Michael Davis
6af0d51dc5 highlight rebase-commands as markup.raw 2021-12-26 00:12:49 +09:00
Michael Davis
c3fb86cbaa tree-sitter-gitcommit->tree-sitter-git-commit 2021-12-26 00:12:49 +09:00
Michael Davis
28c9afdd0e add commented-out diff and rebase injection queries 2021-12-26 00:12:49 +09:00
Michael Davis
3b800025af add diff.{plus,minus,delta} to themes 2021-12-26 00:12:49 +09:00
Michael Davis
78f93239b5 add gitcommit highlights 2021-12-26 00:12:49 +09:00
Sebastian Neubauer
ec878e4011
Add textobjects and indents to cmake (#1307) 2021-12-26 00:10:19 +09:00
chunghha
8aa0b8eacf
chore: update rose pine themes to support markup (#1353) 2021-12-25 14:20:20 +09:00
Gokul Soumya
b2f8f2ba77
Update onedark theme to use new scopes (#1297) 2021-12-24 11:18:04 +09:00
Stuart Hinson
bb684a2b42
Typo fix in ocaml indents.toml (#1342) 2021-12-24 10:05:29 +09:00
Gokul Soumya
a8618cf111
Add precise rust queries for use, mod, as (#1339)
- Differentiates between `as` keyword as a binary type cast
  operator and import renamer.
- `mod` and `use` are now under `@keyword.control.import`,
  but `mod` is a `@keyword` if used as `mod name;`.
2021-12-23 12:10:24 +09:00
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>
2021-12-21 18:22:15 +09:00
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
2021-12-21 11:02:53 +09:00
Sebastian Zivota
7438db66ae
Add dracula theme (#1258)
* Add dracula theme

* remove unused colors

* correctly name constant.character.escape

* Change cursors and selections

* add some missing ui scopes

* sorting
2021-12-20 22:37:47 +09:00
Gokul Soumya
f1c634326b
Improve rust syntax highlighting (#1295)
- Highlight fragment specifiers (expr, tt, in macro
  definitions) with @type.
- Highlight attributes as macros
2021-12-20 11:47:40 +09:00
Sebastian Neubauer
23091c9d29
Highlight comments in c, cpp, cmake and llvm (#1309)
Also, reuse the c injections in glsl
2021-12-20 11:42:23 +09:00
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>
2021-12-19 23:56:56 +09:00
Gokul Soumya
7c01d92653 Add link and quote queries for markdown
- Rename markup.underline.link to markup.link.url
- Add markup.link.label
- Add markup.quote

(The constructor theme scope was missing from the
docs, so unrelated to this commit).
2021-12-19 15:23:39 +09:00
Gokul Soumya
d52eda5d1b
Improve yaml syntax highlighting highlighting (#1294) 2021-12-19 10:20:52 +09:00
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>
2021-12-18 13:41:32 +09:00
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
2021-12-18 13:40:34 +09:00
Blaž Hrastnik
5d91335d6b Fix more highlight scopes 2021-12-17 17:04:59 +09:00
Blaž Hrastnik
9c484e88cf highlights: @include -> @keyword.control.import 2021-12-17 17:04:59 +09:00
Blaž Hrastnik
78b6155292 Partly fix julia's locals.scm 2021-12-17 17:04:59 +09:00
ath3
a8060c06d1
Add indents.toml to perl (#1280) 2021-12-17 09:56:07 +09:00
Blaž Hrastnik
ac4b72fcc8 Add injections query for markdown 2021-12-15 18:03:02 +09:00
Blaž Hrastnik
40969ad452 Partly fix latex highlights and add markup scope docs 2021-12-15 17:46:40 +09:00
Blaž Hrastnik
49e0678741 Add markdown grammar
Fixes #215
2021-12-15 00:50:11 +09:00
NNB
c7ace15fd4 Add ui.gutter theming 2021-12-14 00:48:45 +09:00
Omnikar
42e6d96a75 Use base16_tty as 16-color default, fix theme name 2021-12-14 00:48:45 +09:00
NNB
d9727868dd change to .unwrap_or_default() and fix ui.window and ui.statusline 2021-12-14 00:48:45 +09:00
NNB
3080be8268 Fix error color, add tty theme 2021-12-14 00:48:45 +09:00
Omnikar
98ce2a301d Load alt default theme if true color is not supported
* Move `runtime/themes/base16_default_terminal.toml` to
  `base16_theme.toml` alongside `theme.toml`
* Use `terminfo` crate to detect whether the terminal supports true
  color and, if the user has no theme configured and their terminal does
  not support true color, load the alt default theme instead of the
  normal default.

Remove `terminfo` dependency, use `COLORTERM` env instead

Prevent user from switching to an unsupported theme

Add `true-color-override` option

If the terminal is wrongly detected to not support true color,
`true-color-override = true` will override the detection.

Rename `true-color-override` to `true-color`
2021-12-14 00:47:18 +09:00
NNB
43d17c482c Fix Base16 Dark, add Base16 Light and Terminal
Improve accuracy with line number and cursor color
2021-12-14 00:47:02 +09:00
Skyler Hawthorne
9bdbafa075
Fix solarized selection colors (#1236)
* do not select a foreground color in selections, as this eliminates
  syntax coloring
* select lighter color for selections
* Make non-primary cursor cyan instead of green
2021-12-08 10:22:55 +09:00
chunghha
038a6ce22c
rose_pine_dawn.toml colorscheme (#1226)
* adds: rose_pine_dawn.toml colorscheme

* chore: define ui.statusline.inactive colors of rose_pine
2021-12-03 23:14:03 +09:00
WindSoilder
cf40e61b0a
add more monokai pro filter themes (#1220) 2021-12-03 23:13:21 +09:00
WindSoilder
27ffc79c44
Add monokai pro theme (#1206)
* add monokai_pro theme

* add monokai_pro theme

* claim the inspired theme and original author

* make diagnostic underlined
2021-12-02 13:51:27 +09:00
Kirawi
6f1a7b1220
Add llvm grammar (#1167) 2021-11-29 10:38:17 +09:00
Kirawi
4ec20eaeff
Add language support for WGSL (#1166) 2021-11-27 07:49:40 +05:30
Skyler Hawthorne
05c6cb1d0b
Solarized theme: fix popup colors, adjust menu (#1124)
* fix popup colors, adjust menu

* fix hardcoded horizontal rule color
2021-11-20 23:17:38 +09:00
Koen Van der Auwera
b95c9470de
Add spacebones light theme (#1131)
* Add spacebones light theme

* Fix error background
2021-11-20 07:22:06 +05:30
WindSoilder
1132b7088a improve nord status bar line 2021-11-16 22:06:21 +08:00
Skyler Hawthorne
335ed7fa69
Improve Solarzed Dark theme (#1105)
Adjusts the Solarized Dark theme to be modeled more closely after
vim's incarnation. Also adjust the Solarized Light theme to match.
2021-11-16 12:34:25 +09:00
Kirawi
8f7ada12ac
Solarized dark theme (#999)
* init

* wip

* wip
2021-11-15 09:29:39 +09:00
Mateusz S. Szczygieł
e0540fbcc4
Add json indents.toml file (#1055)
* add glsl language support

* glsl: use indents.toml file

* add json indents.toml
2021-11-11 01:01:19 +09:00
CossonLeo
f96be0fcbc
add solarized_light theme (#1010)
* add solarized_light theme

* solarized_light add constant.numeric
2021-11-09 11:08:08 +09:00
Mateusz S. Szczygieł
3f0345ff58
glsl support (#993)
* add glsl language support

* glsl: use indents.toml file
2021-11-09 00:48:00 +09:00
ath3
30744646cb
Perl support (#978) 2021-11-08 10:05:12 +09:00
Kirawi
ee889aaa85
Updated tree-sitter query scopes (#896)
* updated theme scopes

variable.property -> variable.field
property -> variable.field

* updated theme scopes

* update book and themes

updated book and themes to reflect scope changes

* wip

* update more queries

* update dark_plus.toml
2021-11-03 12:00:52 +09:00
Daniel Poulin
9e247bf6ee Add indents definition based on the one from nvim-treesitter 2021-11-02 17:53:24 +09:00
Gokul Soumya
ea452bec80
Update onedark theme (#936)
- Use named color palette
- Remove blue highlight for variables (too much noise)
- Add purple highlight for control statements (if, match, etc)
2021-10-30 14:17:51 +09:00
Houkime
a1c7e55e3b
update cpp queries (#930)
Co-authored-by: Houkime <>
2021-10-29 14:11:19 +09:00
Michael Davis
7e6ade9290 fix: string.regex{=>p} 2021-10-27 10:03:33 +09:00
Michael Davis
bf20e51044 use punctuation.special for interpolation #{ } 2021-10-27 10:03:33 +09:00
Ray Gervais
d4d16ca1b0
runtime: Rose Pine colorscheme (#897) 2021-10-25 10:18:04 +09:00
Gokul Soumya
4ee92cad19
Add treesitter textobjects (#728)
* Add treesitter textobject queries

Only for Go, Python and Rust for now.

* Add tree-sitter textobjects

Only has functions and class objects as of now.

* Fix tests

* Add docs for tree-sitter textobjects

* Add guide for creating new textobject queries

* Add parameter textobject

Only parameter.inside is implemented now, parameter.around
will probably require custom predicates akin to nvim' `make-range`
since we want to select a trailing comma too (a comma will be
an anonymous node and matching against them doesn't work similar
to named nodes)

* Simplify TextObject cell init
2021-10-23 11:41:19 +09:00
ath3
787ba4f233
CMake support (#888) 2021-10-23 08:57:21 +09:00
Ray Gervais
2edc85e953
fixes: missing info, warning diagnostic (#890) 2021-10-22 09:58:49 +09:00
WindSoilder
7146ae9388
Refactor nord theme (#874)
* refactor again

* remove useless color
2021-10-19 12:17:05 +09:00
WindSoilder
2ac9d30bf3
improve menu selected color for nord (#873) 2021-10-18 16:39:54 +09:00
Blaž Hrastnik
a03b12530c
Merge pull request #830 from the-mikedavis/official-elixir-tree-sitter
prefer elixir-lang/tree-sitter-elixir
2021-10-18 15:13:39 +09:00
Ray Gervais
c278b43319
adds: base16 theme for Helix editor (#833) 2021-10-18 10:31:57 +09:00
WindSoilder
bb011f9fb2
Add indents for python, but it's not perfect. (#837)
* add indents for python, but it's not Perfect

* add last line
2021-10-18 10:01:53 +09:00
Michael Davis
4d8eb09b7c
scope arities in captures as operators 2021-10-17 10:50:20 -05:00
Michael Davis
80b54f2f69
use special.string.symbol instead of symbol
this aligns better with how ruby highlights symbols
2021-10-17 10:50:20 -05:00
Michael Davis
8f658f0dce
use latest tree-sitter-elixir with 'not in' query support
connects https://github.com/elixir-lang/tree-sitter-elixir/issues/9
2021-10-17 10:50:20 -05:00
Michael Davis
4771cc7ee4
align highlight scopes with documented scopes 2021-10-17 10:50:20 -05:00
Michael Davis
c502cafecc
highlight calls to erlang modules as types
connects https://github.com/elixir-lang/tree-sitter-elixir/pull/5
2021-10-17 10:50:20 -05:00
Michael Davis
b2655a7f5c
add LICENSE snippet at elixir hightlights top 2021-10-17 10:50:19 -05:00
Michael Davis
95ab40d171
use the warning type for tree-sitter ERRORs 2021-10-17 10:50:19 -05:00
Michael Davis
5db248cc1c
describe atoms as tags 2021-10-17 10:50:19 -05:00
Michael Davis
d1b434d230
add highlights query from elixir-lang/tree-sitter-elixir 2021-10-17 10:50:19 -05:00
Michael Davis
e216e9621e
Enable c-sharp language and highlights (#861) 2021-10-17 13:45:09 +09:00
Michael Davis
be428a295a
fix digit escapes in java & php highlights (#846) 2021-10-16 18:02:06 +09:00
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>
2021-10-16 17:58:04 +09:00
Omnikar
43465926be
Continue tutor (#737)
* Add sections

* `COUNTS WITH MOTIONS`
* `SELECTING LINES`
* `UNDOING`

* Adjust lesson spacing to conform to page-wise scrolling

Vertical length of lessons reduced by 1 line so that page-up and
page-down move cleanly between lessons.

* Add sections

* `THE CHANGE COMMAND`
* `RECAP`
* `MULTIPLE CURSORS`

* Fix height of `RECAP` section

* Fix typo in `MULTIPLE CURSORS`

* Add additional information about space mode to `MULTIPLE CURSORS`

* Change `<SPACE><SPACE>` to `,`

* Add sections

* `THE SELECT COMMAND`
* `SELECTING VIA REGEX`
* `COLLAPSING SELECTIONS`

* Fix quote inconsistency
2021-10-16 12:47:45 +09:00
WindSoilder
ef3f78b6ce
fix nord ui focus color (#844) 2021-10-15 17:36:01 +09:00
WindSoilder
47208b990b
improve contract on nord comment color (#842) 2021-10-14 18:03:35 +09:00
Thomas Wehmöller
a7f49fa56f
Add Vue tree sitter grammar (#787)
*  Add vue tree sitter support

* Update .gitmodules

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
2021-10-10 22:09:17 +09:00
voroskoi
0e06c10d8c
Zig tree-sitter rework (#811)
- update tree-sitter-zig subproject
- use highlights.scm from upstream, just use helix scopes
- update indents.toml, this one actually works
2021-10-05 12:18:15 +09:00
Ray Gervais
0af8928d63
adds: nord colortheme (#799) 2021-10-03 10:13:53 +09:00
Alex
70a20b7cf8
add everforest dark theme (#760) 2021-09-17 22:40:24 +09:00
Raphael Megzari
b2195e08b5
languages: add svelte support (#733)
* languages: add svelte support

* languages: add svelte injections
2021-09-17 11:04:55 +09:00
Kirawi
f2c73d1567 Update dark_plus error colour
This was recently changed in VSCode.
2021-09-12 21:53:10 +05:30
cbarrete
394cc4f30f
Update ledger treesitter injections (#732)
Co-authored-by: Cédric Barreteau <cbarrete@users.noreply.github.com>
2021-09-09 10:13:11 +09:00
Blaž Hrastnik
4cc562318a Improve docs, fix up a few highlight scopes 2021-09-07 13:03:48 +09:00
Blaž Hrastnik
4ac29434cb syntax: Add go & rust locals, improve tree-sitter error message 2021-09-06 18:13:52 +09:00
Blaž Hrastnik
2bef245b7a At least partly highlight tsx 2021-09-06 15:25:46 +09:00