]> git.sthu.org Git - vimconf.git/commitdiff
plugins: Fixes for nvim-0.7 or lower
authorStefan Huber <shuber@sthu.org>
Sun, 28 Jul 2024 19:07:00 +0000 (21:07 +0200)
committerStefan Huber <shuber@sthu.org>
Sun, 28 Jul 2024 19:07:00 +0000 (21:07 +0200)
plugins-mini.vim

index 2c2b9a6f3c8840c29870a4aafeae66c52656a544..378892ab4defc10e67cd76e7bf61160600938c1d 100644 (file)
@@ -7,8 +7,8 @@ Plug 'mhinz/vim-startify'
 Plug 'dstein64/vim-startuptime'
 
 " The original repo from gruvbox-community would not support treestitter and
-" semantic highlighting
-if has('nvim')
+" semantic highlighting. But gruvbox.nvim requires nvim-0.8.
+if has('nvim-0.8')
     Plug 'ellisonleao/gruvbox.nvim'
 else
     Plug 'gruvbox-community/gruvbox'
@@ -36,7 +36,10 @@ endif
 
 if has('nvim-0.7')
     Plug 'echasnovski/mini.nvim'", { 'branch': 'stable' }
-else
+endif
+
+" mini.vim's status line requires nvim-0.8
+if !has('nvim-0.8')
     Plug 'vim-airline/vim-airline'
 endif
 
@@ -45,7 +48,7 @@ function PluginsConfigMini()
 
     " Config of ellisonleao/gruvbox for neovim and gruvbox-community/gruvbox
     " otherwise
-    if has('nvim')
+    if has('nvim-0.8')
         lua <<EOF
         -- Required before setting colorscheme to gruvbox
         require("gruvbox").setup({
@@ -140,10 +143,16 @@ EOF
         require('mini.pick').setup()
         require('mini.sessions').setup()
         require('mini.splitjoin').setup()
-        require('mini.statusline').setup()
         require('mini.surround').setup()
         require('mini.tabline').setup()
         require('mini.trailspace').setup()
+EOF
+    endif
+
+    " Use mini's statusline from nvim-0.8 on and fallback to airline
+    if has('nvim-0.8')
+        lua <<EOF
+        require('mini.statusline').setup()
 EOF
     else
         let g:airline_powerline_fonts=1