Sublime Forum

Project variants

#1

Primarily what this feature about is the ability to change some project settings, but preserve everything else (i.e. workspace). I’m currently using sublime as a game programmer, and I need to work on multiple platforms. Most of the code is platform independent, but some small places are platform specific, and to work with those places I really need the correct clangd setup. I can achieve this by creating multiple projects, each with the specific lsp options pointing to a separate compile_commands.json file, but the problem is that this is a separate project with the separate workspace. So each time I stumble upon some platform specific code, I have to change the project, and then search this file again, and maybe some other files I needed. This is very cumbersome so most of the time I just don’t bother and try to understand the code without help from lsp.
One of the things I tried is to create a separate projects, but then create workspaces for them via hard links, so all the projects would use essentially the same workspace. This works somewhat, but now the problem that my build system is not changed. Because it appears that build systems and their variants are stored in workspace. I’m not sure why it was done, but it basically means that build system is more workspace specific rather then project specific. Again I can mitigate this by duplicating all build systems for all platforms on all projects, but this became harder to maintain.
I tried to search for any alternative, but I no longer sure such thing is possible on sublime (mb with some plugins, but I didn’t found any).

0 Likes