summaryrefslogtreecommitdiff
path: root/internal/lsp/server.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-03-16 03:59:57 +0200
committerPaul Buetow <paul@buetow.org>2026-03-16 03:59:57 +0200
commitc40056f2102893c4c04aa2fa2380a4146d370e81 (patch)
treeb09795dcce9e172bfb24d38ac480b27e5eedbe98 /internal/lsp/server.go
parentc578f367d81ce035c1f7b9c55e38101753e99de5 (diff)
Add doc comments to exported types and functions
Document ~30 exported types in lsp/types.go and exported functions in llm/provider.go, lsp/server.go, and hexailsp/run.go. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/lsp/server.go')
-rw-r--r--internal/lsp/server.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal/lsp/server.go b/internal/lsp/server.go
index 4e8a339..d8fdc92 100644
--- a/internal/lsp/server.go
+++ b/internal/lsp/server.go
@@ -87,6 +87,7 @@ type ServerOptions struct {
StatusSink StatusSink
}
+// NewServer creates a new LSP server that reads from r and writes to w.
func NewServer(r io.Reader, w io.Writer, logger *log.Logger, opts ServerOptions) *Server {
ctx, cancel := context.WithCancel(context.Background())
s := &Server{
@@ -330,6 +331,7 @@ func (s *Server) emitGlobalStatus(reqs int64, rpm float64, sent int64, recv int6
}
}
+// Run starts the server's main loop, reading and dispatching LSP messages until EOF or exit.
func (s *Server) Run() error {
defer s.cancelRequests()
for {