Skip to content

Commit

Permalink
internal/lsp: report dependent modifiers as defaultLibrary (#817)
Browse files Browse the repository at this point in the history
  • Loading branch information
radeksimko authored Mar 4, 2022
1 parent 3fb75db commit 9e3106c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions internal/langserver/handlers/semantic_tokens_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestSemanticTokensFull(t *testing.T) {
],
"tokenModifiers": [
"deprecated",
"modification"
"defaultLibrary"
],
"requests": {
"full": true
Expand Down Expand Up @@ -184,7 +184,7 @@ func TestSemanticTokensFull_clientSupportsDelta(t *testing.T) {
],
"tokenModifiers": [
"deprecated",
"modification"
"defaultLibrary"
],
"requests": {
"full": {
Expand Down Expand Up @@ -293,7 +293,7 @@ func TestVarsSemanticTokensFull(t *testing.T) {
],
"tokenModifiers": [
"deprecated",
"modification"
"defaultLibrary"
],
"requests": {
"full": true
Expand Down
4 changes: 2 additions & 2 deletions internal/lsp/token_encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,10 @@ func (te *TokenEncoder) encodeTokenOfIndex(i int) []uint32 {
for _, m := range token.Modifiers {
switch m {
case lang.TokenModifierDependent:
if !te.tokenModifierSupported(TokenModifierModification) {
if !te.tokenModifierSupported(TokenModifierDefaultLibrary) {
continue
}
modifiers = append(modifiers, TokenModifierModification)
modifiers = append(modifiers, TokenModifierDefaultLibrary)
case lang.TokenModifierDeprecated:
if !te.tokenModifierSupported(TokenModifierDeprecated) {
continue
Expand Down
2 changes: 1 addition & 1 deletion internal/lsp/token_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ var (
}
serverTokenModifiers = TokenModifiers{
TokenModifierDeprecated,
TokenModifierModification,
TokenModifierDefaultLibrary,
}
)

Expand Down

0 comments on commit 9e3106c

Please sign in to comment.