Skip to content

Commit 3a88cf3

Browse files
authored
Merge pull request #1706 from bstaletic/go_cleanup
Clean up a gopls hack
2 parents cff0e09 + b0c22f7 commit 3a88cf3

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

ycmd/completers/go/go_completer.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -78,25 +78,6 @@ def SupportedFiletypes( self ):
7878
return [ 'go' ]
7979

8080

81-
def _SetUpSemanticTokenAtlas( self, capabilities: dict ):
82-
if 'semanticTokensProvider' not in capabilities:
83-
# gopls is broken and doesn't provide a legend, instead assuming the
84-
# tokens specified by the client are the legend. This is broken, but
85-
# easily worked around:
86-
#
87-
# https://github.com/golang/go/issues/54531
88-
import ycmd.completers.language_server.language_server_protocol as lsp
89-
capabilities[ 'semanticTokensProvider' ] = {
90-
'full': True,
91-
'legend': {
92-
'tokenTypes': lsp.TOKEN_TYPES,
93-
'tokenModifiers': lsp.TOKEN_MODIFIERS
94-
}
95-
}
96-
97-
return super()._SetUpSemanticTokenAtlas( capabilities )
98-
99-
10081
def GetDoc( self, request_data ):
10182
assert self._settings[ 'ls' ][ 'hoverKind' ] == 'Structured'
10283
try:

0 commit comments

Comments
 (0)