import { State } from '../util/state' ; import type { CodeActionParams , CodeAction } from 'vscode-languageserver' ; import { InvalidConfigPathDiagnostic , InvalidTailwindDirectiveDiagnostic , InvalidScreenDiagnostic , InvalidVariantDiagnostic , RecommendedVariantOrderDiagnostic , } from '../diagnostics/types' ; export function provideSuggestionCodeActions ( _state , params , diagnostic ) { return diagnostic . suggestions . map ( ( suggestion ) => ( { title : `Replace with '${ suggestion }'` , kind : 'quickfix' , diagnostics : [ diagnostic ] , edit : { changes : { [ params . textDocument . uri ] : [ { range : diagnostic . range , newText : suggestion } , ] } } } ) ) ; }