Skip to content

Commit 2f4f925

Browse files
committed
Copilot.vim 1.7.0
1 parent 5a411d1 commit 2f4f925

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ method names into coding suggestions across dozens of languages.
88
Copilot.vim is a Vim/Neovim plugin for GitHub Copilot.
99

1010
To learn more, visit
11-
[github.com/features/copilot](https://github.com/features/copilot).
11+
[https://github.com/features/copilot](https://github.com/features/copilot).
1212

1313
## Subscription
1414

@@ -22,8 +22,7 @@ Terms](https://docs.github.com/en/site-policy/github-terms/github-terms-for-addi
2222

2323
1. Install [Neovim][] or the latest patch of [Vim][] (9.0.0185 or newer).
2424

25-
2. Install [Node.js][] version 16. (Other versions should work too, except
26-
Node 18 which isn't supported yet.)
25+
2. Install [Node.js][].
2726

2827
3. Install `github/copilot.vim` using vim-plug, packer.nvim, or any other
2928
plugin manager. Or to install manually, run one of the following

autoload/copilot/agent.vim

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ let g:autoloaded_copilot_agent = 1
55

66
scriptencoding utf-8
77

8-
let s:plugin_version = '1.6.1'
8+
let s:plugin_version = '1.7.0'
99

1010
let s:error_exit = -1
1111

@@ -310,7 +310,6 @@ function! s:LspRequest(method, params, ...) dict abort
310310
endif
311311
if has_key(self, 'client_id')
312312
call copilot#agent#LspExit(self.client_id, -1, -1)
313-
unlet! self.client_id
314313
endif
315314
throw 'copilot#agent: LSP client not available'
316315
endfunction
@@ -372,14 +371,13 @@ function! s:Command() abort
372371
endif
373372
let node_version = matchstr(join(out, ''), '^v\zs\d\+\.[^[:space:]]*')
374373
let major = str2nr(node_version)
375-
let too_new = major >= 18
376374
if !get(g:, 'copilot_ignore_node_version')
377375
if major == 0
378376
return [v:null, node_version, 'Could not determine Node.js version']
379-
elseif (major < 16 || too_new) && s:IsArmMacOS()
380-
return [v:null, node_version, 'Node.js version 16.x or 17.x required on Apple Silicon but found ' . node_version]
381-
elseif major < 12 || too_new
382-
return [v:null, node_version, 'Node.js version 12.x–17.x required but found ' . node_version]
377+
elseif major < 16 && s:IsArmMacOS()
378+
return [v:null, node_version, 'Node.js version 16.x or newer required but found ' . node_version]
379+
elseif major < 14
380+
return [v:null, node_version, 'Node.js version 14.x or newer required but found ' . node_version]
383381
endif
384382
endif
385383
let agent = get(g:, 'copilot_agent_command', '')

copilot/dist/agent.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

copilot/dist/tree-sitter.wasm

275 KB
Binary file not shown.

plugin/copilot.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ function! s:MapTab() abort
2525
return
2626
endif
2727
let tab_map = maparg('<Tab>', 'i', 0, 1)
28-
if empty(tab_map)
28+
if !has_key(tab_map, 'rhs')
2929
imap <script><silent><nowait><expr> <Tab> copilot#Accept()
3030
elseif tab_map.rhs !~# 'copilot'
3131
if tab_map.expr

0 commit comments

Comments
 (0)