acme-lsp

module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2019 License: MIT

README

Build Status GoDoc Go Report Card

acme-lsp

Language Server Protocol tools for acme text editor.

The main tool is acme-lsp, which listens on the plumber port lsp for commands from the L command. It also watches for Put executed in an acme window, organizes import paths in the window and formats it.

Currently, acme-lsp has been tested with gopls, go-langserver and pyls. Please report incompatibilities with those or other servers.

Installation

go get -u github.com/fhs/acme-lsp/cmd/acme-lsp
go get -u github.com/fhs/acme-lsp/cmd/L

gopls

First install gopls:

go get -u golang.org/x/tools/cmd/gopls

Add an empty plumbing rule to $HOME/lib/plumbing for acme-lsp:

# declarations of ports without rules
plumb to lsp

Make sure plumber is running and reload the rules by running:

cat $HOME/lib/plumbing | 9p write plumb/rules

Start acme-lsp like this:

acme-lsp -server '\.go$:gopls' -workspaces /path/to/mod1:/path/to/mod2

where mod1 and mod2 are module directories with a go.mod file. Currently the set of workspace directories can't be changed at runtime (see golang/go#31635).

When Put is executed in an acme window editing .go file, acme-lsp will update import paths and gofmt the window buffer if needed. It also enables commands like L def (jump to defenition), L sig (signature help), etc. within acme.

See also

Directories

Path Synopsis
cmd
L
The program L sends messages to the Language Server Protocol proxy server acme-lsp.
The program L sends messages to the Language Server Protocol proxy server acme-lsp.
Lone
The program Lone is a standalone client for the acme text editor that interacts with a Language Server.
The program Lone is a standalone client for the acme text editor that interacts with a Language Server.
acme-lsp
The program acme-lsp is a client for the acme text editor that acts as a proxy for a set of Language Server Protocol servers.
The program acme-lsp is a client for the acme text editor that acts as a proxy for a set of Language Server Protocol servers.
internal
lsp
Package lsp contains Go types for the messages used in the Language Server Protocol.
Package lsp contains Go types for the messages used in the Language Server Protocol.
lsp/acmelsp
Package acmelsp defines helper functions for implementation of acme-lsp commands.
Package acmelsp defines helper functions for implementation of acme-lsp commands.

Jump to

Keyboard shortcuts

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