-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Hi there! I was looking into setting up the Lua language server to work with love2d for definitions, and was trying to figure out what the process is to include definitions for some of the other libraries and implementations bundled by love.
Specifically, my understanding is that alongside the global love
instance, there are three libraries that can be required:
I've been able to set up a .luarc.json
for neovim that works with love, but haven't been able to figure out a setup for the three above.
.luarc.json
I created a .addons
directory at the root of my project and within it I created a git submodule for LuaCATS/love2d and LuaCATS/luasocket. This works for the global love
, but not the luasocket
import as local socket = require("socket")
and there aren't equivalents that I'm aware of for enet and utf8 implementations within love.
{
"$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
"runtime": {
"version": "LuaJIT"
},
"workspace": {
"library": [
".addons/love2d",
".addons/luasocket",
],
"userThirdParty": [
".addons"
]
},
}