openfl / lime-vscode-extension

Visual Studio Code extension for OpenFL and Lime projects written in Haxe
https://marketplace.visualstudio.com/items?itemName=openfl.lime-vscode-extension
MIT License
27 stars 4 forks source link

Better support for initializing extension for multifolder workspaces #102

Closed T1mL3arn closed 9 months ago

T1mL3arn commented 9 months ago

Right now I can add lime project dir to current workspace with Lime: Open Folder. Though I get the error Failed to create new project. Workspace folder "my-project" is not empty. the dir is added and vscode allows to use Lime command on it.

But when I manually add a project dir to the workspace (with vscode File -> Add folder to workspace), Lime is not active and Lime: Open Folder command doesn't work (I get the same error Workspace folder is not empty).

lime ext v1.5.0 vscode v1.79.2

player-03 commented 9 months ago

I find the extension reliably checks the workspace's first folder and no other folder. Which is enough as long as you only have one Lime project per workspace. (You can reorder the folders by manually editing the .code-workspace file.)

Do you have a use case for multiple Lime projects in one workspace? Or are you saying there's something else wrong?

T1mL3arn commented 9 months ago

Which is enough as long as you only have one Lime project per workspace

For my case it's enough. Reordering folders in vscode explorer helped.

joshtynjala commented 9 months ago

Do you have a use case for multiple Lime projects in one workspace?

I do. 😄 I am working on a library and an app that uses the library at the same time. I'd like them to be in the same window, instead of having to switch between multiple windows.

However, I am aware that vshaxe needs support for multi-root workspaces before lime-vscode-extension can support them too.

player-03 commented 9 months ago

Can't you get code completion by having project.xml import the library's include.xml? And then if the library has unit tests, make a custom task for that. When you press the "run task" hotkey, you get to pick between running Lime or running the unit tests.

There might be something else the extension does that I'm missing, but these two steps cover my use cases.