From 73cb10fdfbb982a0b4274a5a4771825dc84503ef Mon Sep 17 00:00:00 2001 From: Mathias Jakobsen Date: Wed, 22 Jun 2022 21:57:15 +0200 Subject: [PATCH] Require Neovim v0.7 --- README.md | 2 +- autoload/copilot.vim | 4 ++-- autoload/copilot/agent.vim | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fa820987..46caa1a0 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ GitHub Copilot turns natural language prompts including comments and method names into coding suggestions across dozens of languages. Copilot.vim is a Vim plugin for GitHub Copilot. For now, it requires Neovim -0.6 (for virtual lines support) and a Node.js installation. +0.7 (for virtual lines support) and a Node.js installation. To learn more, visit [aka.ms/copilot-learn-more](https://aka.ms/copilot-learn-more) diff --git a/autoload/copilot.vim b/autoload/copilot.vim index 3c97ac9f..f46e7596 100644 --- a/autoload/copilot.vim +++ b/autoload/copilot.vim @@ -5,7 +5,7 @@ let g:autoloaded_copilot = 1 scriptencoding utf-8 -let s:has_ghost_text = has('nvim-0.6') && exists('*nvim_buf_get_mark') +let s:has_ghost_text = has('nvim-0.7') && exists('*nvim_buf_get_mark') let s:hlgroup = 'CopilotSuggestion' @@ -520,7 +520,7 @@ endfunction function! s:EnabledStatusMessage() abort let buf_disabled = s:BufferDisabled() if !s:has_ghost_text && bufwinid('copilot://') == -1 - return "Neovim 0.6 required to support ghost text" + return "Neovim 0.7 required to support ghost text" elseif !copilot#IsMapped() return ' map has been disabled or is claimed by another plugin' elseif !get(g:, 'copilot_enabled', 1) diff --git a/autoload/copilot/agent.vim b/autoload/copilot/agent.vim index a7cb1bb6..d7c1cfce 100644 --- a/autoload/copilot/agent.vim +++ b/autoload/copilot/agent.vim @@ -351,7 +351,7 @@ function! s:IsArmMacOS() abort endfunction function! s:Command() abort - if !has('nvim-0.6') && v:version < 802 + if !has('nvim-0.7') && v:version < 802 return [v:null, 'Vim version too old'] endif let node = get(g:, 'copilot_node_command', '')