Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Always highlight entire function when within the function #28

Open
WizardOfFaraz opened this issue Jul 11, 2022 · 4 comments

Comments

@WizardOfFaraz
Copy link

Great plugin!

Is there a way to always keep the entire function highlighted when within the function?

If yes, is there a way to easily toggle that option without changing my init file and restarting?

@okuuva
Copy link

okuuva commented Sep 22, 2022

I think this is a duplicate of #14 . There's some discussion there how to find the name of the treesitter node to include in the expand table using treesitter playground. TL;DR: what you want is most likely to add "method_definition" in the expand table.

@jluzny
Copy link

jluzny commented Aug 15, 2023

Adding "function_definition" to the expand section works as expected for Python methods.

@cmaughan
Copy link

For those coming here trying to make it work with Rust functions, you are looking for 'function_item' in the expand section.....
You're most welcome ;)

@andrew528i
Copy link

For those who interested for same functionality in Golang just add following lines to expand section in your config:

function_declaration
method_declaration

You can also find this out for other languages here. Just change go keyword in url to your language and you ready to go!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants