Skip to content
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

x/tools/gopls: incorrectly tokenized import statements #42831

Closed
stamblerre opened this issue Nov 25, 2020 · 5 comments
Closed

x/tools/gopls: incorrectly tokenized import statements #42831

stamblerre opened this issue Nov 25, 2020 · 5 comments

Comments

@stamblerre
Copy link
Contributor

@stamblerre stamblerre commented Nov 25, 2020

Screen Shot 2020-11-25 at 11 50 37 AM

See the colors in this block:

import (
    "fmt"
    "os"
)

The entirety of "fmt" and the closing quote of "os" are tokenized as strings, and "os is tokenized as a namespace. My guess is that there's something off about the positions.

/cc @pjweinb

@pjweinb
Copy link

@pjweinb pjweinb commented Nov 25, 2020

@pjweinb
Copy link

@pjweinb pjweinb commented Nov 25, 2020

@pjweinb
Copy link

@pjweinb pjweinb commented Nov 25, 2020

@pjweinb
Copy link

@pjweinb pjweinb commented Nov 26, 2020

hmm, lost the colors. But in your block, I don't think semantic tokens is on. With semantic tokens, fmt and Println would have different types and different colors. (As would os and Exit)
Screen Shot 2020-11-26 at 07 58 18

@stamblerre
Copy link
Contributor Author

@stamblerre stamblerre commented Nov 30, 2020

I thought semantic tokens was on, but you're right, I can no longer reproduce.

@stamblerre stamblerre closed this Nov 30, 2020
gopls semantic tokens automation moved this from To Do to Done Nov 30, 2020
@stamblerre stamblerre removed this from the gopls/unplanned milestone Nov 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants