mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 06:39:14 +00:00
nvim: autocommands for conceallevel
This commit is contained in:
parent
b297ef80d8
commit
ff67fbe4d9
1 changed files with 10 additions and 0 deletions
|
|
@ -58,3 +58,13 @@ vim.api.nvim_create_autocmd({ "VimEnter", "FocusGained", "BufEnter" }, {
|
||||||
group = vim.api.nvim_create_augroup("ReloadFileOnChange", {}),
|
group = vim.api.nvim_create_augroup("ReloadFileOnChange", {}),
|
||||||
command = "checktime",
|
command = "checktime",
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local auto_conceallevel = vim.api.nvim_create_augroup("markdown-conceallevel", { clear = true })
|
||||||
|
vim.api.nvim_create_autocmd(
|
||||||
|
"InsertEnter",
|
||||||
|
{ group = auto_conceallevel, pattern = "*.md", callback = function() vim.o.conceallevel = 0 end }
|
||||||
|
)
|
||||||
|
vim.api.nvim_create_autocmd(
|
||||||
|
{ "InsertLeave", "BufEnter", "WinEnter" },
|
||||||
|
{ group = auto_conceallevel, pattern = "*.md", callback = function() vim.o.conceallevel = 3 end }
|
||||||
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue