kotlin-vim icon indicating copy to clipboard operation
kotlin-vim copied to clipboard

Feature Request: Highlight Function Names (and/or names of classes, interfaces, etc.)

Open smolck opened this issue 6 years ago • 4 comments
trafficstars

Function name highlighting is implemented in both rust.vim and vim-cpp-enhanced-highlight, and rust.vim has highlighting for names of structs too, which is really nice (would be highlighting of class/interface/etc. names here). I'm not sure if this is wanted in this particular plugin, but I figured I'd throw it out there since it helps readability and makes things look nicer IMHO.

This could be implemented multiple ways too. For example, python-syntax only highlights the names of functions when they are defined, but not called (as far as I've noticed). I think always highlighting function names (on both calls and definitions) looks nicer, but of course opinions on this will vary.

smolck avatar Jul 08 '19 01:07 smolck

Personally, I prefer to avoid excessive highlighting when possible, so I wouldn't find this feature useful for my use cases. But I'm not opposed to contributions here if this functionality is disabled by default

udalov avatar Jul 08 '19 12:07 udalov

But I'm not opposed to contributions here if this functionality is disabled by default

How you would you prefer that this sort of highlighting be enabled by the user? I.e. custom commands, let g:<insert name here> = 1 in .vimrc, etc?

smolck avatar Jul 08 '19 15:07 smolck

That is the way that vim-go does it. For example, in my .vimrc:

let g:go_highlight_types = 1 
let g:go_highlight_methods = 1
let g:go_highlight_function_calls = 1
let g:go_highlight_functions = 1
let g:go_highlight_function_parameters = 0
let g:go_highlight_operators = 1
let g:go_highlight_build_constraints = 1
let g:go_highlight_extra_types = 1
let g:go_highlight_fields = 1
let g:go_highlight_format_strings = 1

johnpyp avatar Nov 18 '19 13:11 johnpyp

Bump. That feature would be really awesome! ╰(˵ヘωヘ✿)╯

kerkmann avatar May 26 '20 06:05 kerkmann