Skip to content

Document how to let the lua LSP find local libraries, such as plenary #6

@Murderlon

Description

@Murderlon

This template is great, it saved a lot of time.

There is just one thing I don't understand, which is how to make lua_ls (language server for lua) understand where to find the code for plenary. By default plenary is put into /tmp.

I tried to create a .luarc.json to find it but I failed:

{
  "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
  "diagnostics.globals": ["describe", "it"],
  "workspace.library": ["?.lua", "?/init.lua", "/tmp/plenary.nvim/lua/plenary/?.lua"]
}

Since the docs of plenary are so limited and the LSP doesn't know anything about the available methods and imports of plenary, it's quite hard to develop locally.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions