Skip to content

Commit

Permalink
Add better description for suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
ChallaHalla committed Nov 15, 2024
1 parent affd32e commit 2498021
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions lib/ruby_lsp/ruby_lsp_rails/completion.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ def handle_active_record_where_completions(node)
@response_builder << Interface::CompletionItem.new(
label: column[0],
filter_text: column[0],
label_details: column[0],
text_edit: Interface::TextEdit.new(range: 0, new_text: column[0]),
kind: Constant::CompletionItemKind::METHOD,
label_details: Interface::CompletionItemLabelDetails.new(
description: "Filter #{@node_context.call_node.receiver.name} records by #{column[0]}",
),
text_edit: Interface::TextEdit.new(range: 0, new_text: "#{column[0]}:"),
kind: Constant::CompletionItemKind::FIELD,
)
end
end
Expand Down

0 comments on commit 2498021

Please sign in to comment.