LuaLS / LuaLS/lua-language-server

[Feature Request]: Way to add custom diagnostics in plugin.lua

Open
#2,009 0 comments 4 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

It would be useful to be able to add custom diagnostics that can be propagated from plugin.lua in a custom plugin.

For a plugin my team is developing, we need a way to check that values the user is setting a variable to fall within a certain range (among other possible diagnostics). I can understand why this wouldn't be desirable to add to the core diagnostics.

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 reading plugin.lua and tracing how plugin-provided information could be propagated into the language server's diagnostics. Confirm the expected behavior for range checks and define tests showing that custom diagnostics from a plugin reach users.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua
Domain
devtools
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.