From 4d77b7e3165196342f7a6cc83eb549b63735ff5b Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Tue, 26 Dec 2023 23:48:55 +0800 Subject: Add neovim config --- .vim/after/plugin/cmp.vim | 18 +++++++++++------- .vim/after/plugin/cscope.vim | 4 ++++ .vim/after/plugin/floaterm.vim | 5 ++++- .vim/after/plugin/hop.vim | 14 ++++++++++++++ .vim/after/plugin/minpac.vim | 2 -- .vim/after/plugin/mucomplete.vim | 4 ++++ .vim/after/plugin/nnn.vim | 1 - .vim/after/plugin/nvim-cscope.vim | 29 +++++++++++++++++++++++++++++ .vim/after/plugin/nvim-lsp.vim | 10 +++++----- .vim/after/plugin/tig.vim | 1 - .vim/after/plugin/treesitter.vim | 1 - .vim/after/plugin/vim9-stargate.vim | 4 ++++ .vim/pack/nvim/opt/cmp-buffer | 1 + .vim/pack/nvim/opt/cmp-cmdline | 1 + .vim/pack/nvim/opt/cmp-nvim-lsp | 1 + .vim/pack/nvim/opt/cmp-nvim-ultisnips | 1 + .vim/pack/nvim/opt/cmp-omni | 1 + .vim/pack/nvim/opt/cmp-path | 1 + .vim/pack/nvim/opt/cscope_maps.nvim | 1 + .vim/pack/nvim/opt/hop.nvim | 1 + .vim/pack/nvim/opt/lsp_signature.nvim | 1 + .vim/pack/nvim/opt/nvim-cmp | 1 + .vim/pack/nvim/opt/nvim-lspconfig | 1 + .vim/pack/nvim/opt/nvim-treesitter | 1 + .vim/pack/nvim/opt/symbols-outline.nvim | 1 + 25 files changed, 88 insertions(+), 18 deletions(-) create mode 100644 .vim/after/plugin/hop.vim delete mode 100644 .vim/after/plugin/nnn.vim create mode 100644 .vim/after/plugin/nvim-cscope.vim delete mode 100644 .vim/after/plugin/tig.vim create mode 160000 .vim/pack/nvim/opt/cmp-buffer create mode 160000 .vim/pack/nvim/opt/cmp-cmdline create mode 160000 .vim/pack/nvim/opt/cmp-nvim-lsp create mode 160000 .vim/pack/nvim/opt/cmp-nvim-ultisnips create mode 160000 .vim/pack/nvim/opt/cmp-omni create mode 160000 .vim/pack/nvim/opt/cmp-path create mode 160000 .vim/pack/nvim/opt/cscope_maps.nvim create mode 160000 .vim/pack/nvim/opt/hop.nvim create mode 160000 .vim/pack/nvim/opt/lsp_signature.nvim create mode 160000 .vim/pack/nvim/opt/nvim-cmp create mode 160000 .vim/pack/nvim/opt/nvim-lspconfig create mode 160000 .vim/pack/nvim/opt/nvim-treesitter create mode 160000 .vim/pack/nvim/opt/symbols-outline.nvim (limited to '.vim') 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 <t :FloatermToggle +nnoremap n :FloatermNew nnn +nnoremap gs :FloatermNew tig status 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 f :HopChar1 +noremap s :HopChar2 + +noremap w :HopWord + +lua <n :NnnPicker % 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 css :Cscope find s =expand("") +nmap csg :Cscope find g =expand("") +nmap csc :Cscope find c =expand("") +nmap cst :Cscope find t =expand("") +nmap cse :Cscope find e =expand("") +nmap csf :Cscope find f =expand("") +nmap csi :Cscope find i ^=expand("")$ +nmap csd :Cscope find d =expand("") +nmap csa :Cscope find a =expand("") +nmap cs :Cscope find +nmap :Cstag =expand('') + +lua <gs :TigStatus 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 <f call stargate#OKvim(1) " For 2 consecutive characters to search diff --git a/.vim/pack/nvim/opt/cmp-buffer b/.vim/pack/nvim/opt/cmp-buffer new file mode 160000 index 0000000..3022dbc --- /dev/null +++ b/.vim/pack/nvim/opt/cmp-buffer @@ -0,0 +1 @@ +Subproject commit 3022dbc9166796b644a841a02de8dd1cc1d311fa diff --git a/.vim/pack/nvim/opt/cmp-cmdline b/.vim/pack/nvim/opt/cmp-cmdline new file mode 160000 index 0000000..8ee981b --- /dev/null +++ b/.vim/pack/nvim/opt/cmp-cmdline @@ -0,0 +1 @@ +Subproject commit 8ee981b4a91f536f52add291594e89fb6645e451 diff --git a/.vim/pack/nvim/opt/cmp-nvim-lsp b/.vim/pack/nvim/opt/cmp-nvim-lsp new file mode 160000 index 0000000..5af77f5 --- /dev/null +++ b/.vim/pack/nvim/opt/cmp-nvim-lsp @@ -0,0 +1 @@ +Subproject commit 5af77f54de1b16c34b23cba810150689a3a90312 diff --git a/.vim/pack/nvim/opt/cmp-nvim-ultisnips b/.vim/pack/nvim/opt/cmp-nvim-ultisnips new file mode 160000 index 0000000..24bca5c --- /dev/null +++ b/.vim/pack/nvim/opt/cmp-nvim-ultisnips @@ -0,0 +1 @@ +Subproject commit 24bca5c3e137b28cd87442d4fc51a2b312dd99cc diff --git a/.vim/pack/nvim/opt/cmp-omni b/.vim/pack/nvim/opt/cmp-omni new file mode 160000 index 0000000..4ef610b --- /dev/null +++ b/.vim/pack/nvim/opt/cmp-omni @@ -0,0 +1 @@ +Subproject commit 4ef610bbd85a5ee4e97e09450c0daecbdc60de86 diff --git a/.vim/pack/nvim/opt/cmp-path b/.vim/pack/nvim/opt/cmp-path new file mode 160000 index 0000000..91ff86c --- /dev/null +++ b/.vim/pack/nvim/opt/cmp-path @@ -0,0 +1 @@ +Subproject commit 91ff86cd9c29299a64f968ebb45846c485725f23 diff --git a/.vim/pack/nvim/opt/cscope_maps.nvim b/.vim/pack/nvim/opt/cscope_maps.nvim new file mode 160000 index 0000000..c3922f1 --- /dev/null +++ b/.vim/pack/nvim/opt/cscope_maps.nvim @@ -0,0 +1 @@ +Subproject commit c3922f1decbbcedca3aba5cd4534f397e5a903b4 diff --git a/.vim/pack/nvim/opt/hop.nvim b/.vim/pack/nvim/opt/hop.nvim new file mode 160000 index 0000000..df0b5b6 --- /dev/null +++ b/.vim/pack/nvim/opt/hop.nvim @@ -0,0 +1 @@ +Subproject commit df0b5b693ef8c3d414b5b85e4bc11cea99c4958d diff --git a/.vim/pack/nvim/opt/lsp_signature.nvim b/.vim/pack/nvim/opt/lsp_signature.nvim new file mode 160000 index 0000000..fed2c83 --- /dev/null +++ b/.vim/pack/nvim/opt/lsp_signature.nvim @@ -0,0 +1 @@ +Subproject commit fed2c8389c148ff1dfdcdca63c2b48d08a50dea0 diff --git a/.vim/pack/nvim/opt/nvim-cmp b/.vim/pack/nvim/opt/nvim-cmp new file mode 160000 index 0000000..538e37b --- /dev/null +++ b/.vim/pack/nvim/opt/nvim-cmp @@ -0,0 +1 @@ +Subproject commit 538e37ba87284942c1d76ed38dd497e54e65b891 diff --git a/.vim/pack/nvim/opt/nvim-lspconfig b/.vim/pack/nvim/opt/nvim-lspconfig new file mode 160000 index 0000000..9099871 --- /dev/null +++ b/.vim/pack/nvim/opt/nvim-lspconfig @@ -0,0 +1 @@ +Subproject commit 9099871a7c7e1c16122e00d70208a2cd02078d80 diff --git a/.vim/pack/nvim/opt/nvim-treesitter b/.vim/pack/nvim/opt/nvim-treesitter new file mode 160000 index 0000000..27f68c0 --- /dev/null +++ b/.vim/pack/nvim/opt/nvim-treesitter @@ -0,0 +1 @@ +Subproject commit 27f68c0b6a87cbad900b3d016425450af8268026 diff --git a/.vim/pack/nvim/opt/symbols-outline.nvim b/.vim/pack/nvim/opt/symbols-outline.nvim new file mode 160000 index 0000000..5127919 --- /dev/null +++ b/.vim/pack/nvim/opt/symbols-outline.nvim @@ -0,0 +1 @@ +Subproject commit 512791925d57a61c545bc303356e8a8f7869763c -- cgit v1.2.3