embe-ls
An LSP implementation for embe.
Features
- diagnostics
- code completion
- snippets
- signature help
- documentation on hover
- display and edit colors
- symbol rename
Installation
Build the embe-ls
binary and place it somewhere in your PATH.
VS Code
Install the vscode-embe extension.
Neovim
Install the vim-embe plugin for syntax highlighting and indentation.
coc
In coc-settings.json
:
{
"languageserver": {
"embe-ls": {
"command": "embe-ls",
"filetypes": ["embe"],
"rootPatterns": [".git/", "."]
}
}
}
lspconfig
In init.lua
:
local lspconfig = require('lspconfig')
local configs = require('lspconfig.configs')
configs.embe = {
default_config = {
cmd = { "embe-ls" },
root_dir = lspconfig.util.root_pattern('.git'),
single_file_support = true,
filetypes = { 'embe' },
init_options = {
command = { 'embe-ls' },
},
},
}
lspconfig.embe.setup{}
Building
Prerequisites
git clone https://github.com/Bananenpro/embe-ls
cd embe-ls
go build
Config
You can configure embe-ls in one of the following locations:
- Windows:
%LOCALAPPDATA%\embe-ls\config.json
- MacOS:
~/Library/Application Support/embe-ls/config.json
- Linux:
~/.config/embe-ls/config.json
Example config:
{
"log_file": "~/.cache/embe-ls.log", // the path for logging output (directory must exist) (leave empty to disable logging, default: "")
"log_level": "trace", // the minimum log level (possible values: trace, info, warning, error, fatal, none, default: warning)
"lsp_log_file": "~/.cache/embe-ls-lsp.log" // the path for Language Server Protocol logging output (leave empty to disable protocol logging, default: "")
}
License
Copyright (c) 2022 Julian Hofmann
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see http://www.gnu.org/licenses/.