Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/metaporia/dico.nvim


https://github.com/metaporia/dico.nvim

Last synced: 13 days ago
JSON representation

Awesome Lists containing this project

README

        

# 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](dicoweb.gnu.org.ua).

For a vim compatible version see
[dico-vim](https://github.com/metaporia/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:
> - [dicod-docker](https://github.com/metaporia/dot/tree/489cd70eae8eb4b48b4b02637578d216d76b759f/overlays/dico),
> a dockerized DICT server; and
> - a nixpkgs [overlay](https://github.com/metaporia/dot/) and [nixos module](https://github.com/metaporia/dot/blob/489cd70eae8eb4b48b4b02637578d216d76b759f/home/modules/dicod.nix)

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](doc/dico.nvim.txt) `:h dico.nvim` for more details.

### Default Configuration

```lua
{
default_split = "h", -- window split orientation
map_prefix = "", -- 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 ` = ` in the following key-bindings, and all bindings
work in visual mode on the contents of the current visual selection.

* `d`: define headword under cursor in horizontal split
* `da`: define headword in alternate split (if `opts.default_split` is
`"h"`, then this would open a vertical split).

* `ls` : list synonyms in default split

## Commands

* `Def `: define `` in default split
* `DefA `: define `` in alternate split
* `LsSyn ` : list synonyms (from moby-thesaurus by default) in
default split