class RuboCop::LSP::Diagnostic
def to_lsp_diagnostic(config)
def to_lsp_diagnostic(config) highlighted = @offense.highlighted_area LanguageServer::Protocol::Interface::Diagnostic.new( message: message, source: 'RuboCop', code: @offense.cop_name, code_description: code_description(config), severity: severity, range: LanguageServer::Protocol::Interface::Range.new( start: LanguageServer::Protocol::Interface::Position.new( line: @offense.line - 1, character: highlighted.begin_pos ), end: LanguageServer::Protocol::Interface::Position.new( line: @offense.line - 1, character: highlighted.end_pos ) ), data: { correctable: correctable?, code_actions: to_lsp_code_actions } ) end