mirror of
https://github.com/mentos1386/dotfiles.git
synced 2025-01-30 16:25:41 +00:00
chore: changes
This commit is contained in:
parent
392d8034e4
commit
bc26d8569e
2 changed files with 21 additions and 14 deletions
12
nix/home.nix
12
nix/home.nix
|
@ -30,6 +30,14 @@
|
|||
fd
|
||||
fzf
|
||||
gnumake
|
||||
age
|
||||
sops
|
||||
jq
|
||||
yq
|
||||
http-prompt
|
||||
|
||||
# Docker
|
||||
docker-compose
|
||||
|
||||
# Nodejs
|
||||
nodejs_20
|
||||
|
@ -71,10 +79,6 @@
|
|||
recursive = true;
|
||||
source = ../nvim;
|
||||
};
|
||||
"~/.local/bin/docker".text = ''
|
||||
#!/usr/bin/env bash
|
||||
exec podman "$@"
|
||||
'';
|
||||
};
|
||||
|
||||
programs.git = {
|
||||
|
|
|
@ -6,6 +6,9 @@ require("copilot").setup({
|
|||
javascript = true,
|
||||
typescript = true,
|
||||
rust = true,
|
||||
go = true,
|
||||
yaml = true,
|
||||
python = true,
|
||||
},
|
||||
})
|
||||
require("copilot_cmp").setup()
|
||||
|
@ -53,20 +56,20 @@ cmp.setup({
|
|||
mapping = cmp.mapping.preset.insert({
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
||||
["<Tab>"] = cmp.mapping(function(fallback)
|
||||
local col = vim.fn.col(".") - 1
|
||||
|
||||
-- This little snippet will confirm with tab, and if no entry is selected, will confirm the first item
|
||||
if cmp.visible() then
|
||||
cmp.select_next_item(select_opts)
|
||||
elseif col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then
|
||||
fallback()
|
||||
local entry = cmp.get_selected_entry()
|
||||
if not entry then
|
||||
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||
else
|
||||
cmp.confirm()
|
||||
end
|
||||
else
|
||||
cmp.complete()
|
||||
fallback()
|
||||
end
|
||||
end, { "i", "s" }),
|
||||
end, { "i", "s", "c" }),
|
||||
}),
|
||||
sources = cmp.config.sources({
|
||||
{ name = "copilot" },
|
||||
|
@ -85,7 +88,7 @@ cmp.setup({
|
|||
-- Set configuration for specific filetype.
|
||||
cmp.setup.filetype("gitcommit", {
|
||||
sources = cmp.config.sources({
|
||||
{ name = "git" }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git).
|
||||
{ name = "git" },
|
||||
}, {
|
||||
{ name = "buffer" },
|
||||
}),
|
||||
|
|
Loading…
Reference in a new issue