nvim: improved folding configs

master
tiyn 1 year ago
parent 4beec8a2b0
commit 075bf61358

@ -71,7 +71,6 @@ vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.o.conceallevel = 0
vim.g.markdown_folding = 1
-- load general mapped keys
@ -85,3 +84,8 @@ require('loadplugins')
-- load general mapped keys
require('keymap')
vim.cmd([[
set foldopen-=hor
set foldclose-=hor
]])

@ -91,3 +91,13 @@ vim.keymap.set('n', '<F4>', ':Telescope find_files<CR>', { noremap = true })
vim.keymap.set('n', '<F6>', ':call spelunker#toggle()<CR>', { noremap = true })
vim.keymap.set('n', 'ZT', '<NOP>', { noremap = true })
vim.keymap.set('n', 'Zt', '<NOP>', { noremap = true })
-- kevinhwang91/nvim-ufo
vim.keymap.set('n', 'K', function()
local winid = require('ufo').peekFoldedLinesUnderCursor()
if not winid then
-- choose one of coc.nvim and nvim lsp
vim.fn.CocActionAsync('definitionHover') -- coc.nvim
vim.lsp.buf.hover()
end
end)

@ -359,6 +359,7 @@ return require("lazy").setup({
-- better language highlighting by improved parsing
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
dependencies = {
-- automatically close html-tags
'windwp/nvim-ts-autotag',

Loading…
Cancel
Save