puppetlabs / puppet-editor-services

Puppet Language Server for editors
Apache License 2.0
46 stars 21 forks source link

Auto alignment doesn't work right on multi-resource declarations #201

Closed genebean closed 4 years ago

genebean commented 4 years ago

What Versions are you running?

OS Version: macOS 10.14.6 VSCode Version: 1.40.1 Puppet Extension Version: 0.21.0 PDK Version: 1.14.1

What You Are Seeing?

When editing a multi-resource declaration the feature that does automatic hashrocket alignment tries to align the hashrockets for every resource instead of just the current block.

What is Expected?

Each block within a multi-resource declaration should be aligned independently

How Did You Get This To Happen? (Steps to Reproduce)

The editor automatically pulls the hashrockets in the third block of this to the right one column too far so that they line up with the two blocks above.

class profile::foo {
  file {
    default:
      owner   => 'root',
      group   => 'docker',
      require => Group['docker'],
    ;
    '/docker-compose-files/foo-compose/.env':
      ensure  => file,
      content => "QUERY=${facts['networking']['fqdn']}",
      mode    => '0660',
    ;
    '/docker-compose-files/foo-compose/backup':
      ensure => directory,
      mode   => '0770',
    ;
  }
}
glennsarti commented 4 years ago

Transferred as this is in editor services

glennsarti commented 4 years ago

@genebean Fix is up