-
Notifications
You must be signed in to change notification settings - Fork 273
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
fix(indentation): hover behavior when indentation not set #863
Conversation
0e73345
to
c7b8877
Compare
Works for me. Backporting to the Arch Linux package ❤️ |
Oh yes please. I am having this problem :) |
can you rebase the PR? |
c7b8877
to
cca7c2f
Compare
CI failed with a prettier error. I did not notice that #831 fixed this on the side but did not provide any tests. This is a good complement PR, and I would like to merge it if you can update it for the prettier fix |
The previous behavior of hover replaces indentations with the   entity, because Markdown treats whitespace at the beginning of a line in a special way. However, when the indentation setting wasn't set, the regex that does that replace was set to empty ("") and so would include an   entity between every character. Signed-off-by: Kasama <[email protected]>
cca7c2f
to
ab85743
Compare
fixed. It seems my auto-format wasn't setup to use the project's config 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Nice, would be great to have a release soon, so we can have this fix rolled out! Thanks for the help! |
What does this PR do?
The previous behavior for hover replaces indentations with the
 
entity, because Markdown treats whitespace at the beginning of a line in a special way. However, when the indentation setting wasn't set, the regex that does that replace was set to empty (""
) and so would include an 
entity between every character.This went under the radar because the previous PR #844 also changed the tests setup to include a
.withIndentation
call, which made sure all tests were passing.In this PR I'm reverting that to the default behavior for most tests, but overriding the default only on the test introduced in #844.
What issues does this PR fix or reference?
The issue is referenced on a comment of PR #844. here
Is it tested? How?
I have tested this fix with a neovim setup as described in the original problem report in the PR comment.
At the risk of simply repeating myself, below is the full set of reproduction steps:
Open for steps
cd $(mktemp)
init.lua
with the following contents:.gitlab-ci.yaml
with the following contentsrun neovim with
nvim --noplugin -u init.lua .gitlab-ci.yaml
.give it a couple of seconds to spin up
yaml-language-server
and press<space>
with the cursor on top of thestages
word.