Skip to content
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

Lua Language Server Notation #15

Open
YvanCywan opened this issue Jul 25, 2023 · 2 comments
Open

Lua Language Server Notation #15

YvanCywan opened this issue Jul 25, 2023 · 2 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@YvanCywan
Copy link
Member

YvanCywan commented Jul 25, 2023

Lua Language Server Notation should very much be utilised in CoreScripts.

https://github.com/LuaLS/lua-language-server/wiki/Annotations

This provides automatic support for intellisense on VSCode (I'm pretty sure some other IDEs/editors that support Lua Language Server) and can be used to to provide additional context for reading files.

Example:

---@param seconds number
---@return boolean isWithinTime
local function isOnTime(seconds)
    return seconds < 5
end
@YvanCywan
Copy link
Member Author

Hi all,

I've added everyone to this one because I think it'll be a good idea if we all go through core scripts and take like a few files and annotate them properly. I know it's a bit boring, but this works with intellisense, and this would drastically reduce the barrier of entry for new developers. Along with improving debug-ability of the code as we have clearly documented types.

@magicaldave
Copy link
Member

magicaldave commented Oct 10, 2023

When creation annotations, please name your branch doc/annotations-FILENAME and request a pull into doc/annotations. When we've finished, we'll merge the whole bitch into master.

Tracking for completion and assignments per-file. Check them off and please leave a comment if you self-assign one.

scripts/:

scripts/cell:

  • base.lua
  • json.lua
  • sql.lua

scripts/player:

  • base.lua
  • json.lua
  • sql.lua

scripts/menu:

  • advancedExample.lua
  • defaultCrafting.lua
  • help.lua

scripts/recordstore:

  • base.lua
  • json.lua
  • sql.lua

scripts/world:

  • base.lua
  • json.lua
  • sql.lua

lib/lua:

  • classy.lua
  • dkjson.lua
  • fileHelper.lua
  • irc.lua
  • jsonInterface.lua
  • lanes.lua
  • ltn12-lanes.lua
  • ltn12.lua
  • mime-lanes.lua
  • patterns.lua
  • socket-lanes.lua
  • tableHelper.lua
  • time.lua
  • utils.lua

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

5 participants