a neovim completion source based on user word frequency, word pairs and word relations over on a per session, per project/folder, and global basis.
This is cmp-adaptive-freq working in an environment where it has the bible, Shakespeare's works, Pride and Prejudice, amonst other books totalling in at 2.5 million words working just fine. It does not filter out punctuation, it does not ignore capitalization.
The purpose of this is to give you more accurate results overtime, though it will also take in your mistakes too! This is a tool meant for writers
it auto saves any update to word data on leaving a buffer, nvim or whenever focus is lost
- :CmpAdaptiveFreqScanBuffer => scans current buffer and adds it to global and project data (warning, can be slow, use to get the data up quickly)
- :CmpAdaptiveFreqDeleteGlobalData => deletes global data
- :CmpAdaptiveFreqDeleteProjectData = > deletes current buffer's project data
- all commands are large to ensure no accidents
- neovim 0.8.0+ required
- nvim-cmp required
- using lazy nvim (optional)
--- lazy.nvim
return {"TheShadowblast123/cmp-adaptive-freq",
dependencies = { "hrsh7th/nvim-cmp" },
config = function()
require("cmp-adaptive-freq").setup({})
end,
},
--- I use lazyvim so if these are wrong I'm sorry
---packer.nvim
return require('packer').startup(function(use)
use 'hrsh7th/nvim-cmp'
use {
'TheShadowblast123/cmp-adaptive-freq',
config = function()
require("cmp-adaptive-freq").setup({})
end
}
end)
--- vim-plug
Plug 'TheShadowblast123/cmp-adaptive-freq'
Plug 'hrsh7th/nvim-cmp'
" Then in your init.lua or in a lua block:
lua << EOF
require("cmp-adaptive-freq").setup({})
EOF
local default_config = {
max_items = 5,
}- max_items => the maximum amount of suggested results