File tree Expand file tree Collapse file tree 12 files changed +137
-23
lines changed
tests/test-sources/plugins/cmp Expand file tree Collapse file tree 12 files changed +137
-23
lines changed Original file line number Diff line number Diff line change 4
4
} :
5
5
let
6
6
inherit ( lib . nixvim ) defaultNullOpts ;
7
+ name = "cmp-ai" ;
7
8
in
8
9
lib . nixvim . plugins . mkNeovimPlugin {
9
- name = "cmp-ai" ;
10
+ inherit name ;
10
11
11
12
maintainers = [ lib . maintainers . GaetanLepage ] ;
12
13
13
14
imports = [
14
- { cmpSourcePlugins . cmp_ai = "cmp-ai" ; }
15
+ ( lib . nixvim . modules . mkCmpPluginModule {
16
+ pluginName = name ;
17
+ sourceName = "cmp_ai" ;
18
+ } )
15
19
] ;
16
20
17
21
moduleName = "cmp_ai.config" ;
Original file line number Diff line number Diff line change 2
2
lib ,
3
3
...
4
4
} :
5
- lib . nixvim . plugins . mkNeovimPlugin {
5
+ let
6
6
name = "cmp-git" ;
7
+ in
8
+ lib . nixvim . plugins . mkNeovimPlugin {
9
+ inherit name ;
7
10
moduleName = "cmp_git" ;
8
11
9
12
imports = [
10
- { cmpSourcePlugins . git = "cmp-git" ; }
13
+ ( lib . nixvim . modules . mkCmpPluginModule {
14
+ pluginName = name ;
15
+ sourceName = "git" ;
16
+ } )
11
17
] ;
12
18
13
19
maintainers = [ lib . maintainers . GaetanLepage ] ;
Original file line number Diff line number Diff line change 2
2
let
3
3
inherit ( lib ) types ;
4
4
inherit ( lib . nixvim ) defaultNullOpts ;
5
+ name = "cmp-tabby" ;
5
6
in
6
7
lib . nixvim . plugins . mkNeovimPlugin {
7
- name = "cmp-tabby" ;
8
+ inherit name ;
8
9
9
10
maintainers = [ lib . maintainers . GaetanLepage ] ;
10
11
11
12
imports = [
12
- { cmpSourcePlugins . cmp_tabby = "cmp-tabby" ; }
13
+ ( lib . nixvim . modules . mkCmpPluginModule {
14
+ pluginName = name ;
15
+ sourceName = "cmp_tabby" ;
16
+ } )
13
17
] ;
14
18
15
19
deprecateExtraOptions = true ;
Original file line number Diff line number Diff line change 2
2
let
3
3
inherit ( lib ) types ;
4
4
inherit ( lib . nixvim ) defaultNullOpts ;
5
+ name = "cmp-tabnine" ;
5
6
in
6
7
lib . nixvim . plugins . mkNeovimPlugin {
7
- name = "cmp-tabnine" ;
8
+ inherit name ;
8
9
9
10
maintainers = [ lib . maintainers . GaetanLepage ] ;
10
11
11
12
imports = [
12
- { cmpSourcePlugins . cmp_tabnine = "cmp-tabnine" ; }
13
+ ( lib . nixvim . modules . mkCmpPluginModule {
14
+ pluginName = name ;
15
+ sourceName = "cmp_tabnine" ;
16
+ } )
13
17
] ;
14
18
15
19
deprecateExtraOptions = true ;
Original file line number Diff line number Diff line change 4
4
} :
5
5
let
6
6
inherit ( lib . nixvim ) defaultNullOpts ;
7
+ name = "codeium-nvim" ;
7
8
in
8
9
lib . nixvim . plugins . mkNeovimPlugin {
9
- name = "codeium-nvim" ;
10
+ inherit name ;
10
11
packPathName = "codeium.nvim" ;
11
12
moduleName = "codeium" ;
12
13
@@ -51,9 +52,12 @@ lib.nixvim.plugins.mkNeovimPlugin {
51
52
"wrapper"
52
53
] ;
53
54
54
- # Register nvim-cmp association
55
55
imports = [
56
- { cmpSourcePlugins . codeium = "codeium-nvim" ; }
56
+ # Register nvim-cmp association
57
+ ( lib . nixvim . modules . mkCmpPluginModule {
58
+ pluginName = name ;
59
+ sourceName = "codeium" ;
60
+ } )
57
61
] ;
58
62
59
63
settingsOptions = {
Original file line number Diff line number Diff line change 2
2
let
3
3
inherit ( lib ) types ;
4
4
inherit ( lib . nixvim ) defaultNullOpts ;
5
+ name = "copilot-cmp" ;
5
6
in
6
7
lib . nixvim . plugins . mkNeovimPlugin {
7
- name = "copilot-cmp" ;
8
+ inherit name ;
8
9
moduleName = "copilot_cmp" ;
9
10
10
11
imports = [
11
- { cmpSourcePlugins . copilot = "copilot-cmp" ; }
12
+ ( lib . nixvim . modules . mkCmpPluginModule {
13
+ pluginName = name ;
14
+ sourceName = "copilot" ;
15
+ } )
12
16
] ;
13
17
14
18
maintainers = [ lib . maintainers . GaetanLepage ] ;
Original file line number Diff line number Diff line change 1
1
{ lib , ... } :
2
- lib . nixvim . plugins . mkNeovimPlugin {
2
+ let
3
3
name = "crates" ;
4
+ in
5
+ lib . nixvim . plugins . mkNeovimPlugin {
6
+ inherit name ;
4
7
packPathName = "crates.nvim" ;
5
8
package = "crates-nvim" ;
6
9
7
10
maintainers = [ lib . maintainers . GaetanLepage ] ;
8
11
9
12
imports =
10
- [ { cmpSourcePlugins . crates = "crates" ; } ]
13
+ [
14
+ ( lib . nixvim . modules . mkCmpPluginModule {
15
+ pluginName = name ;
16
+ sourceName = name ;
17
+ } )
18
+ ]
11
19
++
12
20
# TODO introduced 2024-12-12: remove after 25.05
13
21
lib . nixvim . mkSettingsRenamedOptionModules [ "plugins" "crates-nvim" ]
Original file line number Diff line number Diff line change 1
1
{ lib , pkgs , ... } :
2
- lib . nixvim . plugins . mkNeovimPlugin {
2
+ let
3
3
name = "papis" ;
4
+ in
5
+ lib . nixvim . plugins . mkNeovimPlugin {
6
+ inherit name ;
4
7
packPathName = "papis.nvim" ;
5
8
package = "papis-nvim" ;
6
9
7
10
maintainers = [ lib . maintainers . GaetanLepage ] ;
8
11
9
- # papis.nvim is an nvim-cmp source too
10
- imports = [ { cmpSourcePlugins . papis = "papis" ; } ] ;
12
+ imports = [
13
+ # papis.nvim is an nvim-cmp source too
14
+ ( lib . nixvim . modules . mkCmpPluginModule {
15
+ pluginName = name ;
16
+ sourceName = name ;
17
+ } )
18
+ ] ;
11
19
12
20
extraOptions = {
13
21
yqPackage = lib . mkPackageOption pkgs "yq" {
Original file line number Diff line number Diff line change 1
1
{ lib , ... } :
2
- lib . nixvim . plugins . mkVimPlugin {
2
+ let
3
3
name = "vim-dadbod-completion" ;
4
+ in
5
+ lib . nixvim . plugins . mkVimPlugin {
6
+ inherit name ;
4
7
maintainers = [ lib . maintainers . BoneyPatel ] ;
5
8
imports = [
6
- { cmpSourcePlugins . vim-dadbod-completion = "vim-dadbod-completion" ; }
9
+ ( lib . nixvim . modules . mkCmpPluginModule {
10
+ pluginName = name ;
11
+ sourceName = name ;
12
+ } )
7
13
] ;
8
14
}
Original file line number Diff line number Diff line change
1
+ # TODO: Remove this legacy function in favor of using `mkCmpPluginModule` directly
1
2
{
2
3
lib ,
3
4
pkgs ,
12
13
] { } ,
13
14
maintainers ? [ lib . maintainers . GaetanLepage ] ,
14
15
imports ? [ ] ,
16
+ # Whether to add a `plugin.*.blink` option, that uses blink.compat
17
+ mkCmpPluginModuleArgs ? { } ,
15
18
...
16
19
} @args :
17
20
lib . nixvim . plugins . mkVimPlugin (
@@ -24,8 +27,8 @@ lib.nixvim.plugins.mkVimPlugin (
24
27
name = pluginName ;
25
28
26
29
imports = imports ++ [
27
- # Register the source -> plugin name association
28
- { cmpSourcePlugins . ${ sourceName } = pluginName ; }
30
+ # Create the ` plugin.*.cmp` option
31
+ ( lib . nixvim . modules . mkCmpPluginModule ( mkCmpPluginModuleArgs // { inherit pluginName sourceName ; } ) )
29
32
] ;
30
33
}
31
34
)
You can’t perform that action at this time.
0 commit comments