summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/incremental_selection.lua
AgeCommit message (Collapse)Author
2020-11-23fix: update interface following languagetree merge (#687)Thomas Vigouroux
2020-11-03parser: only use parse to get a treeThomas Vigouroux
This will avoid using internal data.
2020-09-07Incremental selection: fix skipping some nodesSantos Gallegos
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
2020-09-01use xmap in detachevakuator
2020-09-01use xmap instead of vmap in textobjectsevakuator
2020-08-22fix(modules): do not reattach if already attachedSteven Sojka
2020-08-06Add noremap option to mappingsRafaƂ Camlet
2020-08-02fix decremental selectionkiyan42
2020-07-16Refactor locals.lua:Stephan Seitz
- shared query group stuff -> query.lua - local-specific stuff from ts_utils -> locals.lua
2020-07-14Add textobjects moduleStephan Seitz
2020-07-05Make luacheck happyStephan Seitz
2020-06-19refacto: remove buf_statekiyan42
- remove buf_state and related code - add get_node_at_cursor() - better incremental selection (code is localized)
2020-05-22Remove postspaces and avoid one globalStephan Seitz
2020-05-12refacto/feat: better handling of parser updateskiyan42
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-02modules: move textobj to incremental_selectionThomas Vigouroux
As suggested in #37, rename the textobj module to incremental_selection. Also adds a utility function to get the config of a module.