-
-
Notifications
You must be signed in to change notification settings - Fork 8
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: Escapes percentages in LSP progress messages #95
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
📢 Thoughts on this report? Let us know! |
hi @cuducos, thanks to your PR, please also update |
Thanks for the quick response! I'm on that right now : ) Also… thanks for the great plugin and for being really active over here 💜 |
I am not in front of my keyboard, would you please help check what is the version of If nvim-0.6 don't have this API, we may need to consider other implementations, or update the minimal required nvim version. |
Great catch! Probably it is newer. I see it as part of this discussion neovim/neovim#23242 which dates from April (I couldn't find yet when it was actually added). Probably it's a 0.9+ thing. I'll go for an alternate implementation. |
Updating for the records: This snippet: local text = "42%"
local cleaned = vim.pesc(text)
print(vim.pesc(text))
print(cleaned) In 0.9.1 results in:
In 0.4.4, though, results in:
Based on that, it looks like just storing the result o |
Yeah, I search this API in helpful.vim, it shows it's from nvim-0.4. Should be good then. Update: tested in my local machine with lua_ls, works good. Merged into main branch. |
A trio I use (Ruby LSP, Solargraph and RuboCop) is sending messages through LSP progress triggering an error like
E539: Illegal character < >
.I did some debugging and found out when the
message
in theseries_format
contains a%
it needs to be escaped.For example, when in the
series_format
, if the message is100% completed
, the space right afer the%
triggers theE539: Illegal character < >
because the end result sent to Neovim would be:Notice that in
Ruby LSP: indexing files 100% completed (100%%)
the second%
is escaped, but the first one is not.This should help get Ruby LSP going, as well as other LSP that uses
%
in the messages themselves.