diff options
Diffstat (limited to '.vim/after/plugin')
-rw-r--r-- | .vim/after/plugin/cmp.vim | 18 | ||||
-rw-r--r-- | .vim/after/plugin/cscope.vim | 4 | ||||
-rw-r--r-- | .vim/after/plugin/floaterm.vim | 5 | ||||
-rw-r--r-- | .vim/after/plugin/hop.vim | 14 | ||||
-rw-r--r-- | .vim/after/plugin/minpac.vim | 2 | ||||
-rw-r--r-- | .vim/after/plugin/mucomplete.vim | 4 | ||||
-rw-r--r-- | .vim/after/plugin/nnn.vim | 1 | ||||
-rw-r--r-- | .vim/after/plugin/nvim-cscope.vim | 29 | ||||
-rw-r--r-- | .vim/after/plugin/nvim-lsp.vim | 10 | ||||
-rw-r--r-- | .vim/after/plugin/tig.vim | 1 | ||||
-rw-r--r-- | .vim/after/plugin/treesitter.vim | 1 | ||||
-rw-r--r-- | .vim/after/plugin/vim9-stargate.vim | 4 |
12 files changed, 75 insertions, 18 deletions
diff --git a/.vim/after/plugin/cmp.vim b/.vim/after/plugin/cmp.vim index e95dd71..17f5086 100644 --- a/.vim/after/plugin/cmp.vim +++ b/.vim/after/plugin/cmp.vim @@ -9,7 +9,10 @@ packadd nvim-cmp packadd cmp-buffer packadd cmp-path packadd cmp-cmdline -packadd cmp-nvim-ultisnips +packadd cmp-omni + +" cmp-nvim-ultisnips is kind of buggy. Disable it before investigation. +" packadd cmp-nvim-ultisnips lua <<EOF @@ -17,15 +20,16 @@ local cmp = require 'cmp' cmp.setup({ preselect = cmp.PreselectMode.None, - snippet = { - expand = function(args) - vim.fn["UltiSnips#Anon"](args.body) - end, - }, + -- snippet = { + -- expand = function(args) + -- vim.fn["UltiSnips#Anon"](args.body) + -- end, + -- }, sources = cmp.config.sources({ - { name = 'ultisnips' }, + -- { name = 'ultisnips' }, { name = 'nvim_lsp' }, + { name = 'omni' }, }, { { name = 'buffer' }, }), diff --git a/.vim/after/plugin/cscope.vim b/.vim/after/plugin/cscope.vim index a098e18..076101f 100644 --- a/.vim/after/plugin/cscope.vim +++ b/.vim/after/plugin/cscope.vim @@ -1,3 +1,7 @@ +if has('nvim') + finish +endif + if executable('gtags-cscope') let &csprg='gtags-cscope' endif diff --git a/.vim/after/plugin/floaterm.vim b/.vim/after/plugin/floaterm.vim index b424f96..89fce6b 100644 --- a/.vim/after/plugin/floaterm.vim +++ b/.vim/after/plugin/floaterm.vim @@ -1,4 +1,7 @@ let g:floaterm_autoclose = 1 -let g:floaterm_opener = 'tabe' +let g:floaterm_width = 0.8 +let g:floaterm_height = 0.8 nnoremap <Leader><Leader>t :FloatermToggle<CR> +nnoremap <Leader><Leader>n :FloatermNew nnn<CR> +nnoremap <Leader>gs :FloatermNew tig status<CR> diff --git a/.vim/after/plugin/hop.vim b/.vim/after/plugin/hop.vim new file mode 100644 index 0000000..03ea18e --- /dev/null +++ b/.vim/after/plugin/hop.vim @@ -0,0 +1,14 @@ +if !has('nvim') + finish +endif + +packadd hop.nvim + +noremap <space>f :HopChar1<CR> +noremap <space>s :HopChar2<CR> + +noremap <space>w :HopWord<CR> + +lua <<EOF + require('hop').setup() +EOF diff --git a/.vim/after/plugin/minpac.vim b/.vim/after/plugin/minpac.vim index f895def..e3fe4a8 100644 --- a/.vim/after/plugin/minpac.vim +++ b/.vim/after/plugin/minpac.vim @@ -65,7 +65,6 @@ function! InitMinpac() abort " external call minpac#add('https://github.com/junegunn/fzf.git') call minpac#add('https://github.com/junegunn/fzf.vim.git', {'type': 'opt'}) - call minpac#add('https://github.com/mcchrish/nnn.vim.git') " terminal call minpac#add('https://github.com/voldikss/vim-floaterm.git') @@ -73,7 +72,6 @@ function! InitMinpac() abort " git call minpac#add('https://github.com/tpope/vim-fugitive.git') call minpac#add('https://github.com/rbong/vim-flog.git') - call minpac#add('https://github.com/iberianpig/tig-explorer.vim') call minpac#add('https://github.com/mhinz/vim-signify.git') call minpac#add('https://github.com/jpalardy/vim-slime', {'type': 'opt'}) diff --git a/.vim/after/plugin/mucomplete.vim b/.vim/after/plugin/mucomplete.vim index 3efbcbe..588d1d2 100644 --- a/.vim/after/plugin/mucomplete.vim +++ b/.vim/after/plugin/mucomplete.vim @@ -1,3 +1,7 @@ +if has('nvim') + finish +endif + let g:mucomplete#enable_auto_at_startup = 1 let g:mucomplete#minimum_prefix_length = 1 let g:mucomplete#empty_text_auto = 1 diff --git a/.vim/after/plugin/nnn.vim b/.vim/after/plugin/nnn.vim deleted file mode 100644 index 08cabfc..0000000 --- a/.vim/after/plugin/nnn.vim +++ /dev/null @@ -1 +0,0 @@ -nnoremap <leader><leader>n :NnnPicker %<CR> diff --git a/.vim/after/plugin/nvim-cscope.vim b/.vim/after/plugin/nvim-cscope.vim new file mode 100644 index 0000000..c463800 --- /dev/null +++ b/.vim/after/plugin/nvim-cscope.vim @@ -0,0 +1,29 @@ +if !has('nvim') + finish +endif + +packadd cscope_maps.nvim + +nmap <leader>css :Cscope find s <C-R>=expand("<cword>")<CR><CR> +nmap <leader>csg :Cscope find g <C-R>=expand("<cword>")<CR> +nmap <leader>csc :Cscope find c <C-R>=expand("<cword>")<CR> +nmap <leader>cst :Cscope find t <C-R>=expand("<cword>")<CR><CR> +nmap <leader>cse :Cscope find e <C-R>=expand("<cword>")<CR><CR> +nmap <leader>csf :Cscope find f <C-R>=expand("<cfile>")<CR><CR> +nmap <leader>csi :Cscope find i ^<C-R>=expand("<cfile>")<CR>$<CR> +nmap <leader>csd :Cscope find d <C-R>=expand("<cword>")<CR> +nmap <leader>csa :Cscope find a <C-R>=expand("<cword>")<CR> +nmap <leader>cs<space> :Cscope find<space> +nmap <C-]> :Cstag <C-R>=expand('<cword>')<CR> + +lua <<EOF + + local cscope_maps = require 'cscope_maps' + cscope_maps.setup({ + disable_maps = true, + cscope = { + exec = "gtags-cscope", + }, + }) + +EOF diff --git a/.vim/after/plugin/nvim-lsp.vim b/.vim/after/plugin/nvim-lsp.vim index d36ed3d..dec2a48 100644 --- a/.vim/after/plugin/nvim-lsp.vim +++ b/.vim/after/plugin/nvim-lsp.vim @@ -3,19 +3,19 @@ if !has('nvim') endif packadd nvim-lspconfig -packadd cmp-nvim-lsp +" packadd cmp-nvim-lsp packadd symbols-outline.nvim packadd lsp_signature.nvim lua <<EOF local lspconfig = require 'lspconfig' -local cmp_nvim_lsp = require 'cmp_nvim_lsp' +-- local cmp_nvim_lsp = require 'cmp_nvim_lsp' local symbols_outline = require 'symbols-outline' local lsp_signature = require 'lsp_signature' -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = cmp_nvim_lsp.update_capabilities(capabilities) +-- The nvim-cmp almost supports LSP's capabilities so You should advertise it to LSP servers.. +-- local capabilities = require('cmp_nvim_lsp').default_capabilities() local opts = { noremap = true, silent = true } @@ -59,7 +59,7 @@ local servers = { 'clangd', 'gopls' , 'gdscript', 'pylsp' } for _, lsp in pairs(servers) do lspconfig[lsp].setup{ on_attach = on_attach, - capabilities = capabilities, + -- capabilities = capabilities, } end diff --git a/.vim/after/plugin/tig.vim b/.vim/after/plugin/tig.vim deleted file mode 100644 index 8093e6a..0000000 --- a/.vim/after/plugin/tig.vim +++ /dev/null @@ -1 +0,0 @@ -nnoremap <leader>gs :TigStatus<CR> diff --git a/.vim/after/plugin/treesitter.vim b/.vim/after/plugin/treesitter.vim index c022662..268ab0a 100644 --- a/.vim/after/plugin/treesitter.vim +++ b/.vim/after/plugin/treesitter.vim @@ -9,7 +9,6 @@ lua <<EOF local treesitter_config = require 'nvim-treesitter.configs' treesitter_config.setup { - ensure_installed = { 'c', 'lua', 'gdscript', 'go', 'python' }, sync_install = false, highlight = { diff --git a/.vim/after/plugin/vim9-stargate.vim b/.vim/after/plugin/vim9-stargate.vim index d6f9075..6462be6 100644 --- a/.vim/after/plugin/vim9-stargate.vim +++ b/.vim/after/plugin/vim9-stargate.vim @@ -1,3 +1,7 @@ +if has('nvim') + finish +endif + " For 1 character to search before showing hints noremap <space>f <Cmd>call stargate#OKvim(1)<CR> " For 2 consecutive characters to search |