Commit Graph

152 Commits (ac1b7d8d0a608f47edfee2872d414e94fd26cc31)

Author SHA1 Message Date
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>
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
Martin Junghanns aaa42e1a69
Underline diagnostics in bogster theme (#1399) 3 years ago
Flakebi 0dab6c8c17 Fix markdown code-block highlighting
Markdown code blocks should be highlighted as a single block, so set
injection.include-children.
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
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
3 years ago
Stuart Hinson 7001665342
Add ruby indents (#1372)
* Add ruby indents

* Include ruby in generated docs
3 years ago
Michael Davis 6af0d51dc5 highlight rebase-commands as markup.raw 3 years ago
Michael Davis c3fb86cbaa tree-sitter-gitcommit->tree-sitter-git-commit 3 years ago
Michael Davis 28c9afdd0e add commented-out diff and rebase injection queries 3 years ago
Michael Davis 3b800025af add diff.{plus,minus,delta} to themes 3 years ago
Michael Davis 78f93239b5 add gitcommit highlights 3 years ago
Sebastian Neubauer ec878e4011
Add textobjects and indents to cmake (#1307) 3 years ago
chunghha 8aa0b8eacf
chore: update rose pine themes to support markup (#1353) 3 years ago
Gokul Soumya b2f8f2ba77
Update onedark theme to use new scopes (#1297) 3 years ago
Stuart Hinson bb684a2b42
Typo fix in ocaml indents.toml (#1342) 3 years ago
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;`.
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
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
3 years ago
Gokul Soumya f1c634326b
Improve rust syntax highlighting (#1295)
- Highlight fragment specifiers (expr, tt, in macro
  definitions) with @type.
- Highlight attributes as macros
3 years ago
Sebastian Neubauer 23091c9d29
Highlight comments in c, cpp, cmake and llvm (#1309)
Also, reuse the c injections in glsl
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
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).
3 years ago
Gokul Soumya d52eda5d1b
Improve yaml syntax highlighting highlighting (#1294) 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 5d91335d6b Fix more highlight scopes 3 years ago
Blaž Hrastnik 9c484e88cf highlights: @include -> @keyword.control.import 3 years ago
Blaž Hrastnik 78b6155292 Partly fix julia's locals.scm 3 years ago
ath3 a8060c06d1
Add indents.toml to perl (#1280) 3 years ago
Blaž Hrastnik ac4b72fcc8 Add injections query for markdown 3 years ago
Blaž Hrastnik 40969ad452 Partly fix latex highlights and add markup scope docs 3 years ago
Blaž Hrastnik 49e0678741 Add markdown grammar
Fixes #215
3 years ago
NNB c7ace15fd4 Add `ui.gutter` theming 3 years ago
Omnikar 42e6d96a75 Use `base16_tty` as 16-color default, fix theme name 3 years ago
NNB d9727868dd change to .unwrap_or_default() and fix ui.window and ui.statusline 3 years ago
NNB 3080be8268 Fix error color, add tty theme 3 years ago
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`
3 years ago
NNB 43d17c482c Fix Base16 Dark, add Base16 Light and Terminal
Improve accuracy with line number and cursor color
3 years ago
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
3 years ago
chunghha 038a6ce22c
rose_pine_dawn.toml colorscheme (#1226)
* adds: rose_pine_dawn.toml colorscheme

* chore: define ui.statusline.inactive colors of rose_pine
3 years ago
WindSoilder cf40e61b0a
add more monokai pro filter themes (#1220) 3 years ago
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
3 years ago
Kirawi 6f1a7b1220
Add llvm grammar (#1167) 3 years ago
Kirawi 4ec20eaeff
Add language support for WGSL (#1166) 3 years ago
Skyler Hawthorne 05c6cb1d0b
Solarized theme: fix popup colors, adjust menu (#1124)
* fix popup colors, adjust menu

* fix hardcoded horizontal rule color
3 years ago
Koen Van der Auwera b95c9470de
Add spacebones light theme (#1131)
* Add spacebones light theme

* Fix error background
3 years ago
WindSoilder 1132b7088a improve nord status bar line 3 years ago