Intellij Plugin Completion exits on dot? - kotlin

What I wanna achieve?
When the Completion list shows up, my code will map all the language files located in .neon files and show them as auto complete text.
What I have done?
I restricted the completion to only show up when your caret is in between double quotes or single quotes
Issue
When I start typing it works as expected
But as soon as I type the dot character it miss behaves
I need the completion list to look up my whole string I wrote, not only those after the dot character
As a really bad workaround is to don't write the dot character
Can it be done somehow?

Okay, i got it. This is a default behavior of intelliJ where i was testing it.
After opening and testing the plugin in a proper intelliJ Ultimate instance. It works by default. I don't know why the sandboxed version has porblems with it.

Related

Automatically place braces like Visual Studio

When I use braces in Visual Studio, I press Enter and the brackets are automatically positioned like this:
When I use them in IntelliJ, I have to apply formatting (Ctrl+Alt+L) to make them move:
Is it possible to get this behaviour in IntelliJ? I don't want to have to spam autoformat to make my code the way I want.
It's worth noting that I've specified that my brackets go on the next line in settings:
Filled the bug request to IntelliJ IDEA bug tracker: https://youtrack.jetbrains.com/issue/IDEA-286306
Feel free to follow.
For the time being, you can toggle reformat manually.

How to stop IntelliJ from placing semicolons after an auto-completion?

so this is annoying me because I use tab to leave brackets etc and when I use auto-complete and a semicolon is being placed after the bracket this happens:
https://streamable.com/i9as2
as you can see in the first statement I'm having problems "jumping" over the semicolon while when I dont use the auto-completion in the second statement (and don't get the semicolon automatically) it's way easier to navigate through it with tab. I know that there is the shift-enter shortcut but I don't really want to develop a habbit of using it so often because I can imagine trying to do that when working with my other IDE's can become quite annoying. I searched through the options but did not find any option do disable that behavior. Does anyone know a way to get around this?
Second Tab press should jump after the semicolon, I've created a feature request for that.
It's already fixed and the fix will be available starting from 2019.2 IDE version.

Having difficulty getting ZeroBrane to highlight code, autocomplete, etc

https://i.imgur.com/SlQ41BS.jpg
Here is an example. For some reason code is simply not being highlighted using the Lua 5.2 interpreter. Autocomplete doesn't appear to be working correctly either. Also whenever I declare a function it doesn't automatically add a space in the middle and the end at the bottom which I've seen. These would all be immensely helpful starting off. I have never coded before.
I don't see any issue with the highlighting, as the Lua code in your snapshot is highlighted. I'm not sure why auto-complete is not working in your case, but if you type "pr" and don't see "print" and "pairs" offered when Lua 5.2 interpreter is selected, you may want to open a ticket and we'll investigate.

Completing code block with semicolon in intellij java

I'm tired of having to take time to reformat code after every statement. Call me lazy or call me spoiled, but every IDE I've used reformatted code automatically when I entered a semicolon.
I've been using intellij because eclipse and android studio have too many internal dependencies that cause problems. But it doesn't reformat code the way the other two do. Is there a plugin or method I could use to correct this?
I didn't tried by myself but the following could address the problem with automatic re-format:
activate the option "save file automatically if the application is
idle for..." option in IntelliJ Idea Settings
install and configure the save actions plugin
https://plugins.jetbrains.com/plugin/7642-save-actions
Regarding Eclipse (I didn't use it for a long time) wasn't automatic reformat of the code triggered on file save? You said you had in eclipse this support on entering a semicolon.
Kind regards.
Also try shift-ctrl-enter. This completes the line, adding semi-colon, closing brackets etc but as a side effect also reformats the line.

Can IntelliJ IDEA automatically format a code block after finishing it?

Some IDEs offer the feature to automatically format a line or block of code after finishing it e.g. by writing the closing curly or semicolon.
I find it hard to believe that IDEA does not offer this kind of feature. Or does it?
If you know how to turn it on - or if I maybe need some plugin - let me and the world know, please!
If it's a single line, you can use the Complete Current Statement action (which adds a closing bracket, semi-colon, and so on) with ctrl-shift-enter - this seems to reformat the whole line.
Otherwise, you can obviously rebind ctrl-w and ctrl-alt-l (to reformat selected text) or just ctrl-alt-l (reformat whole file) to faster / easier keybindings so that you can quickly reformat whenever you want to.
There is no automatic reformat feature, related requests:
IDEABKL-5806 Automatically trigger code formatter on file save
IDEABKL-475 Hard (auto-)reformat code
See also my answer to the similar question with the Complete Current Statement workaround.