summaryrefslogtreecommitdiffhomepage
path: root/internal/lsp
diff options
context:
space:
mode:
authorNacho Vazquez <[email protected]>2025-04-12 12:43:23 -0300
committerNacho Vazquez <[email protected]>2025-04-12 12:43:23 -0300
commitbd2cb4b5b998602537ded61d1d8eae95f955d2df (patch)
treea41536e1e15850722e19ae3967a7e9b524affffd /internal/lsp
parent6fe85c66e7ab17c4e7bf886a662b1f27ac630120 (diff)
downloadopencode-bd2cb4b5b998602537ded61d1d8eae95f955d2df.tar.gz
opencode-bd2cb4b5b998602537ded61d1d8eae95f955d2df.zip
refactor: use context for automatic lsp process cleanup
Diffstat (limited to 'internal/lsp')
-rw-r--r--internal/lsp/client.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/lsp/client.go b/internal/lsp/client.go
index 824a84b5d..e2eedc4fc 100644
--- a/internal/lsp/client.go
+++ b/internal/lsp/client.go
@@ -48,8 +48,8 @@ type Client struct {
openFilesMu sync.RWMutex
}
-func NewClient(command string, args ...string) (*Client, error) {
- cmd := exec.Command(command, args...)
+func NewClient(ctx context.Context, command string, args ...string) (*Client, error) {
+ cmd := exec.CommandContext(ctx, command, args...)
// Copy env
cmd.Env = os.Environ()