carbonblack / intellij-rpmspec

An IntelliJ plugin for RPM SPEC file support
Apache License 2.0
11 stars 4 forks source link

Add all triggers as body item keys #8

Closed giosh94mhz closed 2 years ago

giosh94mhz commented 2 years ago

Hi, the current implementation doesn't highlight the triggers body start. This seems a minor annoyance, but since eveything in a Specfile begins with a %, not highlighting the start of block makes everything unreadable.

I've applied the changes to the code with all the missing keys I'm aware of. I have no idea how to test a plugin on intellij, please give it try before merging.

Thank you!

Reference:

[1] Fedora docs for trigger in/out [2] RedHat 8 new file triggers

tlusk commented 2 years ago

Thanks for the contribution! I'll review and get these changes published soon.

giosh94mhz commented 2 years ago

Thank you! Let me know if you need help with testing.

tlusk commented 2 years ago

@giosh94mhz I haven't tried to run the code yet but I can already say that the new sections also need to be added to the parser here: https://github.com/carbonblack/intellij-rpmspec/blob/master/src/main/grammars/RpmSpecParser.bnf#L72

Also just an FYI, running the plugin should be as simple as running ./gradlew runIde, and if you load the project into intellij as a gradle project you can debug that gradle task in order to debug the plugin.

giosh94mhz commented 2 years ago

Hi @tlusk , I've seen the update today in PHPStorm. Thank you very much, and sorry for not being able to help you out. Have a nice day!