Open refaelsh opened 2 years ago
For 2 and 3 please see what I wrote in the other ticket.
For 1, this is actually a bug in Neovim. I have reported it here https://github.com/neovim/neovim/issues/19557 I suspect it also causes 4
For 2 and 3 please see what I wrote in the other ticket.
I will do it asap today.
For 1, this is actually a bug in Neovim. I have reported it here neovim/neovim#19557 I suspect it also causes 4
Very interesting! It seems like something that should have been discovered as a bug in Neovim a long time ago, as soon as this feature was introduced in Neovim. Very interesting.
- This happens because your font does not support the default character for headlines.nvim. You can either change/patch your font, or use a different character.
I prefer to change the font I am using.
font:
normal:
family: Consolas
style: Regular
Yes, the font in the terminal. I am using the nerd font patched version of Fira Code. https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode
Yes, the font in the terminal. I am using the nerd font patched version of Fira Code. https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode
Interestingly, their README says that my terminal of choice, Alacritty, is not supported. Here is the link: https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode#terminal-compatibility-list.
Perhaps, maybe, you know of some other font that will work with headlines.nvim
?
I think it's only the ligatures that won't work, alacritty just doesn't support those.
https://github.com/alacritty/alacritty/issues/50
You should still be able to use the font
This happens because your org headline highlight groups have a background color. https://github.com/akinsho/org-bullets.nvim uses that color for the bullets, but the background color of virtual text overwrites the highlight of the headline from headlines.nvim.
I am sorry, I don't understand any of it. Can you please explain it again using different words?
P.S.
your org headline highlight groups have a background color
- They do? Well, I don't know what I have in my init.vim that does that. It is the first time I am hearing the term
org headline highlight groups
.- Wait, this plugin supposes to add the background color to the headlines, is it not?
As can be seen from the above, I am thoroughly confused :-)
- This happens because your font does not support the default character for headlines.nvim. You can either change/patch your font, or use a different character.
kitty
without changing any setting (its the first time I installed kitty), and problem number 3 no longer exists. Interesting, it seems to be the fault lies with Alacritty?
- They do?
orgmode.nvim takes the colors from your colorsheme. So if that has background colors, it will have too.
- Wait, this plugin supposes to add the background color to the headlines, is it not?
It is. This is a bit complicated. You have the first level of highlights from your colorscheme. Then this plugin adds highlights to change the background color of the headline. But then, org-bullets adds the bullets to the headlines, and they have background color too. org-bullets has the highest priority, so it overwrites the background color from this plugin. To fix this, you have to remove the background highlight from those highlight groups.
I don't use Alacritty myself, it's possible it just can't display that character. You can still just use a different character, like the one I posted in the original issue.
- This happens because your font does not support the default character for headlines.nvim. You can either change/patch your font, or use a different character.
I've decided to permanently move to kitty+Fira Code, and problem number 3 is gone. Thank you :-)
for i = 1, 40, 1 do
vim.cmd(string.format("highlight OrgHeadlineLevel%d guibg=NONE", i))
end
I did that, and problem number 2 still exists. Suggestions please :-)
Location matters, you need to do this after your colorscheme loads, but before org-bullets setup
Location matters, you need to do this after your colorscheme loads, but before org-bullets setup
Problem number 2 still remains, but much less in quantity. I will blame the Neovim bug you mentioned :-)
I also see some squares under the headings in my notes:
@nyngwang the squares are related to the font used in your terminal. Seems that FiraCode would work.
I personally use Nerd Font Hack and configured like this to get rid of the squares (using lazy.nvim
):
return {
"lukas-reineke/headlines.nvim",
dependencies = "nvim-treesitter/nvim-treesitter",
opts = {
markdown = {
fat_headline_lower_string = "▔",
},
},
}
@lukas-reineke Thanks for the plugin! May I suggest to mention the font "requirement" somewhere in the README.md?
Hard to describe in words, please see the attached screenshot, and then I will try to explain in words. Saw the screenshot? Great.
cat file.org
.Here the org file to reproduce it: https://pastebin.pl/view/6d3fc321.
Neovim version 0.7.2.
A requested, I am reopening this issue from here: https://github.com/nvim-orgmode/orgmode/issues/378.