mirror of
https://github.com/nvim-treesitter/nvim-treesitter.git
synced 2026-07-07 05:50:04 -04:00
refacto: remove buf_state
- remove buf_state and related code - add get_node_at_cursor() - better incremental selection (code is localized)
This commit is contained in:
parent
772aa4c169
commit
38af29a912
9 changed files with 100 additions and 233 deletions
|
|
@ -5,7 +5,7 @@ local api = vim.api
|
|||
local ts = vim.treesitter
|
||||
|
||||
local queries = require'nvim-treesitter.query'
|
||||
local utils = require'nvim-treesitter.utils'
|
||||
local parsers = require'nvim-treesitter.parsers'
|
||||
|
||||
local M = {
|
||||
locals = {}
|
||||
|
|
@ -18,7 +18,7 @@ function M.collect_locals(bufnr)
|
|||
local query = queries.get_query(ft, 'locals')
|
||||
if not query then return end
|
||||
|
||||
local parser = utils.get_parser(bufnr, ft)
|
||||
local parser = parsers.get_parser(bufnr, ft)
|
||||
if not parser then return end
|
||||
|
||||
local root = parser:parse():root()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue