Comments (5)
Another missing part is with imports from the extension, by calling "Motoko: Import Mops Package", the import shows up as not found, but I guess there is already an open issue for that.
Do you have a mops.toml
file in the project root directory?
Does the error appear on the import line or somewhere else?
If you could provide a full error message, that would be helpful.
from vscode-motoko.
I also tried to install prettier-plugin-motoko
separately and configure it in a .prettierrc
file, without success, but I understand from the extension documentation that shouldn't be needed, am I right?
from vscode-motoko.
Happy to help debug. Is this your first time downloading the extension? Also, what operating system are you using?
The extension output looks like this after hovering some part of the motoko file:
The "Reference not found from AST node" messages are actually just debug information, so you can safely ignore them.
I also tried to install prettier-plugin-motoko separately and configure it in a .prettierrc file, without success, but I understand from the extension documentation that shouldn't be needed, am I right?
Yep that's correct; the formatter is built into the extension, so it should work out of the box without installing anything. You should also be okay without installing Mops for the dfx new
starter project, so hopefully that helps narrow down the possible causes.
from vscode-motoko.
Happy to help debug. Is this your first time downloading the extension? Also, what operating system are you using?
The extension output looks like this after hovering some part of the motoko file:
The "Reference not found from AST node" messages are actually just debug information, so you can safely ignore them.
I also tried to install prettier-plugin-motoko separately and configure it in a .prettierrc file, without success, but I understand from the extension documentation that shouldn't be needed, am I right?
Yep that's correct; the formatter is built into the extension, so it should work out of the box without installing anything. You should also be okay without installing Mops for the
dfx new
starter project, so hopefully that helps narrow down the possible causes.
Hi again! I am using macOS Ventura, up to date.
After spending some time testing things, now I think I made it working.
It seems some syntax error in the motoko code prevented the auto-formatting to work, I expected to have vscode messages for these kind of issues, like eslint or similar, but I think we are not there yet (not complaining, tho, I appreciate how hard is to build a tool like this).
It is weird because some issues like typos on keywords or wrong imports, show up as problems on vscode, but things like missing semicolon after a expression are not raising an issue apparently (but they prevent auto-formatting to work properly)
The inputs (intellisense) also seem to work.
Another missing part is with imports from the extension, by calling "Motoko: Import Mops Package", the import shows up as not found, but I guess there is already an open issue for that.
I will keep debugging and try to be more specific or helpful reporting issues as I learn and better understand the scope of the extension.
Thank so much for the support and patience.
from vscode-motoko.
It seems some syntax error in the motoko code prevented the auto-formatting to work, I expected to have vscode messages for these kind of issues, like eslint or similar, but I think we are not there yet (not complaining, tho, I appreciate how hard is to build a tool like this).
This is very unusual; syntax errors should be showing up in the editor. Thank you for reporting this so we can try and find a solution in case anyone else is also running into this. Did you happen to change anything in the extension settings?
Another missing part is with imports from the extension, by calling "Motoko: Import Mops Package", the import shows up as not found, but I guess there is already an open issue for that.
This feature was contributed very recently by the author of Mops. Pinging @ZenVoich in case he has any suggestions.
from vscode-motoko.
Related Issues (20)
- 100% CPU load with this extension HOT 10
- Do you support showing an outline? HOT 1
- performance improvements HOT 8
- extension don't see mops packages HOT 8
- multi line strings HOT 2
- extension does not recognize canister alias when project is in subdirectory HOT 5
- keyword `catch` is not highlighted HOT 1
- [Request] Please add option to disable context menu "Motoko: Deploy (20 Minutes)" HOT 2
- How to disable autoformating of comments? HOT 3
- Import can't find files HOT 9
- Motoko deploy command ERROR HOT 2
- No wigglies on https://github.dev HOT 2
- No wigglies on https://github.dev HOT 1
- management canister did file not found HOT 7
- Language server not working/Heap out of memory HOT 8
- Error while importing a canister HOT 19
- Cannot find module '@napi-rs/lzma-linux-x64-gnu' in WSL HOT 2
- Autocomplete non-functional. HOT 2
- Feature Request: Data type on variable hover HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vscode-motoko.