1
0
mirror of https://github.com/golang/go synced 2024-10-01 07:38:32 -06:00
go/internal/lsp
Muir Manders fe7c687bb5 internal/lsp: don't lower score of builtin completions
Downranking builtins causes weird interplay with other completion
candidates due to fuzzy matching. For example:

notNil := 123
var foo *int = nil<>

ranks "notNil" before "nil" in the builtin list, which is counter
productive.

Change it to not downrank builtins. In my testing with this change,
builtins never were ranked above lexical items with similar names. I
think this is because the "natural" order of completion items puts
builtins last, and we stable sort items by score, so their relative
order is preserved.

Change-Id: Ifbad02be205e3cb26c1d4ce500b77690e7ac5b04
Reviewed-on: https://go-review.googlesource.com/c/tools/+/193897
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-06 20:37:48 +00:00
..
browser internal/lsp: add version and bug commands 2019-05-11 04:16:02 +00:00
cache internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
cmd internal/lsp: change to protocol.TextEdit for formatting 2019-09-06 17:54:09 +00:00
debug internal/telemetry: add the ability to flush telemetry data 2019-08-21 16:29:56 +00:00
diff internal/lsp: add tests at the diff hook layer 2019-08-26 23:40:50 +00:00
fuzzy internal/lsp: add fuzzy completion matching 2019-08-14 16:13:50 +00:00
protocol x/tools/gopls: fix race condition in logging 2019-09-06 11:54:28 +00:00
snippet internal/lsp: introduce snippet builder object 2019-04-25 18:37:29 +00:00
source internal/lsp: don't lower score of builtin completions 2019-09-06 20:37:48 +00:00
telemetry internal/lsp/cache: add additional spans for tracing 2019-09-05 21:33:45 +00:00
testdata internal/lsp: fold contained lines when lineFoldingOnly 2019-09-05 23:56:50 +00:00
tests internal/lsp: use protocol.Position for textDocument/prepareRename 2019-09-06 18:55:03 +00:00
code_action.go internal/lsp: change to protocol.TextEdit for formatting 2019-09-06 17:54:09 +00:00
completion.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
definition.go internal/lsp: use protocol.Ranges for source.Identifier 2019-08-29 05:14:58 +00:00
diagnostics.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
folding_range.go internal/lsp: switch folding range to protocol ranges 2019-09-06 18:26:38 +00:00
format.go internal/lsp: change to protocol.TextEdit for formatting 2019-09-06 17:54:09 +00:00
general.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
highlight.go internal/lsp: switch to using protocol positions for document symbols 2019-09-06 18:11:17 +00:00
hover.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
link.go internal/lsp: switch folding range to protocol ranges 2019-09-06 18:26:38 +00:00
lsp_test.go internal/lsp: use protocol.Position for textDocument/prepareRename 2019-09-06 18:55:03 +00:00
references.go internal/lsp: fix declarations in references 2019-09-05 03:51:44 +00:00
rename.go internal/lsp: use protocol.Position for textDocument/prepareRename 2019-09-06 18:55:03 +00:00
reset_golden.sh internal/lsp: fix definition tests to use golden files 2019-05-10 21:06:55 +00:00
server.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
signature_help.go internal/lsp: change to protocol.TextEdit for formatting 2019-09-06 17:54:09 +00:00
symbols.go internal/lsp: switch to using protocol positions for document symbols 2019-09-06 18:11:17 +00:00
text_synchronization.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
util.go internal/lsp: separate out getMapper function 2019-08-16 20:05:58 +00:00
watched_files.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00
workspace.go internal/lsp: move configuration options to structs 2019-09-06 17:30:54 +00:00