Big update to prettier-extension-monkeyc

I've posted about prettier-extension-monkeyc before, but I've added a bunch of new features that developers will probably like (well, I've been missing them, so maybe you have too).

The new features it implements for VSCode include:

  • Goto Definition. Point at a symbol, Ctrl/Cmd click, and it will take you to the definition. Or F12
  • Goto References. Right click on a symbol and select "Goto References". It will show you all the references. Or Shift-F12
  • Peek Definition/Peek References. Same as above, but in a popup window so you don't lose your place in the original document.
  • Rename Symbol. Right click on a local, function, class or module name, and select "Rename Symbol". It will rename all the references. It doesn't yet work for class members/methods.
  • Goto Symbol. Type Ctrl/Cmd-Shift-O and pick a symbol from the drop down (which has a hierarchical view of all symbols in the current file). This also appears as an outline across the top of the file.
  • Open Symbol By Name. Type Ctrl/Cmd-T, then start typing letters from a symbol name. A drop down will be populated with all matching symbols from anywhere in your project.

Older features include a prettier based formatter for monkeyc, and a monkeyc optimizer that will build/run/export an optimized version of your project.

[edit: My last couple of replies seem to have just disappeared, and the whole conversation seems to be in a jumbled order, so tldr: there's a new test-release at https://github.com/markw65/prettier-extension-monkeyc/releases/tag/v2.0.9 which seems to work for me on linux. I'll do more verification tomorrow, and push a proper update to the vscode store once I'm sure everything is working]

  • Hmm... not sure, Ive never used VSCS, but I'll give it a try.

  • You'll have to explain exactly what you're doing. When I try to use VSCS it tells me that neither the Garmin extension nor PrettierMonkeyC can be installed on the web...

  • Microsoft definitely changed the documentation, which caused confusion for both of us. I can't find the documentation I used for my setup.

    It looks like you're trying to use "Visual Studio Code for the Web", which hosts VS Code for everyone at https://vscode.dev, while I have my own local instance.

    I couldn't find a pre-built Docker image for you to try, that would run the original Microsoft binaries, only some forks of VS Code that can't use the original extensions marketplace (and therefore can't install PMC) due to licensing terms.

    I download official distribution from https://update.code.visualstudio.com/1.135.0/server-linux-x64-web/stable, unpack it and run code-server. I'm not sure if there are versions for Windows or Mac. If you try this, it's worth making backup of ~/.vscode from your desktop installation just in case.

  • Well that was a fun exploration.

    As far as I can tell, the enable/disable already worked "for future sessions" - you just needed to manually run "Developer: Reload Window" to make it take effect immediately.

    I've made the extension check whether the "restartExtensionHost" command is available, and if not it offers a "Restart Window" option, rather than a "Restart Extensions" option, and it all seems to work.

    I'll roll it into the next release, but it may be a few days.

    By the way - why are you working with the server version, rather than the desktop version if you're just running it locally anyway?

  • Great, thanks!

    I'm developing CIQ inside a Docker container because I want to have a reproducible enviroment across multiple machines I use. Running desktop applications inside a container is not very handy, so I chose the web version.