From 33b78ca8896d9ae15425ba751472b305a819dca6 Mon Sep 17 00:00:00 2001 From: Rutherther Date: Wed, 28 Aug 2024 20:33:40 +0200 Subject: [PATCH] feat: do not use electric space inside of vhdl literals --- init.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/init.el b/init.el index c94fb65..191bf89 100644 --- a/init.el +++ b/init.el @@ -1326,7 +1326,13 @@ (add-to-list 'eglot-server-programs '(vhdl-mode . ("vhdl_ls"))) (my/indent-variable-mode-alist-add vhdl-mode vhdl-basic-offset) -) + + (defun my/electric-space-not-in-strings (fun &rest args) + (if (vhdl-in-string-p) + (apply 'self-insert-command args) + (apply fun args))) + + (advice-add 'vhdl-electric-space :around #'my/electric-space-not-in-strings)) (my-use-package vhdl-ts-mode :ensure (:host github :repo "Rutherther/vhdl-ts-mode") -- 2.48.1