https://github.com/frostice482/balatro-lsp
if you're doing mod development and wanting to autocomplete vanilla features, then you might want to get yourself a language server & language server packs.
this project tries to bring more documentation for the balatro's api, giving autocompletes, highlighting potential mistakes, and reducing the undefined global G warnings.
installation
- install lua language server (see https://luals.github.io/#vscode-install for guide)
- install love2d's language pack through addons manager (see https://luals.github.io/wiki/addons/#enabling-addons for guide)
- grab a local copy of the lsp from the repo
- if you have git, simply run
git clone https://github.com/frostice482/balatro-lsp.
otherwise, grab a local copy (https://github.com/frostice482/balatro-lsp/archive/refs/heads/master.zip, extract it) - the easiest way to adding it is by putting it somewhere in your workspace.
- If you
.gitignorethe folder, you'll need to include the folder inworkspace.libraryconfiguration,
e.g.{ "Lua.workspace.library": ["balatro-lsp"] }for VSCode
- If you
- if you decided to put it outside of your workspace, include the lsp's folder in
workspace.libraryconfiguration (Lua.workspace.libraryon VSCode's.vscode/settings.json).
- if you have git, simply run
SMODS
if you have SMODS' lsp_def included, some vanilla definitions from SMODS may conflict (see vanilla.lua). you can remove it from your workspace.