• You've discovered RedGuides 📕 an EverQuest multi-boxing community 🛡️🧙🗡️. We want you to play several EQ characters at once, come join us and say hello! 👋
  • IS THIS SITE UGLY? Change the look. To dismiss this notice, click the X --->
MQ VS Code Lua Autocomplete Definition Library

Lua - MQ VS Code Lua Autocomplete Definition Library (1 Viewer) 1.1

Coldblooded

Purveyor of all things MQ and Lua
Joined
Mar 23, 2019
RedCents
9,061¢
Pronouns
He/Him
Coldblooded submitted a new resource:

MQ VS Code Lua Autocomplete Definition Library - Work Smarter, not Harder

What it is:

This is a collection of Lua files that mimic the MQ libraries and contain Annotation tags that are a lot like standard Lua comments but contain information that allows us to create definitions for Classes, Fields, Functions, Function signatures, and return types. IDEs then use this information to provide typeahead, autocompletion, documentation, and class type information while you write your code. All this results in writing more accurate code, with fewer mistakes, and...

Read more about this resource...
 
I set up the settings file, already had the Lua Language Server installed. Placed the files in my MQNext Lua Folder and still not getting what I'm looking for. Anything I am doing wrong here?
 

Attachments

  • Untitled.png
    Untitled.png
    4.6 KB · Views: 23
  • Untitled2.png
    Untitled2.png
    10.2 KB · Views: 23
Should we name this subdirectory anything specific?
I call mine "annotations" because I have a lot more than the mq definitions in them. I've already gone through a major overhaul of the original mq annotations and spent time in discussion with the Lua Language Server community on how to annotate the API to better reflect how calling code should look. I'm in the middle of a project, but once I have some breathing room I'll see what's different with the definitions here vs what I came up with.
 
I set up the settings file, already had the Lua Language Server installed. Placed the files in my MQNext Lua Folder and still not getting what I'm looking for. Anything I am doing wrong here?
You might want to double check that config. The screenshot you displayed had the path looking exactly like this example, which needs to be modified to work correctly. It's just an example.
Example:
{
  "Lua.runtime.version": "Lua 5.1",
  "Lua.workspace.library": [
    "./relative/path/to/mq/def",
    "./relative/path/to/imgui/def"
  ],
}
 
You might want to double check that config. The screenshot you displayed had the path looking exactly like this example, which needs to be modified to work correctly. It's just an example.
Example:
{
  "Lua.runtime.version": "Lua 5.1",
  "Lua.workspace.library": [
    "./relative/path/to/mq/def",
    "./relative/path/to/imgui/def"
  ],
}
I had an idea that was it but I wasn't sure of the relative path to imgui.

I tried every absolute path that I could find, added the imgui.Lua to my Lua folder and edited both config files. One in the vscode folder and the one in the definition folder. Just not working for me. lol
 
Last edited:
seems I didn't unsterstand the Instructions:
1663775460353.png

In order to be as close to the author as possible, I copied the content of the zip into the folder "MQNext\Lua\mq-defintions"
As soon as I add the Line"---@type Mq"
I get the Error Message as shown below

1663775425860.png

I presume, my problem is, that I don't understand what to look for, in order to be able to set the 2 lines of the "Lua.workspace.library" in settings.json

settings.json:
{
  "Lua.runtime.version": "Lua 5.1",
/*  "Lua.workspace.library": [
    "./mq/def",
    "./imgui/def"
  ],    */
}

Should the path point to a folder like "MQNext\Lua\mq\def" like ""./mq/def""? I found a folder "mq" within the folder "Lua", but there is no folder "def" within the folder "mq".
Similar for imgui.

What am I missing?
 
seems I didn't unsterstand the Instructions:
View attachment 42024

In order to be as close to the author as possible, I copied the content of the zip into the folder "MQNext\Lua\mq-defintions"
As soon as I add the Line"---@type Mq"
I get the Error Message as shown below

View attachment 42023

I presume, my problem is, that I don't understand what to look for, in order to be able to set the 2 lines of the "Lua.workspace.library" in settings.json

settings.json:
{
  "Lua.runtime.version": "Lua 5.1",
/*  "Lua.workspace.library": [
    "./mq/def",
    "./imgui/def"
  ],    */
}

Should the path point to a folder like "MQNext\Lua\mq\def" like ""./mq/def""? I found a folder "mq" within the folder "Lua", but there is no folder "def" within the folder "mq".
Similar for imgui.

What am I missing?
I'm stuck in the same boat. I assume the /def part is the folder name in your Lua folder and mine is C:\MQNext\Lua\mq-definitions. But no idea where the imgui is or should be located. Is this the imgui.Lua file or a folder? Hope to get this working myself.
 
I'm stuck in the same boat. I assume the /def part is the folder name in your Lua folder and mine is C:\MQNext\Lua\mq-definitions. But no idea where the imgui is or should be located. Is this the imgui.Lua file or a folder? Hope to get this working myself.
coldblooded has 2 git repos, mq-definitions and mq-imgui-definitions
Both just go into your Lua folder. All you need to do to use them after that and the settings updates, is have the ---@type Mq and ---@type ImGui
 
@Cannonballdex: did you enter the full absolute path?
I tried ". /. /mq-definitions" which should be the relativ path to the folder, but that seemed to not do the trick.
I have my structure like so, using windows, you might get the idea of how to set up the settings.json
C:\MQNext\Lua\mq-definitions
C:\MQNext\Lua\mq-imgui-definitions

My settings for vscode ended up C:\Users\MyComp\AppData\Roaming\Code\User\settings.json
INI:
{
    "Lua.runtime.version": "Lua 5.1",
    "Lua.workspace.library": [
        "C:\\MQNext\\lua\\mq-definitions",
        "C:\\MQNext\\lua\\mq-imgui-definitions"
    ]
}
 
Lua - MQ VS Code Lua Autocomplete Definition Library

Users who are viewing this thread

Back
Top