Add nvim copilot
This commit is contained in:
@ -10,9 +10,10 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs; [
|
||||||
|
nil
|
||||||
# neovim
|
# neovim
|
||||||
|
|
||||||
(pkgs.nerdfonts.override { fonts = [ "FiraCodeMono" ]; })
|
(pkgs.nerdfonts.override { fonts = [ "FiraCode" ]; })
|
||||||
|
|
||||||
# (pkgs.writeShellScriptBin "my-hello" ''
|
# (pkgs.writeShellScriptBin "my-hello" ''
|
||||||
# echo "Hello, ${config.home.username}!"
|
# echo "Hello, ${config.home.username}!"
|
||||||
|
|||||||
@ -3,7 +3,7 @@
|
|||||||
{
|
{
|
||||||
programs.git = {
|
programs.git = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
|
||||||
aliases = {
|
aliases = {
|
||||||
st = "status";
|
st = "status";
|
||||||
ci = "commit";
|
ci = "commit";
|
||||||
@ -22,6 +22,7 @@
|
|||||||
editor = "nvim";
|
editor = "nvim";
|
||||||
};
|
};
|
||||||
push.default = "matching";
|
push.default = "matching";
|
||||||
|
init.defaultBranch = "main";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,8 @@
|
|||||||
cmp-git
|
cmp-git
|
||||||
nvim-lspconfig
|
nvim-lspconfig
|
||||||
lspkind-nvim
|
lspkind-nvim
|
||||||
|
copilot-lua
|
||||||
|
copilot-cmp
|
||||||
(nvim-treesitter.withPlugins (p: [ p.awk p.bash p.c p.c_sharp p.cpp p.css p.diff p.dockerfile p.doxygen p.git_config p.gitcommit p.go p.gomod p.gosum p.gotmpl p.helm p.haskell p.html p.http p.java p.javascript p.json p.latex p.lua p.markdown p.markdown_inline p.matlab p.nix p.printf p.python p.regex p.rust p.sql p.strace p.supercollider p.svelte p.swift p.terraform p.tmux p.toml p.typescript p.vim p.xml p.yaml p.zig ]))
|
(nvim-treesitter.withPlugins (p: [ p.awk p.bash p.c p.c_sharp p.cpp p.css p.diff p.dockerfile p.doxygen p.git_config p.gitcommit p.go p.gomod p.gosum p.gotmpl p.helm p.haskell p.html p.http p.java p.javascript p.json p.latex p.lua p.markdown p.markdown_inline p.matlab p.nix p.printf p.python p.regex p.rust p.sql p.strace p.supercollider p.svelte p.swift p.terraform p.tmux p.toml p.typescript p.vim p.xml p.yaml p.zig ]))
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -46,5 +48,9 @@
|
|||||||
(lib.strings.fileContents ../../nvim/plugins.lua)
|
(lib.strings.fileContents ../../nvim/plugins.lua)
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
home.packages = with pkgs; [
|
||||||
|
nodejs-slim
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -7,8 +7,10 @@
|
|||||||
mouse = true;
|
mouse = true;
|
||||||
keyMode = "vi";
|
keyMode = "vi";
|
||||||
escapeTime = 0;
|
escapeTime = 0;
|
||||||
|
terminal = "screen-256color";
|
||||||
|
tmuxp.enable = true;
|
||||||
|
# newSession = true;
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
set -g default-terminal "screen-256color"
|
|
||||||
set -g display-time 1500
|
set -g display-time 1500
|
||||||
|
|
||||||
unbind S
|
unbind S
|
||||||
|
|||||||
@ -36,13 +36,16 @@ cmp.setup({
|
|||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
{ name = 'cmp_yanky' },
|
{ name = 'cmp_yanky' },
|
||||||
{ name = 'git' },
|
{ name = 'git' },
|
||||||
|
{ name = 'copilot' },
|
||||||
-- }, {
|
-- }, {
|
||||||
{ name = 'buffer', keyword_length = 2 },
|
{ name = 'buffer', keyword_length = 2 },
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
formatting = {
|
||||||
formatting = {
|
formatting = {
|
||||||
format = lspkind.cmp_format({
|
format = lspkind.cmp_format({
|
||||||
mode = "symbol_text",
|
-- mode = "symbol_text",
|
||||||
|
mode = "symbol",
|
||||||
menu = ({
|
menu = ({
|
||||||
buffer = "[buf]",
|
buffer = "[buf]",
|
||||||
nvim_lsp = "[lsp]",
|
nvim_lsp = "[lsp]",
|
||||||
@ -51,7 +54,9 @@ cmp.setup({
|
|||||||
latex_symbols = "[tex]",
|
latex_symbols = "[tex]",
|
||||||
path = "[path]",
|
path = "[path]",
|
||||||
cmp_yanky = "[yank]",
|
cmp_yanky = "[yank]",
|
||||||
})
|
copilot = "[copilot]",
|
||||||
|
}),
|
||||||
|
symbol_map = { Copilot = "" }
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@ -117,6 +122,7 @@ require("telescope").load_extension("yank_history")
|
|||||||
|
|
||||||
require'nvim-treesitter.configs'.setup {
|
require'nvim-treesitter.configs'.setup {
|
||||||
-- ensure_installed = { "lua", "vim", "help" },
|
-- ensure_installed = { "lua", "vim", "help" },
|
||||||
|
ensure_installed = {},
|
||||||
sync_install = false,
|
sync_install = false,
|
||||||
auto_install = false,
|
auto_install = false,
|
||||||
|
|
||||||
@ -176,3 +182,10 @@ require('lualine').setup({
|
|||||||
inactive_winbar = {},
|
inactive_winbar = {},
|
||||||
extensions = {}
|
extensions = {}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
require("copilot").setup({
|
||||||
|
suggestion = { enabled = false },
|
||||||
|
panel = { enabled = false },
|
||||||
|
})
|
||||||
|
require("copilot_cmp").setup()
|
||||||
|
|||||||
Reference in New Issue
Block a user