vscode-less
vscode-less copied to clipboard
Autocomplete failed while using pattern-matching mixins
I used pattern-matching mixins in some of my less files. But all the smart prompts for variables and mixins of these files have disappeared.
For example:
// mixin.less
.mixin(dark, @color) {
color: darken(@color, 10%);
}
.mixin(light, @color) {
color: lighten(@color, 10%);
}
.mixin(@_, @color) {
display: block;
}
log error:
[Error - 4:15:24 PM] (node:28582) UnhandledPromiseRejectionWarning: TypeError: Cannot read property '1' of null
at makeMixinParameters (/Users/tianzhi/.vscode/extensions/mrmlnc.vscode-less-0.6.3/node_modules/less-symbols-parser/out/index.js:15:23)
at Object.parseSymbols (/Users/tianzhi/.vscode/extensions/mrmlnc.vscode-less-0.6.3/node_modules/less-symbols-parser/out/index.js:162:33)
at Object.findSymbols (/Users/tianzhi/.vscode/extensions/mrmlnc.vscode-less-0.6.3/out/parser/symbols.js:12:34)
at Object.parseDocument (/Users/tianzhi/.vscode/extensions/mrmlnc.vscode-less-0.6.3/out/services/parser.js:20:29)
at /Users/tianzhi/.vscode/extensions/mrmlnc.vscode-less-0.6.3/out/services/scanner.js:23:38
(Use `Code Helper (Renderer) --trace-warnings ...` to show where the warning was created)
[Error - 4:15:24 PM] (node:28582) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
[Error - 4:15:24 PM] (node:28582) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
[vscode-less]: TypeError
[vscode-less]: TypeError: Cannot read property '1' of null
[Error - 4:15:26 PM] (node:28582) PromiseRejectionHandledWarning: Promise rejection was handled asynchronously (rejection id: 1)
Maybe this is related to https://github.com/mrmlnc/less-symbols-parser/issues/7