Skip to content

Commit df04309

Browse files
committed
feat: review
1 parent 04d088f commit df04309

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

packages/language-service/src/plugins/mpx-sfc-style-css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as CSS from 'vscode-css-languageservice'
1+
import type * as CSS from 'vscode-css-languageservice'
22
import type { TextDocument } from 'vscode-languageserver-textdocument'
33
import type {
44
LanguageServicePlugin,

packages/language-service/src/plugins/mpx-sfc-style-stylus.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -157,15 +157,13 @@ export function create(): LanguageServicePlugin {
157157
if (document.languageId !== 'stylus') {
158158
return
159159
}
160-
161160
return parseStylusColors(document)
162161
},
163162

164163
provideColorPresentations(document, color, range) {
165164
if (document.languageId !== 'stylus') {
166165
return
167166
}
168-
169167
return parseStylusColorPresentation(range, color)
170168
},
171169
}
@@ -215,14 +213,12 @@ function parseStylusColorPresentation(
215213
const g = Math.round(color.green * 255)
216214
const b = Math.round(color.blue * 255)
217215
const hex = `#${r.toString(16).padStart(2, '0')}${g.toString(16).padStart(2, '0')}${b.toString(16).padStart(2, '0')}`
218-
219216
colors.push({
220217
label: hex,
221218
textEdit: {
222219
range,
223220
newText: hex,
224221
},
225222
})
226-
227223
return colors
228224
}

0 commit comments

Comments
 (0)