-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double dollar when select variable via enter/tab #118
Comments
I'm having this issue as well, is this new? I don't remember it behaving this way before. |
Having the same issue, it's really annoying. Are there any news about it? |
Fix? |
It's so frustrating. :// |
This is very annoying indeed, can this be fixed? |
This is still not fixed! |
Still not fixed... Using Vue CLI (vue 3) with sass 1.32.7, sass-loader 12.0.0 (.scss files) |
i think that is more a bug in VsCode than the extension it's self, they can't replace symbols with string, playing with the code a little bit i make this work very nice with global vars, just removing the $ from suggestion string (they still need a $ to trigger the suggestion window call) // services/parser.ts
async function findDocumentSymbols(
document: TextDocument,
ast: INode
): Promise<IDocumentSymbols> {
const symbols = ls.findDocumentSymbols(document, ast);
const links = await findDocumentLinks(document, ast);
const result: IDocumentSymbols = {
functions: [],
imports: convertLinksToImports(links),
mixins: [],
variables: [],
};
for (const symbol of symbols) {
const position = symbol.location.range.start;
const offset = document.offsetAt(symbol.location.range.start);
if (symbol.kind === SymbolKind.Variable) {
result.variables.push({
name: symbol.name.replace("$", ""), // Removing $ from var name
offset,
position,
value: getVariableValue(ast, offset),
});
} else if (symbol.kind === SymbolKind.Method) {
result.mixins.push({
name: symbol.name,
offset,
position,
parameters: getMethodParameters(ast, offset),
});
} else if (symbol.kind === SymbolKind.Function) {
result.functions.push({
name: symbol.name,
offset,
position,
parameters: getMethodParameters(ast, offset),
});
}
}
return result;
} I tested this in a vue 3 project with scss and script setup. |
Nice work @crowrvo! |
@dsvgl i will do a pull request, but just write the replace in the compiled parse.js solve the problem |
Nice, that worked. Thank you @crowrvo! Could you do the PR? Otherwise I can do it. |
Omg, if the PR will be merged me and our team will be happy guys, please don't drop this case |
Reproducible Case:
Trying add
color: $
, after$
types, I am searching for var, and select it via enter/tab, after that added another dollar pasted before already typed $.Steps to Reproduce:
The text was updated successfully, but these errors were encountered: