General cleanup + refactor
This commit is contained in:
parent
45122cdea5
commit
4356f894fd
9 changed files with 18 additions and 15 deletions
|
@ -212,6 +212,8 @@ properties."
|
|||
;; Hacks
|
||||
;;
|
||||
|
||||
;; Run these as late as possible, to give a chance for other modules to
|
||||
;; customize these settings in their own hooks.
|
||||
(add-hook! 'window-setup-hook
|
||||
(after! evil
|
||||
(let ((map doom-popup-mode-map))
|
||||
|
|
|
@ -15,7 +15,7 @@ by `+eval/build', and filled with the `:build' setting")
|
|||
eval-expression-print-level nil)
|
||||
|
||||
(def-setting! :repl (mode command)
|
||||
"Define a REPL for a mode. Takes same arguements as `rtog/add-repl'."
|
||||
"Define a REPL for a mode. Takes the same arguements as `rtog/add-repl'."
|
||||
`(after! repl-toggle
|
||||
(rtog/add-repl ',mode ',command)))
|
||||
|
||||
|
@ -63,7 +63,8 @@ suitability for the current buffer."
|
|||
quickrun-shell
|
||||
quickrun-compile-only
|
||||
quickrun-replace-region)
|
||||
:init (add-hook 'quickrun/mode-hook 'linum-mode)
|
||||
:init
|
||||
(add-hook 'quickrun/mode-hook 'linum-mode)
|
||||
:config
|
||||
(set! :popup "*quickrun*" :size 10)
|
||||
|
||||
|
@ -71,7 +72,7 @@ suitability for the current buffer."
|
|||
(setq quickrun-focus-p nil)
|
||||
|
||||
(defun +repl*quickrun-close-popup (&optional _ _ _ _)
|
||||
"Allows us to re-run quickrun from inside the quickrun buffer (silently)."
|
||||
"Allows us to silently re-run quickrun from within the quickrun buffer."
|
||||
(awhen (get-buffer-window quickrun/buffer-name)
|
||||
(let (message-log-max)
|
||||
(quickrun/kill-running-process)
|
||||
|
@ -79,7 +80,7 @@ suitability for the current buffer."
|
|||
(doom/popup-close it)))
|
||||
|
||||
(defun +repl|quickrun-scroll-to-bof ()
|
||||
"Ensures window is scrolled to BOF"
|
||||
"Ensures window is scrolled to BOF on invocation."
|
||||
(with-selected-window (get-buffer-window quickrun/buffer-name)
|
||||
(goto-char (point-min))))
|
||||
|
||||
|
@ -93,14 +94,13 @@ suitability for the current buffer."
|
|||
(def-package! repl-toggle
|
||||
:commands rtog/toggle-repl
|
||||
:preface (defvar rtog/mode-repl-alist nil)
|
||||
:init (add-hook! repl-toggle-mode (evil-initialize-state 'emacs))
|
||||
:config
|
||||
(set! :popup
|
||||
'(:custom (lambda (b &rest _)
|
||||
(when (and (featurep 'repl-toggle)
|
||||
(string-prefix-p "*" (buffer-name (get-buffer b))))
|
||||
(buffer-local-value 'repl-toggle-mode b))))
|
||||
:popup t :size 16)
|
||||
:size 16)
|
||||
|
||||
(map! :map repl-toggle-mode-map
|
||||
:ei "C-n" 'comint-next-input
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(set! :build 'compile-file 'java-mode 'meghanada-compile-file)
|
||||
(set! :build 'compile-project 'java-mode 'meghanada-compile-project)
|
||||
|
||||
(setq meghanada-server-install-dir (expand-file-name "meghanada-server" doom-cache-dir)
|
||||
(setq meghanada-server-install-dir (expand-file-name "meghanada-server/" doom-cache-dir)
|
||||
meghanada-use-company t
|
||||
meghanada-use-flycheck t
|
||||
meghanada-use-auto-start t)
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;;; lang/org/+attach.el --- -*- no-byte-compile: t; -*-
|
||||
;;; lang/org/+attach.el
|
||||
|
||||
;; FIXME
|
||||
;; FIXME Needs to be rewritten
|
||||
;;
|
||||
;; Initializes my own org-mode attachment system. I didn't like Org's native
|
||||
;; one. Mine stores attachments in a global org .attach directory. It also
|
||||
;; implements drag-and-drop file support and attachment icons. It also treats
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; lang/org/+capture.el --- -*- no-byte-compile: t; -*-
|
||||
;;; lang/org/+capture.el
|
||||
|
||||
;; Sets up two `org-capture' workflows that I like:
|
||||
;;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;;; lang/org/+export.el --- -*- no-byte-compile: t; -*-
|
||||
;;; lang/org/+export.el
|
||||
|
||||
;; My own, centralized exporting system as well.
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
|
||||
;; A few things you can expect
|
||||
;; + `org-capture' in a popup frame (can be invoked from outside emacs too)
|
||||
;; + A simpler attachment system (with auto-deleting support) and
|
||||
;; drag-and-drop for images and documents into org files
|
||||
;; + Exported files are put in a centralized location (see
|
||||
;; `org-export-directory')
|
||||
;; + TODO A simpler attachment system (with auto-deleting support) and
|
||||
;; drag-and-drop for images and documents into org files
|
||||
;; + TODO Custom links for class notes
|
||||
;; + TODO An org-mode based CRM (including invoicing and pdf exporting) (see custom-crm)
|
||||
;; + TODO A tag-based file browser reminiscient of Evernote and Quiver (there's neotree too!)
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
(add-hook 'swift-mode-hook 'flycheck-mode)
|
||||
:config
|
||||
(set! :repl 'swift-mode 'swift-mode-run-repl) ; TODO test this
|
||||
(after! flycheck (push 'swift flycheck-checkers)))
|
||||
(push 'swift flycheck-checkers))
|
||||
|
||||
|
||||
(def-package! company-sourcekit
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
:init
|
||||
(add-hook 'typescript-mode-hook 'rainbow-delimiters-mode)
|
||||
:config
|
||||
(set! :company-backend 'typescript-mode '(company-tide))
|
||||
(set! :electric 'typescript-mode :chars '(?\} ?\)) :words '("||" "&&"))
|
||||
|
||||
;; TODO tide-jump-back
|
||||
|
@ -39,6 +38,7 @@
|
|||
(def-package! tide
|
||||
:after typescript-mode
|
||||
:config
|
||||
(set! :company-backend 'typescript-mode '(company-tide))
|
||||
(setq tide-format-options
|
||||
'(:insertSpaceAfterFunctionKeywordForAnonymousFunctions t
|
||||
:placeOpenBraceOnNewLineForFunctions nil)))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue