|
|
|
@ -6,6 +6,9 @@ if empty(glob(data_dir . '/autoload/plug.vim'))
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
call plug#begin()
|
|
|
|
call plug#begin()
|
|
|
|
|
|
|
|
" auto pairs
|
|
|
|
|
|
|
|
Plug 'LunarWatcher/auto-pairs'
|
|
|
|
|
|
|
|
|
|
|
|
" Lightline
|
|
|
|
" Lightline
|
|
|
|
Plug 'itchyny/lightline.vim'
|
|
|
|
Plug 'itchyny/lightline.vim'
|
|
|
|
|
|
|
|
|
|
|
|
@ -58,10 +61,14 @@ Plug 'hrsh7th/cmp-nvim-lsp'
|
|
|
|
Plug 'hrsh7th/cmp-path'
|
|
|
|
Plug 'hrsh7th/cmp-path'
|
|
|
|
Plug 'hrsh7th/cmp-buffer'
|
|
|
|
Plug 'hrsh7th/cmp-buffer'
|
|
|
|
Plug 'hrsh7th/cmp-nvim-lua'
|
|
|
|
Plug 'hrsh7th/cmp-nvim-lua'
|
|
|
|
|
|
|
|
Plug 'f3fora/cmp-spell'
|
|
|
|
" Plug 'hrsh7th/cmp-copilot'
|
|
|
|
" Plug 'hrsh7th/cmp-copilot'
|
|
|
|
Plug 'onsails/lspkind.nvim'
|
|
|
|
Plug 'onsails/lspkind.nvim'
|
|
|
|
Plug 'quangnguyen30192/cmp-nvim-ultisnips'
|
|
|
|
Plug 'quangnguyen30192/cmp-nvim-ultisnips'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Diagnostics
|
|
|
|
|
|
|
|
Plug 'folke/trouble.nvim'
|
|
|
|
|
|
|
|
|
|
|
|
" Telescope
|
|
|
|
" Telescope
|
|
|
|
Plug 'nvim-telescope/telescope.nvim'
|
|
|
|
Plug 'nvim-telescope/telescope.nvim'
|
|
|
|
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' }
|
|
|
|
Plug 'nvim-telescope/telescope-fzf-native.nvim', { 'do': 'make' }
|
|
|
|
@ -223,15 +230,16 @@ let g:lightline = {
|
|
|
|
function! LightlineFilename()
|
|
|
|
function! LightlineFilename()
|
|
|
|
return &filetype ==# 'fugitive' ? fugitive#statusline() :
|
|
|
|
return &filetype ==# 'fugitive' ? fugitive#statusline() :
|
|
|
|
\ &filetype ==# 'qf' ? 'QuickFix' :
|
|
|
|
\ &filetype ==# 'qf' ? 'QuickFix' :
|
|
|
|
|
|
|
|
\ &filetype ==# 'Trouble' ? 'Trouble' :
|
|
|
|
\ expand('%:t') !=# '' ? expand('%:t') : '[No Name]'
|
|
|
|
\ expand('%:t') !=# '' ? expand('%:t') : '[No Name]'
|
|
|
|
endfunction
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
function! LightlineReadonly()
|
|
|
|
function! LightlineReadonly()
|
|
|
|
return &readonly && &filetype !~# '\v(help|fugitive)' ? 'RO' : ''
|
|
|
|
return &readonly && &filetype !~# '\v(help|fugitive|Trouble)' ? 'RO' : ''
|
|
|
|
endfunction
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
function! LightlineBranch()
|
|
|
|
function! LightlineBranch()
|
|
|
|
return &filetype !~# '\v(help|fugitive|qf)' ? FugitiveHead() : ''
|
|
|
|
return &filetype !~# '\v(help|fugitive|qf|Trouble)' ? FugitiveHead() : ''
|
|
|
|
endfunction
|
|
|
|
endfunction
|
|
|
|
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
" }}}
|
|
|
|
@ -275,6 +283,12 @@ let g:vim_markdown_frontmatter = 1
|
|
|
|
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Auto-Pairs config {{{
|
|
|
|
|
|
|
|
let g:AutoPairsMapBS = 1
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" }}}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
" Autocompile dwmblocks {{{
|
|
|
|
" Autocompile dwmblocks {{{
|
|
|
|
if has("nvim")
|
|
|
|
if has("nvim")
|
|
|
|
autocmd BufWritePost ~/desktop/dwmblocks/blocks.h :term cd ~/desktop/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid -f dwmblocks > /dev/null 2> /dev/null ; }
|
|
|
|
autocmd BufWritePost ~/desktop/dwmblocks/blocks.h :term cd ~/desktop/dwmblocks/; sudo make install && { killall -q dwmblocks;setsid -f dwmblocks > /dev/null 2> /dev/null ; }
|
|
|
|
@ -390,6 +404,14 @@ if has("nvim")
|
|
|
|
{ name = 'nvim_lsp' },
|
|
|
|
{ name = 'nvim_lsp' },
|
|
|
|
{ name = 'nvim_lua' },
|
|
|
|
{ name = 'nvim_lua' },
|
|
|
|
{ name = 'ultisnips' },
|
|
|
|
{ name = 'ultisnips' },
|
|
|
|
|
|
|
|
{ name = 'spell',
|
|
|
|
|
|
|
|
option = {
|
|
|
|
|
|
|
|
enable_in_context = function()
|
|
|
|
|
|
|
|
return true --require('cmp.config.context').in_treesitter_capture('spell')
|
|
|
|
|
|
|
|
end,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
keyword_length = 3,
|
|
|
|
|
|
|
|
},
|
|
|
|
{ name = 'path' },
|
|
|
|
{ name = 'path' },
|
|
|
|
}, {
|
|
|
|
}, {
|
|
|
|
{ name = 'buffer', keyword_length = 5},
|
|
|
|
{ name = 'buffer', keyword_length = 5},
|
|
|
|
@ -403,6 +425,7 @@ if has("nvim")
|
|
|
|
nvim_lua = "[api]",
|
|
|
|
nvim_lua = "[api]",
|
|
|
|
path = "[path]",
|
|
|
|
path = "[path]",
|
|
|
|
ultisnips = "[snip]",
|
|
|
|
ultisnips = "[snip]",
|
|
|
|
|
|
|
|
spell = "[spell]",
|
|
|
|
--copilot = "[cop]",
|
|
|
|
--copilot = "[cop]",
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
@ -497,6 +520,12 @@ if has("nvim")
|
|
|
|
},
|
|
|
|
},
|
|
|
|
} -- }}}
|
|
|
|
} -- }}}
|
|
|
|
--]]
|
|
|
|
--]]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
require("trouble").setup {
|
|
|
|
|
|
|
|
-- your configuration comes here
|
|
|
|
|
|
|
|
-- or leave it empty to use the default settings
|
|
|
|
|
|
|
|
-- refer to the configuration section below
|
|
|
|
|
|
|
|
}
|
|
|
|
EOF
|
|
|
|
EOF
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
|
|
|
|
|