Skip to content

Commit

Permalink
Merge pull request #372 from puppetlabs/cat-1669-add_trailing_comma
Browse files Browse the repository at this point in the history
(CAT-1669) - Add trailing comma to completion item
  • Loading branch information
LukasAud authored Apr 15, 2024
2 parents ad6f043 + 25660f1 commit 5295a0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/puppet-languageserver/manifest/completion_provider.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def self.resolve(session_state, completion_item)
unless param_type.nil?
# TODO: More things?
result.documentation = param_type[:doc] unless param_type[:doc].nil?
result.insertText = "#{data['param']} => "
result.insertText = "#{data['param']} => ,"
end
when 'resource_property'
item_type = PuppetLanguageServer::PuppetHelper.get_type(session_state, data['resource_type'])
Expand All @@ -301,7 +301,7 @@ def self.resolve(session_state, completion_item)
unless prop_type.nil?
# TODO: More things?
result.documentation = prop_type[:doc] unless prop_type[:doc].nil?
result.insertText = "#{data['prop']} => "
result.insertText = "#{data['prop']} => ,"
end

when 'resource_class'
Expand All @@ -320,7 +320,7 @@ def self.resolve(session_state, completion_item)
doc += param_type[:type] unless param_type[:type].nil?
doc += "---\n#{param_type[:doc]}" unless param_type[:doc].nil?
result.documentation = doc
result.insertText = "#{data['param']} => "
result.insertText = "#{data['param']} => ,"
end
end

Expand Down

0 comments on commit 5295a0f

Please sign in to comment.