diff --git a/lib/ruby_lsp/server.rb b/lib/ruby_lsp/server.rb index 0e46f6671..ff3cd16bc 100644 --- a/lib/ruby_lsp/server.rb +++ b/lib/ruby_lsp/server.rb @@ -321,13 +321,17 @@ def text_document_did_open(message) ) if document.past_expensive_limit? + log_message = <<~MESSAGE + The file #{text_document[:uri].path} is too long. For performance reasons, semantic highlighting and + diagnostics will be disabled. + MESSAGE + send_message( Notification.new( - method: "window/showMessage", - params: Interface::ShowMessageParams.new( + method: "window/logMessage", + params: Interface::LogMessageParams.new( type: Constant::MessageType::WARNING, - message: "This file is too long. For performance reasons, semantic highlighting and " \ - "diagnostics will be disabled", + message: log_message, ), ), )