Composer.LSP.Server (composer v0.2.0)

Copy Markdown View Source

The GenLSP server of composer-ls; the only module that uses GenLSP.

It adapts the protocol to plain modules: state lives in Composer.LSP.Session (GenLSP runs requests in tasks), positions are converted at this boundary (Composer.LSP.Position), and everything else is Composer.LSP.Cursor, Lookup, Hover, Definition, Complete, Actions and Convert, which build plain maps this module turns into GenLSP structures.

Options

The Composer.LSP.Session options (:cookbooks, :local_dir, :root, :project, :entries, :lint, :discover), GenLSP's (:buffer, :assigns, :task_supervisor, :name), and :halt_on_exit, which halts the VM on the exit notification.

Summary

Functions

Runs the server on stdio and blocks. Only the buffer, started first, writes to stdout: every process started after it has stderr as its group leader.

Starts the server; see the module doc for opts.

Functions

child_spec(opts)

run(opts)

Runs the server on stdio and blocks. Only the buffer, started first, writes to stdout: every process started after it has stderr as its group leader.

start_link(opts)

Starts the server; see the module doc for opts.