tools
tools copied to clipboard
gopls: enhance read/write access distinction in document highlighting for symbols
The definition of 'write access' is same as it in GoLand. Some examples are access to variables in declaration, assignment(left value), self increasing, channel sending and composite literal.
The algorithm to find write access is same as it in jdt (Java LSP), by visiting every write statement in ast traversal and collecting the positions of access to variables.
Fixes golang/go#64579