Closed eronde closed 2 years ago
Thank you for using it.
That setting only delays the loading, so if you open another file after the markdown, this source will be used. You can choose the source to use for each file type, not only for this plugin. Example
autocmd FileType markdown lua require('cmp').setup.buffer { sources = {{name = "buffer"}, {name = "user_dictionary"} }
cmp.setup.buffer
is a function to override some settings locally in the buffer.
You can also set the dictionary for each file type with setlocal
, but the current design only reads the dictionary at the beginning, so I'll improve it.
You can also set the dictionary for each file type with setlocal, but the current design only reads the dictionary at the beginning, so I'll improve it.
Implemented.
Please see the readme for the information you may need.
:pray:
Hello, Thank you for your time to create this plugin. If you want configure this plugin per filetype, I found this way:
Setup per filetype
Example ftplugin/markdown.lua
packer
To use cmp-user_dictionary per filetype, you need to set the ft option in packer so cmp-user_dictionary will only load after the ftplugin. This avoids that the plugin is loaded before the dictionary is set.