Vscode-tads3tools extension alpha release 0.6.1

Hello, Thomas.

Sorry for the delay, besides computers my big hobby is horses and we were riding this weekend so I didn’t get to the computers at all. Thank you very much for the changes, I don’t yet have the experience to directly help with the modifications, however I tried to translate the extension from the 0.21alpha test branch:

I followed the instructions:

and installed the necessary vsce and yaml packages on my Arch linux. However, when I try to create the vsix package, I get errors that I don’t understand and I’m sending them as an error.txt file in the attachment.

For now, I will wait until the new version 0.21 is released and test it carefully. From my side the extension is fully functional, of course like any software it contains bugs, but it is the best that currently exists for TADS3 development and I thank you very much for it.

error.txt (19.6 KB)

2 Likes

“npm install”

Followed by:

“vsce package --no-yarn“

Usually does the trick for me. (Try again an see if you just missed some packages the first time around, otherwise I suspect some issues with the npm installation itself, not that uncommon, at least for me)

The yarn script presence is a bit of an annoyance but I kind if got stuck to it after adding an azure pipeline to automatically test the extension on PR:s.

Hi Thomas, great, both commands

“npm install”

a

“vsce package --no-yarn”

work without any problems, I built the development version 0.21 sucessfully and installed the resulting vsix package.

The new version works perfectly, the problem with saving Python files is removed.

Thank you very much for the excellent work, the extension is now fully usable, so I can continue with further development.

1 Like

Glad to hear it. Thanks a lot for testing it! I’ll most likely release a new version this weekend.

2 Likes

Hey Tomas, I’ve had a chance over the last couple days to work on my game using VSCode for the first time with your extension installed. Thanks so much! Being able to navigate quickly to symbols and do definition peeks are for me the two huge time savers. I like the snippets idea and will probably make more of those in the future, but I made such heavy use of macros in my pre-IDE days that I don’t reach for the snippets as often as I might. One or two questions: Does Go to Symbol in Workspace work for you? Because it doesn’t find anything for me, although Go to Symbol within a single file works right. Another minor thing… can VSCode support the quick dictionary lookup on macOS? For instance, on my laptop in BBEdit or TextEdit I can do a three-finger tap on any word and it will show dictionary/thesaurus for that word. Anyway, great work and thanks for contributing to TADS!!

2 Likes

Also have noticed that the in-editor compiling will sometimes find problems but mark/list the wrong files as the culprits. If I run t3make separately I can find where the problem really is…

You might try the “Mac Dictionary” VS Code extension. Put a cursor on a word, press Ctrl+Cmd+K, and the Mac dictionary pops up with the entry. (I imagine the shortcut key is configurable.)

Another useful extension is “Code Spell Checker.”

– Jim

I installed that, thanks! It would be extra nice if it could do the quick look view with the three-finger tap, but it’s great to have a quick dictionary link.

Hi Johnny! I’ll just address your first question. No it doesn’t and it finally made sense to me why one should implement a workspace symbol provider as well. So I just did that and it will be included now in the next release. Thanks for the idea!

2 Likes

I’ll add this to the issues in the repository so I won’t forget it! Thanks!

New release: version vscode-tads3tools 0.3.0-alpha

The highlights are:

  • A workspace symbol provider is added. You can now use the key combination CTRL-T and use fuzzy search to locate a symbol located in any file.
  • The visual map, if opened, auto redraws itself on each new save that leads to a successful parse.

Full details in the changelog:

To update: just open up the extension tab in vscode and locate the plugin and click update

3 Likes

I’ve also added a discussion forum on the github repository.

This forum will do for now but might perhaps be easier to categorize information about the extension there in the future. We’ll see :slight_smile:

3 Likes

Tomas, thanks so much for adding the workspace symbols at my request. Unfortunately, it only loads a portion of my symbols and I can’t tell what the subset is. I do know that doubleangle brackets nested in doubleangle brackets within a string cause the symbol outliner to get all messed up for the rest of that source file, but I don’t know if that’s why the workspace symbols are incomplete. Again, thanks for all your work on this tool!
How difficult would it be for the symbol outliner to retain the last collapsed/expanded status that you left it at? I usually like to leave them collapsed because I have so many symbols to look through, and don’t usually need to see every property. Thanks!

Hi John! Thanks for your report! I didn’t know about this limitation of nested double angle brackets. That could perhaps be one part of it. Since I’m a little lost in what use cases you have, could you perhaps share portions of the kind of code that you seek support for? It might be other things as well.

I’m going to take a closer look at the workspace symbols that are listed, and see if I can see a pattern of what’s there and what’s excluded. I’ll get back to you…

Something like:
“<<isWet ? ‘The object is wet<<isBroken ? ‘ and broken’ : ‘’>>. ’ : ‘’>>
will disrupt symbol parsing after this point in the source file…

[Later]
I started posting on GitHub, so I put my “findings” there. It seems that Symbol in Workspace is not finding any objects using + notation, or any user-defined methods…

Great! Thanks for the example and all your input on github. I’ll update the parser so it can handle this.

2 Likes

Not sure how often you check GitHub but I gave more info on the outliner collapsing issue, along with some other things…

I’ve seen it but I don’t have an answer yet besides that I believe the behavior might be caused by vscode itself. But I’ll write more under the issue when I know more and have time to investigate. But for now it’s not the most prioritized issue and will have to wait. Every additional info you can add that might help fixing the issue is welcome of course.

No pressure about the issue, I know you have a ton to deal with! That would be a bit annoying if it was an issue embedded somewhere in the VSCode program. I think that’s about the extent of the info I can give you, is that after switching to a tenth distinct editor, the collapse info resets. Unfortunately for me, that reset is quite common. Thanks again for this tool!

1 Like

New release: vscode-tads3tools 0.4.0-alpha

New features:

  • Macro definitions are now also indexed and can be peeked upon and opened up with CTRL-click.
  • A command to add (new project) files and create makefile entries has been added

Plus some bugfixes, the details are found in the changelog:
toerob/vscode-tads3tools/blob/main/CHANGELOG.md

4 Likes