| Age | Commit message (Collapse) | Author |
|
|
|
This will avoid using internal data.
|
|
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
|
|
|
|
|
|
|
|
|
|
|
|
- shared query group stuff -> query.lua
- local-specific stuff from ts_utils -> locals.lua
|
|
|
|
|
|
- remove buf_state and related code
- add get_node_at_cursor()
- better incremental selection (code is localized)
|
|
|
|
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
|
|
As suggested in #37, rename the textobj module to incremental_selection.
Also adds a utility function to get the config of a module.
|