summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/refactor/highlight_current_scope.lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-07-10 22:17:51 +0200
committerThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-07-16 09:34:31 +0200
commit8cf2dc7f9ad31c7467d28f90aec920018e240b7f (patch)
tree3cfa3df9bc6aef2006b2bd6ec0fed530ffece02c /lua/nvim-treesitter/refactor/highlight_current_scope.lua
parenta4e2692c7b9fb562eca39ce0bb10ec2544bc7ccb (diff)
Refactor locals.lua:
- shared query group stuff -> query.lua - local-specific stuff from ts_utils -> locals.lua
Diffstat (limited to 'lua/nvim-treesitter/refactor/highlight_current_scope.lua')
-rw-r--r--lua/nvim-treesitter/refactor/highlight_current_scope.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/lua/nvim-treesitter/refactor/highlight_current_scope.lua b/lua/nvim-treesitter/refactor/highlight_current_scope.lua
index b32ccaf3..8b785ef8 100644
--- a/lua/nvim-treesitter/refactor/highlight_current_scope.lua
+++ b/lua/nvim-treesitter/refactor/highlight_current_scope.lua
@@ -1,6 +1,7 @@
-- This module highlights the current scope of at the cursor position
local ts_utils = require'nvim-treesitter.ts_utils'
+local locals = require'nvim-treesitter.locals'
local api = vim.api
local cmd = api.nvim_command
@@ -12,7 +13,7 @@ function M.highlight_current_scope(bufnr)
M.clear_highlights(bufnr)
local node_at_point = ts_utils.get_node_at_cursor()
- local current_scope = ts_utils.containing_scope(node_at_point, bufnr)
+ local current_scope = locals.containing_scope(node_at_point, bufnr)
local start_line = current_scope:start()