nix/prog/nvim: add default fold options

This commit is contained in:
Dmitriy Pleshevskiy 2022-08-24 11:42:19 +03:00
parent c83e2458db
commit fad16649ba
Signed by: pleshevskiy
GPG key ID: 1B59187B161C0215

View file

@ -93,6 +93,12 @@ vim.opt.smartcase = true
-- Spell -- Spell
vim.opt.spelllang = 'en,ru' vim.opt.spelllang = 'en,ru'
-- Fold level
vim.opt.foldlevel = 99
vim.opt.foldlevelstart = 99
vim.opt.foldminlines = 3
vim.opt.foldnestmax = 5
------------------------------------------------------------------------------- -------------------------------------------------------------------------------
-- --
-- File type specified -- File type specified
@ -136,6 +142,7 @@ vim.api.nvim_create_autocmd(bufReadFile, {
callback = function () vim.wo.spell = true end, callback = function () vim.wo.spell = true end,
}) })
-- Set up fold method for each lang
local folding_augroup = vim.api.nvim_create_augroup('folding', {}) local folding_augroup = vim.api.nvim_create_augroup('folding', {})
vim.api.nvim_create_autocmd(bufReadFile, { vim.api.nvim_create_autocmd(bufReadFile, {
group = folding_augroup, group = folding_augroup,