diff options
author | Squibid <me@zacharyscheiman.com> | 2025-01-24 13:56:11 -0600 |
---|---|---|
committer | Squibid <me@zacharyscheiman.com> | 2025-01-24 13:56:11 -0600 |
commit | 8eaa615596be321a3be12378c5e7d65cc7e482b6 (patch) | |
tree | 53fe601048ea302962420de4feff465e4c7d9317 /lua/conf/plugins/treesitter-context.lua | |
parent | a0ebc39b59a98a69fbb6abf150f86dc4e19987a3 (diff) | |
download | nvim-master.tar.gz nvim-master.tar.bz2 nvim-master.zip |
Diffstat (limited to 'lua/conf/plugins/treesitter-context.lua')
-rw-r--r-- | lua/conf/plugins/treesitter-context.lua | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/lua/conf/plugins/treesitter-context.lua b/lua/conf/plugins/treesitter-context.lua deleted file mode 100644 index 3306e6b..0000000 --- a/lua/conf/plugins/treesitter-context.lua +++ /dev/null @@ -1,40 +0,0 @@ -local misc = require("core.misc") -local map = misc.map - -local branch = nil -if vim.version().minor == 7 then - branch = 'compat/0.7' -end - -return { 'nvim-treesitter/nvim-treesitter-context', - disable = vim.version().minor < 7, - branch = branch, - requires = 'nvim-treesitter/nvim-treesitter', - function() - local treesitter_context = require("treesitter-context") - - treesitter_context.setup { - enable = true, - line_numbers = true, - separator = '─', - } - - -- mapping to jump to the first closest line of context in buffer - map("n", "[j", function() - local lline = vim.api.nvim_win_get_cursor(0)[1]; - local line - - -- go to the first closest line of context and center it - treesitter_context.go_to_context() - vim.api.nvim_input('zz') - - -- make sure we actually moved - line = vim.api.nvim_win_get_cursor(0)[1]; - if line == lline then - return - end - - misc.timeout_highlight() - end) - end -} |