Add folding and searching lua files

This commit is contained in:
flyingscorpio@clevo 2022-07-31 09:23:04 +02:00
parent 556429ab16
commit d9c6775dc7
3 changed files with 20 additions and 0 deletions

View file

@ -2,5 +2,7 @@ require('transition')
require('encoding')
require('remaps')
require('spacetabs')
require('searching')
require('folding')
require('plugins')
-- require('colors')

View file

@ -0,0 +1,10 @@
-- FOLDING
-- enable folding
vim.opt.foldenable = true
-- open most folds by default (0 to 99)
vim.opt.foldlevelstart = 10
-- guard against too many nested folds
vim.opt.foldnestmax = 10
-- fold based on filetype
vim.opt.foldmethod = 'syntax'

View file

@ -0,0 +1,8 @@
-- SEARCHING
-- search as characters are entered
vim.opt.incsearch = true
-- highlight matches
vim.opt.hlsearch = true
-- turn off search hightlight after search
vim.keymap.set('n', '<leader', '<cmd>nohlsearch<CR>', { remap = false })