Skip to content
Merged
Changes from all commits
Commits
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
8 changes: 4 additions & 4 deletions internal/ls/completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ func getCompletionData(program *compiler.Program, typeChecker *checker.Checker,
if parent.Kind == ast.KindJsxElement || parent.Kind == ast.KindJsxOpeningElement {
location = currentToken
}
case ast.KindSlashToken:
case ast.KindLessThanSlashToken:
if parent.Kind == ast.KindJsxSelfClosingElement {
location = currentToken
}
Expand All @@ -460,7 +460,7 @@ func getCompletionData(program *compiler.Program, typeChecker *checker.Checker,

switch parent.Kind {
case ast.KindJsxClosingElement:
if contextToken.Kind == ast.KindSlashToken {
if contextToken.Kind == ast.KindLessThanSlashToken {
isStartingCloseTag = true
location = contextToken
}
Expand Down Expand Up @@ -2432,7 +2432,7 @@ func isValidTrigger(file *ast.SourceFile, triggerCharacter CompletionsTriggerCha
if ast.IsStringLiteralLike(contextToken) {
return tryGetImportFromModuleSpecifier(contextToken) != nil
}
return contextToken.Kind == ast.KindSlashToken && ast.IsJsxClosingElement(contextToken.Parent)
return contextToken.Kind == ast.KindLessThanSlashToken && ast.IsJsxClosingElement(contextToken.Parent)
case " ":
return contextToken != nil && contextToken.Kind == ast.KindImportKeyword && contextToken.Parent.Kind == ast.KindSourceFile
default:
Expand Down Expand Up @@ -3934,7 +3934,7 @@ func (l *LanguageService) getJsxClosingTagCompletion(
switch node.Kind {
case ast.KindJsxClosingElement:
return ast.FindAncestorTrue
case ast.KindSlashToken, ast.KindGreaterThanToken, ast.KindIdentifier, ast.KindPropertyAccessExpression:
case ast.KindLessThanSlashToken, ast.KindGreaterThanToken, ast.KindIdentifier, ast.KindPropertyAccessExpression:
return ast.FindAncestorFalse
default:
return ast.FindAncestorQuit
Expand Down