Skip to content

add Method_TextDocumentSemanticTokensFullDelta #4073

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

Merged
merged 28 commits into from
Feb 21, 2024
Merged
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
43796d0
add Method_TextDocumentSemanticTokensFullDelta
soulomoon Feb 13, 2024
3f29007
fix cache and add test
soulomoon Feb 13, 2024
ff93475
cleanpu
soulomoon Feb 13, 2024
decd9e1
add tset
soulomoon Feb 13, 2024
e1fd84e
add delete tokens test
soulomoon Feb 13, 2024
41499b4
clean up
soulomoon Feb 13, 2024
9b373f3
clean up
soulomoon Feb 13, 2024
4f7546a
add delete tokens test
soulomoon Feb 13, 2024
8af3b99
cleanup
soulomoon Feb 13, 2024
181b10a
fix test
soulomoon Feb 13, 2024
9e7af72
cleanup
soulomoon Feb 13, 2024
cef51ed
remove persistentGetSemanticTokensRule
soulomoon Feb 14, 2024
fa908a0
fix export
soulomoon Feb 14, 2024
e3ed49b
cleanup
soulomoon Feb 14, 2024
82b1eaf
Update plugins/hls-semantic-tokens-plugin/test/SemanticTokensTest.hs
soulomoon Feb 14, 2024
e7a17e7
cleanup
soulomoon Feb 14, 2024
cc69775
add doc
soulomoon Feb 14, 2024
49fd150
cleanup
soulomoon Feb 14, 2024
dcdbb27
Update plugins/hls-semantic-tokens-plugin/src/Ide/Plugin/SemanticToke…
soulomoon Feb 14, 2024
7e7398a
fix
soulomoon Feb 14, 2024
e6ff123
Merge branch 'master' into 4072-textdocumentsemantictokensfulldelta
soulomoon Feb 14, 2024
9ef7796
Merge branch 'master' into 4072-textdocumentsemantictokensfulldelta
soulomoon Feb 19, 2024
b287639
neat
soulomoon Feb 19, 2024
154013b
add doc
soulomoon Feb 19, 2024
42f6284
Merge branch 'master' into 4072-textdocumentsemantictokensfulldelta
soulomoon Feb 21, 2024
699dab7
add doc about semanticTokensCache location
soulomoon Feb 21, 2024
a0b6ac7
add Note [Semantic Tokens Cache Location]
soulomoon Feb 21, 2024
4180c43
fix doc
soulomoon Feb 21, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add delete tokens test
  • Loading branch information
soulomoon committed Feb 13, 2024
commit e1fd84ec01911a4b8aaf4489442f9a34b73ba504
19 changes: 19 additions & 0 deletions plugins/hls-semantic-tokens-plugin/test/SemanticTokensTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,25 @@ semanticTokensFullDeltaTests =
delta <- getSemanticTokensFullDelta doc1 "0"
liftIO $ print delta
liftIO $ delta @?= expectDelta

, testCase "remove tokens" $ do
let file1 = "TModula𐐀bA.hs"
let expectDelta = InR (InL (SemanticTokensDelta (Just "1") [SemanticTokensEdit 0 20 (Just [])]))
-- delete all tokens
Test.Hls.runSessionWithServerInTmpDir def semanticTokensPlugin (mkFs $ FS.directProjectMulti [file1]) $ do
doc1 <- openDoc file1 "haskell"
_ <- waitForAction "TypeCheck" doc1
_ <- Test.getSemanticTokens doc1
-- open the file and append a line to it
let change = TextDocumentContentChangeEvent
$ InL $ #range .== Range (Position 2 0) (Position 2 28)
.+ #rangeLength .== Nothing
.+ #text .== Text.replicate 28 " "
changeDoc doc1 [change]
_ <- waitForAction "TypeCheck" doc1
delta <- getSemanticTokensFullDelta doc1 "0"
liftIO $ print delta
liftIO $ delta @?= expectDelta
]

semanticTokensTests :: TestTree
Expand Down