mirror of
https://github.com/Theaninova/TheaninovOS.git
synced 2025-12-12 11:36:20 +00:00
feat: nixvim refactor
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
{ lib, config, ... }:
|
||||
let
|
||||
cfg = config.presets.base.completion;
|
||||
in
|
||||
{
|
||||
options.presets.base.completion = {
|
||||
enable = lib.mkEnableOption "completion";
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
plugins = {
|
||||
luasnip.enable = true;
|
||||
lspkind = {
|
||||
enable = true;
|
||||
mode = "symbol_text";
|
||||
};
|
||||
cmp = {
|
||||
enable = true;
|
||||
settings = {
|
||||
mapping = {
|
||||
"<C-n>" = "cmp.mapping.select_next_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-p>" = "cmp.mapping.select_prev_item({behavior = cmp.SelectBehavior.Select})";
|
||||
"<C-Space>" = "cmp.mapping.confirm({select = true})";
|
||||
"<C-Enter>" = "cmp.mapping.complete()";
|
||||
};
|
||||
sources = [
|
||||
{ name = "path"; }
|
||||
{ name = "luasnip"; }
|
||||
{ name = "nvim_lsp"; }
|
||||
{ name = "nvim_lsp_signature_help"; }
|
||||
{ name = "nvim_lsp_document_symbol"; }
|
||||
];
|
||||
formatting.fields = [
|
||||
"abbr"
|
||||
"kind"
|
||||
];
|
||||
snippet.expand = "function(args) require('luasnip').lsp_expand(args.body) end";
|
||||
window = {
|
||||
completion.border = "rounded";
|
||||
documentation.border = "rounded";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user