PhpStorm parameter hints in sass - sass

I have a scss file that I call in
#import ..mixins
but when I try to call in methods from the mixin that is defined like this
#mixin myFunction($param1, $param2){
style:$param1
style:$param2
}
Phpstorm just gives a hint like
myFunction()
without any parameter information. Has anyone found any solutions to this?

Unfortunately it's not yet supported in current versions on PhpStorm/WebStorm (stable 2016.3 and upcoming 2017.1).
Watch these tickets (star/vote/comment) to get notified on any progress:
https://youtrack.jetbrains.com/issue/WEB-10806
https://youtrack.jetbrains.com/issue/WEB-24715

I came here searching for this myself, and it isn't supported even in 2018.
It's not going to give you hinting apparently, but, for often used mixins you can create a live template (snippet) with variables.
In your case:
1) - Navigate to Settings: File>Settings>Editor>Live Templates. Then click the '+' to add a new 'snippet'.
#mixin myFunction($$param1$, $$param2$);
The extra $ are for naming vars in Live Templates.
OR,
2) - Highlight the snippet of code to use for a new Live Template. Then press CTRL(CMD)-SHIFT-A and search "Save As Live Template". Double click or press enter to do '1)' much quicker if the code is already present.
That's a dirty workaround in the meantime.
What PHPStorm does support is: when you #include myMix, the hint will expand if you use the up, down arrows. Still not hinting, but almost.

Related

Problem with auto-complete and syntax in *blade.php files with Laravel plugin in PhpStorm

I have strange problem with syntax and autocomplete in blade files. Yesterday it's worked normally, I didn't update any plugins or PhpStorm, I have newest versions.
After closing PhpStorm and launching it again couple of hours later, blade files stopped working. At the beginning HTML not worked too, but I changed some configuration in Editor > File Types and syntax for HTML came back (next I removed every changes and it still working for HTML code).
I had turn on Laravel Plugin and Blade Syntax in plugins. Syntax for directives don't had colors and auto-complete not working, tags {{}} etc. not working too. I fully removed PhpStorm, used Invalidate caches and this not helped me with that problem.
Under this post you can see how it looks like, directives should have purple color syntax, php code not working.
Could someone help me with that problem? I will be very appreciated. (I tried find some information in the google, but with no effect.)
Screen with code
Whole IDE
Before broke
New photo without material design theme

Is it possible to add a separator in TextMate's function popup?

Is it possible to add one or more separators to the function popup in TextMate 2? Some context may help understand what I mean:
I'd like to group the functions into logical sections, similar to what Xcode does with the '#pragma -' option. Is this possible?
Thanks!
Just tested with TextMate version 2.0-alpha.9479 and
#pragma mark -
worked fine in a .cpp file.
It's a per-bundle trick and the Javascript bundle doesn't have it.
You can do it yourself by customizing the bundle to recognize some specially formatted comments for instance.

Foundation SASS amending button-radius

So I've recently set-up a new project using Zurb's Foundation. I've got the default setting working from the gem setup (http://foundation.zurb.com/docs/sass.html).
The problem I am having is amending the buttons. By default my buttons appear square & I want a nice rounded corner style. So within the _settings.scss I have amended the following line:
$button-radius: 30px;
But nothing happens. So after reading the documentation I tried creating my own button class and including the button mixin like so:
.your-class-name {
#include button($padding, $bg, $radius, $full-width, $disabled, $is-input);
}
But when I do this I get an error saying that $padding doesn't exist! This has royally confused me as it's used throughout Foundation (or so I understand).
Can anyone suggest what may be going wrong here. I can provide any additional information if need be.
Lastly, I don't think the $global-radius option is being applied, because when I change the property but it's not causing an error so I'm a little stumped!
EDIT:
Here is the top of my core SASS file:
// Global Foundation Settings
#import "settings";
// Comment out this import if you don't want to use normalize
#import "normalize";
// Comment out this import if you are customizing you imports below
#import "foundation";
The default $border-radius did not work due to a bug in Foundation. I ran into it as well, but when I now went to double-check, it appears to have been fixed already in this commit. The problem was that $button-radius was defined twice in the settings file, one for buttons in general, and one for buttons in forms. The latter has now been renamed to $form-button-radius.

Bootstrap Datepicker Example

I cannot seem to get the bootstrap datepicker from http://www.eyecon.ro/bootstrap-datepicker/ to work using the example from https://gist.github.com/maraujop/2812529.
The only thing I am unsure of is where to put the datepicker folder after downloading it? I put it in my static folder and while I get no errors the only thing that shows up on my form for a date field is a blank looking box next to the field but nothing comes up when pressing it.
This doesn't seem like it should be that hard but for whatever reason, this isn't working.
Any suggestions(something that works).
Thanks
Take a look at django-bootstrap3-datetimepicker which you can install with pip and add to INSTALLED_APPS. Works very well for me.
There's an alternative listed in the docs for Bootstrap2, but I've not used it so can't comment on how well it works.

Dim/hide logging lines of code in Visual Studio

Is there any way to make visual studio dim or hide/show on demand logging lines of my code?
We use a lot of logging in our project and it's harder to read code like this.
I would like it to be like this, for example:
Unobtrusive Code extension worked for me for Visual Studio 2019. It dims the opacity of log lines (and comments, which I disabled - I enjoy reading my comments). He did a quick update for the nuget package, and it works great.
https://marketplace.visualstudio.com/items?itemName=niklaskallander.UnobtrusiveCode
I use this. Hoping one day they will add color customization and line selection regex options as well:
https://marketplace.visualstudio.com/items?itemName=ElmarXCV.GrayLogLines
There is no way to do this from the standard Visual Studio IDE. In order to do this you would need to define a custom extension which recognized lines like this, tagged them with a specific format and have that format be colored a lighter color in the IDE
a "hackier" way would be to wrap all logging in a preprocessor directive like
#if DEBUG
Log.Info(........)
#endif
Visual-Studio will "dim" the code inside.
and have some kind of config header where you
#define DEBUG 0
Not the prettiest but its nice if you don't want debug code compiled into your Release binary
why don't you put your section within #region tag.
E.G:
#region Put some region name here for your reference
Your Code / Comment / Whatever
#endregion

Resources