Clang intellisense limitations

Sysprogs forums Forums VisualGDB Clang intellisense limitations

This topic contains 5 replies, has 2 voices, and was last updated by  support 1 week, 1 day ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #25105

    DeeJayBee
    Participant

    Greetings, and apologies if this has been asked already, but I cannot find it…

    When using the clang intellisense (which is far better than the VC one), CTRL+click does not work for “go to definition”.  Furthermore, typing ‘for’ then pressing tab does not auto generate a for loop; same problem for class declarations (‘class’ + tab and ‘classi’ + tab for inline classes).

    Are these known limitations, and will they ever be implemented?

    Thanks!

    #25106

    support
    Keymaster

    Hi,

    Sorry about that, the Clang IntelliSense indeed handles some commands slightly differently from the native VS IntelliSense (mostly because it has to use older internal interfaces for backward compatibility with older Visual Studio versions).

    The Ctrl-Click is unfortunately not supported, however you can use the regular Go-to-definition command, or the “Go to” button in the top right corner of the edited source file.

    The templates for the ‘for’ loop and other common code constructs should normally work, unless they are filtered out via the buttons at the bottom of the suggestion popup. If they do not appear in the suggestion list, please share a screenshot of the entire VS window demonstrating the problem and we will try to suggest a workaround. Another way to display them would be using the Insert Snippet command (Ctrl-K, Ctrl-X).

    #25111

    DeeJayBee
    Participant

    Thanks!

    Shame about the ctrl-click, that is almost a deal breaker for me for using the clang engine.  Is there no way at all it could be implemented?  If you can control the combo-box that appears via autocomplete, you can surely change the cursor to a hand/underline the current type when CTRL (or whatever the user has configured, ALT in my case) is pressed, then fire the same handler that the “Go to” button invokes?

    And regarding the templates, it seems that (in my case at least) I need to invoke the auto complete manually in order to get the combo box that lists the auto complete types, then press tab to ‘invoke’ the auto selected one.  That is, when I start typing ‘for’ or ‘class’ (or in fact any global symbol name) the combo does not automatically appear, I have to press the keystroke bound to the menu command “Edit->Intellisense->Complete word” to get it to appear, where I can then tab to insert the template.

    In normal intellisense, as soon as I start typing, the combo appears.

    Note that there does not appear to be a problem auto completing object members in clang intellisense; if I make a class declaration with a public member variable or function, then create a static instance, as soon as I press the ‘.’ key, the combo listing members appears.

    Is this by design?

    • This reply was modified 1 week, 1 day ago by  DeeJayBee.
    #25118

    support
    Keymaster

    No problem, we have investigated the Ctrl+Click interfaces used by Visual Studio 2017/2019 and were able to support them from the Clang engine. Please try this build: VisualGDB-5.4.106.3192.msi

    You can control whether the suggestion combo box appears by clicking the button with the lightning icon in the bottom left part of the popup. VisualGDB would normally ask whether you want to display the completion popup automatically or manually (by pressing Ctrl-Space) when you use the Clang IntelliSense first time, so most likely you have accidentally selected the manual option there.

    #25119

    DeeJayBee
    Participant

    Thank you, that is truly awesome!  The first time I tried ALT+click (I have configured the alt key not CTRL key) I got a VS exception dialog, but have not done since.  I will continue to play with it and report back if it keeps happening again!

    Thanks greatly once again!

    #25120

    support
    Keymaster

    Good to know it works. The new functionality is very new, so minor hiccups are to be expected. If you encounter strange error messages or otherwise broken functionality, please share more details with us and we will try our best to fix it.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.