LuaLS / LuaLS/lua-language-server
`workspace.library` does not honor `workspace.ignoreDir`
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?
Other
Expected Behaviour
I think it would make sense to also honor the workspace.ignoreDir setting when including libraries via workspace.library.
My use case is probably rather niche but it pretty much breaks the indexing:
I have a local library that I want to include via workspace.library, at the root of the library is a directory .direnv which includes symlinks to nix derivations (which intern include more than 100000 lua files)
So I would expect a configuration like
"workspace": {
"ignoreDir": [".direnv"],
"library": "path-to-lib"
}
to not index files inside <path-to-lib>/.direnv
Actual Behaviour
Every file inside the library path is indexed
Reproduction steps
Follow example from above
Additional Notes
No response
Log File
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the reported workspace.library path and workspace.ignoreDir setting in NeoVim on macOS. Trace how library paths are indexed and verify that files under /.direnv are excluded while other library files remain indexed; completion is demonstrated by the reproduction no longer indexing those files.
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