Skip to content

Allow clearing diagnostics from addons #3736

@Earlopain

Description

@Earlopain

I have checked that this feature is not already implemented

  • This feature does not exist

Use case

Formatter addons should be able to clear diagnostics

Description

Trying to get the rubocop addon up to the same level as the original addon. One thing I'm stuck with is that when .rubocop.yml changes, diagnostics are cleared:

# Clear all document caches for pull diagnostics
@store.each { |_uri, document| document.clear_cache("textDocument/diagnostic") }
# Request a pull diagnostic refresh from the editor
if @global_state.client_capabilities.supports_diagnostic_refresh
send_message(Request.new(id: @current_request_id, method: "workspace/diagnostic/refresh", params: nil))
end

But I don't think I have access to the store in an addon. How could I make that functionality accessible in an addon?

Implementation

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions