From 281cc919cd769a0f79d7ed63a5cd815aba3406e9 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Thu, 17 Jul 2025 12:47:57 +0200 Subject: [PATCH] remove electric return Was not activated as far as I can tell. It also feels like something which should be managed by the mode of the buffer. --- init.org | 30 ++---------------------------- 1 file changed, 2 insertions(+), 28 deletions(-) diff --git a/init.org b/init.org index e23d38a..5e1634f 100644 --- a/init.org +++ b/init.org @@ -1191,34 +1191,6 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter (if (not (file-exists-p lsp_dir)) (mkdir lsp_dir t))) #+END_SRC -*** Electric Return -#+BEGIN_SRC emacs-lisp - ;; enable electric return to automatically indent code - (defvar electrify-return-match - "[\]}\)\"]" - "The text after the cursor to do an \"electric\" return.") - - (defun electrify-return-if-match (arg) - "Insert a newline, and indent it when needed. - - If the text after the cursor matches `electrify-return-match' then - open and indent an empty line between the cursor and the text. Move the - cursor to the new line. - - With a prefix argument ARG, insert that many newlines" - (interactive "P") - (let ((case-fold-search nil)) - (if (looking-at electrify-return-match) - (save-excursion (newline-and-indent))) - (newline arg) - (indent-according-to-mode))) - - ;; Using local-set-key in a mode-hook is a better idea. - ;(global-set-key (kbd "RET") 'electrify-return-if-match) -#+END_SRC - - -**** TODO Evaluate if Electric Return is still useful ** Configure Selected Languages #+BEGIN_SRC emacs-lisp @@ -1271,6 +1243,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter :hook (tuareg-mode . eglot-ensure)) #+END_SRC + *** Go Support #+BEGIN_SRC emacs-lisp :tangle no ;; configure go support @@ -1280,6 +1253,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter :hook (go-ts . eglot-ensure)) #+END_SRC + *** Javascript, Typescript, TSC, etc... #+BEGIN_SRC emacs-lisp ;; configure typescript support