Commit Graph

69 Commits

Author SHA1 Message Date
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
Michael Davis
c3fb86cbaa tree-sitter-gitcommit->tree-sitter-git-commit 2021-12-26 00:12:49 +09:00
Michael Davis
fd31662b70 add gitcommit grammar and language configuration 2021-12-26 00:12:49 +09:00
Laurențiu Nicola
13d804418f
Enable Rust proc macro support (#1350) 2021-12-24 23:56:13 +09:00
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
2021-12-22 09:45:02 +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
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
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
49e0678741 Add markdown grammar
Fixes #215
2021-12-15 00:50:11 +09:00
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
2021-12-14 13:58:26 +09:00
Gokul Soumya
d08bdfa838 Use same name used in config files for langs in docs 2021-12-08 10:23:50 +09:00
Gokul Soumya
a78b789406 Auto generate docs for language support 2021-12-08 10:23:50 +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
shenlebantongying
1eecd9a2ac
Add language: racket (#1143) 2021-11-24 22:47:12 +09:00
Blaž Hrastnik
f804ed3192 Make shebangs optional, they don't make sense outside of scripts 2021-11-09 10:57:08 +09:00
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
```
2021-11-09 10:49:43 +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
77dbbc73f9
Detect filetype from shebang line (#1001) 2021-11-09 00:19:44 +09:00
ath3
30744646cb
Perl support (#978) 2021-11-08 10:05:12 +09:00
jgart
4010b327e2
Adds mint language server (#974) 2021-11-08 10:01:55 +09:00
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.
2021-11-02 17:53:24 +09:00
kabirz
592fba1100 add cmake-language-server as cmake language server 2021-10-30 13:17:30 +05:30
ath3
787ba4f233
CMake support (#888) 2021-10-23 08:57:21 +09:00
Michael Davis
e216e9621e
Enable c-sharp language and highlights (#861) 2021-10-17 13:45:09 +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
WindSoilder
b42ef0e028
Using pylsp instead of pyls (#834) 2021-10-13 11:24:37 +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
Midnight Exigent
eedcea7e6b
Allow language.config (in languages.toml) to be passed in as a toml object (#807)
* 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
2021-10-08 11:14:12 +09:00
James Cash
2e692dc184
Add (SWI-)Prolog LSP support (#816)
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.
2021-10-08 11:05:30 +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
Raphael Megzari
f871d318c0
add language server for elixir and nix (#725) 2021-09-07 23:23:05 +09:00
Blaž Hrastnik
3cbdc057de lsp: Don't import SymbolServer for Julia anymore, it's not necessary 2021-09-07 13:05:20 +09:00
Blaž Hrastnik
2bef245b7a At least partly highlight tsx 2021-09-06 15:25:46 +09:00
Blaž Hrastnik
d2b9a5d654 lsp: Update the julia definition 2021-09-06 15:25:46 +09:00
oberblastmeister
5766f5da8f
OCaml support (#666)
* added some stuff

* add interface

* indent

* highlights and locals

* scope

* change some stuff

* add indents

* fix blanket highlight

* macro

* use inherits
2021-09-02 01:08:08 +09:00
oberblastmeister
ae3f936611
Lua support (#665)
* added submodule

* small changes

* updated some stuff

* remove

* shallow clone

* correct indent

* shallow

* ok

* highlights

* proper captures
2021-09-02 00:54:21 +09:00
oberblastmeister
1586b0eec7
YAML support (#667)
* added submodule

* remove wrong one

* added highlights

* use property

* add indents

* shallow
2021-09-02 00:16:16 +09:00
voroskoi
f22e0aa2ae
Add zig tree-sitter support (#631)
* Add initial zig tree-sitter support

* zig/highlights.scm: remove unnecessary queries

* Add zig/indents.toml
2021-08-28 13:32:01 +09:00
Yusuf Bera Ertan
4b45f27a13 feat: add protobuf tree-sitter parser with highlighting queries 2021-08-19 09:54:14 +09:00
Conscat
1158fc4487 Added more cpp filename extensions 2021-08-18 11:56:19 -07:00
Yerlan
fdd6530df7
Adding mjs to JavaScript file type (#607)
MJS is a file extension for JavaScript modules using standard ES2015+
2021-08-18 09:40:00 +09:00
Yerlan
a2cd9cce9d
Adding INO to C++ file type (#596)
INO is file extension for C++ files used in Arduino sketches.
Reference: https://www.arduino.cc/en/Guide/Environment
2021-08-17 10:45:29 +09:00
Ivan Tham
aaccc9419a
Add ledger tree-sitter (#572)
Might need to update later since the current one highlight does not
work very well yet.
2021-08-16 11:03:57 +09:00
Kirawi
b239f0f45f
add java highlighting (#448) 2021-08-10 14:09:57 +09:00
Blaž Hrastnik
ba729349b8 languages: Add missing comment token for elixir and nix 2021-08-07 15:04:37 +09:00
Luctius
585d6f8242 Fixes toggle_comment not finding the correct language comment token 2021-07-20 17:10:17 +09:00
Cor Peters
cd65a48635
Made toggle_comments language dependent (#463)
* Made toggle_comments language dependent

* Fixed Test Cases

* Added clippy suggestion

* Small Fixes

* Clippy Suggestion

Co-authored-by: Cor <prive@corpeters.nl>
2021-07-19 01:33:38 +09:00