Skip to content

thesignumt/def.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 

Repository files navigation

def.nvim

def.nvim is a lightweight Neovim plugin for quickly looking up word definitions, examples, synonyms, and antonyms directly in a floating window. It supports word history, favorites, random word exploration, and integrates with Telescope for a smoother experience.

this plugin was made for my neovim config.. so there are probably bigger, better, actively maintained plugins than this.

Compatibility

Operating System Status
Windows ✅ Tested
Linux ⚠️ Untested
macOS ⚠️ Untested
Other Unix-like ⚠️ Untested

Features

  • Lookup the definition of any word under the cursor or via input.
  • Display pronunciations (IPA) and examples.
  • Highlight keywords, definitions, synonyms, and antonyms in a readable floating window.
  • Add words to favorites for quick reference.
  • View a history of previously looked-up words.
  • Fetch a random word of the day (WOTD) for vocabulary building.
  • Integrates with Telescope for history and favorites search.
  • Minimal dependencies — uses native Neovim APIs and Lua.

Installation

Using lazy.nvim

{
  "thesignumt/def.nvim",
  dependencies = {"nvim-telescope/telescope.nvim"},
  opts = {
    -- your opts
  },
  config = function(_, opts)
    require('def').setup(opts)
  end
}

Using packer.nvim

use {
  "thesignumt/def.nvim",
  requires = {"nvim-telescope/telescope.nvim"},
  config = function()
    require("def").setup()
  end
}

Preview

preview


Usage

Lookup word under cursor

require("def").lookup("word")

Prompt for a word

require("def").lookup("lookup")

Word of the day (random word)

require("def").lookup("wotd")

Show history

require("def").lookup("history")

Show favorites

require("def").lookup("favorites")

Keymaps in the floating window

  • q / <Esc> → Close the window
  • ? → Show help keymaps
  • ga → Add the current word to favorites
  • gA → Remove the current word from favorites

Configuration

Configure floating window dimensions in setup():

require("def").setup({
  cmd = true,   -- user command :Def
  width = 80,   -- max width of floating window
  height = 40,  -- max height of floating window
})

These are the default configuration options.


Dependencies

  • Neovim 0.8+
  • Lua
  • curl command-line tool (for fetching word definitions)
  • Telescope.nvim (optional but recommended)

Contributing

Contributions are welcome! Submit bug reports, feature requests, or pull requests. Follow Neovim Lua best practices and maintain consistent code style.


License

MIT License

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages