summaryrefslogtreecommitdiffhomepage
path: root/cmd
diff options
context:
space:
mode:
authoradamdottv <[email protected]>2025-05-01 06:26:20 -0500
committeradamdottv <[email protected]>2025-05-01 06:26:20 -0500
commitd08e58279db42b9892ad32e0fd8cdf086b4027d5 (patch)
treee1f4b40f6afebfa46eaef6c863cc7d4d5ff1a4c6 /cmd
parent7bc542abff85d18112b3e61556659a496d6dc668 (diff)
downloadopencode-d08e58279db42b9892ad32e0fd8cdf086b4027d5.tar.gz
opencode-d08e58279db42b9892ad32e0fd8cdf086b4027d5.zip
feat: lsp discovery
Diffstat (limited to 'cmd')
-rw-r--r--cmd/root.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cmd/root.go b/cmd/root.go
index ab81f7120..f288c9f69 100644
--- a/cmd/root.go
+++ b/cmd/root.go
@@ -14,6 +14,7 @@ import (
"github.com/opencode-ai/opencode/internal/db"
"github.com/opencode-ai/opencode/internal/llm/agent"
"github.com/opencode-ai/opencode/internal/logging"
+ "github.com/opencode-ai/opencode/internal/lsp/discovery"
"github.com/opencode-ai/opencode/internal/pubsub"
"github.com/opencode-ai/opencode/internal/tui"
"github.com/opencode-ai/opencode/internal/version"
@@ -58,6 +59,12 @@ to assist developers in writing, debugging, and understanding code directly from
return err
}
+ // Run LSP auto-discovery
+ if err := discovery.IntegrateLSPServers(cwd); err != nil {
+ logging.Warn("Failed to auto-discover LSP servers", "error", err)
+ // Continue anyway, this is not a fatal error
+ }
+
// Connect DB, this will also run migrations
conn, err := db.Connect()
if err != nil {