LuaLS / LuaLS/vscode-lua

Specific files.exclude breaks file scanning workspace.library

Open
#160 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
215
Forks
62
PR merge metrics
No merged PRs in 30d

Description

### Which OS are you using?

Windows

### Expected Behaviour

When I specify the complicated mask of editor's `files.exclude` ugh... because there is no other way https://github.com/microsoft/vscode/issues/869
```jsonc
"files.exclude": {
"**/?*.[!l]*": true,
"**/?*.l[!u]*": true,
"**/?*.lu[!a]*": true,
"**/?*.lua?*": true
},
```
I expect to exclude all files from the VS Code project except `.lua`, so this should not affect the plugin in any way.

### Actual Behaviour

I see that LuaLS file scanning is starting to work incorrectly, it may selectively skip my libraries from `Lua.workspace.library` list.

### Reproduction steps

1. Setup Multi-root Workspaces project https://code.visualstudio.com/docs/editor/multi-root-workspaces
for example our file located in `proj/data/game/.vscode`
```jsonc
// relative to proj/data/game/.vscode
"folders": [
{
"path": ".." // proj/data/game
},
{
"path": "../../scripts" // proj/data/scripts
},
{
"name": "system_data/game",
"path": "../../../system_data/game" // proj/system_data/game
},
{
"name": "system_data/scripts",
"path": "../../../system_data/scripts" // proj/system_data/scripts
}
],
```
2. Setup `Lua.workspace.library` for correct Multi-root Workspaces file scanning
```jsonc
"Lua.workspace.library": [
"../../data/game",
"../../data/scripts",
"../../system_data/game",
"../../system_data/scripts",
".vscode/library" // some meta definitions in `proj/data/game/.vscode`
],
```
3. Everything works fine. Then setup editor's files mask
```jsonc
"files.exclude": {
"**/?*.[!l]*": true,
"**/?*.l[!u]*": true,
"**/?*.lu[!a]*": true,
"**/?*.lua?*": true
},
```
4. Now some annotations are missing or the files just haven't been loaded.

### Additional Notes

_No response_

### Log

_No response_

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the Windows multi-root workspace scenario using the shown files.exclude and Lua.workspace.library settings. Start by tracing the VS Code extension's workspace file-scanning path and compare results with and without files.exclude. Done means all configured library paths are scanned consistently and the missing annotations or unloaded files no longer occur.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, typescript, vscode
Domain
tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.