mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-08 06:20:01 -04:00
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
This commit is contained in:
parent
307c78aa1e
commit
45dcebb15f
14 changed files with 555 additions and 333 deletions
|
|
@ -55,8 +55,6 @@ function locals_health(lang)
|
|||
end
|
||||
end
|
||||
|
||||
|
||||
-- TODO(vigoux): Maybe we should move each check to be perform in its own module
|
||||
function M.checkhealth()
|
||||
-- Installation dependency checks
|
||||
health_start('Installation')
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue