From 45dcebb15f1a954eba2bcb3ae4c1a03f710a1f2a Mon Sep 17 00:00:00 2001 From: kiyan42 Date: Fri, 8 May 2020 11:22:59 +0200 Subject: 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 --- doc/nvim-treesitter.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'doc') diff --git a/doc/nvim-treesitter.txt b/doc/nvim-treesitter.txt index 084936bad..9c66b0a57 100644 --- a/doc/nvim-treesitter.txt +++ b/doc/nvim-treesitter.txt @@ -31,25 +31,27 @@ By default, everything is disabled. To enable support for features, in your `ini lua <