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.
| Operating System | Status |
|---|---|
| Windows | ✅ Tested |
| Linux | |
| macOS | |
| Other Unix-like |
- 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.
{
"thesignumt/def.nvim",
dependencies = {"nvim-telescope/telescope.nvim"},
opts = {
-- your opts
},
config = function(_, opts)
require('def').setup(opts)
end
}use {
"thesignumt/def.nvim",
requires = {"nvim-telescope/telescope.nvim"},
config = function()
require("def").setup()
end
}require("def").lookup("word")require("def").lookup("lookup")require("def").lookup("wotd")require("def").lookup("history")require("def").lookup("favorites")q/<Esc>→ Close the window?→ Show help keymapsga→ Add the current word to favoritesgA→ Remove the current word from favorites
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.
- Neovim 0.8+
- Lua
curlcommand-line tool (for fetching word definitions)- Telescope.nvim (optional but recommended)
Contributions are welcome! Submit bug reports, feature requests, or pull requests. Follow Neovim Lua best practices and maintain consistent code style.
MIT License
