Skip to content

samwdp/treesit-context-overlay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

Treesitter Overlays

Introduction

This is an emacs mode that is designed to be similar to nvim_context_vt

This will display an overlay at the end of most scopes to siginfy where you are in your file.

Requirements

Emacs >= 29 with –with-tree-sitter compliation option.

Installation

Straight

(use-package treesit-context-overlay
  :straight (treesit-context-overlay :host github :repo "samwdp/treesit-context-overlay")
  :hook (csharp-ts-mode . treesit-context-overlay-mode)
  :config
  ;; these are the default values but feel free to set them to something different. Use the table below for the configuration
  (setq treesit-context-overlay-delimiter "==>"
        treesit-context-overlay-face 'font-lock-comment-face))

Then in any *-ts-mode M-x treesit-context-overlay-mode

Configuration

VariableInitial ValueTypeModification
treesit-context-overlay-delimiter”==>”string(setq treesit-context-overlay-delimiter “–>”)
treesit-context-overlay-face‘font-lock-comment-faceface(setq treesit-context-overlay-face ‘font-lock-string-face)
string(setq treesit-context-overlay-face “red”)
string(setq treesit-context-overlay-face “#ff6600”)
plist(setq treesit-context-overlay-face ‘(:foreground “blue” :weight bold))

For the font lock faces press M-x describe-variable and search for font-lock face. This will show you all the faces you have and what their properties are.

Languages tested

typescript-ts-mode csharp-ts-mode

Next stages [0/2]

  • [ ] Go through and get all node types that should have something to does
  • [ ] Test on different languages

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published