Skip to content

workspace.library works for the addon, but workspace.userThirdParty does not #3046

@evmorov

Description

@evmorov

This is more of a question than a bug report because I might be doing something wrong.

Here's my simple code using the lpeg Lua library I installed using luarocks:

local lpeg = require("lpeg")

p = lpeg.R("az") ^ 1 * -1
print(p:match("hello"))
print(lpeg.match(p))

It works (an intentional error is included to test the LSP Addon).

I downloaded the lpeg addon from here: https://github.com/LuaCATS/lpeg.

evgenii.morozov:~/projects/lls-addons $ tree
.
└── lpeg
    ├── LICENSE
    ├── README.md
    ├── config.json
    └── library
        └── lpeg.lua

I added the following .luarc.json to the root of my project:

{
  "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
  "workspace.library": [
    "~/projects/lls-addons/lpeg/library"
  ]
}

This setup works. However, if I change it to:

{
  "$schema": "https://raw.githubusercontent.com/LuaLS/vscode-lua/master/setting/schema.json",
  "workspace.checkThirdParty": "Apply",
  "workspace.userThirdParty": [
    "~/projects/lls-addons"
  ]
}

It doesn't work. According to https://luals.github.io/wiki/addons/#automatically-enabling, it seems it should be automatically enabled because the addon includes config.json.

Am I missing something?

My env:

  • MacOS
  • Using both VSCode and Intellij IDEA
  • Lua 5.4.7

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