This commit is contained in:
Nachuan Tang
2023-02-11 07:15:30 -05:00
parent e06ab78fc9
commit e7d8431e0e
6 changed files with 41 additions and 9 deletions
+6 -5
View File
@@ -128,6 +128,7 @@
" comment out this plugin if the machine doesn't have required
" font install
Plug 'nvim-tree/nvim-web-devicons'
Plug 'ziontee113/color-picker.nvim'
endif
if g:vim_version >= 0.8
Plug 'nvim-tree/nvim-tree.lua'
@@ -327,7 +328,7 @@ endfunction
" This must using my fork version of bufferline
"
let g:bufferline_max_length = &columns - 22
let g:bufferline_max_length = &columns - 22
function! BufferNumber()
return len(g:index_to_buffer)
endfunction
@@ -720,10 +721,10 @@ endfunction
nnoremap <silent> <C-w>" :split<CR>
" session related KeyBinding. These KeyBinding uses function from startify
nnoremap <silent> <C-s>s :SSave<CR>
nnoremap <silent> <C-s>l :SLoad<CR>
nnoremap <silent> <C-s>d :SDelete!<CR>
nnoremap <silent> <C-s>c :SClose<CR>
nnoremap <silent> <leader><leader>s :SSave<CR>
nnoremap <silent> <leader><leader>l :SLoad<CR>
nnoremap <silent> <leader><leader>d :SDelete!<CR>
nnoremap <silent> <leader><leader>c :SClose<CR>
" }
"
+15
View File
@@ -16,6 +16,20 @@ local function github_theme_config()
})
end
local function color_picker_nvim_config()
-- config for ziontee113/color-picker.nvim
require("color-picker").setup({
["keymap"] = { -- mapping example:
["U"] = "<Plug>ColorPickerSlider5Decrease",
["O"] = "<Plug>ColorPickerSlider5Increase",
},
})
local opts = { noremap = true, silent = true }
vim.keymap.set("n", "cp", "<cmd>PickColor<cr>", opts)
-- vim.keymap.set("i", "<C-u>c", "<cmd>PickColorInsert<cr>", opts)
end
local function indent_blankline_config()
-- Example config in Lua
require("indent_blankline").setup {
@@ -205,6 +219,7 @@ if vim_version_minor >= 5 then
end
if vim_version_minor >= 7 then
nvim_treesitter_config()
color_picker_nvim_config()
-- lsp_zero_config()
end
if vim_version_minor >= 8 then
+3
View File
@@ -6,6 +6,8 @@ else
inoremap <silent><expr> <c-@> coc#refresh()
endif
set updatetime=300
" Make <CR> auto-select the first completion item and notify coc.nvim to
" format on enter, <cr> could be remapped by other vim plugin
inoremap <silent><expr> <cr> pumvisible() ? coc#_select_confirm()
@@ -83,3 +85,4 @@ let g:coc_user_config = {
call coc#config("java.jdt.ls.vmargs", '-javaagent:' . g:mydotfiles_directory . '/config/coc/java/lombok-1.18.26.jar')
call coc#config("java.jdt.ls.lombokSupport.enabled", v:false)
call coc#config("java.inlayHints.parameterNames.enabled", v:false)
call coc#config("inlayHint.enable", v:false)
+14 -4
View File
@@ -2,7 +2,6 @@
function! GetHi(group, term)
" Store output of group to variable
let output = execute('hi ' . a:group)
" Find the term we're looking for
return matchstr(output, a:term.'=\zs\S*')
endfunction
@@ -37,7 +36,7 @@ function! ThemeFix()
endfunction
function! GetRidOfBg()
let hiGroups = ['CocErrorSign']
let hiGroups = ['CocErrorSign', 'CocWarningSign', 'CocHintSign']
for group in hiGroups
if hlexists(group)
execute('hi ' . group . ' ctermbg=none')
@@ -46,10 +45,21 @@ function! GetRidOfBg()
endfunction
function! CocThemeFix()
hi CocErrorHighlight cterm=underline ctermfg=124 ctermbg=none
hi CocErrorHighlight cterm=underline ctermfg=124 ctermbg=none " Keyword at the error position highlight
hi CocErrorSign ctermbg=none ctermfg=124 " Error Sign at the sign column highlight
hi CocWarningSign ctermbg=none ctermfg=214 " Warning Sign at the sign column highlight
hi CocHintSign ctermbg=none ctermfg=214 " Hint Sign at the sign column highlight
hi CocUnusedHighlight cterm=underline ctermfg=214 ctermbg=none " Unused variable/function etc. highlight
hi CocWarningHighlight cterm=underline ctermfg=214 ctermbg=none " Warning variable/function etc. highlight
hi CocInfoHighlight ctermfg=207 ctermbg=none " Info variable/function etc. highlight
hi CocInfoSign ctermbg=none ctermfg=207 " Info Sign at the sign column highlight
hi Todo ctermbg=none ctermfg=214 " Info Sign at the sign column highlight
hi Error cterm=underline ctermfg=124 ctermbg=none
hi javaError cterm=underline ctermfg=124 ctermbg=none
call GetRidOfBg()
endfunction
call CocThemeFix()
+3
View File
@@ -43,6 +43,9 @@ program_exists() {
# return 0 if exists
# 1 not contain string
# 2 file not exist
# when using this function:
# file path should not be quoted but like this:
# file_contains 'abc' file_path
file_contains(){
if [ -f "$2" ]; then
a=`grep "$1" $2`