Add couple plugins.

Comment.nvim, ts-context-commentring, lspkind, indent-blankline and added cmp back with new settings api.
This commit is contained in:
CronyAkatsuki 2024-03-19 13:39:22 +01:00
parent 10c402128d
commit 0f0992e305

View File

@ -62,6 +62,59 @@
''; '';
extraPackages = with pkgs; [ stylua isort black nixfmt jq shfmt ]; extraPackages = with pkgs; [ stylua isort black nixfmt jq shfmt ];
plugins = { plugins = {
comment-nvim.enable = true;
ts-context-commentstring.enable = true;
todo-comments.enable = true;
lspkind = {
enable = true;
cmp.enable = true;
};
indent-blankline = {
enable = true;
scope.enabled = false;
};
cmp = {
enable = true;
settings = {
mapping = {
"<C-l>" = "cmp.mapping.confirm({ select = true })";
"<C-j>" = ''
function(fallback)
if cmp.visible then
cmp.select_next_item()
else
fallback()
end
end
'';
"<C-k>" = ''
function(fallback)
if cmp.visible then
cmp.select_next_item()
else
fallback()
end
end
'';
"<C-Space>" = "cmp.mapping.complete()";
"<C-e>" = "cmp.mapping.abort()";
"<C-u>" = "cmp.mapping.scroll_docs(-4)";
"<C-d>" = "cmp.mapping.scroll_docs(4)";
};
snippet.expand = ''
function(args)
require('snippy').expand_snippet(args.body)
end
'';
sources =
[ { name = "nvim_lsp"; } { name = "path"; } { name = "snippy"; } ];
};
};
conform-nvim = { conform-nvim = {
enable = true; enable = true;
formattersByFt = { formattersByFt = {
@ -130,7 +183,6 @@
enable = true; enable = true;
modules = { modules = {
statusline = { set_vim_settings = false; }; statusline = { set_vim_settings = false; };
comment = { };
notify = { }; notify = { };
}; };
}; };