News for hackers. Stuff that matters.
Re:Neovim 0.5 is overpowering by SavantIdiot on Wednesday May 26, 2021 @03:12PM (#27294790)
Aren't these features are subject to external configuration to behave properly? For example, C/C++ and #defines. The user has to configure yet another file for this to work properly. If the build system/tree is so complicated that I can't figure out what the final #defs are (like building MBED programs with literally a thousand #defs), I end up shutting off this feature entirely. This kills me with VSCode & Sublime, but Eclipse derivatives are usually more tightly coupled. What about neovim?
Re:Neovim 0.5 is overpowering by Asooka on Wednesday May 26, 2021 @07:11PM (#27297282)
You make your build system emit a compile-definitions.json file that has all the compiler flags for every file you compile and feed it to a language server (rtags or clangd usually, either standalone or part of another plugin like YouCompleteMe). CMake has a flag to do that as part of its configuration step (and remembers it), for other build systems you can use something like bear: https://github.com/rizsotto/Bear .
Re:Neovim 0.5 is overpowering by samus on Thursday May 27, 2021 @02:26PM (#27306367)
For future reference, as I found this information to be difficult to find: the flag for CMake is `CMAKE_EXPORT_COMPILE_COMMANDS=YES`. In out-of-source builds, the output file will be in the build directory, therefore one has to create a symlink to ensure the language server finds it in the project root.