Skip to content

Commit

Permalink
fix: consider 0.10 as stable and 0.11 as nightly (#322)
Browse files Browse the repository at this point in the history
* fix: consider 0.10 as stable and 0.11 as nightly

* refactor: changed logic
  • Loading branch information
frolvanya authored May 17, 2024
1 parent af18fa2 commit 4c71c86
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lua/CopilotChat/health.lua
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,12 @@ end
function M.check()
start('CopilotChat.nvim [core]')

local is_nightly = vim.fn.has('nvim-0.10.0') == 1
local is_good_stable = vim.fn.has('nvim-0.9.5') == 1
local vim_version = vim.api.nvim_command_output('version')
if is_nightly then
local dev_number = tonumber(vim_version:match('dev%-(%d+)'))
local is_good_stable = vim.fn.has('nvim-0.9.5') == 1 or vim.fn.has('nvim-0.10.0') == 1

local dev_number = tonumber(vim_version:match('dev%-(%d+)'))

if dev_number then
if dev_number >= 2500 then
ok('nvim: ' .. vim_version)
else
Expand Down

0 comments on commit 4c71c86

Please sign in to comment.