Open brittyazel opened 6 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.
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:
And it shows up in my sidebar as this (along with Gethe's UI source):
And tooltips end up looking like this:
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.
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.
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.
Maybe it is more IDE agnostic to bundle the type annotations as LLS Addon and distribute it as this? π€
I am using https://plugins.jetbrains.com/plugin/22315-sumnekolua for IntelliJ and added the Annotations to the .luarc.json
:
{
...
"workspace.userThirdParty": [".types/LuaAddons"],
}
To mark it as LLS Addon all it needs is the correct directory structure. As example:
βββ wow-api
βββ config.json
βββ library
βββ Data
βΒ Β βββ CVar.lua
βΒ Β βββ ...
βββ Interface
βΒ Β βββ ...
βββ Libraries
βΒ Β βββ ...
βββ Lua
βΒ Β βββ ...
βββ Type
βΒ Β βββ ...
βββ Widget
βΒ Β βββ ...
Maybe it is more IDE agnostic to bundle the type annotations as LLS Addon and distribute it as this? π€
I'm certainly entertaining the idea of bundling it as a LLS Addon for IDE agnostic support. I do need to find out how the vscode 3rd party extension (which has some extra features) would not conflict with the LLS addon
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.