SpartanJ / ecode

Lightweight multi-platform code editor designed for modern hardware with a focus on responsiveness and performance.
MIT License
908 stars 13 forks source link

FR: code-folding #231

Closed ghost closed 1 month ago

ghost commented 4 months ago

Lite XL and Pragtical seem to not support code-folding. So, none of the Lite-based code editors currently support code-folding. It seems existing lexers will need to be modified to include code-folding rules (like what of scintillua).

SpartanJ commented 4 months ago

Yes, this is planned. We will probably rely on the LSP for this feature, since it's the easiest for us to provide it. So it will be limited to languages with LSP code-folding support. And maybe later if tree-sitter support is added we will be able to rely on the tree-sitter AST. Any other method is usually unreliable (simpler implementations will just code-fold with balanced bracket-matches, that maybe I'll support as a fallback method).

SpartanJ commented 2 months ago

Code folding has been implemented, commit here plus the implementation of soft-wrap should close all the pending "basic" functionalities for a code-editor. Both features will be available in the next ecode release.