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

Highlight argument names in function calls? #96

Open
HudsonMC16 opened this issue Dec 15, 2020 · 1 comment
Open

Highlight argument names in function calls? #96

HudsonMC16 opened this issue Dec 15, 2020 · 1 comment

Comments

@HudsonMC16
Copy link

I could not find a way to highlight only the argument names in function calls. Is this possible using this plugin? To illustrate, to highlight the text wrapped in asterisks in the code snippet below:

function_with_many_args(
    *arg1*='testing',
    *arg2*='testing again',
    *arg3*='more testing'
)
@bew
Copy link

bew commented Feb 7, 2021

You can do it without the plugin in the meantime, here is what I do:
https://github.com/bew/dotfiles/blob/07d44f841d2f6ea9932754f44bd52e0623cde3ea/nvim/init.vim#L309-L311

" Add colors to 'arg=' in 'func_call(arg=1)'
autocmd FileType python syn match pythonFunctionCallKwargs '\h\w\+='
autocmd FileType python hi pythonFunctionCallKwargs ctermfg=137

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

2 participants