Skip to content

No types for love.update, love.draw #10

@musjj

Description

@musjj

I've installed this plugin via the VS Code plugin manager:

.vscode/settings.json

{
  "Lua.workspace.library": ["${addons}/love2d/module/library"],
  "Lua.runtime.version": "LuaJIT",
  "Lua.runtime.special": {
    "love.filesystem.load": "loadfile"
  },
  "Lua.workspace.checkThirdParty": false
}

And I'm still not getting any completions for the top-level functions (e.g. love.update(dt)):

Image

But I can see completions for other functions:

Image

I also can see that it's included in the types:

love2d/library/love.lua

Lines 319 to 322 in 765abaf

---
---Callback function used to update the state of the game every frame.
---
---@alias love.update fun(dt: number)

But for some reason VS Code isn't picking them up.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions