File tree Expand file tree Collapse file tree 2 files changed +136
-0
lines changed
plugins/by-name/blink-cmp-words
tests/test-sources/plugins/by-name/blink-cmp-words Expand file tree Collapse file tree 2 files changed +136
-0
lines changed Original file line number Diff line number Diff line change 1+ { lib , ... } :
2+ lib . nixvim . plugins . mkNeovimPlugin {
3+ name = "blink-cmp-words" ;
4+
5+ maintainers = [ lib . maintainers . GaetanLepage ] ;
6+
7+ description = ''
8+ Word and synonym completion source for blink-cmp.
9+
10+ ---
11+
12+ This plugin should be configured through blink-cmp's source settings.
13+
14+ For example:
15+
16+ ```nix
17+ plugins.blink-cmp = {
18+ enable = true;
19+ settings.sources = {
20+ providers = {
21+ thesaurus = {
22+ name = "blink-cmp-words";
23+ module = "blink-cmp-words.thesaurus";
24+ opts = {
25+ score_offset = 0;
26+ definition_pointers = [ "!" "&" "^" ];
27+ similarity_pointers = [ "&" "^" ];
28+ similarity_depth = 2;
29+ };
30+ };
31+ dictionary = {
32+ name = "blink-cmp-words";
33+ module = "blink-cmp-words.dictionary";
34+ opts = {
35+ dictionary_search_threshold = 3;
36+ score_offset = 0;
37+ definition_pointers = [ "!" "&" "^" ];
38+ };
39+ };
40+ };
41+ per_filetype = {
42+ text = [ "dictionary" ];
43+ markdown = [ "thesaurus" ];
44+ };
45+ };
46+ };
47+ ```
48+
49+ And then you can add it as a source for blink-cmp:
50+
51+ ```nix
52+ plugins.blink-cmp = {
53+ enable = true;
54+ settings.sources.default = [
55+ "lsp"
56+ "path"
57+ "luasnip"
58+ "buffer"
59+ "dictionary"
60+ "thesaurus"
61+ ];
62+ };
63+ ```
64+ '' ;
65+
66+ # Configured through blink-cmp
67+ callSetup = false ;
68+ hasLuaConfig = false ;
69+ hasSettings = false ;
70+ }
Original file line number Diff line number Diff line change 1+ {
2+ empty = {
3+ plugins = {
4+ blink-cmp . enable = true ;
5+ blink-cmp-words . enable = true ;
6+ } ;
7+ } ;
8+
9+ example = {
10+ plugins = {
11+ blink-cmp-words . enable = true ;
12+
13+ blink-cmp = {
14+ enable = true ;
15+
16+ settings = {
17+ sources = {
18+ default = [
19+ "lsp"
20+ "path"
21+ "lazydev"
22+ "dictionary"
23+ "thesaurus"
24+ ] ;
25+ providers = {
26+ thesaurus = {
27+ name = "blink-cmp-words" ;
28+ module = "blink-cmp-words.thesaurus" ;
29+ opts = {
30+ score_offset = 0 ;
31+ definition_pointers = [
32+ "!"
33+ "&"
34+ "^"
35+ ] ;
36+ similarity_pointers = [
37+ "&"
38+ "^"
39+ ] ;
40+ similarity_depth = 2 ;
41+ } ;
42+ } ;
43+ dictionary = {
44+ name = "blink-cmp-words" ;
45+ module = "blink-cmp-words.dictionary" ;
46+ opts = {
47+ dictionary_search_threshold = 3 ;
48+ score_offset = 0 ;
49+ definition_pointers = [
50+ "!"
51+ "&"
52+ "^"
53+ ] ;
54+ } ;
55+ } ;
56+ } ;
57+ per_filetype = {
58+ text = [ "dictionary" ] ;
59+ markdown = [ "thesaurus" ] ;
60+ } ;
61+ } ;
62+ } ;
63+ } ;
64+ } ;
65+ } ;
66+ }
You can’t perform that action at this time.
0 commit comments