Stephan Seitz
d351c9b342
Update documentation for new modules 'refactor'/'textobjects'
2020-07-14 22:34:43 +02:00
Stephan Seitz
69cabc69be
Add textobjects module
2020-07-14 22:34:43 +02:00
Stephan Seitz
7d8fc9c4cd
Fix highlight of usages after merging highlight_current_scope
2020-07-14 15:20:34 +02:00
Stephan Seitz
ee80e1ebc5
Add module refactor.highlight_current_scope
2020-07-13 22:26:17 +02:00
Stephan Seitz
8dfe085c41
Add ts_utils.highlight_node
2020-07-13 22:26:17 +02:00
Stephan Seitz
97ad374816
Fix #167 : Add custom_captures config key to set highlights for custom queries
2020-07-13 22:04:24 +02:00
Stephan Seitz
26cb05f205
Lint: remove second argument for one-argument function
2020-07-13 20:42:00 +02:00
Steven Sojka
26b3b3311e
fix(refactor): highlight def perf issue fix
2020-07-08 09:55:12 +02:00
Steven Sojka
884080f89a
feat(configs): dynamic module defintions
2020-07-07 13:53:23 +02:00
Stephan Seitz
ab1916f385
Allow arbitrary query files in locals.lua
...
This is a preparation for `textobject` queries.
2020-07-05 21:32:20 +02:00
Stephan Seitz
5642507f6a
Make luacheck happy
2020-07-05 19:21:06 +02:00
kiyan42
c70a8242eb
fix ask install
2020-06-30 08:54:32 +02:00
kiyan42
2bb6374c34
Define multiple query for a language
...
Allows using another query file for a language, or use a query file
from another language
2020-06-30 08:38:31 +02:00
kiyan42
0611f432aa
if/else in defining languages
2020-06-30 08:32:49 +02:00
kiyan42
2a20484a14
fix: remove goto statements
2020-06-30 08:32:49 +02:00
kiyan42
ce119de2e3
update installer with sync and some fixes
...
- add sync method for installing using `system`
- remove `descriptions` in command configs
- use install(lang) in ensure_installed and make it compatible
2020-06-30 08:32:49 +02:00
Steven Sojka
d73500eaa6
refactor(refactor): use higher local apis and some cleanup
2020-06-30 08:21:01 +02:00
Steven Sojka
6f8e4c97a4
feat(refactor): add definition navigation module
2020-06-30 08:21:01 +02:00
Steven Sojka
64838e51c0
feat(refactor): add smart rename module
2020-06-30 08:21:01 +02:00
Steven Sojka
058e8d2296
feat(refactor): highlight usages module
2020-06-30 08:21:01 +02:00
kiyan42
7f6f7596da
add used_by key to parsers
...
Enables the use of multiple filetypes for one parser.
2020-06-29 17:18:22 +02:00
Stephan Seitz
b0f65cfce4
Merge pull request #102 from vigoux/fix-94
...
Separate queries with newlines
2020-06-27 21:04:17 +02:00
Thomas Vigouroux
282e18edd1
highlight: use custom highlight groups
2020-06-26 20:56:19 +02:00
kiyan42
0ed1fbf909
continue installing if not reinstalling one parser
2020-06-25 13:52:29 +02:00
kiyan42
3e4ea3d890
install can take 'all' as parameter
2020-06-25 13:52:29 +02:00
kiyan42
5e91955b6a
add command to install all parsers
2020-06-25 13:52:29 +02:00
Steven Sojka
d04a833e20
fix(locals): compute locals after later tick
2020-06-24 15:38:00 +02:00
kiyan42
def8c20dd7
rename and finish ft->lang migration
2020-06-22 13:22:30 +02:00
Thomas Vigouroux
3000b878fe
fix: separate queries with newlines
2020-06-21 23:06:13 +02:00
Santos Gallegos
171c7e4bcf
Fix bash parser url
...
Not sure if this was on purpose or if it was a mistake
2020-06-21 13:47:56 -05:00
Thomas Vigouroux
ec903ac99d
fix(statusline): don't call if no parser
2020-06-21 19:50:24 +02:00
Kiyan Yazdani
2c81ec3918
Merge pull request #90 from kyazdani42/fix/parser-names-as-filetypes
...
refacto/fix: filetype / parser name distinction
2020-06-21 17:32:37 +02:00
Stephan Seitz
969d496f3f
Merge pull request #72 from doubleloop/python
...
Updated python highlights
2020-06-21 16:22:53 +02:00
Jakub Łuczyński
0b4d4b4140
Updated python highlights
...
* allow for digits in constant names
* removed redundant/conflicting rules
* added missing hlmap
* fixed escape_sequence
* more explicit @constructor assignment
* added rules for function decoration identifiers
2020-06-21 00:11:58 +02:00
kiyan42
df17a48c85
refactor: parser list and lang->ft/ft->lang
...
- move parser list in `parsers.lua`
- most `ft` variable where changed to `lang`, `ft` is only used on
autocmd binding, and lang is used for everything else. Functions have
been defined to make the switch between `ft` and `lang`
2020-06-20 12:31:52 +02:00
kiyan42
ad636f4f53
fix: declare parse names as their appropriate filetype and change clone url
2020-06-19 16:12:57 +02:00
kiyan42
cf72524b2f
add winnr to get_node_at_cursor
2020-06-19 14:13:23 +02:00
kiyan42
38af29a912
refacto: remove buf_state
...
- remove buf_state and related code
- add get_node_at_cursor()
- better incremental selection (code is localized)
2020-06-19 13:45:33 +02:00
Stephan Seitz
0671c0c6a2
Fixup: Introduce base languages for queries
...
Use same argument for nvim_get_runtime_file for base language
2020-06-15 12:09:51 +02:00
Stephan Seitz
df06026110
Introduce base languages for queries
...
Some treesitter grammars just extend another treesitter grammar.
This enables us to use the C queries also for C++.
We only need to put additional queries in the C++ files.
2020-06-15 11:51:28 +02:00
Kiyan Yazdani
6b26674ba0
Merge pull request #80 from steelsojka/feat/user-query-overrides
...
feat(queries): allow user query overrides
2020-06-15 11:43:42 +02:00
Stephan Seitz
45ea0df21a
Add tree-sitter-regex
...
This might be interesting for injected highlighting
2020-06-14 13:09:38 +02:00
Steven Sojka
44108fe03e
feat(queries): allow for user overrides
2020-06-14 05:58:09 -05:00
Thomas Vigouroux
fbade728fe
feat: add syntax-based folding
2020-05-25 11:19:38 +02:00
Thomas Vigouroux
9afad9698e
Merge pull request #56 from theHamsta/python-locals
...
Add python locals.scm
2020-05-23 15:19:03 +02:00
Stephan Seitz
3b3a692e2c
Remove postspaces and avoid one global
2020-05-22 17:07:28 +02:00
Stephan Seitz
f6bf56974e
Introduce @include
2020-05-17 21:56:44 +02:00
Thomas Vigouroux
0ab6bbec67
install: allow installing multiple parsers at once
...
This allow commands like so :
:TSInstall c rust lua python
2020-05-15 17:24:54 +02:00
kiyan42
8be2dc64a2
Expose internal api.
...
- add `exposed_state` to expose 'current_node' and 'cursor_pos'
for a current buffer to the user.
- add `get_buf_state` and `get_node_api` for users.
- add documentation about api functions.
- remove `node_movement` module which should be done in user side.
2020-05-15 14:19:29 +02:00
kiyan42
45dcebb15f
refacto/feat: better handling of parser updates
...
features:
- node_movement is moving between scopes.
- add selection initialization from normal mode
- add a decremental selection
improvements:
- attach to buffer to run tree parsing on change
- run state update on CursorMoved
- the buffer state is:
```
{
cursor_pos = { row=row, col=col },
current_node = node_under_cursor,
selection = {
range = nil, -- activates when starting a selection
nodes = {} -- filling up when starting an incremental selection
},
parser = parser, -- parser for current buffer
}
```
- refacto all the modules reliant on parsing the tree, update the current nodes, get the current nodes...
fixes:
- fix has_parser to look for .so libraries
- fix should select the whole file when selection root in selection
2020-05-12 16:16:48 +02:00