-
Notifications
You must be signed in to change notification settings - Fork 189
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conceallevel #399
Comments
There's quite a few different ways that people set their config options. But conceallevel isn't just an Obsidian nvim thing.
Here's a basic example for how one could set the conceal level. I have options broken into it's own file. But you might have something configured differently. |
Ok thank you very much I did it also with a different file!!! |
Is there a way to set this just for markdown? Or possible only when the obsidian plugin is loaded? |
@ewoolsey you can try adding this to your config file (init.vim):
Doing so will set conceallevel to 2 for markdown files regardless of your global setting. Edit: I'm not an expert in lua so I'm not 100% sure this applies to init.lua files as well. If not, you need to find its equivalent syntax, but it's certainly doable. |
I was able to put a bandaid over it for me by just adding |
You make an
It will automatically load that file when you open a markdown file only. |
If anyone looks for a simpler fix, you can just add this to your -- Add concealing when we open markdown files for obsidian.nvim ui
vim.api.nvim_create_autocmd('BufEnter', {
callback = function (opts)
if vim.bo[opts.buf].filetype == 'markdown' then
vim.opt.conceallevel = 2
end
end,
}) This is similar to @armaninux suggestion but in plain lua |
I added this callbacks = {
enter_note = function()
vim.wo.conceallevel = 1
end,
leave_note = function()
vim.wo.conceallevel = 0
end,
}
It works as intended, but I get this ugly warning now.
I see that this was discussed here #286 (comment) @epwalsh Is there a way to set |
I came here searching for exactly this. I don't want |
📚 The doc issue
In the doc it's talked about the conceallevel that has to be set to 1 or 2, but no indication on how to set it up, where in the config.... Has it is mentioned in another issue that I've found you detail how to set it up. Would be great to have it explained here too.
Suggest a potential alternative/fix
Add the detailed steps to set up the conceallevel!!!
The text was updated successfully, but these errors were encountered: