kawre / leetcode.nvim

A Neovim plugin enabling you to solve LeetCode problems.
MIT License
655 stars 34 forks source link

Make treesitter optional #12

Closed igorgue closed 8 months ago

igorgue commented 8 months ago

I don't have treesitter installer, but your plugin depends on it, can you make it optional?

kawre commented 8 months ago

I will look into this, but disabling treesitter would make question description formatting not work, as leetcode responds the question content in html. You can always use something like leetbuddy which doesn't depend on treesitter.

igorgue commented 8 months ago

@kawre do you use treesitter to render the html live? I had no idea it could do that... sounds like it's needed.

kawre commented 8 months ago

Yes, you can check out parser. It could be disabled to just display plain text without html tags removed with regex, but LeetCode API is very inconsistent and using something that acutally understands html can eliminate those imprefections. Plus i'm able to add fancy colors to make the description more readable.

kawre commented 8 months ago

@igorgue Treesitter is now optional