morhetz / gruvbox

Retro groove color scheme for Vim
13.86k stars 1.11k forks source link

Go Language Support #387

Closed Spuxy closed 3 years ago

Spuxy commented 3 years ago

Hello guys ! First i appreciate for gruv into vim but i have a little problem with theme :( (Neovim btw)

And thats about highlighting where i use nerdtree (its in ur supported list) but on pic u can see the keyword import and package are not highlighted like on second pic :( am i wrong ?

  1. Screenshot from 2021-03-07 10-22-43

  2. Screenshot from 2021-03-07 10-26-28

uunnxx commented 3 years ago

If you're using standard go.vim syntax then you can change it.

Find out go.vim in /usr/share/neovim/runtime/syntax/go.vim in my case I use asdf-vm so ~/.asdf/install/neovim/nightly/share/nvim/runtime/syntax/go.vim

go.vim file contains all highlight keywords.

image

Here we can find that goDirective is for package and import keywords, and at the same time goDirective equal to standard Statement in your init.vim

hi! link goDirective GruvboxPurpleBold
" or
hi! link Statement GruvboxPurpleBold
""""""""""""""""""""""""""""""""""""""" All Gruvbox color names
" GruvboxRed
" GruvboxRedBold ; s:none, s:bold
" GruvboxRedSign ; s:sign_column, s:invert_sign

" GruvboxGreen
" GruvboxGreenBold ; s:none, s:bold
" GruvboxGreenSign ; s:sign_column, s:invert_sign

" GruvboxYellow
" GruvboxYellowBold ; s:none, s:bold
" GruvboxYellowSign ; s:sign_column, s:invert_sign

" GruvboxBlue
" GruvboxBlueBold ; s:none, s:bold
" GruvboxBlueSign ; s:sign_column, s:invert_sign

" GruvboxPurple
" GruvboxPurpleBold ; s:none, s:bold
" GruvboxPurpleSign ; s:sign_column, s:invert_sign

" GruvboxAqua
" GruvboxAquaBold ; s:none, s:bold
" GruvboxAquaSign ; s:sign_column, s:invert_sign

" GruvboxOrange
" GruvboxOrangeBold ; s:none, s:bold
" GruvboxOrangeSign ; s:sign_column, s:invert_sign
Spuxy commented 3 years ago

Oh thanks mate !