LuaLS / LuaLS/lua-language-server

FR: Option that "Ignore this line" Code Actions adds to this line instead of the one above

Open
#1,726 1 comment 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Lua
Stars
4.4k
Forks
442
PR merge metrics
No merged PRs in 30d

Description

Right now, when using the "Ignore this line" code action, it adds this line above the respective line:

---@diagnostic disable-next-line: rulename
problemline

However, I often prefer this type of line ignoring

problemline ---@diagnostic disable-line: rulename

while it works and is correctly recognized by the lsp, there is no code action and/or no option to add such a comment, I have to change this manually.


The eslint-lsp, for example, has an option for the ignore-line-code-action which accepts sameLine or separateLine.

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 language server implementation of the “Ignore this line” code action and how its settings are defined. Compare the existing disable-next-line behavior with the requested same-line disable-line form; done means users can choose the placement through an option and the generated Lua comment is recognized correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 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.