Giter Site home page Giter Site logo

Comments (5)

ZenVoich avatar ZenVoich commented on August 23, 2024 1

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.

ottodevs avatar ottodevs commented on August 23, 2024

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.

rvanasa avatar rvanasa commented on August 23, 2024

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.

ottodevs avatar ottodevs commented on August 23, 2024

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.

rvanasa avatar rvanasa commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.