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

5 Commits

Author SHA1 Message Date
Rebecca Stambler
c7d52e45e2 internal/lsp: use the view options, not the session options
Previous changes to the config mechanism made the config options
per-view, not per-session. We should now make sure to obey config
changes per-view. This does not fix the configuration handling for
"watchChangedFile" however. This should be done in a future CL.

Change-Id: I73f6236386c36d2587fdb9c0601670833a4366c3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194818
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2019-09-11 22:59:40 +00:00
Rebecca Stambler
73ad5c96a1 internal/lsp: switch folding range to protocol ranges
Change-Id: I899b3cd89901b99a5c65a5be79ac561289506623
Reviewed-on: https://go-review.googlesource.com/c/tools/+/193724
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2019-09-06 18:26:38 +00:00
Ian Cottrell
f1f4a3381f internal/lsp: move configuration options to structs
This cl is the first in a set that change the configuration behaviour.
This one should have no behaviour differences, but makes a lot of preparatory changes.
The same options are set to the same values in the same places.
The options are now stored on the Session instead of the Server
The View supports options, but does not have any yet.

Change-Id: Ie966cceca6878861686a1766d63bb8a78021259b
Reviewed-on: https://go-review.googlesource.com/c/tools/+/193726
Run-TryBot: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-06 17:30:54 +00:00
Suzy Mueller
be0da057c5 internal/lsp: return only multiline ranges when lineFoldingOnly
If the client registers with foldingRange.lineFoldingOnly = true, only
return folding ranges that span multiple lines. Do this as they are
computed, so that if other filtering is applied later, we do not include
ranges that would go unused by the client anyway.

Change-Id: I27ea24428d25f180e26892de0f6d16c211225bf7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/192477
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-09-03 16:36:17 +00:00
Suzy Mueller
114c575556 internal/lsp: add foldingRange support
Support textDocument/foldingRange request. Provide folding ranges for
multiline comment blocks, declarations, block statements, field lists,
case clauses, and call expressions.

Fixes golang/go#32987

Change-Id: I9c76e850ffa0e5bb65bee273d8ee40577c342f92
Reviewed-on: https://go-review.googlesource.com/c/tools/+/192257
Run-TryBot: Suzy Mueller <suzmue@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2019-08-29 20:17:30 +00:00