Commit graph

281 commits

Author SHA1 Message Date
Thomas Vigouroux
f7d92f663c feat(languagetree): implement language tree
Allow the LanguageTree to be used as an option for highlighting.

Co-authored-by: Santos Gallegos <stsewd@protonmail.com>
Co-authored-by: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
2020-10-19 18:28:45 +02:00
Sam Bernheim
7f3276450b feat(folds): add catch_clause to js folds 2020-10-16 20:23:45 +02:00
sbernehim4
be2bb166c8 feat: add more javascript folds 2020-10-16 20:23:45 +02:00
Mike
1f3999234a feat: Add more lua folds
Add repeat_statement to lua folds
2020-10-15 21:01:18 +02:00
Stephan Seitz
1a62b97ccd C++ highlights: highlight all kinds of optional parameters
declarator can be a identifier, a reference or a pointer
2020-10-13 19:48:42 +02:00
Stephan Seitz
7c96582ef1 Ruby highlights: reset highlight on interpolation
@TravonteD
2020-10-12 13:26:51 +02:00
Thomas Vigouroux
c055899dc0 feat(queries): modeline mechanism for base langs
This implements https://github.com/neovim/neovim/pull/13059#issuecomment-704414189

This behaves like modelines and remove the use of the base_language map.
Also, this allows to fine-tune what we actually want to include per
query, which is better IMO.
2020-10-11 19:09:22 +02:00
Stephan Seitz
45397ebbd9 fix(highlights): Add TSNamespace highlight
Start adding highlights for
     - C++
     - Rust (including other scoped_identifier/scoped_type_identifier fixes)
     - JS (only namespace_import)

Addresses #516
2020-10-10 15:31:51 +02:00
Corey Williamson
73ef705eb2 Fix typearg brackets not highlighting for multiple typeargs 2020-10-05 12:02:59 +02:00
Corey Williamson
85791a4316 Set function scope 2020-10-05 12:02:59 +02:00
euclidianAce
0aa4940f8b Update queries/teal/highlights.scm
Co-authored-by: Santos Gallegos <stsewd@protonmail.com>
2020-10-05 12:02:59 +02:00
Corey Williamson
c2acddd651 Add teal parser 2020-10-05 12:02:59 +02:00
Stephan Seitz
93f9708a3c Dart highlights: Reset highlight in interpolation 2020-10-05 06:37:31 +02:00
Pau Ruiz Safont
f7126fe54b fix(ocaml): highlight characters as such 2020-10-04 14:33:29 +02:00
Pau Ruiz Safont
f1c272676b feat: add ocamllex parser and highlights 2020-10-04 14:33:29 +02:00
Stephan Seitz
3362f45196 Remove textobjects module 2020-10-04 14:20:20 +02:00
Alvaro Muñoz
5debe93133 make query-checker happy 2020-10-01 06:26:59 +02:00
Alvaro Muñoz
9e09ce6c8e change module to namespace 2020-10-01 06:26:59 +02:00
Alvaro Muñoz
a5dccb0ac7 CodeQL locals.scm queries 2020-10-01 06:26:59 +02:00
Alvaro Muñoz
61ea08f8d3 fine tune keyword highlights 2020-09-30 17:06:58 +02:00
Alvaro Muñoz
c29865a7b3 remove locals.scm 2020-09-30 17:06:58 +02:00
Alvaro Muñoz
90c53d3d1e remove non-used captures 2020-09-30 17:06:58 +02:00
Alvaro Muñoz
3dc2e9331e initial support for CodeQL 2020-09-30 17:06:58 +02:00
Akin Sowemimo
0e37148dd1 Add extension and on keywords 2020-09-27 17:42:27 +02:00
Akin Sowemimo
98c12ec23a Improve the highlighting for class instantiation
So it finds _HiddenClasses as well as OtherClasses
2020-09-24 00:00:59 +02:00
Dennis B
3818cc29d0 Highlight top-level 'require' as TSInclude (fix #463)
Same for 'require_relative' & 'load' code importation mechanisms.

Note, method calls of 'require' (as in Rails strong-params) will be
still be highlighted as Method/Function.
2020-09-23 17:14:11 +02:00
Stephan Seitz
58ec0bd7ef Python locals: account for https://github.com/tree-sitter/tree-sitter-python/pull/83 2020-09-21 22:56:01 +02:00
Pieter Goetschalckx
718fc1be3e Add OCaml folds 2020-09-21 08:54:30 +02:00
Pieter Goetschalckx
a8c8de13ae Improve OCaml locals 2020-09-21 08:54:30 +02:00
Pieter Goetschalckx
60e097a14a Improve OCaml highlights 2020-09-21 08:54:30 +02:00
Akin Sowemimo
00e1a5555a Add locals.scm for dart
This is an initial stab at this since I don't know much about how this
should work but this seems to at leas allow incremental selection of
most block of code
2020-09-20 22:10:21 +02:00
kiyan42
b3a1ae3210 also match variable names to be @type when uppercased 2020-09-20 01:11:55 +02:00
kiyan42
1340375c90 use @tag and @type directives for jsx highlights 2020-09-20 01:11:55 +02:00
Stephan Seitz
cd9cab7990 fix(python): use @Normal again for f-strings @none is not aggressive enough 2020-09-19 15:06:04 -05:00
Stephan Seitz
624a6896b5 chore(java): remove duplicate line 2020-09-19 10:42:30 -05:00
Pau Ruiz Safont
9447909d11 ocaml: follow upstream for highlights 2020-09-19 13:35:12 +02:00
Pau Ruiz Safont
465ed37494 ocaml: follow upstream for highlights 2020-09-19 13:35:12 +02:00
Santos Gallegos
76c00934a6 Bash: update highlights
Following some of our conventions and some bits from atom
https://github.com/atom/language-shellscript/blob/master/grammars/tree-sitter-bash.cson:

- Uppercase var are constants
- `$` is a special symbol, not part of the name
- Builtin constants and functions
2020-09-19 13:33:05 +02:00
Stephan Seitz
7e3c4f8089 Add @keyword.operator for operators that are English words and add @exception for Java/JS 2020-09-19 07:30:49 +02:00
Akin Sowemimo
3652bed53e Re-add attribute highlight 2020-09-18 21:30:13 +02:00
Akin Sowemimo
8cc0b8d4c4 Add case builtin
Based on accepted PR to unhide this node
Also show Function as a type correctly
and use existing annotation highlight for annotations
2020-09-18 21:30:13 +02:00
Santos Gallegos
5c85e6beee RST: update queries
Some nodes were renamed and added more textobjects.
2020-09-18 21:29:19 +02:00
TravonteD
c366a041c8 Add TSTag and TSTagDelimiter groups
These groups will be added for use with xml-like tags such as html and
jsx.
2020-09-18 17:09:43 +02:00
TravonteD
b4abf6b07d move the generic "constant" capture to the top 2020-09-18 15:14:32 +02:00
Santos Gallegos
68d8f4c02e Remove @definition.doc captures
These aren't really definitions and are being show in the definitions
list. We aren't using them at the moment, we could use another group or
query file.
2020-09-17 09:18:05 +02:00
TravonteD
73a82638a5 update require statements to use TSInclude 2020-09-16 10:28:41 +02:00
Santos Gallegos
09c703193f RST: update locals
A title is an implicit target.
2020-09-15 20:59:02 +02:00
kiyan42
2fe1f2877e reset python interpolation node 2020-09-15 00:19:04 +02:00
kiyan42
71ba2afc70 add TSNone 2020-09-15 00:19:04 +02:00
kiyan42
bfdee5658a do not highlight as normal to prevent background to override CursorLine 2020-09-15 00:19:04 +02:00