Linux users, what IDE are you using and do you have code completion?

Currently I am using VS Code with https://github.com/hiroMTB/vscode_oF but code completion doesn’t work and I find it very handy to be able to quickly type dot and see a list of available methods, for example. Someone must have figured this out so… here I am asking. I’m not opposed to nvim or something. I don’t love QT because it’s sort of massive.

Thanks!

1 Like

atom. semi-code completion (but you wont need it after a while, at least not needed here). vscode tries to compile everything, and when you have a massive of folder it puts the machine to a crawl (99% all cores)

I use vs-code, yep is a shame code completion…note that sometimes it works but not sure what happens here…

If that can be made to work, will be perfect, as is no 100% need but is nice to have it sometimes

Note that when you compile from it “natively” it will use all cores, you can change that in tasks.json

Qt is huge but Qt Creator (4.6.1) is 500 mb or so on my laptop, and you don’t need Qt to use Qt Creator. I use it with Mint on older laptops and desktops. Running the /qtcreator/install_template.sh script makes it super easy to create or import new oF projects; so I never need to use the project generator with Qt Creator.

i been using VScode with this https://github.com/npisanti/of_vscode
it works well with code completion

I use qtCreator. The version I use is the latest one that you can install offline. It’s 4.11.2
I use VS Code a lot for some embedded programming, but for OF it’s qtCreator all the way. The main reason I think is the debugger and the general workflow, plus the fact OF can spit out qtCreator projects using the projectmanager tool.

1 Like

Sometimes i do extrange things :slight_smile:

I was talking about my new computer where i have been working for few months and vs code completion was not working… i just discovered the reason, i can not imagine how can i forget that

note to myself in future: ¡¡¡install the intellisense ms extension!!!

And code completion works

@pandereto do you use any scripts or applications that create the project files or anything?

Just tried setting up QTcreator and can’t compile any projects that require ofxHTTPS/poco

i dont use qt i use vscode, you can create project with project generator

eclipse with the CDT plugin for C++, code completion works fine.

Hey @prismspecs did you edit the project .qbs file when you tried Qt Creator? Addons can be added to the project like this:

        of.addons: [
            'ofxCv',
            'ofxTbb',
        ]

It’s QtCreator, not just Qt, it’s not the same even if based on Qt.
Since it’s officially supported, with tutorial in the oF download section, this is the easiest one to set up and requires the least work to do so.
Good thing is, even the newest versions like QtCreator 4.11.1 work with OF very well without issues (even though the setup tutorial for OF on Linux is for 4.6.1); tried both 4.6.1 and 4.11.1, doesn’t make much difference - it works just fine.

Don’t know about vscode and atom, considering full code autocompletion. To have it, they would require to recognize openFrameworks project dependencies (for your own OF-based project) - and to do that, they’d have to compile it in real-time, seeing whether you can use some particular OF function and what arguments can it take, how many overloads does it have, etc.
Tried Atom before, but to me, it’s limited to autocompletion of your own project only. It won’t see the functions of openFrameworks you have in the documentation section.

I use VS Code and code completion does work, so long as the libraries are included. I didn’t use the full repository you linked to, just the relevant lines (61-109) from https://github.com/hiroMTB/vscode_oF/blob/master/exampleEmpty/.vscode/c_cpp_properties.json

I modified the lines to satisfy the paths in my workspace and then code completion worked just fine. Keep in mind not all the library locations are up-to-date/map perfectly to whatever distro you’re using

I use neovim. I use the built in LSP functionality with clangd for code completion (plugins for autocompletion + snippet expansion) and a stripped down ccls for the AST extensions. A handful of other plugins to build+execute (which can also be done without)

Can share my dotfiles with comments if anyone is interested in that setup

PS: I use the python module(?) compiledb to generate the compile_commands.json to help the LSP