mirror of
https://github.com/mentos1386/dotfiles.git
synced 2025-01-31 00:35:42 +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
|
fd
|
||||||
fzf
|
fzf
|
||||||
gnumake
|
gnumake
|
||||||
|
age
|
||||||
|
sops
|
||||||
|
jq
|
||||||
|
yq
|
||||||
|
http-prompt
|
||||||
|
|
||||||
|
# Docker
|
||||||
|
docker-compose
|
||||||
|
|
||||||
# Nodejs
|
# Nodejs
|
||||||
nodejs_20
|
nodejs_20
|
||||||
|
@ -71,10 +79,6 @@
|
||||||
recursive = true;
|
recursive = true;
|
||||||
source = ../nvim;
|
source = ../nvim;
|
||||||
};
|
};
|
||||||
"~/.local/bin/docker".text = ''
|
|
||||||
#!/usr/bin/env bash
|
|
||||||
exec podman "$@"
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
|
|
||||||
programs.git = {
|
programs.git = {
|
||||||
|
|
|
@ -6,6 +6,9 @@ require("copilot").setup({
|
||||||
javascript = true,
|
javascript = true,
|
||||||
typescript = true,
|
typescript = true,
|
||||||
rust = true,
|
rust = true,
|
||||||
|
go = true,
|
||||||
|
yaml = true,
|
||||||
|
python = true,
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
require("copilot_cmp").setup()
|
require("copilot_cmp").setup()
|
||||||
|
@ -53,20 +56,20 @@ cmp.setup({
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||||
["<C-Space>"] = cmp.mapping.complete(),
|
|
||||||
["<C-e>"] = cmp.mapping.abort(),
|
["<C-e>"] = cmp.mapping.abort(),
|
||||||
["<CR>"] = cmp.mapping.confirm({ select = true }),
|
|
||||||
["<Tab>"] = cmp.mapping(function(fallback)
|
["<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
|
if cmp.visible() then
|
||||||
cmp.select_next_item(select_opts)
|
local entry = cmp.get_selected_entry()
|
||||||
elseif col == 0 or vim.fn.getline("."):sub(col, col):match("%s") then
|
if not entry then
|
||||||
fallback()
|
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
||||||
else
|
else
|
||||||
cmp.complete()
|
cmp.confirm()
|
||||||
end
|
end
|
||||||
end, { "i", "s" }),
|
else
|
||||||
|
fallback()
|
||||||
|
end
|
||||||
|
end, { "i", "s", "c" }),
|
||||||
}),
|
}),
|
||||||
sources = cmp.config.sources({
|
sources = cmp.config.sources({
|
||||||
{ name = "copilot" },
|
{ name = "copilot" },
|
||||||
|
@ -85,7 +88,7 @@ cmp.setup({
|
||||||
-- Set configuration for specific filetype.
|
-- Set configuration for specific filetype.
|
||||||
cmp.setup.filetype("gitcommit", {
|
cmp.setup.filetype("gitcommit", {
|
||||||
sources = cmp.config.sources({
|
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" },
|
{ name = "buffer" },
|
||||||
}),
|
}),
|
||||||
|
|
Loading…
Reference in a new issue