zyedidia / micro

A modern and intuitive terminal-based text editor
https://micro-editor.github.io
MIT License
25.2k stars 1.18k forks source link

【Feature request】- outline of code (at least common used types like markdown, c/c++, python, etc) #3435

Open Giessen opened 2 months ago

Giessen commented 2 months ago

[Feature request description] A sideabar showing the headlines/structure of current code/text file.

[Why] When browsing through a long text file (e.g., markdown type), it's painful to locate and navigate. An outline of contents at sidebar would greatly improve the efficiency.

[Reference] https://github.com/hedyhli/outline.nvim?tab=readme-ov-file

[Appearing like this] image

Thank you very much for the great work.

Neko-Box-Coder commented 2 months ago

A proper outline would require sending requests and parsing responses from LSP, maybe with Document Symbols Request I personally don't use LSP but we do have some LSP plugins however I don't think they have something similar to what you want yet.

That being said, I have a "minimap" feature in my plugin that summarizes the file based on the indentations, which works fine for coding, not so much on files like markdowns :sweat_smile:

Giessen commented 2 months ago

Glad to know that. Thanks a lot.