You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@netbeans.apache.org by "NicolaIsotta (via GitHub)" <gi...@apache.org> on 2023/10/12 09:48:47 UTC
[I] Enable Groovy syntax highlighting for Jenkinsfile [netbeans]
NicolaIsotta opened a new issue, #6560:
URL: https://github.com/apache/netbeans/issues/6560
### Description
It would be nice to have Groovy syntax highlightning for [Jenkinsfile](https://www.jenkins.io/doc/book/pipeline/jenkinsfile/), but they do not have an extension, so it is not possible to set the Groovy mimetype for them under Option -> Miscellaneous -> Files -> File Associations
### Use case/motivation
Example without higlight:

Example with:

### Related issues
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
Re: [I] Enable Groovy syntax highlighting for Jenkinsfile [netbeans]
Posted by "neilcsmith-net (via GitHub)" <gi...@apache.org>.
neilcsmith-net commented on issue #6560:
URL: https://github.com/apache/netbeans/issues/6560#issuecomment-1775364601
So, it looks like the underlying implementation supports this, but not sure if there's any UI that does. The `Open As` action on files currently configures this for all files without extension - could perhaps be extended there to offer other options?
Adding a file in the userdir at `<userdir>/config/Services/MIMEResolver/user-defined-mime-resolver.xml` with the following contents will work -
```xml
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MIME-resolver PUBLIC "-//NetBeans//DTD MIME Resolver 1.1//EN" "http://www.netbeans.org/dtds/mime-resolver-1_1.dtd">
<MIME-resolver>
<file>
<name name="Jenkinsfile"/>
<resolver mime="text/x-groovy"/>
</file>
</MIME-resolver>
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@netbeans.apache.org
For additional commands, e-mail: notifications-help@netbeans.apache.org
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists