Strange VSC editor behaviour with SDK 8.2.1

Due to the fact that soon only SDK 8.x.x apps can be loaded into the store, I have now switched from 7.4.3 to 8.2.1.

I have to get used to the changed editor behavior, but what I really miss is:

A)
With 7.4.3 a text completion for variables and API was suggested. If I type “dc.fill”, for example, a context menu appears with all possible completions.
With 8.2.1 I have no suggestions.

Can I set this somewhere?

B)
After typing a line of code, it often remains underlined in red (i.e. typed incorrectly) although there is no error in the line of the code.

EDIT:
Meanwhile I found out that A) and B) works fine on code for small IQ apps.
But for datafields with a couple of thousand code lines it does not work.
(worked fine with 7.4.3)

  • How do they expect language server to provide autocompletion features for code that is not complete and can't be built by definition?

    Yeah, unfortunately it forces you to write your code a certain way (such that it's compilable almost every step of the way).

    Like I said, other languages like javascript don't have this problem in VS Code. You can even have syntax errors in js, and a lot of the language features still work.

    I guess if you use Monkey C: New Project, at least the very first version of your app should be compilable

  • I only can tell how it works with 7.4.3:

    I often do typos when typing "fieldWidth", which is a declared variable in my code.

    With 7.4.3 I only have to type "fieldW" and then tap Enter, because autocompletion suggests only this variable in a context window.

  • With 7.4.3 I only have to type "fieldW" and then tap Enter, because autocompetion suggests only this variable in a context window.

    That's because VS Code has a static list of CIQ symbols (e.g. println, onUpdate) as well as a dynamic list of words in your app, and the only word that matches "fieldW" is "fieldWidth". It has no idea whether "fieldWidth" would actually work in that context.

    In 8.x, "fieldWidth" would only be suggested if it was valid in that context. e.g. If you started to type "System.fieldW", then "fieldWidth" would *not* be suggested. (There would be no suggestions, as there is nothing that matches "fieldW" in the System module.)

  • But "dumb autocompletion" is better as a not working autocompletion!

    What you can do is disable the new language features by disabling the language server.

    Either:

    - disable type checking (not recommended)

    or

    - open the current SDK's bin folder [*] and rename LanaguageServer.jar

    [*] an easy way to do this is to open the command palette, select "Monkey C: Open Samples Folder", and navigate to "..\bin\"

    In this case, "dumb autocomplete" starts to work again.

    It seems that:

    - All matching CIQ symbols will be listed, as before 

    - All matching symbols from your app will be listed (but it still requires at least one successful build)

    Note that it's def dumb autocompletion, as none of those symbols are available in the "System." context. The IDE just has a big static list of CIQ symbols, and a list of app symbols that's updated when you build successfully, but the matches do not take context into account.

  • an easy way to do this is to open the command palette, select "Monkey C: Open Samples Folder", and navigate to "..\bin\"

    Thank you for helping out! Very appreciated!

    But I don't know how to navigate to "..\bin\".
    I'm seeing all the sample projects after "Open Samples Folder".

    Cannot find "..\bin\"

  • Cannot find "..\bin\"

    Sorry I should have been clear.

    I meant:

    - Go up one folder (this is the same as saying "go to the parent folder")

    - Navigate to "bin\" folder


    ".." means parent folder. You will see this if you type it in a file path in various contexts:

    - Windows File Explorer. For example, if you open the samples folder in File Explorer and edit the folder path in the address bar to add "\..\bin" to the end, it would accomplish the same thing as above

    - Windows Terminal / command prompt: cd .. takes you to the parent folder

    - macOS / linux terminal: cd .. takes you to the parent folder

  • Ahhh - all clear now!

    I found LanguageServer.jar.

    You mean I should rename it, so it can't be used?

     _LanguageServer.jar for example...

  • Yes, exactly. You will probably have to exit VS Code first, if you have any open Monkey C projects.

  • WORKS!

    You are my hero!
    Thanks!

    Anyway, I will file a bug report.

    btw: to disable type check does not disable LanguageServer.jar. You still get error marks and hovering displays and so on… (at least on my system…)