Show entire Sass-nesting-path/levels in the top? - intellij-idea

I'm coding some colorschemes (in Sass), where one super-duper-parent-class, controls all the children. And I keep finding myself on screens such as this:
... thinking to myself: 'Now, which colorscheme am I in now?'.
I'm currently fixing it, by splitting the code into several files, which kinda solves it, but not in an ideal way. It means a lot of file-switching. And also if I have a .open- / .closed-class or a .missing- / .present-class, then I have to find that and 'climb down the tree' to ensure that I make the change in the correct spot. Quite tedious!
I was hoping that I could find a plugin, that could (at all times, regardless of where the cursor is), could display the nesting-levels in a fixed status-bar at the top of the screen ( kind of like that I can position my cursor on a bracket to see the matching one ).
An example of what I'm trying to find is, if I put the cursor inside ul.menu-main__current-menu-item__missing li a {, that it then would show a status-bar in the top:
#header >> &.green-colorscheme >> ul.menu-main__current-menu-item__missing li a
Can I achieve this, somehow? If not, - then how do I stop getting lost in my code?
Attempts
Looked into bookmarks.
Looked into code folding.
I'm trying Rainbow Brackets at the moment.
None of which solves the issue as well as my suggestion.

IDE can already do this for Sass/SCSS (since 2018.1 or so, I do not remember exact version number; could do that for HTML/PHP for a long time).
Make sure that you enabled Breadcrumbs for Sass language at Settings (Preferences on macOS) | Editor | General | Breadcrumbs

Related

Why are my wxTreeListCtrl column widths always wrong?

I'm trying to display multiple columns with a wxTreeListCtrl. I'm using wxWidgets 3.0.5 and developing with GTK, although I'm intending to use this code in OSX and Windows.
The screenshot below shows what I'm seeing (the application is a file browser, in case that's not obvious). The first column, Filename, is always sized to the width of the tree view. The other two columns are pushed off the right; you can see the scroll bar.
If I manually resize the window, the two columns pop into view, which makes me feel that the tree view hasn't been laid out properly, but the right-hand column's manually set width is always ignored and as I continue to resize the window it gradually gets larger and larger.
I've tried manually setting and getting the column widths, and it appears that the tree view control is mostly ignoring the numbers I give it --- if I call SetColumnWidth(...) and then GetColumnWidth(...) immediately afterwards, I get either 0 or an incorrect number.
The actual code is trivial --- this is all generated with wxformbuilder, so I'd expect it to work:
browserTree = new wxTreeListCtrl( browsePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTL_MULTIPLE|wxBORDER_THEME );
browserTree->AppendColumn( wxT("Filename"), wxCOL_WIDTH_DEFAULT, wxALIGN_LEFT, 0 );
browserTree->AppendColumn( wxT("Size"), 100, wxALIGN_RIGHT, 0 );
browserTree->AppendColumn( wxT("Mode"), 100, wxALIGN_LEFT, 0 );
(I should add that this behaviour manifests in the wxformbuilder GUI viewer, too.)
The main thing which makes me suspicious is that the widget hierarchy is pretty complex, so it's possible one of the parents is doing something to upset the tree view, but I've tried moving the tree view into a new box sizer in a new frame and exactly the same thing happens there. But there's a screenshot of the hierarchy below in case that helps.
I have found some very old bugs describing this behaviour (e.g. this one: https://github.com/wxWidgets/wxWidgets/issues/17476) but they're all really old and have been fixed anyway. If this were a real bug I'd expect to see a lot more complaints, as it makes the widget essentially unusable; therefore, this must be something I'm doing wrong, probably something really basic.
But what?
Welp, five minutes later I have an answer. I'm going to post this here in case someone else has the same problem, even though it makes me look really stupid.
Short version: it is that five-year old bug I found. It's just that the version of wxWidgets on Debian, which I'm developing on, is so old it hasn't picked up the bugfix.
The good news is that wxWidgets 3.2, which does have the bugfix, is being packaged right now (last post August 28 2022: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=919903). But I don't think that'll help me much, so I'll need to find a workaround. At least now I know what's going on.

Single feature highlight on hover

map.js :
https://github.com/ro-hit81/COVID-19-Vuetify/blob/master/src/assets/map.js
timeline.vue:
https://github.com/ro-hit81/COVID-19-Vuetify/blob/master/src/views/Timeline.vue
Actually it is going to be a confusing query I guess and it might get difficult for me to make my problem understandable. I am actually using 'Vue js' and 'Echarts js' to create a Map of my country with some temporal point data. The problem may be minor but I am not able to figure out to solve.
While importing China.json file in my .js file, I can see 'Province' is highlighted on hover as:
Now, without changing any code, only importing Nepal.json file inplace of China.json, I see whole layer is highlighted on hover.
I want single feature (as in 'Province' in case of China data , similarly 'District' in case of Nepal data) to be highlighted on hover.
I tried my best to make this problem understandable. Please tell me kindly if i have to attach code.

Clang format for banner style

An open-source project I contribute to uses banner style (also called Ratliff style). It looks like that:
// In C
for (i = 0; i < 10; i++) {
if (i % 2 == 0) {
doSomething(i);
}
else {
doSomethingElse(i);
}
}
Some IDE's like QtCreator have their own configurations for formatting, but others, like Visual Studio Code, require a .clang-format file.
I looked online for existing configurations, and couldn't find any. Then I tried to make one from scratch using this clang-format generator, but I couldn't manage to indent the braces right.
So, is it possible to create a clang-format file for Ratliff/Banner style, or is there some missing configuration that will force us to use some other generator?
This answer is not going to be the "answer" that you were looking for, but it is what I've discovered over the last two days of digging through the code for clang-format. I, too, have been looking for a way to auto-format a variant of banner style with clang-format.
clang-format seems to be missing some capabilities that would enable it to auto-format banner style.
For instance, you need to indent ending (right) braces for code blocks. clang-format does not even appear to track ending braces, but it does track starting (left) braces within its internals.
I started out my studying streak thinking I could understand the way clang-format implements its formatter system, so I could add the features needed to do it. Sadly it was way too complicated for me.
Perhaps someday we will be able to auto-format banner style with clang-format, but not today.
If someone out there knows this answer is inaccurate, please don't hesitate to correct me.
edit: Instead of giving you just a verification of what can't be done with clang-format, perhaps you might find http://astyle.sourceforge.net useful.

Automatic generation of HAML from HTML in SublimeText 2?

I would like to have SublimeText show the HTML result of parsing my HAML in another window, live, as I type the HAML.
Does anyone have an idea of how to make this happen? In, e.g., WebStorm there are file watchers that do this, but is there something like that built into ST2?
I did something similar to this with Typescript, only I only updated the Javascript output when I saved the file. First, I would say to take a look at SublimeBuildOnSave. That'll show you how to hook into the save function and see what file is being saved.
When you've got the general idea, you can take a look here and mess around with opening another pane (or using the existing pane) to show the compiled output.
It's pretty simple to make a simple version of this. If you want more advanced features like live compiling, it'll take a bit more effort, but it's not impossible. But the above scenario worked just fine for Typescript for me. (If I find where I left that code, I'll post it.)

dojo.dnd.move node rendering issue

Dojo has a basic issue, amongst other things... with its dojo.dnd.move class. The issue which you can see here:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dojo/tests/dnd/test_parent_constraints.html
Is that when you click on a node, and start dragging, the node itself jumps. It actually moves its position. This is extremely problematic and I was wondering if anyone has seen this happen before.
I am creating an application that requires the moving of nodes but it needs to be precise and thus can't have the initial jump.
Any help would be greatly appreciated.
This is caused by the following highlighted code in Mover.js:
https://github.com/dojo/dojo/blob/master/dnd/Mover.js#L91-92
The odd thing is, based on the comments, it seems like this code is causing the very problem it aims to prevent.
That said, if your body has padding: 0 applied to its style, this code shouldn't affect you. (You can test it on that test page by running document.body.style.padding = "0" in the console before dragging.)
You might want to enter a ticket on the Dojo bug tracker at http://bugs.dojotoolkit.org (or maybe search and see if one has already been entered for it).