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.
This commit is contained in:
parent
d0fbd88647
commit
281cc919cd
1 changed files with 2 additions and 28 deletions
30
init.org
30
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))
|
(if (not (file-exists-p lsp_dir))
|
||||||
(mkdir lsp_dir t)))
|
(mkdir lsp_dir t)))
|
||||||
#+END_SRC
|
#+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
|
** Configure Selected Languages
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
|
@ -1271,6 +1243,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
|
||||||
:hook
|
:hook
|
||||||
(tuareg-mode . eglot-ensure))
|
(tuareg-mode . eglot-ensure))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Go Support
|
*** Go Support
|
||||||
#+BEGIN_SRC emacs-lisp :tangle no
|
#+BEGIN_SRC emacs-lisp :tangle no
|
||||||
;; configure go support
|
;; configure go support
|
||||||
|
@ -1280,6 +1253,7 @@ see also [[https://www.masteringemacs.org/article/how-to-get-started-tree-sitter
|
||||||
:hook
|
:hook
|
||||||
(go-ts . eglot-ensure))
|
(go-ts . eglot-ensure))
|
||||||
#+END_SRC
|
#+END_SRC
|
||||||
|
|
||||||
*** Javascript, Typescript, TSC, etc...
|
*** Javascript, Typescript, TSC, etc...
|
||||||
#+BEGIN_SRC emacs-lisp
|
#+BEGIN_SRC emacs-lisp
|
||||||
;; configure typescript support
|
;; configure typescript support
|
||||||
|
|
Loading…
Add table
Reference in a new issue