Skip to content

metaporia/dico.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dico.nvim

What is it? A plugin to provide bindings to query via the dico client either (i) a local DICT server or (ii) GNU's DICT server.

For a vim compatible version see dico-vim

Dependencies

  • Ideally, a local DICT server on the standard port 2628. Either dicod or dictd will do. See below for pre-configured options.
  • GNU's DICT client dico version >= 2.4.
  • fold from GNU coreutils

Note

There are two ready-made dicod servers pre-configured with good dictionaries:

Note that at the moment the remote default DICT server (at dicoweb.gnu.org.ua) is not configurable.

Installation

Add the following to your init.lua:

With junegunn/vim-plug Plug "metaporia/dico.nvim"
With folke/lazy.nvim { "metaporia/dico.nvim", config = true}

Configuration

See the helpfile :h dico.nvim for more details.

Default Configuration

{
    default_split = "h", -- window split orientation
    map_prefix = "<leader>", -- default prefix for keymappings
    enable_nofile = false, -- Expose user command `Nofile` used to open scratch buffer
    fallback_dict_server = "gnu.org.ua" -- remote fallback DICT server
}

Keymaps

By default <prefix> = <leader> in the following key-bindings, and all bindings work in visual mode on the contents of the current visual selection.

  • <prefix>d: define headword under cursor in horizontal split

  • <prefix>da: define headword in alternate split (if opts.default_split is "h", then this would open a vertical split).

  • <prefix>ls : list synonyms in default split

Commands

  • Def <headword>: define <headword> in default split
  • DefA <headword>: define <headword> in alternate split
  • LsSyn <headword> : list synonyms (from moby-thesaurus by default) in default split

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages