-
-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display parameters one of multiple functions when hover #352
Comments
it seems to me the solution you suggested would work very well for displaying such a function: ---Unsubscribes from one or several topics.
---@param tbl table array of `topic, anything` pairs to unsubscribe from
---@overload fun(tbl: table, foo: function): boolean
---@param topic string a topic string
---@param foo? function|' function(client) end' optional callback fired when unsubscription(s) succeeded.
---@return boolean
function m:unsubscribe(topic, foo) end
-- instead of defining two functions=>
---Unsubscribes from one or several topics.
---@param topic string a topic string
---@param foo? function|' function(client) end' optional callback fired when unsubscription(s) succeeded.
---@return boolean
function MQTT:unsubscribe(topic, foo) end
---Unsubscribes from one or several topics.
---@param tbl table array of `topic, anything` pairs to unsubscribe from
---@param foo? function|' function(client) end' optional callback fired when unsubscription(s) succeeded.
---@return boolean
function MQTT:unsubscribe(tbl, foo) end
because only the type of one parameter changes. However, the three node.random functions (param1, param2 | no_param) could be shown separately (not @overload). |
Now, on hover, the description of another function is shown and vice versa. sdmmc = {}
---@class sdmmc
local card = {}
---@class SDmmcCfg
---@field cd_pin integer
---@field wp_pin integer
---@field fmax integer
---@field width integer
---SDMMC Mode. Initialize the SDMMC and probe the attached SD card.
---@param slot integer|'sdmmc.HS1'|'sdmmc.HS2' SDMMC slot
---@param cfg? SDmmcCfg optional table containing slot configuration:
-- - **cd_pin** card detect pin, none if omitted
-- - **wp_pin** write-protcet pin, none if omitted
-- - **fmax** maximum communication frequency, defaults to 20 if omitted
-- - **width** bis width, defaults to sdmmc.W1BIT if omitted, one of:
-- - sdmmc.W1BIT
-- - sdmmc.W4BIT
-- - sdmmc.W8BIT, not supported yet
---@return sdmmc cardObj Card object. Error is thrown for invalid parameters or if SDMMC hardware or card cannot be initialized.
function sdmmc.init(slot, cfg) end
---@class SDspiCfg
---@field sck_pin integer
---@field mosi_pin integer
---@field miso_pin integer
---@field cs_pin integer
---@field cd_pin integer
---@field wp_pin integer
---@field fmax integer
---SD SPI Mode. Initialize the SDMMC and probe the attached SD card.
---@param slot integer|'sdmmc.HSPI'|'sdmmc.VSPI' SD SPI slot
---@param cfg SDspiCfg mandatory table containing slot configuration:
-- - **sck_pin** SPI SCK pin, mandatory
-- - **mosi_pin**, SPI MOSI pin, mandatory
-- - **miso_pin**, SPI MISO pin, mandatory
-- - **cs_pin**, SPI CS pin, mandatory
-- - **cd_pin** card detect pin, none if omitted
-- - **wp_pin** write-protcet pin, none if omitted
-- - **fmax** maximum communication frequency, defaults to 20 if omitted
---@return sdmmc cardObj Card object. Error is thrown for invalid parameters or if SDMMC hardware or card cannot be initialized.
function sdmmc.init(slot, cfg) end |
Thank you for reporting, please open a new issue, so that I can record and fix the bug separately. |
Describe the bug
I have three function definitions:
In input mode, it is suggested to choose one function of three, as expected.
But when hover, shows only last defined function.
I tryed alternative method using @overload, but it doesn't works also.
Is it possible to display parameters of multiple functions when hover?
Environment :
The text was updated successfully, but these errors were encountered: