Skip to content

Latest commit

 

History

History
62 lines (59 loc) · 1.78 KB

README.md

File metadata and controls

62 lines (59 loc) · 1.78 KB

cmp-dictionary-nanny

This is a nvim-cmp plugin that can help complete words and view translated documents

2023-03-13_22-58-25.mp4

Install

Install before

Make sure the system with these procedures

  • cmake,g++,sqlite3,make,wget,git,unzip

Use the plug-in manager installation

  • packer.nvim
use {
    "denstiny/cmp-dictionary-nanny",
    config = function ()
      require("cmp-dictionary-nanny.config").setup({opt})
    end
    run = "./install.sh"
}

lazy.nvim

{
  "denstiny/cmp-dictionary-nanny",
  build = "./install.sh",
  event = { "InsertEnter" },
}

Default configuration

local conf_defaults = {
	max_num_results = 20,
	table_name = "stardict",
	database_path = vim.fn.stdpath("data") .. "/data/ultimate.db",
	item_add_translation = true,
  database_url = "https://github.com/skywind3000/ECDICT-ultimate/releases/download/1.0.0/ecdict-ultimate-sqlite.zip",
	run_on_every_keystroke = true,
	ignored_file_types = { -- default is not to ignore
		-- uncomment to ignore in lua:
		-- lua = true
	},
}

Senior players

you can custom database(default chinese database)

database requirements

key describe
word completion of the word
definition The word meaning
translation word translation
frq Contemporary corpus word frequency
bnc Word processing
phonetic phonetic symbol

Q&A

  • The database failed download
    try perform the plugins directory of the download.sh script

About