Closed kelvie closed 8 months ago
Is there any error when setting the variable? What's the value of copilot-indentation-alist
? 🤔 I don't think defcustom
and defvar
would make any differences.
Debugger entered--Lisp error: (wrong-type-argument symbolp 2)
#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_35>(2)
cl-some(#<subr F616e6f6e796d6f75732d6c616d626461_anonymous_lambda_35> (2))
copilot--infer-indentation-offset()
copilot--generate-doc()
copilot--get-completion(#f(compiled-function (jsonrpc-lambda-elem1) #<bytecode 0xff2af3ebacb1718>))
copilot-complete()
copilot--post-command-debounce(#<buffer userscript.org>)
apply(copilot--post-command-debounce #<buffer userscript.org>)
timer-event-handler([t 0 0 0 nil copilot--post-command-debounce (#<buffer userscript.org>) idle 0 nil])
There is no error in the add-to-list
of course
Looks like it's here, when the alist-get
returns 2
, that lambda doesn't like that (never used common lisp before).
Edit: Ah it calls symbol-value
on the value, so I guess it only accepts symbols (it could check if it's a number I suppose)
This should be fixed by #253 (thanks to @kelvie! :trophy:). I have tested this on my side but feel free to re-open if it is not resolved.
e.g. you can't set
(add-to-list 'copilot-indentation-alist '(org-mode 2)
, but if you use a defvar, like here: https://github.com/chloelee767/dotfiles/blob/feba957413eab9de115c8a46301208d708a76245/doom/.doom.d/config.el#L220-L227It'll work.