LuaLS / LuaLS/lua-language-server
Unable to ignore applying only one library
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?
Visual Studio Code Extension (sumneko.lua)
### Which OS are you using?
Windows
### What is the issue affecting?
Libraries
### Expected Behaviour
When multiple libraries are detected, the user should be able to tell the server to stop asking to apply a *specific* library, and continue receiving suggestions for other libraries.
### Actual Behaviour
Once the user selects “Don't show again”, [`workspace.checkThirdParty`](https://github.com/sumneko/lua-language-server/wiki/Settings#workspacecheckthirdparty) is set to `false`, preventing any suggestions from appearing.
### Reproduction steps
1. Enter the following in a file to trigger library detection:
```lua
local assert = require("luassert")
resty.a
love.a
```
2. When the “Apply library” popup appears, press “Don't show again”
3. Try to automatically apply one of the other libraries automatically.
### Additional Notes
A [similar issue](https://github.com/sumneko/lua-language-server/issues/1558) was resolved in `v3.6.0` which allowed the server to continue recommending libraries when one was **applied**, but this issue is about when a user **does not** apply the suggested library.
Maybe it would make sense to create a new setting called `workspace.libraryIgnore` that is an array of ignored libraries. Then `workspace.checkThirdParty` can remain for backwards compatibility and so **all** suggestions can be disabled.
### 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 tracing the workspace.checkThirdParty setting and the “Don't show again” path described in the issue. Reproduce the luassert, resty, and love example on Windows, then verify that declining one library suppresses only that library while other library suggestions remain available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua
- Domain
- devtools
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100