Compare commits

..

3 Commits

6 changed files with 41 additions and 14 deletions

View File

@ -98,6 +98,22 @@
"type": "github" "type": "github"
} }
}, },
"cmp-async-path": {
"flake": false,
"locked": {
"lastModified": 1673896803,
"narHash": "sha256-dgAiVbdMiKjiKWk+dJf/Zz8T20+D4OalGH5dTzYi5aM=",
"owner": "FelipeLema",
"repo": "cmp-async-path",
"rev": "d8229a93d7b71f22c66ca35ac9e6c6cd850ec61d",
"type": "github"
},
"original": {
"owner": "FelipeLema",
"repo": "cmp-async-path",
"type": "github"
}
},
"comment-box-nvim": { "comment-box-nvim": {
"flake": false, "flake": false,
"locked": { "locked": {
@ -669,6 +685,7 @@
"asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver", "asus-touchpad-numpad-driver": "asus-touchpad-numpad-driver",
"attic": "attic", "attic": "attic",
"bufferline-nvim": "bufferline-nvim", "bufferline-nvim": "bufferline-nvim",
"cmp-async-path": "cmp-async-path",
"comment-box-nvim": "comment-box-nvim", "comment-box-nvim": "comment-box-nvim",
"copilot-lua": "copilot-lua", "copilot-lua": "copilot-lua",
"flake-utils": "flake-utils", "flake-utils": "flake-utils",

View File

@ -39,6 +39,9 @@
bufferline-nvim.flake = false; bufferline-nvim.flake = false;
bufferline-nvim.url = "github:akinsho/bufferline.nvim"; bufferline-nvim.url = "github:akinsho/bufferline.nvim";
cmp-async-path.url = "github:FelipeLema/cmp-async-path";
cmp-async-path.flake = false;
comment-box-nvim.flake = false; comment-box-nvim.flake = false;
comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim"; comment-box-nvim.url = "github:LudoPinelli/comment-box.nvim";

View File

@ -27,9 +27,7 @@ in
fish = { fish = {
enable = true; enable = true;
shellAbbrs = shellConfig.abbreviations; shellAbbrs = shellConfig.abbreviations;
shellAliases = shellConfig.aliases; shellAliases = shellConfig.aliases;
shellInit = '' shellInit = ''
# Vi Mode # Vi Mode
fish_vi_key_bindings fish_vi_key_bindings

View File

@ -66,6 +66,7 @@ in
yamlfmt yamlfmt
]; ];
plugins = with pkgs.vimPlugins; [ plugins = with pkgs.vimPlugins; [
cmp-async-path
cmp-nvim-lsp cmp-nvim-lsp
cmp_luasnip cmp_luasnip
copilot-cmp copilot-cmp

View File

@ -21,6 +21,13 @@ vim.api.nvim_create_autocmd("InsertEnter", {
require("luasnip.loaders.from_vscode").lazy_load() require("luasnip.loaders.from_vscode").lazy_load()
require("copilot_cmp").setup() require("copilot_cmp").setup()
local default_sources = {
{ name = "async_path", priority = 4 },
{ name = "copilot", priority = 3 },
{ name = "luasnip", priority = 2 },
{ name = "nvim_lsp", priority = 4 },
}
cmp.setup({ cmp.setup({
formatting = { formatting = {
format = require("lspkind").cmp_format({ format = require("lspkind").cmp_format({
@ -63,13 +70,14 @@ vim.api.nvim_create_autocmd("InsertEnter", {
end end
end, { "i", "s" }), end, { "i", "s" }),
}), }),
sources = { sources = default_sources,
{ name = "buffer", priority = 1 }, })
{ name = "copilot", priority = 8 },
{ name = "luasnip", priority = 7 }, cmp.setup.filetype("org", {
{ name = "nvim_lsp", priority = 9 }, sources = vim.tbl_deep_extend("force", default_sources, {
{ name = "orgmode", priority = 9 }, { name = "buffer", priority = 5 },
}, { name = "orgmode", priority = 5 },
}),
}) })
end, end,
}) })

View File

@ -26,11 +26,11 @@ with lib.my;
src = inputs.lspsaga-nvim; src = inputs.lspsaga-nvim;
}); });
advanced-git-search-nvim = prev.vimUtils.buildVimPluginFrom2Nix { cmp-async-path = prev.vimPlugins.cmp-path.overrideAttrs (old: {
pname = "advanced-git-search-nvim"; pname = "cmp-async-path";
version = mkVersionInput inputs.advanced-git-search-nvim; version = mkVersionInput inputs.cmp-async-path;
src = inputs.advanced-git-search-nvim; src = inputs.cmp-async-path;
}; });
comment-box-nvim = prev.vimUtils.buildVimPluginFrom2Nix { comment-box-nvim = prev.vimUtils.buildVimPluginFrom2Nix {
pname = "comment-box-nvim"; pname = "comment-box-nvim";