feat: setup copilot
This commit is contained in:
parent
0e02daf29b
commit
7b6b1f9247
3 changed files with 54 additions and 3 deletions
34
flake.lock
34
flake.lock
|
@ -53,6 +53,38 @@
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"copilot-cmp": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1677432266,
|
||||||
|
"narHash": "sha256-Bu9Lx+1H1pG97ibwn8Q7jOHOKOrzg1nyucTTqbdlapI=",
|
||||||
|
"owner": "zbirenbaum",
|
||||||
|
"repo": "copilot-cmp",
|
||||||
|
"rev": "92535dfd9c430b49ca7d9a7da336c5db65826b65",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zbirenbaum",
|
||||||
|
"repo": "copilot-cmp",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"copilot-lua": {
|
||||||
|
"flake": false,
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1679135186,
|
||||||
|
"narHash": "sha256-ibp46ZQptwEqgaI03ANSbDV+lCaBe9uO0DkIAog8dgo=",
|
||||||
|
"owner": "zbirenbaum",
|
||||||
|
"repo": "copilot.lua",
|
||||||
|
"rev": "db62371b6eac73954c194f3c8faee36cffee8135",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "zbirenbaum",
|
||||||
|
"repo": "copilot.lua",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
"darwin": {
|
"darwin": {
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"nixpkgs": [
|
"nixpkgs": [
|
||||||
|
@ -180,6 +212,8 @@
|
||||||
"agenix": "agenix",
|
"agenix": "agenix",
|
||||||
"cmp-conventionalcommits": "cmp-conventionalcommits",
|
"cmp-conventionalcommits": "cmp-conventionalcommits",
|
||||||
"cmp-git": "cmp-git",
|
"cmp-git": "cmp-git",
|
||||||
|
"copilot-cmp": "copilot-cmp",
|
||||||
|
"copilot-lua": "copilot-lua",
|
||||||
"gh-nvim": "gh-nvim",
|
"gh-nvim": "gh-nvim",
|
||||||
"home-manager": "home-manager",
|
"home-manager": "home-manager",
|
||||||
"impermanence": "impermanence",
|
"impermanence": "impermanence",
|
||||||
|
|
10
flake.nix
10
flake.nix
|
@ -19,6 +19,16 @@
|
||||||
flake = false;
|
flake = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
copilot-cmp = {
|
||||||
|
url = "github:zbirenbaum/copilot-cmp";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
|
copilot-lua = {
|
||||||
|
url = "github:zbirenbaum/copilot.lua";
|
||||||
|
flake = false;
|
||||||
|
};
|
||||||
|
|
||||||
gh-nvim = {
|
gh-nvim = {
|
||||||
url = "github:ldelossa/gh.nvim";
|
url = "github:ldelossa/gh.nvim";
|
||||||
flake = false;
|
flake = false;
|
||||||
|
|
|
@ -60,13 +60,20 @@
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = cmp-git;
|
plugin = cmp-git;
|
||||||
config = "lua require 'cmp_git'.setup()";
|
config = "lua require 'cmp_git'.setup {}";
|
||||||
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
plugin = copilot-vim;
|
||||||
|
config = ''
|
||||||
|
let g:copilot_node_command = "${pkgs.nodejs-16_x}/bin/node"
|
||||||
|
'';
|
||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
plugin = crates-nvim;
|
plugin = crates-nvim;
|
||||||
config = ''
|
config = ''
|
||||||
lua require 'crates'.setup()
|
lua require 'crates'.setup {}
|
||||||
|
|
||||||
nnoremap <silent> ${leader}ct :lua require('crates').toggle()<cr>
|
nnoremap <silent> ${leader}ct :lua require('crates').toggle()<cr>
|
||||||
nnoremap <silent> ${leader}cr :lua require('crates').reload()<cr>
|
nnoremap <silent> ${leader}cr :lua require('crates').reload()<cr>
|
||||||
|
@ -272,7 +279,7 @@
|
||||||
documentation = cmp.config.window.bordered(),
|
documentation = cmp.config.window.bordered(),
|
||||||
},
|
},
|
||||||
mapping = {
|
mapping = {
|
||||||
['<c-space>'] = cmp.mapping.confirm({ select = true }),
|
['<tab>'] = cmp.mapping.confirm({ select = true }),
|
||||||
['<c-p>'] = cmp.mapping.select_prev_item(select_opts),
|
['<c-p>'] = cmp.mapping.select_prev_item(select_opts),
|
||||||
['<c-n>'] = cmp.mapping.select_next_item(select_opts),
|
['<c-n>'] = cmp.mapping.select_next_item(select_opts),
|
||||||
['<c-d>'] = cmp.mapping.scroll_docs(4),
|
['<c-d>'] = cmp.mapping.scroll_docs(4),
|
||||||
|
|
Loading…
Reference in a new issue