Everlaw / nbts

NetBeans TypeScript editor plugin
282 stars 46 forks source link

Add formatting options for TypeScript #81

Open Chris2011 opened 7 years ago

Chris2011 commented 7 years ago

As we know NetBeans have formatting options for JS, Java, PHP, and so on inside the options panel, where you can change a lot of formatting options. Atm NBTS use implicit JS formatting options and a special option which is available in java. It would be better and is a must have to have formatting options for TypeScript as an entry inside the options and with a lot of formatting options.

Cheers

Chris

jeffrey-easyesi commented 7 years ago

It looks like this requires implementing the org.netbeans.modules.options.editor.spi.PreferencesCustomizer.Factory interface. The package is not public and can only be accessed by other modules that are part of NetBeans (see the <friend-packages> list at http://hg.netbeans.org/main/file/tip/options.editor/nbproject/project.xml)

So unfortunately I don't think there's a supported way for a third-party plugin to add a new language to the formatting options panel.

Chris2011 commented 7 years ago

Ok, thats a pity. Thx for the info.

blendsdk commented 7 years ago

FYI, NetBeans team is very friendly in making thirdparty plugins as "friend" to internal packages. You should drop them a message.

wadechandler commented 7 years ago

I can make that a friend if nobody else has started yet

wadechandler commented 7 years ago

I closed that issue in NB.org as a won't fix as Jeffrey said that won't work for older versions of NetBeans. I suggest using Yenta. https://bitbucket.org/jglick/yenta

Chris2011 commented 7 years ago

Maybe someone can have a look into the community Ruby Project? http://hg.netbeans.org/community-ruby

Because I figured out, that the Ruby and Rails plugin, adds formatting options for Ruby and Ruby HTML (RHTML).

Chris2011 commented 7 years ago

Maybe this can help: http://hg.netbeans.org/community-ruby/file/tip/ruby/src/org/netbeans/modules/ruby/options

and

http://hg.netbeans.org/community-ruby/file/tip/ruby/src/org/netbeans/modules/ruby/options/FmtOptions.java

Chris2011 commented 7 years ago

Anything new here? Maybe Yenta can be the option as @wadechandler said.

TiS commented 7 years ago

I'm also quite interested in that, as default formatting options (eg. no space in import statements) break my tests (linter reports this as error).

Chris2011 commented 5 years ago

IMHO it should be finally part of NetBeans core, so this problem will go away.