copilot-emacs / copilot.el

An unofficial Copilot plugin for Emacs.
MIT License
1.79k stars 126 forks source link

[fix] Error indentation offset got with non-number type variable #161

Closed hikycool closed 1 year ago

hikycool commented 1 year ago

Some indent-offset variable is not a number type for default value. Example: In c++-ts-mode, "c-basic-offset" is default type of "symbol" and default value is "set-from-style". And in the function of "copilot--infer-indentation-offset" will return value of "set-from-style".

Change: Add a new judgment before returning indent-offset