This package lets you show the scope info of blocks like function
definitions, loops, conditions etc. It does this by adding the first
line of these blocks at the end of the last char of that block. In the
screenshot you can see the light grey things after the closing
brackets }. It makes use of tree-sitter to figure out block start
and end of items. It has support for elisp-tree-sitter as well as builtin
treesit package. As long as you have one or the other, it should
work.
The package exposes a single minor mode scopeline-mode which you
can use to enable or disable the functionality.
To enable scopeline, you just have to call scopeline-mode.
(use-package scopeline
:config (add-hook 'prog-mode-hook #'scopeline-mode))scopeline-overlay-prefix: Change this to another string to change the prefix. Defaults to¤.scopeline-face: This is the face applied for the scopeline overlay, change this to change how it appears. Defaults to whatever comments are highlighted with.scopeline-targets: Update this alist which mapsmajor-modeto list of tree-sitter entries to control what all blocks get scopeline overlaysscopeline-min-lines: Minimum number of lines before we start showing scopeline information. Default is set to 5. Set it to 0 to always show.
Thanks to haringsrob/nvim_context_vt for the idea.