Skip to content

Commit def4db4

Browse files
committed
rename fromLspTokenType to lspTokenTypeHsTokenType
1 parent 472e141 commit def4db4

File tree

1 file changed

+3
-3
lines changed
  • plugins/hls-semantic-tokens-plugin/src/Ide/Plugin/SemanticTokens

1 file changed

+3
-3
lines changed

plugins/hls-semantic-tokens-plugin/src/Ide/Plugin/SemanticTokens/Mappings.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ lspTokenReverseMap config
5555
where xs = enumFrom minBound
5656
mr = Map.fromList $ map (\x -> (toLspTokenType config x, x)) xs
5757

58-
fromLspTokenType :: SemanticTokensConfig -> SemanticTokenTypes -> Maybe HsSemanticTokenType
59-
fromLspTokenType cf tk = Map.lookup tk (lspTokenReverseMap cf)
58+
lspTokenTypeHsTokenType :: SemanticTokensConfig -> SemanticTokenTypes -> Maybe HsSemanticTokenType
59+
lspTokenTypeHsTokenType cf tk = Map.lookup tk (lspTokenReverseMap cf)
6060

6161
-- * 2. Mapping from GHC type and tyThing to semantic token type.
6262

@@ -172,7 +172,7 @@ recoverSemanticTokens config v s = do
172172
-- the `SemanticTokensConfig` used should be a map with bijection property
173173
lspTokenHsToken :: SemanticTokensConfig -> SemanticTokenOriginal SemanticTokenTypes -> SemanticTokenOriginal HsSemanticTokenType
174174
lspTokenHsToken config (SemanticTokenOriginal tokenType location name) =
175-
case fromLspTokenType config tokenType of
175+
case lspTokenTypeHsTokenType config tokenType of
176176
Just t -> SemanticTokenOriginal t location name
177177
Nothing -> error "recoverSemanticTokens: unknown lsp token type"
178178

0 commit comments

Comments
 (0)