hansec / fortran-language-server

Fortran Language Server for the Language Server Protocol
MIT License
295 stars 57 forks source link

Language-Aware folding #166

Open JayPBe opened 4 years ago

JayPBe commented 4 years ago

Hey,

I've been using your language server for quite a while now and it's a blessing for my daily work. One thing which is bugging me though, is the fact that, by default, VSCode code folding is only indentation based. As far as I understand, language aware code folding would be possible via the language server (https://microsoft.github.io/language-server-protocol/specification#textDocument_foldingRange), however my knowledge of this topic is too limited to implement this myself.

It'd be great if you could implement some basic language aware code folding and point me to the part of the fortls code which handles this, so I can possibly extend this as needed.

Thanks a lot for your awesome work.

hansec commented 3 years ago

Thanks for the suggestion and sorry for the delay. I agree this would be a good feature to have. I'll look into adding it and how it is handled by VSCode and Atom.

phil-blain commented 3 years ago

That would be immensely helpful for me as well.