Documentation
¶
Overview ¶
modified based on https://github.com/microsoft/typescript-go/blob/cedc0cbe6c188f9bfe6a51af00c79be48c9ab74d/internal/lsp/server.go#L1
Index ¶
- type LintResponse
- type Reader
- type Server
- func (s *Server) Client() project.Client
- func (s *Server) DefaultLibraryPath() string
- func (s *Server) FS() vfs.FS
- func (s *Server) GetCurrentDirectory() string
- func (s *Server) Log(msg ...any)
- func (s *Server) PublishDiagnostics(ctx context.Context, params *lsproto.PublishDiagnosticsParams) error
- func (s *Server) RefreshCodeLens(ctx context.Context) error
- func (s *Server) RefreshDiagnostics(ctx context.Context) error
- func (s *Server) RefreshInlayHints(ctx context.Context) error
- func (s *Server) Run() error
- func (s *Server) SetCompilerOptionsForInferredProjects(options *core.CompilerOptions)
- func (s *Server) Trace(msg string)
- func (s *Server) TypingsLocation() string
- func (s *Server) UnwatchFiles(ctx context.Context, id project.WatcherID) error
- func (s *Server) WatchFiles(ctx context.Context, id project.WatcherID, ...) error
- type ServerOptions
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LintResponse ¶
type LintResponse struct {
Diagnostics []lsproto.Diagnostic `json:"diagnostics"`
ErrorCount int `json:"errorCount"`
FileCount int `json:"fileCount"`
RuleCount int `json:"ruleCount"`
}
LintResponse represents a lint response from Go to JS
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(opts *ServerOptions) *Server
func (*Server) DefaultLibraryPath ¶
DefaultLibraryPath implements project.ServiceHost.
func (*Server) GetCurrentDirectory ¶
GetCurrentDirectory implements project.ServiceHost.
func (*Server) PublishDiagnostics ¶ added in v0.2.1
func (s *Server) PublishDiagnostics(ctx context.Context, params *lsproto.PublishDiagnosticsParams) error
PublishDiagnostics implements project.Client.
func (*Server) RefreshCodeLens ¶ added in v0.2.1
RefreshCodeLens implements project.Client.
func (*Server) RefreshDiagnostics ¶
RefreshDiagnostics implements project.Client.
func (*Server) RefreshInlayHints ¶ added in v0.2.1
RefreshInlayHints implements project.Client.
func (*Server) SetCompilerOptionsForInferredProjects ¶
func (s *Server) SetCompilerOptionsForInferredProjects(options *core.CompilerOptions)
!!! temporary; remove when we have `handleDidChangeConfiguration`/implicit project config support
func (*Server) TypingsLocation ¶
TypingsLocation implements project.ServiceHost.
func (*Server) UnwatchFiles ¶
UnwatchFiles implements project.Client.
func (*Server) WatchFiles ¶
func (s *Server) WatchFiles(ctx context.Context, id project.WatcherID, watchers []*lsproto.FileSystemWatcher) error
WatchFiles implements project.Client.