Crates.io | wordnet-ls |
lib.rs | wordnet-ls |
version | 0.1.0 |
source | src |
created_at | 2024-04-10 14:47:00.938212 |
updated_at | 2024-04-10 14:47:00.938212 |
description | A tool to explore language as you write, where you write |
homepage | |
repository | https://github.com/jeffa5/wordnet-ls |
max_upload_size | |
id | 1203663 |
size | 3,564,424 |
A tool to explore language as you write, where you write.
It currently supports English, using the WordNet database.
hover
shows meaning of the wordgotoDefinition
of a word for all info about it
Currently, the main way to install wordnet-ls is by cloning the repo and running
cargo install --force wordnet-ls
This adds the binary wordnet-ls
to the rust bin location.
You can also get it on nix, using the flake in this repo:
nix shell github:jeffa5/wordnet-ls
You'll need to download a copy of wordnet. The tested version is 3.1.
To configure the location of the wordnet dictionary set the initializationOptions
as:
{
"wordnet": "<location>"
}
Home dir (~
) should get expanded if needed.
Capabilities are all enabled by default, but can be disabled in the initializationOptions
(e.g. to prevent conflicting handling of hover
or gotoDefinition
):
{
"wordnet": "<location>",
"enable_completion": false,
"enable_hover": false,
"enable_code_actions": false,
"enable_goto_definition": false
}
For debugging and quickly adding it to neovim you can use the provided vim.lua
file, provided you have nvim-lspconfig
.
Just make sure to run cargo build
and enter nvim
from the root of this repo.
nvim test.txt
# then :LspStop
# then :luafile vim.lua
# then :LspStart
# Write some words and hit K to hover one
It by default is set up for the text
and markdown
filetypes.
For more information about the WordNet database see here.