1
1
--- @type vim.lsp.Config
2
2
return {
3
+ -- NOTE: This name means that existing blink completion works
3
4
name = " copilot" ,
4
5
cmd = {
5
6
" copilot-language-server" ,
6
7
" --stdio" ,
7
8
},
8
9
init_options = {
10
+ -- TODO: Grab versions from the editor
9
11
editorInfo = { name = " neovim" , version = " 0.11" },
10
12
editorPluginInfo = {
11
13
name = " Github Copilot LSP for Neovim" ,
@@ -17,7 +19,7 @@ return {
17
19
enabled = true ,
18
20
},
19
21
},
20
- root_markers = { " .git " } ,
22
+ root_dir = vim . uv . cwd () ,
21
23
on_init = function (client )
22
24
vim .api .nvim_set_hl (0 , " NesAdd" , { link = " DiffAdd" , default = true })
23
25
vim .api .nvim_set_hl (0 , " NesDelete" , { link = " DiffDelete" , default = true })
@@ -26,10 +28,12 @@ return {
26
28
local nes = require (" copilot-lsp.nes" )
27
29
local inline_completion = require (" copilot-lsp.completion" )
28
30
31
+ -- TODO: make this configurable for key maps, or just expose commands to map in config
29
32
vim .keymap .set (" i" , " <c-i>" , function ()
30
33
inline_completion .request_inline_completion (1 )
31
34
end )
32
35
36
+ -- TODO: This should go on an auto command
33
37
vim .keymap .set (" n" , " <leader>x" , function ()
34
38
nes .request_nes (client )
35
39
end )
0 commit comments