per_buffer_config = {
treesitter_context = {
line_shift_down = 2, -- how many lines shift down from center, so cursor above will have actual code not influenced by context.
},
lines = 6,
},
note: the zindex should be lower than context's window
Please try this branch to test it, we can make this option undocumented, test it for now and wait this to merge( I tried to make it work out of box, but our window opens too fast to determine bufnr in WinEnter autocmd).
https://github.com/nvim-treesitter/nvim-treesitter-context/pull/419
It looks like with line_shift_down=2
with line_shift_down=1
with line_shift_down=0
the config option now is
note: the zindex should be lower than context's window Please try this branch to test it, we can make this option undocumented, test it for now and wait this to merge( I tried to make it work out of box, but our window opens too fast to determine bufnr in WinEnter autocmd). https://github.com/nvim-treesitter/nvim-treesitter-context/pull/419