Closed mehalter closed 7 months ago
Hey o/ Thanks for spending your time with this. I will totally support LSP in future updates, so no need to open a PR for me. I will use your code as a basis for the feature :)
Hey o/ Just providing feedback. I've started working on the LSP integration and so far it's looking good! Hopefully, i will have something to show soon.
Thanks for the update @brenoprata10 ! Very exciting stuff!! Let me know if you want any help testing or any work you want to offload on a random stranger on the interwebs 😂
@mehalter Do you know which LSPs support color highlighting? The only one I know of is tailwindcss. I would like to test my solution with more LSPs before release
PR is created with the initial version, Could you give it a try?
Just tested and it works great! Thanks so much!
The LSP specification defines a capability for a language server to return elements that are colors (Document Color Requests). This is supported by language servers like tailwindcss.
I started looking at the source code here and doing a bit of an investigation, but haven't gotten it organized into a pull request yet. I'm not sure if I will have time, so I figured I would leave the information I have gathered so far for what would need to go into a pull request:
create_highlight
should be updated to support multi-line highlights. with a start row/end row as these are possible (color.range.start.line
andcolor.range["end"].line
)create_highlight
could be modified to also take in a color table rather than just a string and decoding it.I hope this helps provide some guidance to getting this implemented! Thanks so much for maintaining this plugin!