improve illuminate config

This commit is contained in:
Nachuan Tang
2023-03-01 14:49:35 -05:00
parent 42c2ae5273
commit 3b9a6f17ff
2 changed files with 15 additions and 7 deletions
+1 -1
View File
@@ -53,7 +53,7 @@
set shortmess+=filmnrxoOtT " Abbrev. of messages (avoids 'hit enter') set shortmess+=filmnrxoOtT " Abbrev. of messages (avoids 'hit enter')
" set viewoptions=folds,options,cursor,unix,slash " Better Unix / Windows compatibility " set viewoptions=folds,options,cursor,unix,slash " Better Unix / Windows compatibility
set virtualedit=onemore " Allow for cursor beyond last character " set virtualedit=onemore " Allow for cursor beyond last character
set history=1000 " Store a ton of history (default is 20) set history=1000 " Store a ton of history (default is 20)
set hidden " Allow buffer switching without saving set hidden " Allow buffer switching without saving
set iskeyword-=. " '.' is an end of word designator set iskeyword-=. " '.' is an end of word designator
+14 -6
View File
@@ -152,10 +152,13 @@ endfunction
endif endif
" } " }
if HasPlug('vim-illuminate') if HasPlug('vim-illuminate') && g:vim_type == 'vim'
let g:Illuminate_ftHighlightGroups = { let g:Illuminate_ftHighlightGroups = {
\ 'vim': ['vimVar', 'vimString', 'vimFuncName', \ 'vim': ['vimVar', 'vimString', 'vimFuncName',
\ 'vimFunction', 'vimUserFunc', 'vimFunc'] \ 'vimFunction', 'vimUserFunc', 'vimFunc'],
\ 'java:blacklist' : [ 'javaType', 'javaScopeDecl', 'javaMethodDecl',
\ 'javaComment', 'javaStorageClass', 'javaClassDecl', 'javaExternal',
\ 'javaTypedef', 'javaLineComment', 'javaStatement' ]
\ } \ }
let g:Illuminate_ftwhitelist = ['vim', 'sh', 'python', 'rust', 'java', 'c', 'cpp', 'javascript', 'typescript', 'lua'] let g:Illuminate_ftwhitelist = ['vim', 'sh', 'python', 'rust', 'java', 'c', 'cpp', 'javascript', 'typescript', 'lua']
@@ -465,10 +468,15 @@ endfunction
" "
" debug function print out highlight group of cursor position " debug function print out highlight group of cursor position
function! SynStack() function! SynStack()
if !exists("*synstack") if !exists("*synstack")
return return
endif endif
echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")')
:echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<'
\ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<"
\ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">"
endfunc endfunc
nmap <Leader>db :call SynStack()<CR> nmap <Leader>db :call SynStack()<CR>