-
Notifications
You must be signed in to change notification settings - Fork 49
bug: Incorrct padding on first non-toplevel bullet when right_pad != 0 #199
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
Comments
Instructions not followed, I am unable to replicate with this input.
Give me the text causing the problem. |
Just these lines will make the problem.
On line 4(the correct line):
|
You may be experiencing the issue outlined here: #93 (comment) Can you try updating treesitter? |
## Details Issue: #199 Issue may not be related to this but setting a priority of 0 to right padding like is done with left padding seems like the correct approach. Update unit tests to validate priority value as well.
After disable treesitter hignlight using { -- Highlight, edit, and navigate code
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
main = 'nvim-treesitter.configs', -- Sets main module to use for opts
opts = {
ensure_installed = {
'bash',
'c',
'diff',
'html',
'lua',
'luadoc',
'markdown',
'markdown_inline',
'query',
'vim',
'vimdoc',
'java',
'fish',
'python',
},
auto_install = true,
highlight = {
enable = true,
additional_vim_regex_highlighting = { 'ruby' },
},
indent = { enable = true, disable = { 'ruby' } },
},
} Is this expected? |
No, this is not expected, can you try updating nvim-treesitter using your plugin manager, with that the parsers should also be updated. If this doesn't fix anything do you know if you have any custom treesitter highlights in your config? |
Have updated treesitter to latest commit.
No, this is everything about treesitter in my config. And If I disable markdown highlight in treesitter config like |
It would seem like there's something going on with the highlights, other plugins can modify them so it's hard to know for sure what's going on. Let's look at what your highlights are just to rule that out. First open some random Then run the following 2 commands to get the files containing your highlights:
For me the outputs were:
Give me the output from these commands as well as the contents of those files. This is what mine contain. markdown/highlights.scm:
markdown_inline/highlights.scm:
You can actually see there's a |
I think it is my colorscheme newpaper markdown: { "/home/heddxh/.local/share/nvim/lazy/nvim-treesitter/queries/markdown/highlights.scm", "/home/heddxh/.local/share/nvim/lazy/newpaper.nvim/after/queries/markdown/highlights.scm" } markdown_inline: { "/home/heddxh/.local/share/nvim/lazy/nvim-treesitter/queries/markdown_inline/highlights.scm", "/home/heddxh/.local/share/nvim/lazy/newpaper.nvim/after/queries/markdown_inline/highlights.scm" } And off cource it does not comment the code like treesitter do. ;; Conceal backticks
(fenced_code_block
(fenced_code_block_delimiter) @markup.raw.delimiter
(#set! conceal ""))
;; Conceal bullet points
([(list_marker_plus) (list_marker_star)]
@markup.list
(#offset! @markup.list 0 0 0 -1)
(#set! conceal "•"))
([(list_marker_plus) (list_marker_star)]
@markup.list
(#any-of? @markup.list "+" "*")
(#set! conceal "•"))
((list_marker_minus)
@markup.list
(#offset! @markup.list 0 0 0 -1)
(#set! conceal "—"))
((list_marker_minus)
@markup.list
(#eq? @markup.list "-")
(#set! conceal "—")) So is this a issue of colorscheme plugin that they should fix? |
Yeah, that seems like the culprit. It's strange for a color scheme to extend highlights, I don't think there is any way to dynamically disable them either. There might be similar issues with checkboxes based on the other highlights. Can you try changing color schemes to validate? Unfortunately I wouldn't call it an issue on either side as much as a conflict of interests maybe. The color scheme author probably wants to provide some nice out of the box behavior by adding these extended highlights with nothing needed from the user and that might be what most people want from it. On the flip side these highlights delve more into the rendering space and it would be unexpected behavior IMO for a color scheme to provide them. Again with no way to opt out, but that's more of a side effect with how treesitter and after directories work. You're welcome to create an issue in the color scheme repo, get some more info, maybe mention the issue with bullet points specifically and see if they'll comment those out. But if not your options would be to use a different color scheme, not use this plugin, use this plugin but use 2 space indenting for lists otherwise you get this visual offset. |
Thank you for your help! |
Stumbled upon the same issue with the same Newpaper theme, which was not even in use, just installed (to use sometimes with theme switcher). I was living with weird bugs and unnecessary |
Neovim version (nvim -v)
0.10.1
Neovim distribution
N/A
Operating system
Arch Linux
Terminal emulator / GUI
konsole, kitty
Describe the bug
As the screenshot, top-level bullet look good. But at level-2 or smaller, the first bullet have no padding on the right though I set
right_pad = 1
.Expected behavior
Aligned all sub bullet with same right padding.
Healthcheck output
Plugin configuration
Plugin error log
Confirmations
Additional information
Additionally, As the wiki said, default setting will also render a space between the bullet sign and the text. But on my machine only if I increase the value of
bullet.right_pad
then it looks like this demo.The text was updated successfully, but these errors were encountered: