LuaLS / LuaLS/lua-language-server

Ignoring dir doesn't work when checking diagnostics

Open
#2,548 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

How are you using the lua-language-server?

NeoVim

Which OS are you using?

MacOS

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

When I set workspace.ignoreDir in .luarc.json it should exclude these folders from check when calling:

lua-language-server --check="some/path" --configpath="some/path/.luarc.json"
Actual Behaviour

The tool still prints errors in 3rd party dir.

Reproduction steps
  1. Create .luarc.json and put:
{
  "workspace.library": ["${3rd}/luassert/library"],
  "workspace.ignoreDir": ["${3rd}/luassert/library"],
  "diagnostics.globals": ["vim", "require", "describe", "it", "P"],
  "diagnostics.disable": ["different-requires"]
}
  1. Run:
lua-language-server --check="${DIR_SRC}" --configpath="${PWD}/.luarc.json" --checklevel=Information --logpath="${DIR_OUT}" --loglevel=error
Additional Notes

No response

Log File

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the supplied .luarc.json and the lua-language-server --check command, then trace how workspace.ignoreDir is applied during diagnostics checking. Done means files under the configured ignored directory produce no diagnostics while checking the requested path.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.