Ian Cottrell | d4e310b | 2019-06-12 15:54:15 -0400 | [diff] [blame] | 1 | // Copyright 2019 The Go Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file. |
| 4 | |
Russ Cox | e1c06e4 | 2021-01-08 12:59:44 -0500 | [diff] [blame] | 5 | // Gopls (pronounced “go please”) is an LSP server for Go. |
Ian Cottrell | d4e310b | 2019-06-12 15:54:15 -0400 | [diff] [blame] | 6 | // The Language Server Protocol allows any text editor |
| 7 | // to be extended with IDE-like features; |
| 8 | // see https://langserver.org/ for details. |
Hana Kim | 174f5c6 | 2020-01-30 15:20:19 -0500 | [diff] [blame] | 9 | // |
Russ Cox | e1c06e4 | 2021-01-08 12:59:44 -0500 | [diff] [blame] | 10 | // See https://github.com/golang/tools/blob/master/gopls/README.md |
| 11 | // for the most up-to-date documentation. |
Ian Cottrell | d4e310b | 2019-06-12 15:54:15 -0400 | [diff] [blame] | 12 | package main // import "golang.org/x/tools/gopls" |
| 13 | |
Hana (Hyang-Ah) Kim | 3881046 | 2022-11-28 20:36:49 -0500 | [diff] [blame] | 14 | //go:generate go run doc/generate.go |
| 15 | |
Ian Cottrell | d4e310b | 2019-06-12 15:54:15 -0400 | [diff] [blame] | 16 | import ( |
| 17 | "context" |
| 18 | "os" |
| 19 | |
Ian Cottrell | c426260 | 2019-09-18 17:33:04 -0400 | [diff] [blame] | 20 | "golang.org/x/tools/gopls/internal/hooks" |
Robert Findley | b15dac2 | 2022-08-30 14:40:12 -0400 | [diff] [blame] | 21 | "golang.org/x/tools/gopls/internal/lsp/cmd" |
Ian Cottrell | d4e310b | 2019-06-12 15:54:15 -0400 | [diff] [blame] | 22 | "golang.org/x/tools/internal/tool" |
| 23 | ) |
| 24 | |
| 25 | func main() { |
Ian Cottrell | c426260 | 2019-09-18 17:33:04 -0400 | [diff] [blame] | 26 | ctx := context.Background() |
Ian Cottrell | 5889748 | 2019-10-10 20:48:16 -0400 | [diff] [blame] | 27 | tool.Main(ctx, cmd.New("gopls", "", nil, hooks.Options), os.Args[1:]) |
Ian Cottrell | d4e310b | 2019-06-12 15:54:15 -0400 | [diff] [blame] | 28 | } |