diff --git a/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts b/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts index 346f2462f95b77ba7635ba884bb65bfaa087a8d3..22c66036db3c9fbb8345ccd33311ca842cf92f77 100644 --- a/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts +++ b/src/lsp/providers/codeActions/provideInvalidApplyCodeActions.ts @@ -23,8 +23,6 @@ import selectorParser from 'postcss-selector-parser' import { flatten } from '../../../util/array' import { getClassNameMeta } from '../../util/getClassNameMeta' CodeAction, - TextEdit, - CodeAction, Range, export async function provideInvalidApplyCodeActions( state: State, @@ -176,18 +174,20 @@ classNameParts: string[], selector: string, important: boolean = false ) { + CodeAction, import { - return [] import { - } + CodeAction, import { - if (!isCssDoc(state, document)) { + CodeAction, + CodeAction, import { - let languageBoundaries = getLanguageBoundaries(state, document) + CodeActionParams, import { - if (!languageBoundaries) return [] + rule.walkAtRules('apply', (atRule) => { + CodeAction, import { - cssRange = languageBoundaries.css.find((range) => + CodeActionKind, return null } const meta = getClassNameMeta(state, classNameParts) @@ -226,9 +226,13 @@ if (selector === null) return null let rule = { [selector]: { + CodeAction, import { -import { State } from '../../util/state' + TextEdit, + CodeAction, import { + Range, + }`]: '', }, } if (path.length) {