added treesitter builtin (#31)

* added treesitter builtim

* fixed treesitter pr comments

* fix the buffer previewer to keep lnum visable
This commit is contained in:
Brian Ryall
2020-09-06 22:48:36 -04:00
committed by GitHub
parent 0185d9b6b0
commit b065423013
3 changed files with 83 additions and 0 deletions

View File

@@ -123,6 +123,8 @@ previewers.vim_buffer = defaulter(function(_)
if entry.lnum then
vim.api.nvim_buf_add_highlight(bufnr, previewer_ns, "Visual", entry.lnum - 1, 0, -1)
vim.api.nvim_win_set_option(status.preview_win, 'scrolloff', 10)
vim.api.nvim_win_set_cursor(status.preview_win, {entry.lnum, 0})
-- print("LNUM:", entry.lnum)
end
end,