File tree Expand file tree Collapse file tree
src/main/kotlin/com/peppa/css/completion Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33## [ Unreleased]
44
5+ ## [ 1.6.0] - 2025-12-10
6+
7+ - fix css icon lose
8+ - fix completion with two dot
9+
510## [ 1.5.4] - 2025-12-10
611
712- 升级版本号到 1.5.4 并准备发布
160165- support a little complex parents selector
161166- support css selector has pseudo
162167
163- [ Unreleased ] : https://github.com/Q-Peppa/react-css-modules-all/compare/v1.5.4...HEAD
168+ [ Unreleased ] : https://github.com/Q-Peppa/react-css-modules-all/compare/v1.6.0...HEAD
169+ [ 1.6.0 ] : https://github.com/Q-Peppa/react-css-modules-all/compare/v1.5.4...v1.6.0
164170[ 1.5.4 ] : https://github.com/Q-Peppa/react-css-modules-all/compare/v1.5.3...v1.5.4
165171[ 1.5.3 ] : https://github.com/Q-Peppa/react-css-modules-all/compare/v1.5.2...v1.5.3
166172[ 1.5.2 ] : https://github.com/Q-Peppa/react-css-modules-all/compare/v1.5.1...v1.5.2
Original file line number Diff line number Diff line change @@ -4,8 +4,8 @@ pluginGroup = com.peppa.css
44pluginName = CSS Modules
55pluginRepositoryUrl = https://github.com/Q-Peppa/react-css-modules-all
66# SemVer format -> https://semver.org
7- pluginVersion = 1.5.4
8- version = 1.5.4
7+ pluginVersion = 1.6.0
8+ version = 1.6.0
99# Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html
1010pluginSinceBuild =242
1111# pluginUntilBuild = 242.* # for Supported all version > 231
Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ class CssModulesClassNameCompletionContributor : CompletionContributor() {
7373 private fun convertToBracketSyntax (context : InsertionContext , lookupString : String ) {
7474 val document = context.editor.document
7575 val dotOffset = context.startOffset - 1
76- document.replaceString(dotOffset, context.tailOffset, " [' $lookupString ' ]" )
77- context.editor.caretModel.moveToOffset(dotOffset + lookupString.length + 4 )
76+ document.replaceString(dotOffset, context.tailOffset, " [$lookupString ]" )
77+ context.editor.caretModel.moveToOffset(context.tailOffset )
7878 }
7979 }
8080
Original file line number Diff line number Diff line change @@ -165,14 +165,15 @@ fun buildLookupElementHelper(
165165 val lookupString = CssEscapeUtil .escapeSpecialCssChars(name)
166166 val lineNumber = (css as CssRuleset ).selectors.first().lineNumber
167167 val lookup = if (isNeedWrapByChar) " '$lookupString '" else lookupString
168- return LookupElementBuilder .createWithSmartPointer(lookup, css).apply {
169- bold()
170- withPsiElement(css)
171- withIcon(AllIcons .Xml .Css_class )
172- withPresentableText(lookup)
173- withCaseSensitivity(true )
174- withTailText(" " .repeat(SpaceSize ) + " ($location :$lineNumber )" , true )
175- }.let { PrioritizedLookupElement .withPriority(it, CssCompletionUtil .CSS_SELECTOR_SUFFIX_PRIORITY .toDouble()) }
168+ val ele = LookupElementBuilder .createWithSmartPointer(lookup, css)
169+ .bold()
170+ .withPsiElement(css)
171+ .withIcon(AllIcons .Xml .Css_class )
172+ .withPresentableText(lookup)
173+ .withCaseSensitivity(true )
174+ .withTailText(" " .repeat(SpaceSize ) + " ($location :$lineNumber )" , true )
175+
176+ return PrioritizedLookupElement .withPriority(ele, CssCompletionUtil .CSS_SELECTOR_SUFFIX_PRIORITY .toDouble())
176177}
177178
178179private fun toGetStylesheetFile (ref : PsiReference ? ): StylesheetFile ? {
You can’t perform that action at this time.
0 commit comments