How to combine toggle-concealer and set the conceallevel in one single keymap?
#1066
Answered
by
champignoom
amalgame21
asked this question in
Q&A
-
|
Sorry my lua skill is so so limited. vim.api.nvim_create_autocmd({"BufEnter", "BufWinEnter"}, {
pattern = "*.norg",
callback = function()
vim.opt.conceallevel = 2
vim.keymap.set( "n", "<leader>ntc", ":Neorg toggle-concealer<CR>")
vim.keymap.set( "n", "<leader>ntl", function()
if vim.opt.conceallevel:get() == 2 then
vim.opt.conceallevel = 0
elseif vim.opt.conceallevel:get() == 0 then
vim.opt.conceallevel = 2
end
end)
end,
})I would like to combine both keymaps into one, how can I do that? |
Beta Was this translation helpful? Give feedback.
Answered by
champignoom
Sep 8, 2023
Replies: 1 comment 10 replies
-
|
I think the syntax should be without the |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#1068 it's a bug