mirror of
https://github.com/NotAShelf/nvf.git
synced 2024-11-26 15:06:45 +00:00
plugins/nvim-cmp: add alwaysComplete option
Disabling this option makes the completion window not popup by default, requiring manual activation.
This commit is contained in:
parent
7cb47c71b3
commit
b93ce3ced8
3 changed files with 13 additions and 2 deletions
|
@ -88,3 +88,7 @@ Release notes for release 0.6
|
||||||
|
|
||||||
- Added plugin auto-discovery from plugin inputs. This is mostly from
|
- Added plugin auto-discovery from plugin inputs. This is mostly from
|
||||||
[JordanIsaac's neovim-flake](https://github.com/jordanisaacs/neovim-flake)
|
[JordanIsaac's neovim-flake](https://github.com/jordanisaacs/neovim-flake)
|
||||||
|
|
||||||
|
[jacekpoz](https://github.com/jacekpoz):
|
||||||
|
|
||||||
|
- Added `vim.autocomplete.alwaysComplete`. Allows users to have the autocomplete window popup only when manually activated.
|
||||||
|
|
|
@ -219,6 +219,7 @@ in {
|
||||||
|
|
||||||
completion = {
|
completion = {
|
||||||
completeopt = 'menu,menuone,noinsert',
|
completeopt = 'menu,menuone,noinsert',
|
||||||
|
${optionalString (!cfg.alwaysComplete) "autocomplete = false"}
|
||||||
},
|
},
|
||||||
|
|
||||||
formatting = {
|
formatting = {
|
||||||
|
|
|
@ -1,11 +1,17 @@
|
||||||
{lib, ...}: let
|
{lib, ...}: let
|
||||||
inherit (lib.options) mkEnableOption mkOption literalMD;
|
inherit (lib.options) mkEnableOption mkOption literalMD;
|
||||||
inherit (lib.nvim.binds) mkMappingOption;
|
inherit (lib.nvim.binds) mkMappingOption;
|
||||||
inherit (lib.types) enum attrsOf nullOr str;
|
inherit (lib.types) enum attrsOf nullOr str bool;
|
||||||
in {
|
in {
|
||||||
options.vim = {
|
options.vim = {
|
||||||
autocomplete = {
|
autocomplete = {
|
||||||
enable = mkEnableOption "enable autocomplete" // {default = false;};
|
enable = mkEnableOption "autocomplete" // {default = false;};
|
||||||
|
|
||||||
|
alwaysComplete = mkOption {
|
||||||
|
type = bool;
|
||||||
|
description = "Automatically show completion.";
|
||||||
|
default = true;
|
||||||
|
};
|
||||||
|
|
||||||
mappings = {
|
mappings = {
|
||||||
complete = mkMappingOption "Complete [nvim-cmp]" "<C-Space>";
|
complete = mkMappingOption "Complete [nvim-cmp]" "<C-Space>";
|
||||||
|
|
Loading…
Reference in a new issue