apache / netbeans

Apache NetBeans
https://netbeans.apache.org/
Apache License 2.0
2.65k stars 850 forks source link

.editoconfig #4039

Open abbas-v1 opened 2 years ago

abbas-v1 commented 2 years ago

Description

There used to be a .editorconfig plugin for the previous version of Netbeans but it is not more maintained. https://github.com/welovecoding/editorconfig-netbeans https://issues.apache.org/jira/browse/NETBEANS-1287

Standardization of editor configuration should be a feature of the Netbeans itself, instead a plugin.

Use case/motivation

EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. The EditorConfig project consists of a file format for defining coding styles and a collection of text editor plugins that enable editors to read the file format and adhere to defined styles. EditorConfig files are easily readable and they work nicely with version control systems.

Related issues

No response

Are you willing to submit a PR?

Code of Conduct

ebarboni commented 2 years ago

Hi, I would suggest discussion on dev mailing list. Taking over existing code should follow a formal process so it may be possible.

But then we need transformation (maven to ant) to fit to code source and it will be release at same time Apache NetBeans is. Its also possible to start a new "beast" having plugins build at Apache and voted by PMC to release like other plugins but in the strict Apache world.

Chris2011 commented 2 years ago

Hey @esafzay the plugin you mentioned never worked that well or good enough for production. It was to slow, to laggy, throws some exceptions etc. You can follow the tickets on the repo. I wanted to have a look but I left them.

My idea is still to create a plugin for that, because for a lot of things a plugin is the way to go due to the release cycle, licences etc. inside the NetBeans core code. A vote for plugins to implement will be also cool for sure.

My plugin idea is to create a plugin which supports prettier and prettier can handle formatting based on .editorconfig files. I don't want to write a custom formatter for each language that NetBeans supports. I will use prettier as an external process to handle all supported languages in prettier which you can find here: https://prettier.io/ scroll down to section "Works with the Tools You Use".

xwolfde commented 2 years ago

At the moment (version 13) Netbeans allows to export and imports formatting settings (Options->Editor->Export / Import).

grafik

The settings will be exportet as a zip file in which the editor preferences are stored in org-netbeans-modules-editor-settings-CustomPreferences.xml. It should be possible to add an option to export/import the settings in the syntax defined by the EditorConfig standard. Therfor i think the best place would be to make the support in the core of netbeans instead of using a plugin.

By the way (maybe a new task of this issue): Currently Netbeans is also listed on the official EditorConfig site https://editorconfig.org/ to support EditorConfig with a plugin. Once this issue was solved, someone should inform the maintainer to update the informations there (togethers with a new icon for netbeans :) )

iceflower commented 1 year ago

How are you?

I was wondering if anyone could let me know the progress of this issue?

Chris2011 commented 1 year ago

There is no progress unfortunately. I also wanted to have a look into it sooner or later but my todo list is higher then my lifetime probably. It would really help if you just have a look how we can implement this easily without much effort. But it is up to you.

Chris2011 commented 1 year ago

Maybe it could be part of this plugin: https://github.com/funfried/externalcodeformatter_for_netbeans