Skip to content

lua-enet, luasocket, and utf8 support #9

@chipsenkbeil

Description

@chipsenkbeil

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:

  1. lua-enet
  2. luasocket
  3. utf8

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"
    ]
  },
}

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