Closed liff closed 5 years ago
I am not sure why this patch is needed for Nix. Can't you just make up nix-shell command line with ccls-executable
and ccls-args
?
The command needs to refer to shell.nix
within the project. Given that ccls-executable
and -args
are variables, I don’t see how that could be done with them.
I think you can leverage dynamic binding of ccls-executable ccls-args
(defun +nix/ccls
(let ((ccls-executable "nix-shell") (ccls-args `("-I" "." "--command" ...))
(lsp)))
That works, thanks and sorry.
I suppose the reason why lsp-haskell
has it is that one can just call (lsp)
directly.
I suppose the reason why lsp-haskell has it is that one can just call (lsp) directly.
I've also commented in its PR as I don't think this custom variable is necessary. In any case, the example used isn't good either: the used append/list functions have some redundancy.
You can call (lsp)
directly if you (setq ccls-executable .. ccls-args ..)
correctly.
To make it possible to run ccls in
nix-shell
. Blatantly stolen almost verbatim from lsp-haskell.