Code Monkey home page Code Monkey logo

cmp-dictionary-nanny's Introduction

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

cmp-dictionary-nanny's People

Contributors

denstiny avatar javahello avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

javahello

cmp-dictionary-nanny's Issues

Mac M1 build ERROR

        /Users/luokai/.local/share/nvim/lazy/cmp-dictionary-nanny/server/./jsoncpp/include/value.h:224:10: error: unknown type name 'constexpr'
          static constexpr LargestInt minLargestInt =
                 ^
        /Users/luokai/.local/share/nvim/lazy/cmp-dictionary-nanny/server/./jsoncpp/include/value.h:224:30: error: expected ';' at end of declaration list
          static constexpr LargestInt minLargestInt =
                                     ^
                                     ;
        /Users/luokai/.local/share/nvim/lazy/cmp-dictionary-nanny/server/./jsoncpp/include/value.h:227:10: error: unknown type name 'constexpr'
          static constexpr LargestInt maxLargestInt = LargestInt(LargestUInt(-1) / 2);
                 ^
        /Users/luokai/.local/share/nvim/lazy/cmp-dictionary-nanny/server/./jsoncpp/include/value.h:227:30: error: expected ';' at end of declaration list
          static constexpr LargestInt maxLargestInt = LargestInt(LargestUInt(-1) / 2);
                                     ^
                                     ;
        /Users/luokai/.local/share/nvim/lazy/cmp-dictionary-nanny/server/./jsoncpp/include/value.h:229:10: error: unknown type name 'constexpr'
          static constexpr LargestUInt maxLargestUInt = LargestUInt(-1);
                 ^
        fatal error: too many errors emitted, stopping now [-ferror-limit=]
        39 warnings and 20 errors generated.
        make[2]: *** [CMakeFiles/dict_server.dir/dict_server.cpp.o] Error 1
        make[1]: *** [CMakeFiles/dict_server.dir/all] Error 2
        make: *** [all] Error 2

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.