Skip to content

An adaptive, self personalizing autocomplete source for nvim-cmp that could replace cmp-buffer

License

Notifications You must be signed in to change notification settings

TheShadowblast123/cmp-adaptive-freq

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

96 Commits
 
 
 
 
 
 
 
 

Repository files navigation

cmp-adaptive-freq

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.

Usage

image

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.

image

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

Commands

  • :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

⇁ Install

--- 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

⇁ Configuration

⇁ Default:

local default_config = {
	max_items = 5,
}
  • max_items => the maximum amount of suggested results

About

An adaptive, self personalizing autocomplete source for nvim-cmp that could replace cmp-buffer

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages