feat(neovim): use blink for completion, auto-brackets and indent lines
This commit is contained in:
1 parent
a2beafffa7
commit
f5a6072bb5
4 files changed
+13
-83
No files matched your search
@@ -0,0 +1,12 @@
|
|||||||
|
{
|
||||||
|
programs.nixvim = {
|
||||||
|
plugins = {
|
||||||
|
blink-indent.enable = true;
|
||||||
|
blink-pairs.enable = true;
|
||||||
|
blink-cmp = {
|
||||||
|
enable = true;
|
||||||
|
settings.signature.enabled = true;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
{
|
|
||||||
programs.nixvim = {
|
|
||||||
opts.completeopt = [
|
|
||||||
"menu"
|
|
||||||
"menuone"
|
|
||||||
"noselect"
|
|
||||||
];
|
|
||||||
|
|
||||||
plugins = {
|
|
||||||
lspkind.enable = true;
|
|
||||||
|
|
||||||
cmp = {
|
|
||||||
enable = true;
|
|
||||||
|
|
||||||
autoEnableSources = true;
|
|
||||||
|
|
||||||
settings = {
|
|
||||||
snippet.expand = "function(args) vim.snippet.expand(args.body) end";
|
|
||||||
|
|
||||||
formatting.fields = [
|
|
||||||
"abbr"
|
|
||||||
"icon"
|
|
||||||
"menu"
|
|
||||||
];
|
|
||||||
|
|
||||||
mapping = {
|
|
||||||
"<C-p>" = "cmp.mapping.select_prev_item()";
|
|
||||||
"<C-n>" = "cmp.mapping.select_next_item()";
|
|
||||||
"<C-b>" = "cmp.mapping.scroll_docs(-4)";
|
|
||||||
"<C-f>" = "cmp.mapping.scroll_docs(4)";
|
|
||||||
"<C-e>" = "cmp.mapping.close()";
|
|
||||||
"<C-y>" = "cmp.mapping.confirm({ select = true })";
|
|
||||||
"<CR>" = "cmp.mapping.confirm({ select = true })";
|
|
||||||
"<C-Space>" = "cmp.mapping.complete()";
|
|
||||||
"<C-l>" = ''
|
|
||||||
cmp.mapping(
|
|
||||||
function()
|
|
||||||
if vim.snippet.active({ direction = 1 }) then
|
|
||||||
vim.snippet.jump(1)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{'i', 's'}
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
"<C-h>" = ''
|
|
||||||
cmp.mapping(
|
|
||||||
function()
|
|
||||||
if vim.snippet.active({ direction = -1 }) then
|
|
||||||
vim.snippet.jump(-1)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
{'i', 's'}
|
|
||||||
)
|
|
||||||
'';
|
|
||||||
};
|
|
||||||
|
|
||||||
sources = [
|
|
||||||
{ name = "nvim_lsp"; }
|
|
||||||
{ name = "nvim_lsp_signature_help"; }
|
|
||||||
{ name = "path"; }
|
|
||||||
];
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
@@ -1,24 +1,17 @@
|
|||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./cmp.nix
|
./blink.nix
|
||||||
./dap.nix
|
./dap.nix
|
||||||
./lsp.nix
|
./lsp.nix
|
||||||
./fmt.nix
|
./fmt.nix
|
||||||
./treesitter.nix
|
./treesitter.nix
|
||||||
./telescope.nix
|
./telescope.nix
|
||||||
./lualine.nix
|
./lualine.nix
|
||||||
./nvim-autopairs.nix
|
|
||||||
./which-key.nix
|
./which-key.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
programs.nixvim = {
|
programs.nixvim = {
|
||||||
plugins = {
|
|
||||||
lz-n.enable = true;
|
|
||||||
indent-blankline.enable = true;
|
|
||||||
web-devicons.enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
extraPlugins = with pkgs.vimPlugins; [
|
extraPlugins = with pkgs.vimPlugins; [
|
||||||
vim-sleuth
|
vim-sleuth
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -1,9 +0,0 @@
|
|||||||
{
|
|
||||||
programs.nixvim.plugins.nvim-autopairs = {
|
|
||||||
enable = true;
|
|
||||||
lazyLoad = {
|
|
||||||
enable = true;
|
|
||||||
settings.event = "InsertEnter";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
}
|
|
||||||
Reference in new issue
Block a user