-
Notifications
You must be signed in to change notification settings - Fork 736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Semantic token setting transition #2598
Comments
I noticed that one of the previous issues (2286) had a comment:
1387 was a request to support doing partial ranges, rather than the full file, specifically to work around gopls limiting the size of the file, and to allow updates to parts of the file at a time. but also note that gopls is software, and can be modified or configured, and may not always be limiting the size of the file. as a user who sometimes has large files, i would definitely prefer that the extension use the partial-file range behavior to get semantic tokens rather than just giving up. |
On my version, for a large file, the client (vscode-insiders) sends a full
request immediately followed
by a range request (textDocument/semanticTokens/range).
Gopls returns an error for the full request and proper
semantic tokens for the range request. Thereafter the client only asks for
range requests for that file.
A minimal example with the gopls logs would help us understand this. The
setting to get logs is
"go.languageServerFlags": [
"-rpc.trace",
"-logfile=auto"
],
and they are named gopls-<pid>.log. They are in /tmp on linux, $TMPDIR on
Macs. To get a relatively short log file, just reload the window (Editor:
reload window) while editing the large file.
…On Fri, Jan 6, 2023 at 2:00 PM seebs ***@***.***> wrote:
I noticed that one of the previous issues (2286) had a comment:
gopls: allow semantic highlighting to work with large files #1387
<#1387> @pjweinb
<https://github.com/pjweinb> can we close this issue now, since gopls is
limiting the size of file?
1387 was a request to support doing partial ranges, rather than the full
file, specifically to *work around* gopls limiting the size of the file,
and to allow updates to parts of the file at a time.
but also note that gopls is software, and can be modified or configured,
and may not always be limiting the size of the file.
as a user who sometimes has large files, i would definitely prefer that
the extension use the partial-file range behavior to get semantic tokens
rather than just giving up.
—
Reply to this email directly, view it on GitHub
<#2598 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABJIAI3FMMNMHK2VG2EDCGDWRBTWNANCNFSM6AAAAAATRJD2IQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
The vscode setting mentioned above (editor.semanticHighlighting.enabled ) does not seem to work, so closing this until there is a way for the client to control semantic tokens without setting a gopls flag. |
If this setting does not work, should we reopen #2286? |
While addressing golang/go#54531 we realized semantic token feature should be controlled by
editor.semanticHighlighting.enabled
setting (https://code.visualstudio.com/api/language-extensions/semantic-highlight-guide#enablement-of-semantic-highlighting), not by the language server specific setting.Before the next gopls release, we need
The text was updated successfully, but these errors were encountered: