Commit Graph

66 Commits

Author SHA1 Message Date
Jonáš Dujava
e16193b6e0 fix(query): use explicitly the legacy behavior (#358)
After
6913c5e1d9
it is necessary to opt-in explicitly to the old behavior.

Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com>
2024-09-06 14:12:29 -04:00
Andy K. Massimino
19c4787344 Add TS quote patterns re #234 2023-05-06 20:53:53 -04:00
Andy K. Massimino
96e6480231 Revert "Use nvim-treesitter's compat module for now"
This reverts commit 327eb6f56d.
2023-04-21 21:17:02 -04:00
Andy K. Massimino
1364b2ba55 Fix typo from a41e95ee5f 2023-04-19 22:50:21 -04:00
Andy K. Massimino
a41e95ee5f Skip collecting TS group results from comment lang
Re #283
2023-04-19 22:44:31 -04:00
Andy K. Massimino
5fa824acc8 Memoize TS get_matches function re #283 2023-04-17 19:21:55 -04:00
Andy K. Massimino
327eb6f56d Use nvim-treesitter's compat module for now 2023-04-17 18:30:43 -04:00
Tom van Dijk
156367e4cb fix: Move to non-deprecated vim.treesitter function calls (#278)
ref: neovim/neovim@cbbf8bd
2023-03-25 10:52:02 -04:00
Andy K. Massimino
fef9f334e6 Fix issue with TS range instead of node 2023-03-06 19:04:25 -05:00
Andy K. Massimino
2dffaedded Handle nested TS syntax, closes #271 2023-02-18 15:58:59 -05:00
Andy K. Massimino
d7a5d19354 Update TS support files 2023-02-18 09:21:32 -05:00
oncomouse
945e01e39f update nvim 0.7 treesitter api (#272) 2023-02-12 11:18:03 -05:00
Andy K. Massimino
e75ffcdbdd Fix safety check for TS hl-info 2023-01-18 12:53:30 -05:00
Andy K. Massimino
1f1ac485e7 Add another safety check for TS hl-info 2023-01-18 12:50:53 -05:00
Jędrzej Boczar
3fa1b2283e Pass bufnr to TS configs.is_enabled (#251) 2022-10-01 16:51:34 -04:00
Andy Massimino
80ad7817e5 Merge TS playground changes from upstream (#250) 2022-09-21 11:13:57 -04:00
Andy Massimino
950ef5d6a2 Fix for changes to nvim upstream TS/hl API, fix #241 (#242)
* Fix for changes to nvim upstream TS/hl API, fix #241

re https://github.com/neovim/neovim/pull/19931

* Work around bug in TS playground util

* Work around nvim TS highlighter.hl_map change

* Fix lint
2022-08-27 11:59:34 -04:00
Andy K. Massimino
485e71120f Fix bug with missing node text, fix #222 2022-05-05 21:07:25 -04:00
Andy K. Massimino
b016e0ffab Fix lua lint 2022-05-03 22:16:03 -04:00
Andy K. Massimino
96abbdcb2e Improve performance of TS matching with xml re #221 2022-05-03 22:11:41 -04:00
Micah Halter
366a72009a Fix _node_text
Signed-off-by: Micah Halter <micah@balena.io>
2022-04-19 08:52:49 -04:00
Micah Halter
af894203cf update nvim 0.7 treesitter api
Signed-off-by: Micah Halter <micah@balena.io>
2022-04-18 11:22:38 -04:00
Andy K. Massimino
7fd8806138 Fix lua lint 2022-02-17 22:18:36 -05:00
Andy K. Massimino
fce4ec19dc Update TS hl-info from upstream 2022-02-17 22:12:40 -05:00
Sainnhe Park
cfb83906d3 Avoid goto logic in internal.lua
The `goto` keyword is introduced in a newer version of lua, running this
plugin with an older version of lua will produce an error:

```
Error detected while processing function matchup#loader#bufwinenter[4]..matchup#loader#init_buffer[5]..matchup#ts_engine#is_enabled[4]..<SNR>126_forward:
line    1:
E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue'
stack traceback:
        [C]: in function 'error'
        vim.lua:63: in function <vim.lua:57>
        [C]: in function 'require'
        [string "luaeval()"]:1: in main chunk
Error detected while processing function matchup#loader#bufwinenter[4]..matchup#loader#init_buffer[15]..matchup#ts_engine#is_hl_enabled[4]..<SNR>126_forward:
line    1:
E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue'
stack traceback:
        [C]: in function 'error'
        vim.lua:63: in function <vim.lua:57>
        [C]: in function 'require'
        [string "luaeval()"]:1: in main chunk
Error detected while processing function matchup#loader#init_buffer[5]..matchup#ts_engine#is_enabled[4]..<SNR>126_forward:
line    1:
E5108: Error executing lua vim.lua:63: ...local/share/nvim/plugins/vim-matchup/lua/treesitter-matchup/internal.lua:195: '=' expected near 'continue'
stack traceback:
        [C]: in function 'error'
        vim.lua:63: in function <vim.lua:57>
        [C]: in function 'require'
        [string "luaeval()"]:1: in main chunk
```

This commit removes the goto keyword to avoid such error. Has been
tested on debian testing.

Related: https://github.com/AaronJackson/vrn/issues/157
2022-02-03 11:22:16 +08:00
captainko
91c9530d49 fix(treesitter-matchup): Fixes #206 2022-01-26 12:07:01 +07:00
Andy K. Massimino
f129003823 Wrap TS parse in pcall to prevent crash
Fixes #201A.
2022-01-25 08:52:06 -05:00
Andy K. Massimino
43483d27bc Update lua TS queries for upstream parser change, fix #204 2022-01-18 19:05:57 -05:00
Andy K. Massimino
181b4f6518 Revert "Cleanup echo"
This reverts commit 3d3e6c5472.
2021-12-27 12:24:09 -05:00
Andy K. Massimino
3d3e6c5472 Cleanup echo 2021-12-27 12:23:24 -05:00
Andy K. Massimino
cde0efc774 Add lua setup wrapper 2021-11-26 11:53:15 -05:00
Andy K. Massimino
2c3227b3de Be more accurate to cursor in TS skip expr 2021-11-24 11:37:21 -05:00
Andy K. Massimino
66d8936fd0 Add TS lang-based skips, fixes #198 2021-11-24 09:41:43 -05:00
Andy K. Massimino
50cadec5e6 Add option to disable ts virtual_text
Fixes #191
Closes #188
2021-11-04 22:05:42 -04:00
Andy K. Massimino
79254a238e Improve ts syn test
Fix
2021-10-07 21:47:16 -04:00
Andy K. Massimino
fb5c4606ef Add test for ts syn skip cases 2021-10-06 19:05:30 -04:00
Andy K. Massimino
cdf8ff7c1e Add ts engine option include_match_words 2021-09-28 22:15:05 -04:00
Andy K. Massimino
35899fd1ed Fix missing is_hl_enabled, closes #181 2021-09-28 07:25:15 -04:00
Andy K. Massimino
2ea566403c Use ts syn skip if available 2021-09-27 21:03:55 -04:00
Andy K. Massimino
b9cd82ccf8 Update TS query library file 2021-07-19 08:46:12 -04:00
Andy K. Massimino
05f4962c64 Fix TS query reload autocmds, fix #161 2021-07-05 18:45:44 -04:00
Andy K. Massimino
39e39b1338 Update ts query lua (fix lint) 2021-07-04 16:34:47 -04:00
Andy K. Massimino
78775d82af Update ts query lua 2021-07-04 16:29:52 -04:00
Andy K. Massimino
7b7b5f3746 Inline nvim-treesitter's query.lua 2021-06-15 21:04:56 -04:00
Andy K. Massimino
bfc2d1b24e Fix #155 regression when not using treesitter 2021-05-11 21:10:21 -04:00
Andy K. Massimino
f5b98dd645 Add missing file for ccaa000, fix #154 2021-05-10 22:16:14 -04:00
Andy K. Massimino
ccaa000f9d Add syntax highlight for offscreen with TS 2021-05-08 23:16:31 -04:00
Andy K. Massimino
952e871e67 Reorganize lua slightly 2021-05-08 22:58:08 -04:00
Andy K. Massimino
5bbcdf9dbb Enable g:matchup_delim_nomids for TS queries 2021-05-06 23:01:44 -04:00
Andy K. Massimino
d46c404cf2 Allow ts range open/close nodes 2021-04-30 20:10:32 -04:00