Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aca/neuron-language-server

Language server implementation for neuron
https://github.com/aca/neuron-language-server

language-server-protocol neuron vim

Last synced: about 2 months ago
JSON representation

Language server implementation for neuron

Awesome Lists containing this project

README

        

# neuron-language-server
Language server for [neuron](https://github.com/srid/neuron).

Neuron will embed language server in neuron. Check [sric/neuron#213](https://github.com/srid/neuron/issues/213) for updates.

This is just an personal experiment.

Supports
- textDocument/completion(search by title/id)

![completion](./images/completion.png)
- textDocument/definition
- textDocument/hover

![definition](./images/definition.png)
- textDocument/publishDiagnostics

![diagnostic](./images/diagnostic.png)

Virtual text is available with [nvim-lsp](https://github.com/neovim/nvim-lsp)

#### TODO
* [Renaming tag](https://github.com/srid/neuron/issues/213#issuecomment-648885576)

* improve completion

* LSP snippets
- header snippets?

* textDocument/codeAction

https://github.com/felko/neuron-mode has some awesome features that might be converted to code actions.

#### Prerequisites
- neuron

#### Installation
```
go get -u github.com/aca/neuron-language-server
```

#### LSP client settings
- vim/neovim, [coc.nvim](https://github.com/neoclide/coc.nvim)
```
"languageserver": {
"neuron": {
"command": "neuron-language-server",
"filetypes": ["markdown"]
},
```
- neovim, [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig)
```lua
local nvim_lsp = require'lspconfig'
local configs = require'lspconfig/configs'

configs.neuron_ls = {
default_config = {
cmd = {'neuron-language-server'};
filetypes = {'markdown'};
root_dir = function()
return vim.loop.cwd()
end;
settings = {};
};
}

nvim_lsp.neuron_ls.setup{}
```