emacs-lsp / emacs-ccls

Emacs client for ccls, a C/C++ language server
200 stars 29 forks source link

Make ccls-initialization-options safe for local variables #47

Closed madscientist closed 5 years ago

madscientist commented 5 years ago

Due to the wide range of projects I work on I've been searching for ways to correctly customize them. It seems the "most approved" way so far is to use the .dir-locals.el facility to create directory-local variables: https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html

However, setting directory-local variables gives a warning unless they're declared to be safe. I've declared this safe in my init.el but it would be nice if ccls.el did this itself, with something like:

(put 'ccls-initialization-options 'safe-local-variable 'listp)

There may be other variables that are also appropriate for this treatment: I didn't check.