Wiki rework #1362
Replies: 18 comments 36 replies
-
Some diagnostics I have never seen and not been able to trigger but would like to in order to write descriptions for them:
Some sample code that would trigger each one and/or a description would be great! EDIT: All diagnostics have been documented 🎉. Just the syntax errors now but those are of lower priority. |
Beta Was this translation helpful? Give feedback.
-
for i = 10, 1 do end
local a ---@type something
print("somefakeworks")
print(blah)
---@param aa string
---@param aa string
local function test(aa, bb) end
---@class Read: fake
local function test2()
if true then
return
else
return
end
print "test"
end
test2()
---@diagnostic disable: notacode |
Beta Was this translation helpful? Give feedback.
-
spell-check and codestyle-check are "none" by default "Lua.diagnostics.neededFileStatus": {
"spell-check": "Opened!",
"codestyle-check": "Opened!",
}, Edit: They also might be set to "hint" by default too I can't remember that will only show up as three tiny dots and not show up in problems view |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
local a = coroutine.create(function()
coroutine.yield()
end) |
Beta Was this translation helpful? Give feedback.
-
local A
---@type iolib
_ENV = {}
print(A) |
Beta Was this translation helpful? Give feedback.
-
local d = {
done
("this")
} They are getting harder to come by! |
Beta Was this translation helpful? Give feedback.
-
This really has me wondering, why is there 3 different ways to disable diagnostics? There is I think going with just |
Beta Was this translation helpful? Give feedback.
-
But I agree on the other two, I think |
Beta Was this translation helpful? Give feedback.
-
The rest are syntax errors rather than diagnostics. |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
For ---@type integer
local x
---@cast x +? and ---@type integer
local x
---@cast x +nil Do they not both imply that |
Beta Was this translation helpful? Give feedback.
-
Currently documenting ---@class Array<T>: { [integer]: T }
---@type Array<string>
local arr = {}
-- correctly warns that I am assigning a boolean to a string
arr[1] = false
-- no warning despite indexing with a string instead of an integer
arr["foo"] = "bar"
-- correctly does not warn as I am following the type correctly
arr[3] = "Correct" Behaves even weirder for a dictionary: ---@class Dictionary<T>: { [string]: T }
---@type Dictionary<boolean>
local dict = {}
-- no warning despite indexing with a number
dict[1] = "incorrect"
-- no warning despite assigning a string
dict["foo"] = "bar?"
-- correctly does not warn as I am following the type correctly
dict["correct"] = true |
Beta Was this translation helpful? Give feedback.
-
I am nearing the end of the rework of the wiki and there are a few things that I would like to discuss, @sumneko. I have seen many commits to the wiki where a file is created with no content by mistake (I assume while following dead links). This is cluttering the commit history and serves as a concerning reminder that someone malicious could temporarily delete parts of the wiki. Can we change the permissions of the wiki so that not everyone has access to change it? I spent a lot of time trying to cover everything so there should not be a need for large changes from the community anymore. According to GitHub's docs the wiki can restrict write access to "collaborators" only. So to commit my changes, I would need to be made a "collaborator". This would require a serious amount of trust due to the permissions that grants so if you are not comfortable with that, I understand. However, if I were made a collaborator, I would also be able to take on a larger role regarding documentation. I have not yet dived into adding to the language server code-wise but I am definitely able to help with improving/correcting documentation/translations. I would be able to help add documentation in the future and handle any issues concerning documentation, if that interests you. Alternatively, you could create a repo dedicated to the wiki where trusted people could be added as collaborators with no worries of someone messing with the language server itself. Issues regarding documentation would then have to be split between the two repos though. Due to the wiki being a git repository that doesn't really have any of GitHub's features, you or another collaborator on this repo would then have to manually commit changes from the other repository. |
Beta Was this translation helpful? Give feedback.
-
My rework of the wiki is complete! How are we thinking I go about submitting these changes? Would you like to see the changes first or are you okay with me committing them all at once to the wiki? Are we going to include the wiki in the source code? A separate repository/branch? 😵💫 There are a lot of changes so most links to the wiki will probably be broken. I can help track them down and let you know what needs changing there too. |
Beta Was this translation helpful? Give feedback.
-
Hello 👋
I am currently reworking the wiki to be neater and more detailed. I am starting this thread because I have some questions about the language server that I'll need some help finding answers for.
For my first (of many, I'm sure 😆) questions:
What effect does
completion.showParams
have? I have tried toggling it and completing functions and params and I don't see any effect.Beta Was this translation helpful? Give feedback.
All reactions