You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Details
Submitted as a bug: #140
When checkboxes are rendered they are padded with spaces to fill the
width of the underlying text. This is because most icons have a width of
2, while the text forming the checkbox (like [x]) has a width of 3. If
spaces were not added using overlay virtual text would result in one of
the square brackets poking through depending on the side of the padding.
We can use inline virtual text which was added in neovim 0.10.0 to fully
hide the underlying text and insert the virtual text, shifting text as
needed, however on its own this would remove the feature for users of
older versions of neovim.
To get around this I have added a position property to the checkbox
config which defaults to the new value of 'inline' which results in
nicer alignment of checkboxes. The value 'overlay' is available and will
result in identical behavior to before this change if users prefer it.
Additionally when initializing the config we check the neovim version
and change configuration values that are known to not work with older
versions to availble alternatives. Currently this is done for:
- checkbox position -> 'overlay' so as not to remove the feature and
require users to manually modify their config if they run neovim <
0.10.0
- code position -> 'right' since left alignment requires shifting text
while right does not, adding a feature to users if they did not dive
too deep into the options available for this plugin
Overall this updates behavior for anyone that can use it and keeps the
old behavior around either out of necessity (version) or personal
preference.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@
14
14
- wiki links nested in tables [72688ba](https://github.com/MeanderingProgrammer/render-markdown.nvim/commit/72688baea4ef0ed605033bf654b54d801b6a5f01)
15
15
- code block background when indented in lists [#133](https://github.com/MeanderingProgrammer/render-markdown.nvim/issues/133)
0 commit comments