This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 240398

Summary: Support for .editorconfig files
Product: web Reporter: bennyn
Component: HTML EditorAssignee: Milutin Kristofic <mkristofic>
Status: CLOSED INVALID    
Severity: normal CC: andidev, cfoellmann, sgtgarcia, Sladex, tauger, terje7601, trey, xuhdev
Priority: P3    
Version: 7.4   
Hardware: All   
OS: All   
Issue Type: ENHANCEMENT Exception Reporter:

Description bennyn 2014-01-13 09:42:29 UTC
There is a very famous way to set the formatting of the IDE edtior. The option is called EditorConfig (http://editorconfig.org/) and consists of a file that is placed in the root directory of the project. 

Many IDEs like Sublime, Visual Studio or IntelliJ support this format. I know that there are files in NetBeans, with which you can also set project specific formatting but I would be very helpful if NetBeans can also handle .editorconfig files to simplify the collaboration with team members who use other IDEs than NetBeans.
Comment 1 tauger 2014-02-19 21:50:46 UTC
WordPress will be making an editorconfig publicly available that would help developers follow their coding standards http://core.trac.wordpress.org/ticket/26429. Would be great if NetBeans were on top of editorconfig as well!

Go NetBeans!
Comment 2 Geertjan Wielenga 2014-03-13 11:02:16 UTC
First steps here, but a lot of work ahead to map each EditorConfig property to a NetBeans way of handling it:

https://blogs.oracle.com/geertjan/entry/editorconfig_and_netbeans_ide
Comment 3 Mte90 2014-08-05 19:13:47 UTC
any news about this?
Comment 4 bennyn 2014-08-21 09:12:00 UTC
The last update I read was this one from March 12, 2014: https://blogs.oracle.com/geertjan/entry/editorconfig_and_netbeans_ide_part1

There is also this video:
https://www.youtube.com/watch?v=DTv9gUvmd5U

But I cannot find an installable plugin. If you are into NetBeans plugin development, then you can build the plugin from the sources provided here: https://java.net/projects/nb-api-samples/sources/api-samples/show/versions/8.0/nb-editorconfig
Comment 5 Mte90 2014-08-21 10:35:04 UTC
i'm not a java developer so i don't know how to compile the plugin.
Maybe onyone can release this plugin on the portal?
Comment 6 cfoellmann 2014-08-21 10:56:20 UTC
(In reply to Mte90 from comment #5)
> i'm not a java developer so i don't know how to compile the plugin.
> Maybe onyone can release this plugin on the portal?

I don't think releasing it "officially" is the way to go now. Just a compiled version for dl from the repo/somewhere would be great for testing.
Comment 7 bennyn 2014-08-21 11:31:35 UTC
Compiling the plugin is very easy. Just open the source code (mentioned in the comments above) in NetBeans. Then you will have a NetBeans Plugin project. After that open the context menu of the project (with a right click on the project itself) and click on "Create NPM". You can install then the NBM file by clicking in "Tools" - "Plugins" - "Downloaded" - "Add Plugins". After that you point to the NBM file and it will be installed. You can then use the plugin like shown in this video: https://www.youtube.com/watch?v=DTv9gUvmd5U - But be aware that not all editorconfig properties are working right now. For me it was working with the "indent_size" but "end_of_line" for example wasn't taken.
Comment 8 Mte90 2016-05-20 11:11:17 UTC
As update the development now is on github and they release the packages https://github.com/welovecoding/editorconfig-netbeans
Comment 9 banaan 2016-11-19 15:34:23 UTC
Please add editorconfig support to netbeans!
Comment 10 Christian Lenz 2016-11-20 11:46:01 UTC
(In reply to banaan from comment #9)
> Please add editorconfig support to netbeans!

As you can see the post before, there is already a plugin. Download it and everything is fine. Or see this post here: https://blogs.oracle.com/geertjan/entry/editorconfig_and_netbeans_ide
Comment 11 banaan 2016-11-29 08:08:12 UTC
(In reply to ChrisLE from comment #10)
> (In reply to banaan from comment #9)
> > Please add editorconfig support to netbeans!
> 
> As you can see the post before, there is already a plugin. Download it and
> everything is fine. Or see this post here:
> https://blogs.oracle.com/geertjan/entry/editorconfig_and_netbeans_ide

I've tried that plugin, doesn't work very well. If you save it re formats your code, and if your code doesn't happen to be complete at that moment (missing bracket or something) it messes everything up with that automatic reformat. see https://github.com/welovecoding/editorconfig-netbeans/issues/98. 

In my opinion support should be built in. All major PHP frameworks now ship with an .editorconfig file.
Comment 12 newable 2017-10-24 12:30:40 UTC
Still, can't use EditorConfig in NetBeans? Really?!
Comment 13 Mte90 2017-10-24 12:33:12 UTC
Yes, actually there is that plugin that seems abandoned and with the bug mentioned few comments above that is blocking the use.
The missing support of editorconfig is one of the reason I am using different editors (like for the missing of phpcs configuration by project) and evaluating another editor.
Comment 14 bennyn 2017-10-24 15:31:40 UTC
I am the maintainer of https://github.com/welovecoding/editorconfig-netbeans and as you can see we have come a long way with the project. There are only a few issues with which we are struggling. Any help there is really appreciated!
Comment 15 Christian Lenz 2020-07-24 13:59:07 UTC
I will close this ticket, because a newer ticket exists at the official Apache NetBeans JIRA board: https://issues.apache.org/jira/browse/NETBEANS-1287. Please leave comments there.