udalov / kotlin-vim

Kotlin plugin for Vim. Featuring: syntax highlighting, basic indentation, Syntastic support
Apache License 2.0
632 stars 51 forks source link

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

Open smolck opened 5 years ago

smolck commented 5 years ago

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.

udalov commented 5 years ago

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

smolck commented 5 years ago

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?

johnpyp commented 4 years ago

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
kerkmann commented 4 years ago

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