mirror of
https://github.com/NotAShelf/nvf.git
synced 2025-09-07 02:41:33 +00:00
treewide: rewrite autocompletion module and related stuff (#404)
* modules/completion: rewrite * treewide: remove vsnip, add luasnip * nvim-cmp: add default sorting * nvim-cmp: load after luasnip * lib: fix docs for mergelessListOf * docs: add changelog entires for rewrite * deprecations: add rewrite deprecations * nvim-cmp: clarify in format description * docs: fix option reference in release notes * treewide: remove reduant `// {default = false;}`s * luasnip: add missing `{option}` for option reference * deprecations: add entry for vsnip * nvim-autopairs: use multiline string * nvim-dap: use outer attribute
This commit is contained in:
parent
ef413736e9
commit
7dbd1cd8d1
33 changed files with 512 additions and 483 deletions
|
@ -2,8 +2,8 @@
|
|||
{lib}: let
|
||||
inherit (builtins) isString getAttr;
|
||||
inherit (lib.options) mkOption;
|
||||
inherit (lib.attrsets) listToAttrs;
|
||||
inherit (lib.types) bool;
|
||||
inherit (lib.nvim.attrsets) mapListToAttrs;
|
||||
in {
|
||||
# Converts a boolean to a yes/no string. This is used in lots of
|
||||
# configuration formats.
|
||||
|
@ -12,21 +12,21 @@ in {
|
|||
config,
|
||||
diagnosticsProviders,
|
||||
}:
|
||||
listToAttrs
|
||||
(map (v: let
|
||||
type =
|
||||
if isString v
|
||||
then v
|
||||
else getAttr v.type;
|
||||
package =
|
||||
if isString v
|
||||
then diagnosticsProviders.${type}.package
|
||||
else v.package;
|
||||
in {
|
||||
name = "${lang}-diagnostics-${type}";
|
||||
value = diagnosticsProviders.${type}.nullConfig package;
|
||||
})
|
||||
config);
|
||||
mapListToAttrs
|
||||
(v: let
|
||||
type =
|
||||
if isString v
|
||||
then v
|
||||
else getAttr v.type;
|
||||
package =
|
||||
if isString v
|
||||
then diagnosticsProviders.${type}.package
|
||||
else v.package;
|
||||
in {
|
||||
name = "${lang}-diagnostics-${type}";
|
||||
value = diagnosticsProviders.${type}.nullConfig package;
|
||||
})
|
||||
config;
|
||||
|
||||
mkEnable = desc:
|
||||
mkOption {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue