Skip to content

Commit

Permalink
cuepls: initial version of cmd/cuepls
Browse files Browse the repository at this point in the history
As mentioned in previous CL commit messages, we are maintaining
cmd/cuepls as a separate entry point for now largely because of the
complications in adapting the flag handling between the flag-based
approach of gopls (cuepls) and the cobra-based approach of cmd/cue. We
will fix/unify those approaches in a later CL, but for now we are in the
mindset of making minimal changes to get a working cuepls.

This commit creates the cmd/cuepls entrypoint. An integration test
follows in a later CL.

For #142

Signed-off-by: Paul Jolly <paul@myitcv.io>
Change-Id: I533b875155f4d2da999ff1c1ef20d32eea3c4ff4
  • Loading branch information
myitcv committed Feb 14, 2024
1 parent 75c2c3f commit db1618f
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions cmd/cuepls/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// cuepls (pronounced “CUE please”) is an LSP server for CUE.
// The Language Server Protocol allows any text editor to be extended with
// IDE-like features; see https://langserver.org/ for details.
package main

import (
"context"
"os"

"cuelang.org/go/internal/golangorgx/gopls/cmd"
"cuelang.org/go/internal/golangorgx/gopls/hooks"
"cuelang.org/go/internal/golangorgx/telemetry/counter"
"cuelang.org/go/internal/golangorgx/tools/tool"
)

func main() {
counter.Open() // Enable telemetry counter writing.
ctx := context.Background()
tool.Main(ctx, cmd.New(hooks.Options), os.Args[1:])
}

0 comments on commit db1618f

Please sign in to comment.