Skip to content

kaste/TreeSitter-calls-and-callers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an addon to https://github.com/sublime-treesitter/TreeSitter/ Make sure you install that one before!

install

git clone this repository into the Packages directory, make sure to pull the submodule "nvim-treesitter" as well. E.g.

git clone --recurse-submodules https://github.com/kaste/TreeSitter-calls-and-callers

The plugin uses the following arbitrary scopes as "regions": pyhi-contents, pyhi-parens, and pyhi-refs. Typically you need to add them (before this gets customizable) and make them so that only the foregroung color of the text changes. (That's not easily done, see: sublimehq/sublime_text#817 where wbond argues even against it because it could feel sluggish and ugly. But here this is done without LSP in a completely sync fashion.)

callers and arguments

What I always had in Sublime (it is just implemented here in a more generic way) is highlighting the caller (function name) while in the arguments section.

Like so:

image

And highlighting the complete arguments part when the cursor is on a function name. Like so:

image

This helps tremendously with reading complicated, nested calls.

image

assignments to the var under the cursor

I experimented here with highlighting the near assignments to a variable the caret is on.

Like so:

image

Releases

No releases published

Packages

No packages published

Languages