Xinqi Bao's Git

feat(nvim): add optional LeetCode plugin bundle
[dotfiles.git] / .config / nvim / init.vim
index 4a6d558..d38c9ff 100644 (file)
@@ -83,6 +83,7 @@ call plug#begin()
     Plug 'preservim/nerdtree'
     Plug 'majutsushi/tagbar'
 
+    Plug 'MeanderingProgrammer/render-markdown.nvim'
     Plug 'plasticboy/vim-markdown'
     Plug 'iamcco/markdown-preview.nvim', { 'do': 'cd app && npx --yes yarn install' }
 
@@ -94,25 +95,10 @@ call plug#begin()
 
     Plug 'nvim-treesitter/nvim-treesitter'
 
-    """
-    "" avante and its dependents
-    " Deps
-    Plug 'nvim-lua/plenary.nvim'
-    Plug 'MunifTanjim/nui.nvim'
-    Plug 'MeanderingProgrammer/render-markdown.nvim'
-
-    " Optional deps
-    Plug 'hrsh7th/nvim-cmp'
-    Plug 'nvim-tree/nvim-web-devicons' "or Plug 'echasnovski/mini.icons'
-    Plug 'HakonHarnes/img-clip.nvim'
     Plug 'zbirenbaum/copilot.lua'
-    Plug 'stevearc/dressing.nvim' " for enhanced input UI
-    Plug 'folke/snacks.nvim' " for modern input UI
 
-    " Yay, pass source=true if you want to build from source
-    Plug 'yetone/avante.nvim', { 'branch': 'main', 'do': 'make' }
-    ""
-    ""
+    " execute 'source' fnameescape(expand('<sfile>:p:h') . '/opt/avante.vim')
+    " execute 'source' fnameescape(expand('<sfile>:p:h') . '/opt/leetcode.vim')
 
 call plug#end()
 
@@ -240,6 +226,13 @@ if has_key(plugs, 'nvim-treesitter')
     set foldlevel=99
 endif
 
+"----------------------
+" copilot.lua setting
+"----------------------
+if has_key(plugs, 'copilot.lua')
+    lua require('plugin-config/copilot')
+endif
+
 "----------------------
 " avante.nvim setting
 "----------------------
@@ -247,6 +240,13 @@ if has_key(plugs, 'avante.nvim')
     lua require('plugin-config/avante')
 endif
 
+"----------------------
+" leetcode.nvim setting
+"----------------------
+if has_key(plugs, 'leetcode.nvim')
+    lua require('plugin-config/leetcode')
+endif
+
 nnoremap J :tabprevious<CR>
 nnoremap K :tabnext<CR>
 nnoremap <leader>J :tabmove -1<CR>