From 7c48fdd049abdc7ebec05d72edd3583320039737 Mon Sep 17 00:00:00 2001 From: Jack Foltz Date: Fri, 3 May 2019 09:02:33 -0400 Subject: [PATCH] Fix java defs --- lain/.emacs.d/config.org | 56 ++++++++++++++++++++++++++++++------------------ 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/lain/.emacs.d/config.org b/lain/.emacs.d/config.org index 116d080..4059c60 100644 --- a/lain/.emacs.d/config.org +++ b/lain/.emacs.d/config.org @@ -832,6 +832,20 @@ And [[https://www.emacswiki.org/emacs/ParEdit][ParEdit]] handles the rest. :diminish :commands enable-paredit-mode) #+END_SRC +**** Lispyville +And now Lispyville handles the rest. +#+BEGIN_SRC emacs-lisp + (use-package lispyville + :commands lispyville-mode + :config + (lispyville-set-key-theme + '(operators + c-w + slurp/barf-cp + commentary + (escape insert) + (additional-movement normal visual motion)))) +#+END_SRC **** Evil-Cleverparens [[https://github.com/luxbock/evil-cleverparens][Evil-Cleverparens]] adds additional features to Evil all about working with sexps, including keeping parens balanced when @@ -841,33 +855,32 @@ using commands like =dd=. :diminish :commands evil-cleverparens-mode) #+END_SRC +**** Activation +Add a hook to enable paren helper modes for any prog-mode buffer +#+BEGIN_SRC emacs-lisp + (defun jf-paren-mode () + "Pick a suitable parenthesis mode for the current major mode." + (electric-pair-mode) + (if (member major-mode '(emacs-lisp-mode + lisp-mode + lisp-interaction-mode + scheme-mode)) + (lispyville-mode) + (smartparens-mode))) + + (add-hook 'prog-mode-hook #'jf-paren-mode) +#+END_SRC **** Helpers Helpers for wrangling sexps #+BEGIN_SRC emacs-lisp (jf-kbd-defmacro jf-wrap-fn-inline - "ESC i{ DEL RET TAB ESC jI} SPC ESC k^") + "ESC i C-q { RET TAB ESC jI} SPC ESC k^") (jf-kbd-defmacro jf-wrap-fn-line - "ESC kA SPC { DEL ESC jjI} SPC ESC k^") + "ESC kA SPC C-q { ESC jjI} SPC ESC k^") (jf-kbd-defmacro jf-wrap-fn-sexp - "ESC i{ DEL RET TAB ESC )i} ESC i RET ESC k^") -#+END_SRC -**** Activation -Pick a suitable parenthesis editing mode for the -current major mode when entering any prog-mode derivative. -#+BEGIN_SRC emacs-lisp - (defun jf-paren-mode () - (electric-pair-mode) - (lispyville-mode)) - ;; (if (member major-mode '(emacs-lisp-mode - ;; lisp-mode - ;; lisp-interaction-mode - ;; scheme-mode)) - ;; (enable-paredit-mode) - ;; (smartparens-mode))) - - (add-hook 'prog-mode-hook #'jf-paren-mode) + "ESC i C-q { RET TAB ESC )i} ESC i RET ESC k^") #+END_SRC *** Whitespace **** ws-butler @@ -920,7 +933,6 @@ pretty-mode left off. (add-hook 'python-mode-hook #'prettify-symbols-mode) (add-hook 'python-mode-hook #'jf-prettify-python) #+END_SRC - ** Checkers *** Flycheck Flycheck highlights syntax errors in a few languages. @@ -1235,6 +1247,7 @@ company-irony for company integration (use-package elixir-mode :mode "\\.exs?\\'" :hook (elixir-mode . lsp)) +#+END_SRC *** Java **** Eclim Secretly actually use eclipse in the background in the form of eclimd @@ -1252,7 +1265,8 @@ for all of the IDE like features. :company java-mode) #+END_SRC **** Gradle -The std:: java build system +The std:: java build system #+BEGIN_SRC emacs-lisp (use-package gradle-mode :commands gradle-mode) +#+END_SRC