server

package
v0.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2022 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package server is a simple abstraction of glsp server that includes in custom handler that supports CUE language. For more information about glsp: https://github.com/tliron/glsp

Index

Constants

View Source
const (
	Name    = "cuelsp"
	Version = "0.3.3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LSP

type LSP struct {
	// contains filtered or unexported fields
}

LSP stands for Language Server Protocol, this type represents the server

func New

func New(opts ...Options) (*LSP, error)

New initializes a new language protocol server that contains his logger and his handler

func (*LSP) Run

func (s *LSP) Run() error

Run will start the server

type Mode

type Mode int
const (
	ModeProd Mode = iota
	ModeDev
)

func (Mode) IsProd

func (m Mode) IsProd() bool

type Options

type Options = func(*LSP)

func WithDebug

func WithDebug(debug bool) Options

func WithMode

func WithMode(mode Mode) Options

Directories

Path Synopsis
Package handler is a collection of all methods supported by LSP.
Package handler is a collection of all methods supported by LSP.
Package utils is a simple package that group any pure functions useful in LSP /!\: functions in package utils should be the simplest possible
Package utils is a simple package that group any pure functions useful in LSP /!\: functions in package utils should be the simplest possible

Jump to

Keyboard shortcuts

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