lsp

package
v0.0.0-...-16953b7 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2025 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader interface {
	Read() (*lsproto.Message, error)
}

func ToReader

func ToReader(r io.Reader) Reader

type Server

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

func NewServer

func NewServer(opts *ServerOptions) *Server

func (*Server) Client

func (s *Server) Client() project.Client

Client implements project.ServiceHost.

func (*Server) DefaultLibraryPath

func (s *Server) DefaultLibraryPath() string

DefaultLibraryPath implements project.ServiceHost.

func (*Server) FS

func (s *Server) FS() vfs.FS

FS implements project.ServiceHost.

func (*Server) GetCurrentDirectory

func (s *Server) GetCurrentDirectory() string

GetCurrentDirectory implements project.ServiceHost.

func (*Server) Log

func (s *Server) Log(msg ...any)

func (*Server) RefreshDiagnostics

func (s *Server) RefreshDiagnostics(ctx context.Context) error

RefreshDiagnostics implements project.Client.

func (*Server) Run

func (s *Server) Run() error

func (*Server) SetCompilerOptionsForInferredProjects

func (s *Server) SetCompilerOptionsForInferredProjects(options *core.CompilerOptions)

!!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support

func (*Server) Trace

func (s *Server) Trace(msg string)

Trace implements project.ServiceHost.

func (*Server) TypingsLocation

func (s *Server) TypingsLocation() string

TypingsLocation implements project.ServiceHost.

func (*Server) UnwatchFiles

func (s *Server) UnwatchFiles(ctx context.Context, handle project.WatcherHandle) error

UnwatchFiles implements project.Client.

func (*Server) WatchFiles

func (s *Server) WatchFiles(ctx context.Context, watchers []*lsproto.FileSystemWatcher) (project.WatcherHandle, error)

WatchFiles implements project.Client.

type ServerOptions

type ServerOptions struct {
	In  Reader
	Out Writer
	Err io.Writer

	Cwd                string
	FS                 vfs.FS
	DefaultLibraryPath string
	TypingsLocation    string

	ParsedFileCache project.ParsedFileCache
}

type Writer

type Writer interface {
	Write(msg *lsproto.Message) error
}

func ToWriter

func ToWriter(w io.Writer) Writer

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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