Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/metafates/buffer-language-server
💬 LSP that can autocomplete words found in the opened buffer
https://github.com/metafates/buffer-language-server
Last synced: 3 days ago
JSON representation
💬 LSP that can autocomplete words found in the opened buffer
- Host: GitHub
- URL: https://github.com/metafates/buffer-language-server
- Owner: metafates
- License: unlicense
- Created: 2023-07-24T11:34:06.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-07-24T12:01:03.000Z (over 1 year ago)
- Last Synced: 2024-11-01T04:27:42.106Z (10 days ago)
- Language: Rust
- Size: 14.6 KB
- Stars: 17
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# buffer-language-server
[![asciicast](https://asciinema.org/a/MiLyGWxpb6KzmHqJd3Ha1ANXm.svg)](https://asciinema.org/a/MiLyGWxpb6KzmHqJd3Ha1ANXm)
> **Warning** This is just a proof-of-concept. Does not support Unicode (yet).
Language server that can autocomplete words found in the current buffer.
This is primary made for the [Helix editor](https://github.com/helix-editor/helix)
which currently lacks this functionality. See https://github.com/helix-editor/helix/issues/1063Currently, it can only autocomplete the words[^1] found in the current buffer.
## Install
### Cargo
```bash
cargo install buffer-language-server
```### From source
```bash
cargo install --git https://github.com/metafates/buffer-language-server
```## Use in your editor
### Helix
If you are using the stable version (<= 23.05), which doesn't support multiple language servers yet,
add these lines to your `languages.toml` (if you want to enable this LSP for the markdown files)```toml
[[language]]
name = "markdown"
language-server = { command = "buffer-language-server" }
```Otherwise (you will need the Helix editor compiled from the HEAD [latest commit])
Add these lines to your `languages.toml`
```toml
[language-server.buffer-language-server]
command = "buffer-language-server"
```Then you can use it as an additional language server.
```toml
[[language]]
name = "markdown"
language-servers = ["buffer-language-server"][[language]]
name = "my-language"
language-servers = ["buffer-language-server"]
```[^1]: "Word" is defined as a sequence of ASCII characters without whitespace nor punctuation. For example, `one,two,three four!five` contains 5 words.