Merge pull request #250 from jacekpoz/v0.6

completion/nvim-cmp: add `vim.autocomplete.autoComplete`
This commit is contained in:
NotAShelf 2024-04-14 23:14:57 +00:00 committed by GitHub
commit 522a1b9310
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 13 additions and 2 deletions

View file

@ -88,3 +88,7 @@ Release notes for release 0.6
- Added plugin auto-discovery from plugin inputs. This is mostly from
[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.

View file

@ -219,6 +219,7 @@ in {
completion = {
completeopt = 'menu,menuone,noinsert',
${optionalString (!cfg.alwaysComplete) "autocomplete = false"}
},
formatting = {

View file

@ -1,11 +1,17 @@
{lib, ...}: let
inherit (lib.options) mkEnableOption mkOption literalMD;
inherit (lib.nvim.binds) mkMappingOption;
inherit (lib.types) enum attrsOf nullOr str;
inherit (lib.types) enum attrsOf nullOr str bool;
in {
options.vim = {
autocomplete = {
enable = mkEnableOption "enable autocomplete" // {default = false;};
enable = mkEnableOption "autocomplete" // {default = false;};
alwaysComplete = mkOption {
type = bool;
description = "Automatically show completion.";
default = true;
};
mappings = {
complete = mkMappingOption "Complete [nvim-cmp]" "<C-Space>";