diff options
| author | kiyan42 <yazdani.kiyan@protonmail.com> | 2020-05-08 11:22:59 +0200 |
|---|---|---|
| committer | kiyan42 <yazdani.kiyan@protonmail.com> | 2020-05-12 16:16:48 +0200 |
| commit | 45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a (patch) | |
| tree | 50cbca8e9615d69a8ff9aca6b33a35abb32f9363 /lua/nvim-treesitter.lua | |
| parent | Merge pull request #47 from theHamsta/fix-typo-contributing.md (diff) | |
| download | nvim-treesitter-45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a.tar nvim-treesitter-45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a.tar.gz nvim-treesitter-45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a.tar.bz2 nvim-treesitter-45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a.tar.lz nvim-treesitter-45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a.tar.xz nvim-treesitter-45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a.tar.zst nvim-treesitter-45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a.zip | |
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
Diffstat (limited to 'lua/nvim-treesitter.lua')
| -rw-r--r-- | lua/nvim-treesitter.lua | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/lua/nvim-treesitter.lua b/lua/nvim-treesitter.lua index 90b5468a3..5c0dfac75 100644 --- a/lua/nvim-treesitter.lua +++ b/lua/nvim-treesitter.lua |
