nvim: set conceallevel only for org files

This commit is contained in:
tastytea 2022-08-11 01:06:29 +02:00
parent 14ad39e5c5
commit 36f0d07ecc
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM
2 changed files with 14 additions and 2 deletions

View File

@ -13,6 +13,20 @@ packer.use {
},
ensure_installed = {'org'},
}
vim.api.nvim_create_augroup('config_fileformats', { clear = true })
vim.api.nvim_create_autocmd(
{ 'BufEnter' },
{
group = 'config_fileformats',
pattern = { '*.org' },
callback = function()
-- allow to hide stuff, like links
vim.opt_local.conceallevel = 2
vim.opt_local.concealcursor = 'nc'
end
}
)
end
}

View File

@ -13,8 +13,6 @@ vim.o.shiftwidth = 4 -- 1 indentation = 4 spaces
vim.o.completeopt = 'menu,menuone,noselect' -- completion popup
vim.o.autochdir = true -- change workir to current file dir
vim.opt.conceallevel = 2 -- hidden stuff, needed for org
vim.opt.concealcursor = 'nc'
vim.o.updatetime = 500 -- fire CursorHold autocommand event
-- theme