embe-ls

command
v0.4.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 14, 2023 License: GPL-3.0 Imports: 23 Imported by: 0

README

embe-ls

An LSP implementation for embe.

Features

  • diagnostics
  • code completion
  • snippets
  • signature help
  • documentation on hover
  • display and edit colors
  • goto definition
  • symbol rename

Installation

Embe-ls should automatically come with your embe installation.

If not you can build the embe-ls binary and place it somewhere in your PATH manually.

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
  • Go 1.19+
git clone https://github.com/juho05/embe
cd embe
go build ./cmd/embe-ls

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-2023 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/.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL