فهرست منبع

feat: lock new installations to nvim 0.9+ (#3858)

* feat: lock new installations to nvim 0.9+

* feat: newer compat tag
opalmay 2 سال پیش
والد
کامیت
e32872a057

+ 2 - 2
.github/ISSUE_TEMPLATE/general-issue-form.yaml

@@ -34,10 +34,10 @@ body:
   - type: input
     id: nvim-version
     attributes:
-      label: Neovim version (>= 0.8.0)
+      label: Neovim version (>= 0.9.0)
       description: "Output of `nvim --version`"
       placeholder: |
-        NVIM v0.8.0-dev+199-g2875d45e7
+        NVIM v0.9.0-dev-983+g6dfabd014
     validations:
       required: true
   - type: input

+ 2 - 2
.github/ISSUE_TEMPLATE/lsp-issue-form.yaml

@@ -27,10 +27,10 @@ body:
   - type: input
     id: nvim-version
     attributes:
-      label: Neovim version (>= 0.8.0)
+      label: Neovim version (>= 0.9.0)
       description: "Output of `nvim --version`"
       placeholder: |
-        NVIM v0.8.0-dev+199-g2875d45e7
+        NVIM v0.9.0-dev-983+g6dfabd014
     validations:
       required: true
   - type: input

+ 2 - 2
lua/lvim/bootstrap.lua

@@ -1,7 +1,7 @@
 local M = {}
 
-if vim.fn.has "nvim-0.8" ~= 1 then
-  vim.notify("Please upgrade your Neovim base installation. Lunarvim requires v0.8+", vim.log.levels.WARN)
+if vim.fn.has "nvim-0.9" ~= 1 then
+  vim.notify("Please upgrade your Neovim base installation. Lunarvim requires v0.9+", vim.log.levels.WARN)
   vim.wait(5000, function()
     ---@diagnostic disable-next-line: redundant-return-value
     return false

+ 20 - 22
lua/lvim/core/breadcrumbs.lua

@@ -209,29 +209,27 @@ end
 
 M.create_winbar = function()
   vim.api.nvim_create_augroup("_winbar", {})
-  if vim.fn.has "nvim-0.8" == 1 then
-    vim.api.nvim_create_autocmd({
-      "CursorHoldI",
-      "CursorHold",
-      "BufWinEnter",
-      "BufFilePost",
-      "InsertEnter",
-      "BufWritePost",
-      "TabClosed",
-      "TabEnter",
-    }, {
-      group = "_winbar",
-      callback = function()
-        if lvim.builtin.breadcrumbs.active then
-          local status_ok, _ = pcall(vim.api.nvim_buf_get_var, 0, "lsp_floating_window")
-          if not status_ok then
-            -- TODO:
-            require("lvim.core.breadcrumbs").get_winbar()
-          end
+  vim.api.nvim_create_autocmd({
+    "CursorHoldI",
+    "CursorHold",
+    "BufWinEnter",
+    "BufFilePost",
+    "InsertEnter",
+    "BufWritePost",
+    "TabClosed",
+    "TabEnter",
+  }, {
+    group = "_winbar",
+    callback = function()
+      if lvim.builtin.breadcrumbs.active then
+        local status_ok, _ = pcall(vim.api.nvim_buf_get_var, 0, "lsp_floating_window")
+        if not status_ok then
+          -- TODO:
+          require("lvim.core.breadcrumbs").get_winbar()
         end
-      end,
-    })
-  end
+      end
+    end,
+  })
 end
 
 return M

+ 3 - 3
lua/lvim/utils/hooks.lua

@@ -41,10 +41,10 @@ end
 function M.run_post_update()
   Log:debug "Starting post-update hook"
 
-  if vim.fn.has "nvim-0.8" ~= 1 then
-    local compat_tag = "1.1.4"
+  if vim.fn.has "nvim-0.9" ~= 1 then
+    local compat_tag = "1.2.0"
     vim.notify(
-      "Please upgrade your Neovim base installation. Newer version of Lunarvim requires v0.7+",
+      "Please upgrade your Neovim base installation. Newer version of Lunarvim requires v0.9+",
       vim.log.levels.WARN
     )
     vim.wait(1000)

+ 2 - 2
utils/installer/install.sh

@@ -214,11 +214,11 @@ function print_missing_dep_msg() {
 }
 
 function check_neovim_min_version() {
-  local verify_version_cmd='if !has("nvim-0.8") | cquit | else | quit | endif'
+  local verify_version_cmd='if !has("nvim-0.9") | cquit | else | quit | endif'
 
   # exit with an error if min_version not found
   if ! nvim --headless -u NONE -c "$verify_version_cmd"; then
-    echo "[ERROR]: LunarVim requires at least Neovim v0.8 or higher"
+    echo "[ERROR]: LunarVim requires at least Neovim v0.9 or higher"
     exit 1
   fi
 }