Ketho / vscode-wow-api

VS Code extension for World of Warcraft AddOns
https://marketplace.visualstudio.com/items?itemName=ketho.wow-api
MIT License
142 stars 31 forks source link

(Request) Advertise support for IntelliJ IDEA #143

Open brittyazel opened 4 months ago

brittyazel commented 4 months ago

I am a long-time user of Intellij IDEA with the EmmyLUA plugin, and after maintaining my own API docs for many years, here, I have now been using this project as it is far superior and far better maintained. Interestingly, this project, while advertised as being for VSCode specifically, works essentially perfect out-of-the-box for IntelliJ IDEA and EmmyLUA. Given that, perhaps you might consider adding IntelliJ IDEA to the advertised list of IDEs.

That being said, I know the name of the project itself has "vscode-" prefixing it, so I wouldn't request you alter that at all, but perhaps in the README it might be worth mentioning the working IntelliJ IDEA / EmmyLUA support for those like me that are developing using those alternative tools. Either way, accidental or not, your repo is hands-down the best in-IDE implementation of the WoW API Documentation for both VSCode and IntelliJ IDEA, and I say that confidently as someone who, until recently, developed a far inferior competitor to this project lol.

Ketho commented 4 months ago

I actually have no idea how this project works for IntelliJ, is there something I should change to better target other IDEs like IntelliJ?

I do know some people somehow use at least the annotations for IntelliJ, but not their exact setup and if they use the same language server or a different one. I'm open to working together with you on as a collaborator if you want.

brittyazel commented 4 months ago

It seems to work perfectly fine in IntelliJ as far as I can tell, granted I haven't done an in-depth side-by-side between VSCode and IntelliJ. I think the big ticket item here is EmmyLUA, which supports both VSCode and IntelliJ as a native plugin. I think, for the most part, as long as this project supports EmmyLUA's format it should just 'work' for both.

I'm not really sure what else you could add to support IntelliJ 'more' tbh. There might be some minor differences in the mouseover tooltips and how they might handle rich-text features, but I'd just be guessing.

Just so you can see, this is how I import your docs into my project: ProjectStructure

And it shows up in my sidebar as this (along with Gethe's UI source): Sidebar

And tooltips end up looking like this: Tooltip

Ketho commented 4 months ago

So if I understand this correct, for IntelliJ documentation it should say that users should get EmmyLua, clone/download this repo and add ../vscode-wow-api/EmmyLua to the Lua path?

There might be some differences with EmmyLua and LuaCATS, I suppose generics from CreateFrame and maybe enums. The vscode extension does add its own hover tooltips for CVars, enums and globalstrings which I can assume would not work for other IDEs.

I went ahead added you as a collaborator if you want to add that to the README.md or somewhere else.

brittyazel commented 4 months ago

Oh, thank you for adding me! I'll make sure to not abuse the privilege lol.

I believe a user could add the root vscode-wow-api folder as a Classpath, and it would work just as well, but by focusing it to the EmmyLUA folder it avoids unnecessarily indexing some of the supporting utilities and focuses on just the docs themselves. But otherwise, yeah, once you add the classpath it goes ahead and indexes the files starts working immediately.

One question I now have is how does EmmyLUA relate to this project? I assumed given the main folder is named "EmmyLUA" that VSCode users were using the EmmyLUA VSCode plugin. Is that the case? I'm not sure how EmmyLUA and LuaCATS relate to one another, or how you are using either.

brittyazel commented 4 months ago

Yeah for things like Enums and CVars I'm not really sure how best to handle that. I tried to come up with a solution myself using raw EmmyLUA features (at least from what I could figure out), but it was never totally satisfactory. It would sometimes provide suggestions and other times not.

There is likely some hidden EmmyLUA functionality for exactly this that I was ignorant to, but my main focus was just getting parsing from warcraft.wiki.gg and the api source code working broadly.