Closed stevennevins closed 1 year ago
Code folding is not implemented in the solidity lsp. Could this maybe come from a different plugin?
I think i read in the coc plugin docs that it consults the lsp to fold based on syntax. I'll do a bit more research and report back
I think this behavior is caused coc trying to handle the code folding itself and this is just coc doing it's best to infer folding ranges without knowing solidity syntax since it's not handled by the lsp. Might be more appropriate to close this issue and add this to the list prioritizing features to support
I actually had a look at how LSP can guide folding and it's actually not that complex: => https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_foldingRange
Also, coc.nvim does support that, so it should be fairly trivial to ensure functionality with some working clients.
This issue has been marked as stale due to inactivity for the last 90 days. It will be automatically closed in 7 days.
Description
LSP improper detection of code folding
Environment
Steps to Reproduce
Example
setup function folds improperly