1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:18:32 -06:00
Commit Graph

10 Commits

Author SHA1 Message Date
Ian Cottrell
75aaabac35 internal/lsp: reduce trace package to minimal StartSpan for now
also change the return type to be and end function and not an incomplete span

Change-Id: Icd99d93ac98a0f8088f33e905cf1ee3fe410c024
Reviewed-on: https://go-review.googlesource.com/c/tools/+/185349
Run-TryBot: Ian Cottrell <iancottrell@google.com>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-07-11 17:25:55 +00:00
Ian Cottrell
4457e4cfd4 internal/lsp: add some trace spans to important functions
This uses the new opencensus compatability layer to add telementry to some of
the functions in the lsp, in order to allow us to understand their costs and
call patterns.

Change-Id: I7df820cd4eace7a4840ac6397d5df402369bf0a7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/183419
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-07-03 19:14:57 +00:00
Rebecca Stambler
252024b829 internal/lsp: separate refactorings out of memoization CL
This change just separates minor changes made along the course of the
memoization CL out into their own change. This will clean up the diffs
in the memoization CL.

Change-Id: I7d59e05ba6472af5f1bf516b1e5b879a5815b9a5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/183250
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-06-25 16:04:30 +00:00
Ian Cottrell
b9584148ef internal/lsp: add structured layers to the cache
This is primarily to separate the levels because they have different cache
lifetimes and sharability.
This will allow us to share results between views and even between servers.

Change-Id: I280ca19d17a6ea8a15e48637d4445e2b6cf04769
Reviewed-on: https://go-review.googlesource.com/c/tools/+/177518
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-05-16 21:30:38 +00:00
Ian Cottrell
4f9510c6a1 internal/lsp: prepare for non go files
This abstracts out the concrete file type so that we can support non go files.

Change-Id: I7447daa2ce076ec2867de9e59a0dedfe1a0553f5
Reviewed-on: https://go-review.googlesource.com/c/tools/+/175217
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-05-15 23:59:46 +00:00
Rebecca Stambler
34437f544f internal/lsp: refactor server.go to separate into LSP categories
This change separates the different behaviors of server.go by the
categories defined in the spec. This allows us to differentiate more
easily between the language features and the text synchronization code.

I also renamed the "Symbols" function to "Symbol", which fits with the
specification
(https://microsoft.github.io/language-server-protocol/specification#workspace_symbol),
and makes clearer the distinction between DocumentSymbols and Symbol.

Change-Id: I926b8a772c478f6ae426352fb12dc4403f0e736a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/172637
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-04-17 20:54:51 +00:00
Zac Bergquist
2538eef759 internal/lsp: enhance document symbols support
Make methods children of their receiver's type symbol.
Add struct fields as children of the struct's type symbol.
Also identify numeric, boolean, and string types.

Updates golang/go#30915
Fixes golang/go#31202

Change-Id: I33c4ea7b953e981ea1e858505b77c7a3ba6ee399
Reviewed-on: https://go-review.googlesource.com/c/tools/+/170198
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-04-10 21:12:19 +00:00
Zac Bergquist
8f05a32dce internal/lsp: correctly report interface symbols
Updates golang/go#30915

Change-Id: I9c5faa615df506cf1d015a9eb48196fa9b0387ee
Reviewed-on: https://go-review.googlesource.com/c/tools/+/169682
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-03-28 03:05:05 +00:00
Rebecca Stambler
c02eab13f0 internal/lsp: group document symbols and add more detail
This change uses go/types information to get the types for the
different symbols. It also groups the symbols according to their kinds,
though this doesn't seem to be reflected in the actual VSCode UI...

Updates golang/go#30915

Change-Id: I2caefe01f9834aaad6b9e81cd391d461405ef725
Reviewed-on: https://go-review.googlesource.com/c/tools/+/169438
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-03-26 23:54:22 +00:00
Zac Bergquist
1d95b17f1b x/tools/internal/lsp: add support for document symbols
Updates golang/go#30915

Change-Id: I9a447f7748eb9894fb6f4072febec132b2ed91d7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/168338
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-03-25 22:30:49 +00:00