Closed Kasama closed 1 year ago
Works for me. Backporting to the Arch Linux package ❤️
Oh yes please. I am having this problem :)
can you rebase the PR?
It seems the actual issue has been fixed at #831 here, but I think the test changes are still relevant.
WYT?
I have rebased it, anyway
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
fixed. It seems my auto-format wasn't setup to use the project's config :smile:
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
1. Download neovim (I used v0.8.3) 2. Create a new folder `cd $(mktemp)` 3. create a file named `init.lua` with the following contents: ```lua local settings = { yaml = { schemas = { ["https://gitlab.com/gitlab-org/gitlab/-/raw/master/app/assets/javascripts/editor/schema/ci.json"] = ".gitlab-ci.y*l", }, hover = true, } } vim.api.nvim_create_autocmd('FileType', { pattern = "yaml", callback = function(args) vim.lsp.start({ name = 'yamlls', cmd = { 'yaml-language-server', '--stdio' }, -- replace with local installation as necessary root_dir = vim.fn.fnamemodify('./.gitlab-ci.yaml', ':p:h'), settings = settings }) end }) vim.keymap.set('n', '