MaskRay / ccls

C/C++/ObjC language server supporting cross references, hierarchies, completion and semantic highlighting
Apache License 2.0
3.73k stars 255 forks source link

Use SYSTEM ENVIRONMENT in .ccls file #846

Closed GinShio closed 2 years ago

GinShio commented 2 years ago

I download a lib and I want to use it, export it path in shell, this env var is found in emacs (getenv),

so i want to include it, add line to .ccls file like

-I${env:ENVPATH}

then i delete .ccls-cache and restart lsp in workspace, but it isn't work

could i can include system environment path or use absolute path in .ccls

System information

MaskRay commented 2 years ago

This looks like a client feature request to me. The client may have some way to use a template to generate customized initialization-options (https://github.com/MaskRay/ccls/wiki/Customization#initialization-options). Imagine that if the server is not spawned by the client, its environment variables may not be expected, so only the client has the information.