-
-
Notifications
You must be signed in to change notification settings - Fork 386
Closed
Labels
as designedFunctioning as intended, will not be modifiedFunctioning as intended, will not be modifiedquestionUser has a questionUser has a question
Description
let's say I have a function with two optional parameters
---@param foo? string
---@param bar string?
local function func(foo, bar) endfoo parameter has its ? after its name and bar after its type.
When I hover my mouse over the function name, the ? sign appears after names of the parameters

But when I hover it over a parameter name, this sign appears after type of the parameters

It doesn't matter where I put this sign in ---@param annotation: after name or after type.
Same with classes
---@class Cls
---@field foo string?
---@field bar? string
local cls = {}
cls.foo = nil
cls.bar = nilIs this inconsistency by design? Does it mean something? If not, I'd prefer always seeing it at the same place. May be always after a type.
This issue is pretty minor but I still wanted to report about it. Screenshots are from VS Code.
Metadata
Metadata
Assignees
Labels
as designedFunctioning as intended, will not be modifiedFunctioning as intended, will not be modifiedquestionUser has a questionUser has a question


