Class: RubyLsp::Requests::Support::SyntaxErrorDiagnostic
- Inherits:
-
Object
- Object
- RubyLsp::Requests::Support::SyntaxErrorDiagnostic
- Extended by:
- T::Sig
- Defined in:
- lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb
Instance Method Summary collapse
- #correctable? ⇒ Boolean
-
#initialize(edit) ⇒ SyntaxErrorDiagnostic
constructor
A new instance of SyntaxErrorDiagnostic.
- #to_lsp_diagnostic ⇒ Object
Constructor Details
#initialize(edit) ⇒ SyntaxErrorDiagnostic
Returns a new instance of SyntaxErrorDiagnostic.
11 12 13 |
# File 'lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb', line 11 def initialize(edit) @edit = edit end |
Instance Method Details
#correctable? ⇒ Boolean
16 17 18 |
# File 'lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb', line 16 def correctable? false end |
#to_lsp_diagnostic ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/ruby_lsp/requests/support/syntax_error_diagnostic.rb', line 21 def to_lsp_diagnostic LanguageServer::Protocol::Interface::Diagnostic.new( message: "Syntax error", source: "SyntaxTree", severity: LanguageServer::Protocol::Constant::DiagnosticSeverity::ERROR, range: @edit[:range], ) end |