Hello, As far as I see, in the screenshot the $store property is highlighted as a warning. Could you please share the complete code snippet so we can better understand your requirements?
if (typeof existentGetNumber === 'number' && event === this.mode) { const root = this.$root; this.$store.category.pageNumber = 1; // Reset page number to 1 because load more items removed this.$dispatch('reset-load-more-counter', {message: `Switch the other list length`}); }
Hello Max, Could you please clarify if you want to apply special styling to this particular member? Or do you want to change the style of the warning(the underline, color)? What warning is it? Could you please share a screenshot of the Problems tool window? Unfortunately, the code snippet outside the project context does not allow us to reproduce the current behavior. It would be of great help if you could share a small example so we can test it locally.
As far as I understand, you use a structural search to highlight specific keywords. However, the underlining can be displayed if the default IDE highlighting is applied. For example, in this case, my custom highlighting is applied together with the JSUnresolvedReference inspection's highlighting:
In this case, I can suppress the default JSUnresolvedReference inspection to get rid of the underlining.
So, you need to understand whether any other inspections are applied in your code. If this is not the case, I will need to test your example together with the IDE style preferences(you can export them to the Project.xml file in Settings | Editor | Inspections).
Also, here is what I mean by the Problems tool window:
Tried to di the same but didn't get the result but anyway I just want to apply mark color in same cases like $root. $store, $ dispatch. I tried to use structural search but no success
Hello Max, the solution with the structural search inspection worked on my side(see the screenshots in my previous reply). Could you please share your example and project style settings as I requested above so I can test your approach on my side? With this information, I will be in a better position to determine why this approach did not work out for you.
Hello Max, Yes, the process looks similar to me. However, it is not completely clear where you specify 'File' and 'extension' in point 4. Could you please share a screenhsot? Also, I tested .js files. Please clarify in what files you wish to see the highlighting?
Hello, Thank you for the clarification. I tested this functionality in a JS file. Please share the complete file or an example that I could use for testing. Also, please specify what IDE version you are using.
Hello, Thank you for the clarification. I tested this functionality in a JS file. Please share the complete file or an example that I could use for testing. Also, please specify what IDE version you are using.
Thank you, Max. I think I found the cause of the issue. I tested this functionality in PhpStorm 2025.1, Build #PS-251.23774.436, and it did not work. However, after updating to PhpStorm 2025.1, Build #PS-251.23774.436, the same project works correctly. Please refer to the attached screenshots. Could you please try upgrading the IDE?
This underlying must be coming from some other inspection. You can disable, suppress it, or modify the highlighting. Please refer to the attached video. If you can't find the required inspection, please share a screenshot of the Problems tool window fr the file.
Hi there,
You can try Better Highlights plugin, the Paid version says it can highlight anything using RegEx.
https://plugins.jetbrains.com/plugin/12895-better-highlights
I tried to make this using inspections but no success
As far as I see, in the screenshot the $store property is highlighted as a warning. Could you please share the complete code snippet so we can better understand your requirements?
Yes, as warning, I added $root as example also
Could you please clarify if you want to apply special styling to this particular member? Or do you want to change the style of the warning(the underline, color)? What warning is it? Could you please share a screenshot of the Problems tool window? Unfortunately, the code snippet outside the project context does not allow us to reproduce the current behavior. It would be of great help if you could share a small example so we can test it locally.
Hello Natalia,
I want just to color ApineJS “magic values” such as $root, $watch, $dispatch, $el (the short stable list) with yellow, for example.
That is the “screenshot of the Problems tool window” you need?
Hello Max,
As far as I understand, you use a structural search to highlight specific keywords. However, the underlining can be displayed if the default IDE highlighting is applied. For example, in this case, my custom highlighting is applied together with the JSUnresolvedReference inspection's highlighting:
In this case, I can suppress the default JSUnresolvedReference inspection to get rid of the underlining.
So, you need to understand whether any other inspections are applied in your code. If this is not the case, I will need to test your example together with the IDE style preferences(you can export them to the
Project.xmlfile in Settings | Editor | Inspections).Also, here is what I mean by the Problems tool window:
Hello Natalia,
Tried to di the same but didn't get the result but anyway I just want to apply mark color in same cases like $root. $store, $ dispatch. I tried to use structural search but no success
Hello Natalia,
Ok, let's go step by step:
1. Add this.$store.category.pageNumber = 1; this.root = this.$root; in some method.
2. Go to Settings → Editor → Inspections
3. Add Structural Search Inspection
4. Draft template → search template: this.root → ok. Language: Javascript. File: php + HTML + AlpineJs, extension: phtml
5. Add this.$store template, clone
6. Add severity and select it in “Hightlight in editor”
7. Ok and nothing
Ah, I got
Restart, just opened setting and tried to save ad again ….
UPD: sudo chmod a+w -R .idea/* was the fix but the same
Yes, the process looks similar to me. However, it is not completely clear where you specify 'File' and 'extension' in point 4. Could you please share a screenhsot? Also, I tested .js files. Please clarify in what files you wish to see the highlighting?
Hello Natalia,
1. I adder draft template
2. Search template: this.$root
3. Language: Javascript
File details:
1; Extension: phtml
2. Used languages inside: php, html, Alpine (js)
Thank you for the clarification. I tested this functionality in a JS file. Please share the complete file or an example that I could use for testing. Also, please specify what IDE version you are using.
Thank you for the clarification. I tested this functionality in a JS file. Please share the complete file or an example that I could use for testing. Also, please specify what IDE version you are using.
Hello Natalia,
PhpStorm 2025.1
Build #PS-251.23774.436, built on April 14, 2025
File: basic-forms-03.zip
Shared above as zip. I checked, shared well
I think I found the cause of the issue. I tested this functionality in PhpStorm 2025.1, Build #PS-251.23774.436, and it did not work. However, after updating to PhpStorm 2025.1, Build #PS-251.23774.436, the same project works correctly. Please refer to the attached screenshots. Could you please try upgrading the IDE?
My build is
PhpStorm 2025.1.0.1
Build #PS-251.23774.466, built on April 24, 2025
OMG, suddenly it started to work. Only one question, how to remove underscore from store?