-
Notifications
You must be signed in to change notification settings - Fork 9
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
Formatter does note recognitsa @stdlib imports for syntax highlighting #51
Comments
I didn't expect any issue with this code
May you share information about your environment? I see that you use Windows, as and I, but maybe not the latest version for the extension? Also, may this issue be related to different tact compiler version? |
there is another problem that I found import "./std/primitives";
import "./std/cells";
import "./std/crypto";
import "./std/text";
import "./std/math";
import "./std/contract";
import "./std/debug";
import "./std/context";
import "./std/reserve";
import "./std/send";
import "./std/config";
import "./std/base"; I'm writing code now to make it load them because it doesn't see them for autocomplete or for ctrl+click. const stdlibPath = path.resolve(path.dirname(this.absolutePath), "../node_modules/@tact-lang/compiler/stdlib/std");
const standardImports = [
"primitives", "cells", "crypto", "text", "math", "contract",
"debug", "context", "reserve", "send", "config", "base"
];
const contractFileName = path.basename(contractPath);
for (const lib of standardImports) {
const fullPath = path.join(stdlibPath, `${lib}.tact`);
const fullPathFileName = path.basename(fullPath);
if (fs.existsSync(fullPath) && fullPathFileName !== contractFileName && !this.imports.includes(fullPath)) {
this.imports.push(fullPath);
}
} |
The formatter does not recognize libraries imported using the @StdLib syntax, resulting in missing syntax highlighting and potentially affecting other IDE features.
For instance, the following snippet:
tact
is not recognized by the formatter and syntax highlighter, while the workaround below works as expected:
tact
Logs:
The text was updated successfully, but these errors were encountered: