From 3b9a6f17ff83163cdebaf9b58f537b22cc63e225 Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Wed, 1 Mar 2023 14:49:35 -0500 Subject: [PATCH] improve illuminate config --- .vimrc | 2 +- .vimrc.bundles | 20 ++++++++++++++------ 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/.vimrc b/.vimrc index f8db73a..b68f7f0 100644 --- a/.vimrc +++ b/.vimrc @@ -53,7 +53,7 @@ set shortmess+=filmnrxoOtT " Abbrev. of messages (avoids 'hit enter') " 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 hidden " Allow buffer switching without saving set iskeyword-=. " '.' is an end of word designator diff --git a/.vimrc.bundles b/.vimrc.bundles index 0e9da69..ee53466 100644 --- a/.vimrc.bundles +++ b/.vimrc.bundles @@ -152,10 +152,13 @@ endfunction endif " } - if HasPlug('vim-illuminate') + if HasPlug('vim-illuminate') && g:vim_type == 'vim' let g:Illuminate_ftHighlightGroups = { \ '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'] @@ -465,10 +468,15 @@ endfunction " " debug function print out highlight group of cursor position function! SynStack() - if !exists("*synstack") - return - endif - echo map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")') + if !exists("*synstack") + return + endif + 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 nmap db :call SynStack()