Skip to content
This repository has been archived by the owner on Apr 10, 2021. It is now read-only.

Doesn't work on Mac OSX #89

Closed
tylik1 opened this issue Oct 6, 2015 · 7 comments
Closed

Doesn't work on Mac OSX #89

tylik1 opened this issue Oct 6, 2015 · 7 comments

Comments

@tylik1
Copy link

tylik1 commented Oct 6, 2015

It seems that on save nothing is happening.
Steps to reproduce:
Download and install plugin on Netbeans 8.0.2
Restart IDE
Edit and save .less file.
Nothing changes although 4 spaces should become 2 as pointed in .editorconfig file.
I have Java 8 installed

Here is the sample .editorconfig

root = true

[*]

indent_style = space
indent_size = 4

end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false

[*.less]
indent_size = 2
@Yserz
Copy link
Member

Yserz commented Oct 6, 2015

Hey, thx for reporting! Currently we have an issue with this and we are working on it. Can you verify that it is properly indenting when you enable 'insert_final_newline = true' in the editorconfig and remove the newline from the file before saving it (see #88 )?

@tylik1
Copy link
Author

tylik1 commented Oct 6, 2015

@Yserz I have the same issue with white space as in #88
But also it seems that Netbeans doesn't format .less files the right way. Even if I disable plugin and manually configure 2 spaces indent for all Languages in settings, it still doesn't work for.less files. I' m still having 4 indents instead of 2.

I guess it is more Netbeans issue though, or probably my imported settings from old machine messed up something. I'll have to investigate further on that.

@Yserz
Copy link
Member

Yserz commented Oct 6, 2015

Uh jeah, sounds like an NetBeans issue since we are relying on the NetBeans indentation in the current implementation. Does it work well for you if you format other file types?
Which kind of project is it, HTML5?

@tylik1
Copy link
Author

tylik1 commented Oct 6, 2015

@Yserz Yep, Html5.
Javascript is formatted well. Actually in formatting tab the "Language" select contains only the following options:
All Languages
HTML
Javascript
JSON
PHP
I'm running Netbeans for php.
The same wrong formatting on .less files on my older Windows machine.
So I guess "All languages" is not doing a good job in formatting .less files.

@Yserz
Copy link
Member

Yserz commented Oct 6, 2015

Mh, I just tested it with my NetBeans 8.0.2 and without the editorconfig plugin and it worked just fine :o

@tylik1
Copy link
Author

tylik1 commented Oct 6, 2015

Strange. Could you please try this inner block, and confirm that it has proper alignment.
.class-a{
display:inline-block;
.class-b{
float:left;
}
}

Also after formatting try to change indents from 4 to 2 in settings and try to format again. Sometimes it worked for me, but most of the time I had wrong indents.

@bennycode
Copy link
Member

Looks like it's related to #91 ("indent_style" and "tab_width" does not work). Since the EditorConfig plugin is working on OSX I will close this issue here and keep #91 open.

Thanks for reporting, @tylik1!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants