greybel-vs icon indicating copy to clipboard operation
greybel-vs copied to clipboard

Improve hover docs for maps

Open ayecue opened this issue 11 months ago • 1 comments

It would be good if the hover docs could be extended so that when hovering over maps their content is shown.

import_code("./Strings.src") // provides(lib): Strings
import_code("../Settings.src") // provides(lib): Settings

Mail = {}
Mail.client = mail_login(user_mail_address,Settings.Passwords.Mail)
//mail functions:

// @description checks if the mission is complete returns true/false
// @param {string} missionThread the email thread, seperated by three char(10)
// @return {number} true if the mission is complete, false if not
Mail.MissionComplete=function(missionThread)
...
end function

// @description gets a list of all missions that are not complete
// @return {string[]} an array of all mission ids that are not complete
Mail.Missions = function()
...
end function

// @description gets the content of an email
// @param {string} id the id of the email
// @param {number} index the index of the message in the email thread
// @return {string} the content of the email
Mail.GetContent = function(id,index)
...
end function

To improve the hover docs even more something similar to "luaCATS" could be implemented. Here an example:

--- @class (exact) Project
--- @field sha string
--- @field path string
--- @field description string The projects description, unused, but may be seen by the user at some point
--- @field name string The ID of the project, should be unique, simple ID searching returns the first match found
--- @field files FileMapping[] list of strings representing the needed remote files and where they go locally
--- @field installer string? optional, a lua script that will be ran to install/uninstall the program. mode set by arg1 being "install" or "remove". script is ran last on install and first on uninstall

    ---@type Project
    local project = nil

ayecue avatar Mar 21 '24 08:03 ayecue