It has been a while
My last post was quite a while back. In all honesty, the current state of affairs in coding land had me somewhat burned out on building things, AI is taking the pleasure out of actually thinking.
I switched jobs in April, which also took a mental toll... so I decided to step away from my hobby projects and workshops to just focus on that.
Now, 3 months later, I decided to reset the way I work with my projects. I have started focusing on a single project, a desktop based comic book collection tracker. It is written using Qt and C++.
I don't use any AI, except for finding things in the documentation (replacing stack overflow and search engines I guess), and I am starting to enjoy the process again. Removing AI from my workflow was quite easy; simply use Emacs and stay away from more elaborate tooling.
In the project that I was running last year up to April we had to use Jetbrains IDEA, and it is loaded with things to make you stop thinking critically. I think that has been the biggest “oh man, is this what life has become?” driver. Luckily I am now able to leave that behind me. Obviously I could've just not used that tooling, but when everyone in a project uses it, it becomes a given really. In hindsight I now no longer remember all the things I did with it, while I can still remember that specific piece of code that I struggled with before the AI systems took over the thinking process.
Luckily Emacs does not force anything on you. The biggest helper I use in Emacs is lsp-mode.
Qt in Emacs
Qt comes with its own IDE, qt-creator, surprisingly mostly AI free. It has good completion for all the qml based syntax. Luckily lsp-emacs provides a good interface here as well. A combination of cmake and some elisp makes everything work together.
CMake
Qt applications build using cmake, and as a result you can make it generate all the necessary configuration you need.
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
set(QT_QML_GENERATE_QMLLS_INI ON)
The compiler commands will generate compiler_commands.json, which lsp will pick up and configure itself with.
Generating .qmlls.ini based on your cmake configuration will configure the QML Lanuage Server.
Emacs
The only thing that is left is to configure Emacs to support qmlls.
(eval-after-load 'lsp-mode
(lsp-register-client
(make-lsp-client :new-connection (lsp-stdio-connection
(lambda ()
(executable-find "qmlls")))
:activation-fn (lsp-activate-on "qml")
:priority -1
:server-id 'qml-ls)))
Thats it.