Commit graph

586 commits

Author SHA1 Message Date
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
Santos Gallegos
c1313ba7af Link to gallery 2020-09-18 18:09:24 -05:00
Santos Gallegos
9127038027 Update FAQ
Add an entry for
https://github.com/nvim-treesitter/nvim-treesitter/issues/340.
2020-09-19 00:59:43 +02:00
Rasmus Michelsen
2624c00b37 Ensure that updated files are replaced w/o warning 2020-09-18 22:35:45 +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
kyazdani42
79fd22cc5a use TSnone instead of linking to Normal 2020-09-18 17:55:55 +02:00
TravonteD
bc727653b9 link highlight groups for TSTag and TSTagDelimiter 2020-09-18 17:09:43 +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
Florian Beeres
18adc9e176
Make :TSInstall work in Nix by adding a second module installation target (#473)
* Ignore tags file in project root

* Make :TSInstall work with Nix

This commit adds logic to determine where to install parsers, meaning
the *.so files. Until now the package path of the nvim-treesitter plugin
was used. But when installed with Nix, the plugin lands in "/nix/store",
which is read-only.

With this commit $XDG_DATA_HOME/nvim/site/parser/*.go will be used as
the parser installation path. The directory will be created if it
doesn't exist.

* Add generate_join function

The generate_join function is used to create two other functions, one
to join path segments, the other to join strings with a space for error
messages.
2020-09-18 09:44:07 +02:00
Santos Gallegos
b2e1ea1edf Update CONTRIBUTING.md
Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
2020-09-17 17:21:29 +02:00
Santos Gallegos
434b937dfc Update contributing 2020-09-17 17:21:29 +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
Stephan Seitz
ee9dd63ecd fix(folds): has_fold -> has_folds 2020-09-16 10:02:37 +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
73ba2994ab add @none to contributing.md 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
Santos Gallegos
f8a76d6de6
Merge pull request #467 from stsewd/patch-1
Rename jsx/fold.scm -> folds.scm
2020-09-14 11:35:12 -05:00
Santos Gallegos
dd8ca8a375
Rename jsx/fold.scm -> folds.scm
This was merged before https://github.com/nvim-treesitter/nvim-treesitter/pull/461
2020-09-14 11:31:06 -05:00
Stephan Seitz
bcf421b4e7 Fix #307: Use and document TSVariable/TSVariableBuiltin in all languages 2020-09-14 18:27:20 +02:00
Santos Gallegos
50991e370b Folds: rename query files to folds.scm to be consistent
We use plural names for all query files except folds.
2020-09-14 18:26:30 +02:00
Sh3Rm4n
97113abedc Fix typo in foldexpr example 2020-09-14 14:36:36 +02:00
Steven Sojka
3f86d08390
Merge pull request #452 from kyazdani42/jsx-folds
Jsx fold
2020-09-14 06:54:20 -05:00
Santos Gallegos
fe06e6fbec Bash: fix hl capture groups
Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/387
2020-09-13 17:55:37 +02:00
Stephan Seitz
da6bc7be20 fix(cpp highlights): Use @include for preproc_include (fix #445) 2020-09-13 12:46:52 +02:00
Pau Ruiz Safont
b4d7ea7e66 fix ocaml highlights
Function matching was wrongly parenthesized, parameter detection was too
eager and it was wrongly matching all + and - as delimiters
2020-09-12 23:11:05 +02:00
kyazdani42
b024072ded add jsx fold on jsx_element only 2020-09-12 14:14:28 +02:00
Shirasaka
8be4fb059e Update PHP query 2020-09-12 13:15:48 +02:00
Santos Gallegos
31e6d1e647 TextObjects: refactor wrong func names
Reading the code, these functions should be named differently

a755017dd5/lua/nvim-treesitter/query.lua (L203-L203)
2020-09-12 10:51:06 +02:00
TravonteD
e1434ff68b - Fix TSType and TSPunctuationSpecial
Move class and module names to @type to be consistent with the other
languages. (fixes #448)

Use @punction.special for interpolation brackets. (fixes #449)
2020-09-12 09:36:55 +02:00
Santos Gallegos
a755017dd5 Highlight definition: mention updatetime in docs
Ref https://github.com/nvim-treesitter/nvim-treesitter/issues/435
2020-09-11 21:53:23 +02:00
Stephan Seitz
d180dca74d Yield meaningful error messages in iter_cmd{,_sync} when cmd.err == nil 2020-09-11 18:01:33 +02:00
Pau Ruiz Safont
7be8e6ca5c maintenance(ocaml): adapt queries to nvim-treesitter 2020-09-11 12:10:31 +02:00
Pau Ruiz Safont
ddc200768e feat(queries): pull ocaml queries from upstream 2020-09-11 12:10:31 +02:00
Thomas Vigouroux
b90e520ccd ci: fix wrong queries 2020-09-11 12:02:35 +02:00
Thomas Vigouroux
5d2b866518 ci: check capture names in queries 2020-09-11 12:02:35 +02:00
Santos Gallegos
4b578c52bd Show up logo
Too good to be hidden
2020-09-11 09:12:42 +02:00
Santos Gallegos
20b822314d Allow to call setup on already loaded modules. 2020-09-11 08:45:50 +02:00
Santos Gallegos
facdb691d9 Improve startuptime
- Don't load everything at startup
- Don't define an autocomand for each module and for each supported lang
  (this creates nxm autocomand!)
2020-09-10 22:58:59 +02:00
Steven Sojka
649fe1a842
Merge pull request #421 from steelsojka/add-missing-js-ops
fix(highlights): add missing js operators
2020-09-10 10:09:46 -05:00
Steven Sojka
2fd3236a92 fix(highlights): add missing js operators 2020-09-10 09:57:09 -05:00
Markus Koller
fd6d09fd1f Find package path based on the Lua source file
This is more robust compared to the previous method where we walked
up the tree and matched on the directory name, which also required
that the repository was cloned in a directory named `nvim-treesitter`.
2020-09-10 15:11:04 +02:00
Nolan Prochnau
10848ca5bd Add folding for local functions in lua 2020-09-10 09:20:23 +02:00
Santos Gallegos
9ec7e56fda Ocaml: fix parser
Paths were changed https://github.com/tree-sitter/tree-sitter-ocaml/pull/41
2020-09-10 09:15:18 +02:00