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.
I have the default plugin for Twig in my PHP Netbeans 8.0 Product Version: NetBeans IDE 8.0 (Build 201403101706) Twig plugin: Version: 1.19.1 Source: NetBeans IDE 8.0 (Build 201403101706) It's enabled and everything. The color syntax work as expected, but there is no autocomplete? So for example, in my file which is named "index.html.twig", I try to type something like this {{ and it's not auto-closing those brackets. I try to do a foreach, like so: {% and it's not closing anything. Even when I have a {% for %}, it's not ending it with {% endfor %} i.e. {% for user in users %} Is this the expected behavior? You know how when you type <div> it generates the closing div tag automatically, right? so it just adds </div> Perfect. Does that exist for Twig plugin? Or do we really have to type it all out, every time? Just curious. I mentioned this on the forum, and a nice person told me to report an issue if I feel this should be there, so - hope it helps. http://forums.netbeans.org/viewtopic.php?p=156987#156987 Thanks guys! :)
Autoclosing doesn't work (it wasn't implemented). It's an enhancement for next release.
Ah, alright. Thanks. :) I'll close the "bug" report then. Have a great Friday! :)
More than half of year is passed. Any progress? This feature is very necessary. I even think of starting to use Sublime 2 only for editing of twig templates.
I am also interested to see this implemented.
Taking over.
Hi Tomas, Any feedback regarding the auto closing of the brackets when using Twig in netbeans 8.2 The concept is similar to whats already being implemented in PHP with the auto-closing brackets. Please fix this. Thanks Sarel
Perhaps Junichi could have time to look at it, please? Thanks.
(In reply to Tomas Mysik from comment #7) > Perhaps Junichi could have time to look at it, please? I'll try looking at it later. (I'm looking at another issue now.) Thanks.
Good day, Thanks for responding, your time and effort appreciated. Please contact me directly if i need to explain or test. Thanks Sarel
I'll support the following delimiters: - {{ ({{ }}) - {% ({% %}) {# is not supported. Because it would be annoying if you want to comment-out the specific part manually(Although you can use the toggle comment feature.). > Even when I have a {% for %}, it's not ending it with {% endfor %} In this case, I think that you can use the code template feature. Thanks.
Created attachment 163201 [details] GIF for the delimiters This is available in HTML part. So it doesn't work fine JS and CSS parts now. This means that it doesn't work in the value of some attributes for HTML tag. e.g. id="", style="", onload="". OTOH, <a href="{{"> works fine. Are the delimiters used in JS and CSS parts? Perhaps, the JS case can be fixed. But the CSS case has a problem. Thanks.
Created attachment 163202 [details] GIF for quotes and brackets I'm also adding quotes and brackets completion now. I'm going to add the option for these features to Editor > Code Completion > Twig File. Thanks.
Created attachment 163245 [details] proposed patch Tomas, To add Options for code completion, I want to add php.twig module to options.editor module as a friend. Do we have to ask a specific person that? or Can I do that? If I can do that, I'm going to push my changes tomorrow (or later). Thanks!
(In reply to junichi11 from comment #13) > Tomas, To add Options for code completion, I want to add php.twig module to > options.editor module as a friend. Do we have to ask a specific person that? > or Can I do that? Adding TomasZ to CC - Tome, could you please confirm whether it is OK or not? If not, what we need to do exactly? Thanks! > If I can do that, I'm going to push my changes tomorrow (or later). Let's wait for TomasZ. Anyway, as always, thanks for the patch, Junichi!
Tome, feel free to do it.
Thanks, Tome! Junichi, one minor issue - the Twig dependency on options.editor should be 1.60 (there is 1.59 in the patch). Otherwise, please apply the patch. Thanks!
Thank you guys! (In reply to Tomas Mysik from comment #16) > Junichi, one minor issue - the Twig dependency on options.editor should be > 1.60 (there is 1.59 in the patch). Otherwise, please apply the patch. Thanks for catching it! I'll fix it, then push changes tomorrow.
(In reply to junichi11 from comment #17) > push changes tomorrow. Perfect, thanks a lot!
Fixed. http://hg.netbeans.org/web-main/rev/1a6fec7f795b There are a few differences between this commit and the attached patch. - options.editor dependency: 1.59 -> 1.60 - Remove the same method in TwigTypedTextInterceptor: Use TypingHooksUtils.sameAsExistingChar() instead - Change a class name: CharRemoverFactory -> RemoverFactory Thanks!
Thanks a lot, Junichi! I noticed that PHP build now has one FindBugs warning [1] (which is related to your commit) and some formatting test failures [2] (I am not sure whether they can be related). Thanks. [1] http://deadlock.netbeans.org/job/PHP-build/2865/findbugsResult/? [2] http://deadlock.netbeans.org/job/PHP-build/2865/#showFailuresLink
Integrated into 'main-silver', will be available in build *201612170001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/1a6fec7f795b User: Junichi Yamamoto <junichi11@netbeans.org> Log: #244054 - twig autocomplete not working
Hi, Thanks for the fix. How can I install this fix. Im using NetBeans IDE 8.2 (Build 201609300101) Thanks
(In reply to Supervan from comment #22) > How can I install this fix. > Im using NetBeans IDE 8.2 (Build 201609300101) You cannot use it in NetBeans 8.2. Please use the development version [1]. If you find some problems, please submit them as new issues. (Please don't add them here as comments.) Thanks. [1] http://bits.netbeans.org/download/trunk/nightly/latest/
Hi Do you know when this patch will be included to official version?
(In reply to Radioaktywnyja from comment #24) > Hi > > Do you know when this patch will be included to official version? It's the next version (probably NB9.0). Thanks.
Hi, Im Using NetBeans IDE Dev (Build 201710190002) I noticed the Twig Autocomplete not working, maybe its not added to this build. Thanks
(In reply to Supervan from comment #26) > Hi, > > Im Using NetBeans IDE Dev (Build 201710190002) > > I noticed the Twig Autocomplete not working, maybe its not added to this > build. > > Thanks Please don't reopen it. If you have a problem, just submit it as a new issue. BTW, It works fine in my environment: Product Version: NetBeans IDE Dev (Build 201711060002) Java: 1.8.0_151; Java HotSpot(TM) 64-Bit Server VM 25.151-b12 Runtime: Java(TM) SE Runtime Environment 1.8.0_151-b12 System: Linux version 4.4.0-98-generic running on amd64; UTF-8; Just try checking Tools > Options > Editor > Code Completion > Language: Twig File.
Thanks it working on this build. Product Version: NetBeans IDE Dev (Build 201711060002) Java: 1.8.0_101; Java HotSpot(TM) 64-Bit Server VM 25.101-b13 Runtime: Java(TM) SE Runtime Environment 1.8.0_101-b13 System: Windows 10 version 10.0 running on amd64; Cp1252; en_ZA (nb) User directory: C:\Users\Sarelvdm\AppData\Roaming\NetBeans\dev Cache directory: C:\Users\Sarelvdm\AppData\Local\NetBeans\Cache\dev the Build 201710190002 didn't had the Language: Twig File installed under Tools > Options > Editor > Code Completion > Language