Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jeffa5/wordnet-ls
Explore language as you write, where you write
https://github.com/jeffa5/wordnet-ls
Last synced: 23 days ago
JSON representation
Explore language as you write, where you write
- Host: GitHub
- URL: https://github.com/jeffa5/wordnet-ls
- Owner: jeffa5
- License: mit
- Created: 2020-03-29T13:45:43.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-04T12:43:46.000Z (5 months ago)
- Last Synced: 2024-09-17T04:47:09.827Z (2 months ago)
- Language: Rust
- Homepage:
- Size: 2.07 MB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Wordnet language server
A tool to explore language as you write, where you write.
It currently supports English, using the [WordNet](https://wordnet.princeton.edu/) database.
![](./definition.png)
## Actions
- `hover` shows meaning of the word
- `gotoDefinition` of a word for all info about it
- also available through code actions to avoid conflicts
- completion for words## Installation
### Cargo
Currently, the main way to install wordnet-ls is by cloning the repo and running
```sh
cargo install --force wordnet-ls
```This adds the binary `wordnet-ls` to the rust bin location.
### Nix
You can also get it on nix, using the flake in this repo:
```sh
nix shell github:jeffa5/wordnet-ls
```## Configuration
You'll need to download a copy of [wordnet](https://wordnet.princeton.edu/download/current-version).
The tested version is 3.1.To configure the location of the wordnet dictionary set the `initializationOptions` as:
```json
{
"wordnet": ""
}
```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`):
```json
{
"wordnet": "",
"enable_completion": false,
"enable_hover": false,
"enable_code_actions": false,
"enable_goto_definition": false
}
```### Neovim
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.```sh
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.
## WordNet
For more information about the WordNet database see [here](https://wordnet.princeton.edu/).