Commit graph

554 commits

Author SHA1 Message Date
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
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
Stephan Seitz
39d5b97bc5 feat(C++ highlights): highlight operator_name as function 2020-09-08 22:03:57 +02:00
Stephan Seitz
985c5def34 C/C++ locals: Deduplicate C++ locals contained in C 2020-09-08 22:02:39 +02:00
Stephan Seitz
8bc5d1ff3f Add C++ folds and C comment/preproc folds 2020-09-08 22:02:39 +02:00
Stephan Seitz
3c1399b94e Fix #418: iterator function should always return an iterator
Even if it's an empty iterator.
2020-09-08 22:02:11 +02:00
Stephan Seitz
dc077b5fb0 feat(parsers): add filetype PKGBUILD 2020-09-08 20:34:58 +02:00
Santos Gallegos
7508b93287 Import treesitter.install only when needed 2020-09-08 19:37:32 +02:00
Santos Gallegos
77c2730a62 Improve startup performance 2020-09-08 19:37:32 +02:00
kyazdani42
3a3a1bb252 use keyword.function instead of function 2020-09-08 19:23:04 +02:00
kyazdani42
b10a09ebc3 fix function/end keywords not applied for every scope 2020-09-08 19:23:04 +02:00
Santos Gallegos
95a7d24180 Queries: merge query_extensions into base_language_map
These two are doing the same currently.
2020-09-08 19:16:54 +02:00
Santos Gallegos
7b972d581c Fold: update docs
Document foldnestmax.
2020-09-08 15:07:23 +02:00
kyazdani42
8d6c40ce24 fix using highlight query extension for every query type 2020-09-07 21:57:56 +02:00
Santos Gallegos
9c456edb3a Incremental selection: fix skipping some nodes
The range from ts nodes are a little different than
neovim's nodes. They start at 0 and the end is exclusive.
For example, a nvim range (1, 3, 2, 4) is the equivalent to the ts
range (0, 2, 1, 4).

Since we may hit parent nodes that have the same range as its child,
we skip those till we find one that actually changes the selection
(since this is the relevant part for the user).

Fixes https://github.com/nvim-treesitter/nvim-treesitter/issues/232
2020-09-07 18:24:55 +02:00
Santos Gallegos
a5360d02e4 Fold: respect max_fold_level from 'foldnestmax' 2020-09-07 18:24:21 +02:00
Stephan Seitz
f37d94699f go locals: remove unused strip! directive 2020-09-07 01:47:53 +02:00
Santos Gallegos
c719e60266 rst: remove unused captures
This is causing an error.
2020-09-06 21:57:32 +02:00
Pau Ruiz Safont
4db39e27c9 fix: ocaml highlight
The string.special group was removed from highlight.lua, replace its
uses by the string group.
2020-09-06 20:52:56 +02:00
kyazdani42
b69b43b712 fix: contional > conditional in lua hl.scm 2020-09-06 18:32:14 +02:00
kyazdani42
15b182b2a9 fix bash highlight 2020-09-06 17:59:16 +02:00
Santos Gallegos
0928b918a0 Lua: update highlights 2020-09-06 17:25:03 +02:00
Santos Gallegos
5504b84d21 Lua: fix loop and conditional keywords highlights 2020-09-06 17:24:34 +02:00
Steven Sojka
02735aae55 feat(folds): add ts and js folds 2020-09-06 17:20:43 +02:00
kiyan42
feead20c04 change @meta to @type for derive directives because @meta is not defined 2020-09-06 17:00:41 +02:00
Steven Sojka
881eff1c60 fix(highlights): fix ts parameter highlights 2020-09-06 16:59:03 +02:00
Santos Gallegos
1a42056e09 Highlights: default TSError to Normal
This provides a better experience for users
without any extra config.
2020-09-06 16:12:02 +02:00
Santos Gallegos
97c1e60bd4 Text objects: check for query files first
The first function is faster and more common.
2020-09-06 15:51:10 +02:00
Rasmus Michelsen
50de57711b Fixed table insertion 2020-09-06 13:42:24 +02:00
Rasmus Michelsen
07c0e837ab Fixed win32 check hopefully 2020-09-06 13:42:24 +02:00
Rasmus Michelsen
d9a7b80c7b Added changes 2020-09-06 13:42:24 +02:00
Rasmus Michelsen
f0f162d041 A few fixes 2020-09-06 13:42:24 +02:00
Rasmus Michelsen
38d34ad493 Local variable fix 2020-09-06 13:42:24 +02:00
Rasmus Michelsen
4f1a464027 Support TSInstall on Winddows with Clang 2020-09-06 13:42:24 +02:00