@@ -2,7 +2,11 @@ return {
22 " saghen/blink.cmp" ,
33 version = ' v1.2.0' ,
44 dependencies = {
5- { ' echasnovski/mini.nvim' , version = false }
5+ { ' echasnovski/mini.nvim' , version = false },
6+ {
7+ ' Kaiser-Yang/blink-cmp-dictionary' ,
8+ dependencies = { ' nvim-lua/plenary.nvim' }
9+ }
610 },
711 --- @module ' blink.cmp'
812 --- @type blink.cmp.Config
@@ -13,14 +17,34 @@ return {
1317 },
1418 },
1519 sources = {
16- default = { " path" , " lsp" , " snippets" , " buffer" , " lazydev" },
20+ default = { " dictionary " , " path" , " lsp" , " snippets" , " buffer" , " lazydev" },
1721
1822 providers = {
1923 -- dont show LuaLS require statements when lazydev has items
2024 lsp = {
2125 fallbacks = { " path" , " buffer" , " snippets" },
2226 },
2327 lazydev = { name = " LazyDev" , module = " lazydev.integrations.blink" , fallbacks = { " lsp" } },
28+ dictionary = {
29+ module = ' blink-cmp-dictionary' ,
30+ name = ' Dict' ,
31+ -- Make sure this is at least 2.
32+ -- 3 is recommended
33+ min_keyword_length = 3 ,
34+ opts = {
35+ dictionary_files = function ()
36+ if vim .bo .filetype == ' markdown' then
37+ local bufname = vim .api .nvim_buf_get_name (0 )
38+ if bufname :match (" ^/tmp/claude%-prompt%-.+%.md$" ) then
39+ return { vim .fn .expand (' ~/.config/nvim/dictionary/markdown-claude.dict' ) }
40+ end
41+ return { vim .fn .expand (' ~/.config/nvim/dictionary/markdown.dict' ) }
42+ end
43+ return { vim .fn .expand (' ~/.config/nvim/dictionary/words.dict' ) }
44+ end ,
45+ -- options for blink-cmp-dictionary
46+ }
47+ }
2448 },
2549 },
2650 enabled = function ()
0 commit comments