WebStorm support for nesting CSS - webstorm

I am using PostCSS and one of the important elements in PostCSS is CSS nesting. WebStorm doesn't like the syntax and highlights errors.
Is there any solution for this issue?

As of WebStorm 2016.3 this issue has been solved. As detailed in the WebStorm Blog, users of PostCSS can now install an official PostCSS plugin by navigating to Preferences > Plugins > and searching for "PostCSS support". After the plugin is installed and WebStorm has been restarted, you must identify any existing css files using PostCSS as PostCSS by going to Preferences > Languages & Frameworks > Stylesheets > Dialects and clicking on the file's CSS dialect and changing it to "PostCSS".

Edit
Evan's answer below is better now as Webstorm have released an official plugin for PostCSS WebStorm support for nesting CSS
Unfortunately, currently the only way to get it to play nice with PostCSS is to do:
Register *.css or *.pcss if you use that extension to treat them as Sass files inside Webstorm. You'll also need to turn off a few syntax checks Webstorm provides after you change the file type depending on what PostCSS plugins you use.

Related

Cannot add extra styles to django-ckeditor

django-ckeditor packages comes with highlight.js library for code snippets and that library comes with some pre-installed styles.
As I prefer seti-ui style, I download it from highlightjs.org. Inside the downloaded package is seti-ui.min.css file and I copy it to \venv\Lib\site-packages\ckeditor\static\ckeditor\ckeditor\plugins\codesnippet\lib\highlight\styles where all other styles are and then set this in my settings.py:
'codeSnippet_theme': 'seti-ui' # based on the name of css file
And it doesn't work. The editor shows the code snippet but without any style. I've tried several other pre-installed themes like monokai and foundation and they work fine.
Then I noticed that seti-ui.min.css is inside a subfolder base16 in the package I downloaded from highlightjs.org, so I tried \venv\Lib\site-packages\ckeditor\static\ckeditor\ckeditor\plugins\codesnippet\lib\highlight\styles\base16 too but didn't work either.
So what is the correct method to add it?

What link references to include when setting up foundation project in phpStorm

Firstly I am new to using foundation.
When you go onto foundations website and you download the complete foundation file you get this index file:
that has link references to the stylesheets and the Js files and if you start coding everything works just fine, but if I create a foundation project through php storm it downloads the foundation release straight from GitHub, but this folder:
does not have a index file that includes the required css and js files, and I have tried to find the files but they are not included in this version from github. What files do I need to link to get foundation working.
In short, you'd need to link foundation.min.css and foundation.min.js. also, make sure you include jquery before the js.
I suggest downloading a bundle from Zurb's site in this link and recieve a good and working bundle.
Foundation is a great framework so don't give up, it's totally worth it.

Where to add css and js files in ember-cli app?

In rails,
js files are located under
app/assets/javascripts
Similarly where to add js and css files in ember-cli app ?
app/styles/ should contain your stylesheets:
Contains your stylesheets, whether SASS, LESS, Stylus, Compass, or plain CSS
(though only one type is allowed, see Asset Compilation).
These are all compiled into <app-name>.css
If you need external JavaScript libraries, you should manage them in dependency sections of package.json and bower.json. You may have to include the assets manually in the build. This could be done by app.import() in ember-cli-build.js or by using ember-auto-import. Have a look in the User Guide for more details.
User Guide also contains a section about folder layout in ember-cli.

How to exclude a source file from being build in eclipse (C++)?

I am trying to follow some insane complicated steps in order to be able to create C++ unit-tests for C++ code in eclipse (I am utterly new to eclipse). These steps state to exclude some source files from using in the built - which makes sense to me. However, in my eclipse I do not see any Exclude from built option when right-clicking on the source file. Also, neither this answer nor this answer do work, as I do not see the mentioned options in the list of things when I right-click on the source file.
So how to exclude a source file from a built?
P.S. The Version of eclipse seems to be Luna 4.4.0.
(Or, even better: If anyone knows an easier way to set up eclipse with ANY unit-testing framework in a SIMPLE way,- or knows a different Linux framework to start developing C++ projects with unit-testing right away without trying to set up things in unknown and complicated ways for weeks before starting to actually code something - ideas are VERY VERY welcome...)
I ran into a similar problem.
The C/C++ perspective of Eclipse Luna (4.4) is missing the contextual menu "Exclude from build".
I solve my problem by using the java perpective:
Window -> Open Perspective -> Other... -> Java(default)
Navigate to the file/folder you want to exclude
Right Click -> Resource -> Exclude from build
Then you can switch back to the C/C++ CDT perspective
Project Properties> C/C++ General> Path and Symbols
Tab Source Location
Select the source folder
Click the Edit Filter button
Add the file you want to exclude
I've tried this and it worked on Eclipse:
Right Click the file > Properties ... > Resource > Attributes : Derived.
(Eclipse Indigo)
Hope that helps.
I am using MARS eclipse version.
You have to create a build configuration for each component you are building.
Here is how to do that: multiple_execs
Then for each source file that you do not want included in that build; you right click on that source file and then select Resource Configuration and select Exclude From Build. Then you check the box of the build configuration you created above that you do not want the source a part of.
Here is YouTube video showing this: exclude files from a build

How to configure code completion for Django based projects in PyDev?

I am playing with a simple project based on Django framework. My IDE is PyDev/Eclipse.
I cannot make code completion work for Django code, but it works fine for standard Python libraries.
I tried to add Django dir (in my case C:\Program Files\Python26\Lib\site-packages\django) to PYTHONPATH both on PyDev level (Window->Preferences->PyDev->Interpreter - Python->libraries) and on a project level (Project->Properties->PyDev - PYTHONPATH) - no luck so far.
Can you please advise what I am missing here (preferably without installing PyDev extensions).
Ok I give it another try.
Eclipse in C:\test\eclipse
Python 2.6.2 in C:\test\python-2.6.2
Django 1.0.2 final in C:\test\python-2.6.2\Lib\site-packages -> only the actual django folder not the docs, example, and so on. I did this without running setup.py as descriped in the INSTALL file.
Added C:\test\python-2.6.2 and C:\test\python-2.6.2\Lib\site-packages to the PATH variable
As described here I set the Interpreter in Eclipse by Window > preferences > pydev > Interpreter > Python. This automatically included a whole bunch of things under System libs like (C:\test\python-2.6.2\;C:\test\python-2.6.2\DLLs;C:\test\python-2.6.2\lib\site-packages;....). A whole bunch of Forced Builtins are also found.
Then I made a new "Pydev Project" added a package and there a new module with a class and a module which imports the class and calls a function from it. During writing this pressed Crtl+Space several times, and builtins as well as the new stuff from my Module where shown by code completion.
I suggest Configuring pydev to work with django and
Getting started Eclipse/Pyddev
In the latter one there is a section specifically for code completion which mentions a problem with firewall or shell timeout. And in another section he mentions problems when (as in your case) the eclipse installations has spaces in the filepath
I solved setting the PYTHONPATH too.
In the pallet Projects, right-click on the project -> properties
In the PYTHONPATH configuration you have to put the folder that contains your project as a external folder.
Exemple:
/var/www/my_project
PYTHONPATH=/var/www/