Making Emacs LSP work with Rust conditional features

So here is where it all started. I'm working on a Rust project that makes heavy use of conditional compilation through cargo features. The codebase has chunks of code that are only compiled when certain features are enabled, like this: #[cfg(feature = 'generate_templates' )] mod cert ; #[cfg(feature = 'generate_templates' )] mod code_gen ; #[cfg(feature = 'generate_templates' )] mod csr ;…