mirror of
https://github.com/neovim/neovim.git
synced 2026-03-27 19:02:02 +00:00
18 lines
723 B
Lua
18 lines
723 B
Lua
vim.treesitter.start()
|
|
|
|
vim.keymap.set('n', 'gO', function()
|
|
require('vim.treesitter._headings').show_toc()
|
|
end, { buf = 0, silent = true, desc = 'Show an Outline of the current buffer' })
|
|
|
|
vim.keymap.set('n', ']]', function()
|
|
require('vim.treesitter._headings').jump({ count = 1 })
|
|
end, { buf = 0, silent = false, desc = 'Jump to next section' })
|
|
vim.keymap.set('n', '[[', function()
|
|
require('vim.treesitter._headings').jump({ count = -1 })
|
|
end, { buf = 0, silent = false, desc = 'Jump to previous section' })
|
|
|
|
vim.b.undo_ftplugin = (vim.b.undo_ftplugin or '')
|
|
.. '\n call v:lua.vim.treesitter.stop()'
|
|
.. '\n sil! exe "nunmap <buffer> gO"'
|
|
.. '\n sil! exe "nunmap <buffer> ]]" | sil! exe "nunmap <buffer> [["'
|