Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: Toggle diagnostics inside of files #184

Open
OXY2DEV opened this issue Sep 25, 2024 · 0 comments
Open

Feat: Toggle diagnostics inside of files #184

OXY2DEV opened this issue Sep 25, 2024 · 0 comments

Comments

@OXY2DEV
Copy link

OXY2DEV commented Sep 25, 2024

Some LSP provide a way to disable their diagnostics. For example,

---@diagnostics disable

I think this would be a good feature to add to harper_ls as some files can easily create 1000s of warnings otherwise.

Proposed solution

Provide a way to disable the diagnostics on specific lines.

<!-- @harper disable -->
a line that doesn't start with a capital letter
<!-- @harper enable -->

Or something like

---@harper disable-next-line
---@param buf integer?
local function do_stuf (buf)
  -- Do something here
end

It might be a good idea to disable specific rules too.

// Ignores only capitalization warnings
// @harper disable capital

// Ignores spelling mistakes
// @harper disable spell

// Ignores too many spaces warning
// @harper disable whitespace

// Ignore warnings on lines that are too long
// @harper disable length
@elijah-potter elijah-potter pinned this issue Sep 26, 2024
@grantlemons grantlemons unpinned this issue Oct 3, 2024
@grantlemons grantlemons pinned this issue Oct 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant