I am coming from languages that don't use semicolons by default and I keep forgetting adding them all the time. Also it's annoying to type ; all the time.
Is there any VS Code plugin that will add semicolons on save automatically?
If it's not possible in VS Code, is it possible in some other editor like IntelliJ or something?
For anyone looking for an answer to this problem, add this to your settings.json in VSCode:
"editor.codeActionsOnSave": {
"quickfix.insertSemicolon": true,
},
That's not directly possible at the moment. You may try this extension: https://marketplace.visualstudio.com/items?itemName=vmsynkov.colonize
Related
The documentation only shows that you can pass the SystemConfigService as a parameter to another service.
Is there also the possibility to pass directly the value from the plugin configuration?
Background of the question: I would like to initialize directly an instance of an external component. But this expects fixed arguments as strings. Alternatively, one would otherwise have to write some kind of factory.
Hm, it's possible to do. I have not done this directly myself, but 99% confident that it will work. You may need to play around with it a little.
In the services.xml you can use symfony expressions.
<argument type="expression">service('Shopware\Core\System\SystemConfig\SystemConfigService').get('SwagBasicExample.config.example')</argument>
You may need to find the alias name for the Shopware\Core\System\SystemConfig\SystemConfigService class instead. Also check the Symfony documentation, you can do a lot more with this!
I myself passed an array as an argument, but used a custom class as a config getter like so:
<argument type="expression">
{
"shop_is_active": service('config_bridge').get('isActive'),
"customer_number": service('config_bridge').get('customerNumber'),
"shop_number": service('config_bridge').get('shopNumber'),
"apikey": service('config_bridge').get('apiKey')
}
</argument>
Not strictly necessary as Shopware already requires it, but always a good practice to add the requirement to your plugin composer file:
"require": {
...,
"symfony/expression-language": "~5.3.0|~5.4.0"
},
As of today it's not possible to inject specific system_config values in services.
Is it possible to add a package in the reflection-config.json?
Something like:
[
{
"name" : "org.apache.tinkerpop.shaded.kryo.serializers.*",
"allDeclaredConstructors" : true
}
}
Instead of doing it one by one.
Thanks :)
As far as I know, that isn't possible yet. There is an open feature request for this: https://github.com/oracle/graal/issues/1236
Probably the best would be to create a Feature class which would register classes for reflection programmatically. Here's a short example: https://www.graalvm.org/reference-manual/native-image/Reflection/#configuration-with-features
The feature class needs to be on classpath then referenced using the --features= command line option.
I am using tracing agent features to auto generate a list for reflection/jni/resources, this should be quite convenient until one day the wildcard features is implemented. (I bet it will not be implemented due to performance concern.)
Ok, We all love fsi, but I hate it when I type in the wrong thing and then I want to go up a line and it won't let me....
Is there some kind of shortcut I am missing?
For example, here is a mutually recursive discriminated union. Oh crap, I screwed it up. I want to go back, but I can't.
How do I go up one line and fix stuff?
If you've already committed the line, you can either redefine it (you can define the same types/functions as many times as you want in FSI), or start over. That's why the preferred way to use FSI is: write the code in a script file and 'Send to Interactive'. That avoids this issue.
I would like to globally prevent LaTeX from hyphenating 'Objective-C'. I am aware of the \hyphenation command, but I don't see how I can make use of it. If I pass 'Objective-C' to this command, the dash will be treated as a hint to hyphenate the word there.
One solution I found is wrapping Objective-C into an mbox each time I use it. However, the document I am writing contains this name a lot, and wrapping it into an mbox each time is ugly (as is defining a command and using this over and over again in the source code).
Why is defining a new command ugly? It's how \LaTeX\ defines itself.
\def\ObjectiveC{\mbox{Objective-C}}
Use \nobreakdash. That's what LyX produces when I insert a nonbreakingdash and convert it to tex.
As suggested here, you could define a command like this:
\newcommand\dash{\nobreakdash-\hspace{0pt}}
and use it like this
Consider the $n$\dash dimensional manifold ...
Also, you could use the babel package and use "~ as a protected hyphen. I'm not sure if using babel is advisable when writing in english, though.
It's possible modify or change a color scheme (Color SpeedSetting) in the Rad-Studio?
There is an entry in the Windows Registry? or must edit some file?
Thanks in advance.
It doesn't look easy at first glance.
I found the following under then HKCU path:
\HKCU\Software\CodeGear\ETM\12.0\Color
with the following sub-keys
List item
Classic
Default
Ocean
Twilight
Each key has what appear to be color constants but there doesn't appear to be enough constants to make it the right section.
The list of values under each key:
Auto_TranslatedItemColor
EditBackgroundColor
EditForegroundColor IsOEM
Non_editBackgroundColor
Non_editForegroundColor
SelectionBackgroundColor
SelectionForegroundColor
TranslatedItemColor
UntranslatedItemColor UnusedItemColor
That's all I've got, with out spending a lot more time from the looks of it.
It's probably stored in a BPL as a Opentools API object.
Take a look at OP's https://github.com/rruz/delphi-ide-theme-editor, it supplies thousands of themes. Yes, the OP makes one himself.
Thanks for the OP's awesome project.
Thanks for #Nicholas point out this for me.