Open isvicy opened 4 years ago
Could you please try using vim-polyglot package?
tried on my mac and ubuntu pc, didn't work.
Is that a golang?
Yes, it's a golang file. my vimrc:
"-----------------basic config--------------------------"
"set true color for vim
if has("termguicolors")
" fix bug for vim
set t_8f=[38;2;%lu;%lu;%lum
set t_8b=[48;2;%lu;%lu;%lum
" enable true color
set termguicolors
endif
set nocompatible
set backspace=indent,eol,start
set rnu
set ruler
set showcmd
set history=1000
set nobackup
set noswapfile
set showmatch
set autoindent
set cindent
syntax enable
syntax on
set ignorecase
set tabstop=4
set shiftwidth=4
set softtabstop=4
set smarttab
set expandtab
"encoding, will try to encode in following sequence
set encoding=utf-8
set fileencodings=ucs-bom,utf-8,cp936,gb18030,big5,euc-jp,euc-kr,latin1
set ff=unix
"check filetype
filetype on
filetype indent on
filetype plugin on
filetype plugin indent on
"-----------------check existence of plug--------------------------"
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
"-------------------vim-plug-----------------------"
call plug#begin('~/.vim/plugged')
" language
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'sheerun/vim-polyglot'
"nerdtree
Plug 'scrooloose/nerdtree'
Plug 'Xuyuanp/nerdtree-git-plugin'
" theme、style、syntax highlighting related
Plug 'morhetz/gruvbox'
Plug 'ekalinin/Dockerfile.vim'
Plug 'mhinz/vim-startify'
call plug#end()
let g:go_def_mode = 'gopls'
set background=dark
colorscheme gruvbox
"nerdtree configuration
"open nerdtree automatically when not specify a dir opening vim
autocmd StdinReadPre * let s:std_in=1
autocmd VimEnter * if argc() == 1 && isdirectory(argv()[0]) && !exists("s:std_in") | exe 'NERDTree' argv()[0] | wincmd p | ene | exe 'cd '.argv()[0] | endif
"close vim when nerdtree is the last window
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
Any suggestion?
Hi. See :h g:go_highlight_functions
.
can't distinguish function name and params in go. Both are displayed as white text. Please tell me how can I fix this?