Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"format.splitAttributes:true" adds excessive indentation #188

Closed
fbricon opened this issue Nov 2, 2018 · 0 comments
Closed

"format.splitAttributes:true" adds excessive indentation #188

fbricon opened this issue Nov 2, 2018 · 0 comments
Assignees
Labels
bug Something isn't working completion This issue or enhancement is related to completion support formatting This issue or enhancement is related to formatting support to do
Milestone

Comments

@fbricon
Copy link
Contributor

fbricon commented Nov 2, 2018

Having "format.splitAttributes:true", given:

<?xml version="1.0" encoding="UTF-8"?>
<beans
        xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:camel="http://camel.apache.org/schema/spring"
        xmlns:util="http://www.springframework.org/schema/util"
        xsi:schemaLocation="http://www.springframework.org/schema/beans 
          http://www.springframework.org/schema/beans/spring-beans-4.2.xsd  
          http://camel.apache.org/schema/spring 
          http://camel.apache.org/schema/spring/camel-spring.xsd
          http://www.springframework.org/schema/util 
          http://www.springframework.org/schema/util/spring-util-4.2.xsd">
    <camelContext xmlns="http://camel.apache.org/schema/spring">
        <!-- Add routes here -->
        <route>
            <proces|// complete here
        </route>
    </camelContext>
</beans>

results in weirdly formatted xml, with too many indentations:
splitattributes

@fbricon fbricon added bug Something isn't working formatting This issue or enhancement is related to formatting support completion This issue or enhancement is related to completion support labels Nov 2, 2018
@fbricon fbricon added this to the v0.0.2 milestone Nov 3, 2018
@fbricon fbricon added the to do label Nov 5, 2018
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Nov 5, 2018
Fixes eclipse-lemminx#188

The issue was that when adding attributes it  needed to know before hand how many attributes
would be added to know which add attribute method should be called.
.isRequired() was messing this up and was moved outside to determine the total variables being added
before the add attribute methods were called.

Signed-off-by: Nikolas Komonen <[email protected]>
NikolasKomonen added a commit to NikolasKomonen/lsp4xml that referenced this issue Nov 5, 2018
Fixes eclipse-lemminx#188

The issue was that when adding attributes it  needed to know before hand how many attributes
would be added to know which add attribute method should be called.
.isRequired() was messing this up and was moved outside to determine the total variables being added
before the add attribute methods were called.

Signed-off-by: Nikolas Komonen <[email protected]>
fbricon pushed a commit that referenced this issue Nov 5, 2018
Fixes #188

The issue was that when adding attributes it  needed to know before hand how many attributes
would be added to know which add attribute method should be called.
.isRequired() was messing this up and was moved outside to determine the total variables being added
before the add attribute methods were called.

Signed-off-by: Nikolas Komonen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working completion This issue or enhancement is related to completion support formatting This issue or enhancement is related to formatting support to do
Projects
None yet
Development

No branches or pull requests

2 participants