blink-cmp - Way nicer
This commit is contained in:
parent
0043e78eb2
commit
aeb6afa880
4 changed files with 67 additions and 99 deletions
|
@ -41,7 +41,6 @@
|
||||||
pkgs.hello
|
pkgs.hello
|
||||||
pkgs.delta
|
pkgs.delta
|
||||||
pkgs.difftastic
|
pkgs.difftastic
|
||||||
pkgs.alejandra
|
|
||||||
pkgs.nodePackages.bash-language-server
|
pkgs.nodePackages.bash-language-server
|
||||||
pkgs.shellcheck
|
pkgs.shellcheck
|
||||||
pkgs.shfmt
|
pkgs.shfmt
|
||||||
|
|
36
nix/home-manager/flake.lock
generated
36
nix/home-manager/flake.lock
generated
|
@ -140,11 +140,11 @@
|
||||||
"zon2nix": "zon2nix"
|
"zon2nix": "zon2nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742702839,
|
"lastModified": 1743087033,
|
||||||
"narHash": "sha256-9atn1IrQH/R2ahK+Zj6JpS0CfjSPBLObHQeTw/4Vv5Q=",
|
"narHash": "sha256-SvCTbeFnojkQ9Y6SjSTru2xaeqF4BvcteCcggfb5LGk=",
|
||||||
"owner": "ghostty-org",
|
"owner": "ghostty-org",
|
||||||
"repo": "ghostty",
|
"repo": "ghostty",
|
||||||
"rev": "c58fe676ad6212114455ac89a2703dcc3b8b67b7",
|
"rev": "0afb922375b2f8329f1c923cb58df75ddd4a6eb1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -160,11 +160,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742771635,
|
"lastModified": 1743136572,
|
||||||
"narHash": "sha256-HQHzQPrg+g22tb3/K/4tgJjPzM+/5jbaujCZd8s2Mls=",
|
"narHash": "sha256-uwaVrKgi6g1TUq56247j6QvvFtYHloCkjCrEpGBvV54=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "home-manager",
|
"repo": "home-manager",
|
||||||
"rev": "ad0614a1ec9cce3b13169e20ceb7e55dfaf2a818",
|
"rev": "1efd2503172016a6742c87b47b43ca2c8145607d",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -233,11 +233,11 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742750727,
|
"lastModified": 1743096623,
|
||||||
"narHash": "sha256-NCLL5+P8X0fLIEowCqDXU0OqLm5NRyNLyorghiPCfe4=",
|
"narHash": "sha256-In+XxSBeofO1N3npGmdYFjrNFdzN2yQsJg26VdWsKcg=",
|
||||||
"owner": "m15a",
|
"owner": "m15a",
|
||||||
"repo": "flake-awesome-neovim-plugins",
|
"repo": "flake-awesome-neovim-plugins",
|
||||||
"rev": "2454117d654292eee6d2a27f596d479833b9981e",
|
"rev": "7dafc523d8062ee7b9571d481f6651718e9a5807",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -248,11 +248,11 @@
|
||||||
},
|
},
|
||||||
"nixpkgs": {
|
"nixpkgs": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742776792,
|
"lastModified": 1743166830,
|
||||||
"narHash": "sha256-04dzabgZAMUt3jKwlCZpU877kCI3Kl1gWlNRlXo9KNo=",
|
"narHash": "sha256-Vg0bN62JwzH1rPOpJRBUkmTUj6q/HW8l4sBS1AV/MMw=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "a6d0c7c8a8a79ec30c69c5dcd34a5225b55ce8bf",
|
"rev": "71d127da24364704116ca250f40fa478effa68e1",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -286,11 +286,11 @@
|
||||||
"nuschtosSearch": "nuschtosSearch"
|
"nuschtosSearch": "nuschtosSearch"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742732006,
|
"lastModified": 1743157969,
|
||||||
"narHash": "sha256-ZIBMfPNb/hfoFf79MRnhDXGKl0yGhjlYEpy3+/jbxFI=",
|
"narHash": "sha256-ldlSyVKNaXL7ys7Jr7mLhlpGDE4VPVcWmV7Odupn5TY=",
|
||||||
"owner": "nix-community",
|
"owner": "nix-community",
|
||||||
"repo": "nixvim",
|
"repo": "nixvim",
|
||||||
"rev": "7776e37b67e7875c3cd56d9d20fd050798071706",
|
"rev": "95573411bc9be155a93b0f15d2bad62c6b43b3cc",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
@ -404,11 +404,11 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1742370146,
|
"lastModified": 1743081648,
|
||||||
"narHash": "sha256-XRE8hL4vKIQyVMDXykFh4ceo3KSpuJF3ts8GKwh5bIU=",
|
"narHash": "sha256-WRAylyYptt6OX5eCEBWyTwOEqEtD6zt33rlUkr6u3cE=",
|
||||||
"owner": "numtide",
|
"owner": "numtide",
|
||||||
"repo": "treefmt-nix",
|
"repo": "treefmt-nix",
|
||||||
"rev": "adc195eef5da3606891cedf80c0d9ce2d3190808",
|
"rev": "29a3d7b768c70addce17af0869f6e2bd8f5be4b7",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
|
|
|
@ -10,6 +10,9 @@
|
||||||
colorschemes = {
|
colorschemes = {
|
||||||
onedark.enable = true;
|
onedark.enable = true;
|
||||||
};
|
};
|
||||||
|
diagnostics = {
|
||||||
|
virtual_lines = true;
|
||||||
|
};
|
||||||
plugins = {
|
plugins = {
|
||||||
fugitive = {
|
fugitive = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -67,9 +70,6 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
lsp-lines = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
lsp = {
|
lsp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
preConfig = '''';
|
preConfig = '''';
|
||||||
|
@ -101,7 +101,7 @@
|
||||||
lspkind = {
|
lspkind = {
|
||||||
enable = true;
|
enable = true;
|
||||||
mode = "symbol";
|
mode = "symbol";
|
||||||
cmp.enable = true;
|
# cmp.enable = true;
|
||||||
symbolMap = {
|
symbolMap = {
|
||||||
# TODO
|
# TODO
|
||||||
"Text" = "";
|
"Text" = "";
|
||||||
|
@ -146,43 +146,55 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
cmp = {
|
blink-cmp = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoEnableSources = true;
|
|
||||||
settings = {
|
settings = {
|
||||||
mapping = {
|
keymap.preset = "super-tab";
|
||||||
"<CR>" = "cmp.mapping.confirm({ select = true})";
|
appearance = {
|
||||||
"<C-Space>" = "cmp.mapping.complete()";
|
nerd_font_variant = "mono";
|
||||||
"<Tab>" = ''
|
|
||||||
cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
local entry = cmp.get_selected_entry()
|
|
||||||
if not entry then
|
|
||||||
cmp.select_next_item({ behavior = cmp.SelectBehavior.Select })
|
|
||||||
end
|
|
||||||
cmp.confirm()
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {"i", "s", "c"})
|
|
||||||
'';
|
|
||||||
"<S-Tab>" = ''
|
|
||||||
cmp.mapping(function(fallback)
|
|
||||||
if cmp.visible() then
|
|
||||||
cmp.select_prev_item()
|
|
||||||
elseif luasnip.jumpable(-1) then
|
|
||||||
luasnip.jump(-1)
|
|
||||||
else
|
|
||||||
fallback()
|
|
||||||
end
|
|
||||||
end, {"i", "s", "c"})
|
|
||||||
'';
|
|
||||||
};
|
};
|
||||||
view = {
|
completion = {
|
||||||
entries.name = "custom";
|
ghost_text.enabled = true;
|
||||||
|
accept = {
|
||||||
|
auto_brackets = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
list = {
|
||||||
|
selection = {
|
||||||
|
auto_insert = false;
|
||||||
|
preselect = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
menu = {
|
||||||
|
# draw == colorful-menu.nvim config
|
||||||
|
};
|
||||||
|
};
|
||||||
|
signature = {
|
||||||
|
enabled = true;
|
||||||
|
};
|
||||||
|
sources = {
|
||||||
|
default = [
|
||||||
|
"lsp"
|
||||||
|
"path"
|
||||||
|
"snippets"
|
||||||
|
"buffer"
|
||||||
|
# [TODO] Disabled until I figure this out, rust uses :: "emoji"
|
||||||
|
];
|
||||||
|
providers = {
|
||||||
|
emoji = {
|
||||||
|
module = "blink-emoji";
|
||||||
|
name = "Emoji";
|
||||||
|
score_offset = 15;
|
||||||
|
opts = {
|
||||||
|
insert = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
blink-emoji.enable = true;
|
||||||
project-nvim = {
|
project-nvim = {
|
||||||
enable = true;
|
enable = true;
|
||||||
enableTelescope = true;
|
enableTelescope = true;
|
||||||
|
@ -193,10 +205,10 @@
|
||||||
};
|
};
|
||||||
telescope = {
|
telescope = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
extensions.live-grep-args.enable = true;
|
||||||
enabledExtensions = [
|
enabledExtensions = [
|
||||||
"zf-native" # TODO
|
"zf-native" # TODO
|
||||||
"projects" # TODO
|
"projects" # TODO
|
||||||
"egrepify" # TODO
|
|
||||||
];
|
];
|
||||||
# extraLua = {
|
# extraLua = {
|
||||||
# post = builtins.readFile ./neovim/telescope.lua;
|
# post = builtins.readFile ./neovim/telescope.lua;
|
||||||
|
@ -209,7 +221,7 @@
|
||||||
};
|
};
|
||||||
"<leader>fg" = {
|
"<leader>fg" = {
|
||||||
mode = "n";
|
mode = "n";
|
||||||
action = "egrepify";
|
action = "live_grep";
|
||||||
options.desc = "Live Grep";
|
options.desc = "Live Grep";
|
||||||
};
|
};
|
||||||
"<leader>fb" = {
|
"<leader>fb" = {
|
||||||
|
|
|
@ -47,46 +47,3 @@ require("gitlinker").setup()
|
||||||
require("nvim-biscuits").setup()
|
require("nvim-biscuits").setup()
|
||||||
require("overseer").setup()
|
require("overseer").setup()
|
||||||
require("officer").setup({ create_mappings = true })
|
require("officer").setup({ create_mappings = true })
|
||||||
|
|
||||||
local cmp = require("cmp")
|
|
||||||
|
|
||||||
cmp.setup({
|
|
||||||
snippet = {
|
|
||||||
expand = function(args)
|
|
||||||
vim.snippet.expand(args.body)
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
cmdline,
|
|
||||||
})
|
|
||||||
|
|
||||||
cmp.setup.cmdline(":", {
|
|
||||||
mapping = cmp.mapping.preset.cmdline(),
|
|
||||||
sources = cmp.config.sources({
|
|
||||||
{ name = "path" },
|
|
||||||
}, {
|
|
||||||
{ name = "cmdline" },
|
|
||||||
}),
|
|
||||||
matching = { disallow_symbol_nonprefix_matching = false },
|
|
||||||
})
|
|
||||||
|
|
||||||
do
|
|
||||||
function setup()
|
|
||||||
require("ufo").setup({
|
|
||||||
provider_selector = function(bufnr, filetype, buftype)
|
|
||||||
return { "treesitter", "indent" }
|
|
||||||
end,
|
|
||||||
})
|
|
||||||
|
|
||||||
require("ufo").setup({})
|
|
||||||
vim.o.foldcolumn = "1" -- '0' is not bad
|
|
||||||
vim.o.foldlevel = 99 -- Using ufo provider need a large value, feel free to decrease the value
|
|
||||||
vim.o.foldlevelstart = 99
|
|
||||||
vim.o.foldenable = true
|
|
||||||
end
|
|
||||||
|
|
||||||
success, output = pcall(setup) -- execute 'setup()' and catch any errors
|
|
||||||
if not success then
|
|
||||||
print("Error on setup for plugin: ufo")
|
|
||||||
print(output)
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue