LuaLS / LuaLS/lua-language-server

"Lua.workspace.ignoreDir" does not work with folders that contain square brackets

Open
#2,152 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
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?

Visual Studio Code Extension (sumneko.lua)

Which OS are you using?

Windows

What is the issue affecting?

Diagnostics/Syntax Checking

Expected Behaviour

Folders that contain [ ] square brackets can be ignored using Lua.workspace.ignoreDir.

Actual Behaviour

Folders that contain square brackets are not ignored.

Reproduction steps
  1. In a workspace, create a folder [example] with a file that contains syntax errors.

  2. Add that folder to your ignored directories:

"Lua.workspace.ignoreDir": [
    "[example]"
]
  1. Observe that the file is not ignored, and still appears in Problems as well as highlighted in the explorer.
Additional Notes

This is on Windows specifically, I don't have a *nix environment handy to test on.

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

Start by reproducing the issue on Windows with the Visual Studio Code Extension and the Lua.workspace.ignoreDir setting, using a folder named [example] containing syntax errors. Trace how ignored directories are matched, then verify that the folder is excluded from Problems and explorer highlighting while ordinary ignored folders continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
tooling
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.