Skip to content

Commit

Permalink
Disable "liftShorter" completion classifier on 221 platform
Browse files Browse the repository at this point in the history
  • Loading branch information
vlad20012 committed Feb 5, 2022
1 parent 2b62bb9 commit c42fd5d
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -6,6 +6,7 @@
package org.rust.lang.core.completion

import com.intellij.codeInsight.completion.*
import com.intellij.codeInsight.completion.impl.CompletionSorterImpl
import com.intellij.codeInsight.lookup.LookupElement
import com.intellij.codeInsight.lookup.LookupElementWeigher
import com.intellij.openapi.application.ApplicationInfo
Expand Down Expand Up @@ -66,7 +67,8 @@ class RsCompletionContributor : CompletionContributor() {
*/
fun withRustSorter(parameters: CompletionParameters, result: CompletionResultSet): CompletionResultSet {
return if (is221Platform) {
var sorter = CompletionSorter.defaultSorter(parameters, result.prefixMatcher)
var sorter = (CompletionSorter.defaultSorter(parameters, result.prefixMatcher) as CompletionSorterImpl)
.withoutClassifiers { it.id == "liftShorter" }
for ((anchor, weighers) in RS_COMPLETION_WEIGHERS_GROUPED) {
val wrappers = weighers.map {
object : LookupElementWeigher(it.id, /* negated = */ false, /* dependsOnPrefix = */ false) {
Expand Down

0 comments on commit c42fd5d

Please sign in to comment.