LuaLS / LuaLS/lua-language-server

[Feature Request] Diagnostic for using wrong require separator

Open
#2,860 0 comments 2 reactions 0 assignees View on GitHub

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

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.