vis-lspc
vis-lspc copied to clipboard
misc
Hey, I've been maintaining a fork of vis-lspc to adapt it to my needs, just dropping this PR here so you can cherry pick any commits you might find useful. Most commits are atomic, some changes:
- Fetch the line's content from the file (either by re-using the existing vis buffer or opening it via the general lua APIs)
- Convert paths to relative paths so more content is visible when being piped to a program like
fzy
- Hover messages are requested in markdown
- Different styling for each type of diagnostic message
-
vis:pipe
refactors to usevis:pipe_buffer
, as I noticed theprintf
command construction breaking in large codebases
If you'd be interested in having some of this upstream I can create individual PRs
Thanks a lot for creating this project!
Thank very much for your contribution! I will look at your changes when I have time and reach out to you if necessary.
Applyied so far: (sorry for making this harder to rebase)
- 1c3cbec8097f79c90d56a8d90c1cc66335fdc308 as fe4249de4f9155b874d68bcc7fd68851cc763a52
- 126b882f188cc49ce9392689496edd37ec2fbe52 as 8303e07b2fcaf0a23a1fa4604aa0d0380041f231
- 4d88cfcdda41829a3d7f830eb0904bf5275bf8c6 as ac7bdc1f1a84d9e7bbd28f091700993362b72525
- ee3c172ff9190511bf17e7332c22d41dba0eb27a as 435559d6ff94ba861c67a486736af5c506348326
- 840d27336f76601660fa91e615c98e85b9c22709 as a2dc6b94c97dcb55d5451fcf7b89498dbc0b9b9d
- lspc_show_message:
- f2ab5c99d0fe13c124672c6c4e1969a8975a88c7 as 85ace3c4355d7bb9f981b9d24a84c790347575c5
- 6902efd51029fe33e739b7d1bdd325ff83195e29 as efaf185f4368aeb04de0b851f76b5bad020804e7
TODO
- [ ] relative paths
- [X] show messages in new windows using syntax highlghting
- [ ] show line content
- [ ] detect and propagate project roots
What is the reason for the
_show_message
change?I think it has worse UX than using
vis:message
. The new split window has to be forcefully closed using:q!
because it has unsaved changes.
Yeah it's just a personal thing. I felt vis:message output was harder to follow as there was no highlighting and the previous output was clubbed together. :q!
is indeed annoying, i use the ZQ
binding instead
@git-bruh let me know what you think about https://gitlab.com/muhq/vis-lspc/-/merge_requests/49.
I tried to make the way messages are presented configurable.
You should achieve your desired behavior by setting lspc.show_message = 'open'
in your configuration.