I’ve made a snap for https://github.com/3v1n0/clangd-snap in order to use it with any Language Server Protocol supported editors (vim, emacs, sublime, vscode, atom…) to get proper intelligent completion.
While this wouldn’t need any special confinement to run, it actually needs to read the include files.
Now, I was thinking to request an interface for reading system /usr/include files, but this wouldn’t be actually enough in real environment scenarios where people is installing headers everywhere and using tools such as jhbuild.
Then although this doesn’t need any write ability (it would be nice to add a “classic-readonly” :-)), I think that the classic mode is the only option we have to get this working.