LuaLS / LuaLS/lua-language-server
[Feature Request] Diagnostic for using wrong require separator
Open
Nobody has claimed this yet.
- Dominant language
- Lua
- Stars
- 4.4k
- Forks
- 442
- PR merge metrics
- No merged PRs in 30d
Description
The setting completion.requireSeparator allows the user to define a certain character to use as the separator when require-ing a file. It would be nice to have a diagnostic that warns the user if he violates this setting.
Example
"Lua.completion.requireSeparator": {
"default": "/"
}
local strings = require("helpers.strings")
^^^ --Warning: Wrong separator
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 locating the implementation of the completion.requireSeparator setting and the language server's existing diagnostic handling. Reproduce the example with / configured and a require call using ., then define done as reporting the incorrect separator without warning when the configured separator is used.
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
- 45/100