mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-01 19:11:15 +00:00
modified: modules/completion/nvim-cmp/nvim-cmp.nix
This commit is contained in:
parent
ad95175224
commit
acf592e8b1
5 changed files with 53 additions and 44 deletions
|
@ -93,7 +93,7 @@ inputs: let
|
|||
vim.autopairs.enable = true;
|
||||
|
||||
vim.autocomplete = {
|
||||
enable = false;
|
||||
enable = true;
|
||||
type = "nvim-cmp";
|
||||
};
|
||||
|
||||
|
|
|
@ -49,10 +49,13 @@ with builtins; {
|
|||
'';
|
||||
type = types.str;
|
||||
default = "nvim_cmp_menu_map";
|
||||
example = ''
|
||||
example = nvim.nmd.literalAsciiDoc ''
|
||||
[source,lua]
|
||||
---
|
||||
function(entry, vim_item)
|
||||
return vim_item
|
||||
end
|
||||
---
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
|
|
@ -12,7 +12,7 @@ in {
|
|||
config = mkIf cfg.enable {
|
||||
vim.startPlugins = optional usingNvimCmp "cmp-nvim-lsp";
|
||||
|
||||
vim.autocomplete.sources = ["nvim_lsp"];
|
||||
vim.autocomplete.sources = {"nvim_lsp" = "[LSP]";};
|
||||
|
||||
vim.luaConfigRC.lsp-setup = ''
|
||||
vim.g.formatsave = ${boolToString cfg.formatOnSave};
|
||||
|
|
|
@ -42,11 +42,12 @@ in {
|
|||
default = true;
|
||||
};
|
||||
|
||||
theme = mkOption {
|
||||
theme = let
|
||||
themeSupported = elem config.vim.theme.name supported_themes;
|
||||
in
|
||||
mkOption {
|
||||
description = "Theme for lualine";
|
||||
default = "auto";
|
||||
type = types.enum (
|
||||
[
|
||||
type = types.enum ([
|
||||
"auto"
|
||||
"16color"
|
||||
"gruvbox"
|
||||
|
@ -79,8 +80,11 @@ in {
|
|||
"tomorrow"
|
||||
"wombat"
|
||||
]
|
||||
++ optional (elem config.vim.theme.name supported_themes) config.vim.theme.name
|
||||
);
|
||||
++ optional themeSupported config.vim.theme.name);
|
||||
default = "auto";
|
||||
# TODO: xml generation error if the closing '' is on a new line.
|
||||
# issue: https://gitlab.com/rycee/nmd/-/issues/10
|
||||
defaultText = nvim.nmd.literalAsciiDoc ''`config.vim.theme.name` if theme supports lualine else "auto"'';
|
||||
};
|
||||
|
||||
sectionSeparator = {
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
...
|
||||
}:
|
||||
with lib;
|
||||
with builtins; {
|
||||
with builtins; let
|
||||
cfg = config.vim.visuals;
|
||||
in {
|
||||
options.vim.visuals = {
|
||||
enable = mkEnableOption "Visual enhancements.";
|
||||
|
||||
|
|
Loading…
Reference in a new issue