jdtsmith / kind-icon

Completion kind text/icon prefix labelling for emacs in-region completion
GNU Affero General Public License v3.0
174 stars 4 forks source link

Use a separate kind-icon--cache #2

Closed minad closed 2 years ago

minad commented 2 years ago

Currently you cache the values inside the defcustom kind-icon-mapping. I'd consider it better style if you introduce a separate variable for this, since as a user one may want inspect the customizable variables and it is odd to see them then modified programmatically behind the back. Furthermore I worry that this could lead to bad effects when the customized value is persisted in the init.el/custom.el?

jdtsmith commented 2 years ago

I had considered that, but the modification is only in the form of adding an additional property, never removing the user's customizations. I hadn't considered whether the cache could leak into the init file though, let me look at that.

minad commented 2 years ago

I think it can if the cache is filled, you customize and then save. But this is besides the point - even the need to look into this or the need to discuss this clearly shows that using a separate variable is better.

jdtsmith commented 2 years ago

Agreed. Fixed in 0921fe2.