General refactor & cleanup, across the board
This commit is contained in:
parent
4ddc5c194b
commit
2d365619cd
35 changed files with 141 additions and 155 deletions
|
@ -669,7 +669,7 @@ startup (or theme switch) time, so long as `doom--prefer-theme-elc' is non-nil."
|
|||
|
||||
;; doesn't exist in terminal Emacs; we define it to prevent errors
|
||||
(unless (fboundp 'define-fringe-bitmap)
|
||||
(defun define-fringe-bitmap (&rest _)))
|
||||
(fset 'define-fringe-bitmap #'ignore))
|
||||
|
||||
(after! whitespace
|
||||
(defun doom-disable-whitespace-mode-in-childframes-a (orig-fn)
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
;;; config/default/+evil.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defun +default|disable-delete-selection-mode ()
|
||||
(defun +default-disable-delete-selection-mode-h ()
|
||||
(delete-selection-mode -1))
|
||||
(add-hook 'evil-insert-state-entry-hook #'delete-selection-mode)
|
||||
(add-hook 'evil-insert-state-exit-hook #'+default|disable-delete-selection-mode)
|
||||
(add-hook 'evil-insert-state-exit-hook #'+default-disable-delete-selection-mode-h)
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -109,7 +109,7 @@ If ARG (universal argument), runs `compile' from the current directory."
|
|||
((error "No kill-ring search backend available. Enable ivy or helm!")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default*newline-indent-and-continue-comments ()
|
||||
(defun +default--newline-indent-and-continue-comments-a ()
|
||||
"A replacement for `newline-and-indent'.
|
||||
|
||||
Continues comments if executed from a commented line, with special support for
|
||||
|
@ -159,7 +159,7 @@ possible, or just one char if that's not possible."
|
|||
((delete-char -1)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +default*delete-backward-char (n &optional killflag)
|
||||
(defun +default--delete-backward-char-a (n &optional killflag)
|
||||
"Same as `delete-backward-char', but preforms these additional checks:
|
||||
|
||||
+ If point is surrounded by (balanced) whitespace and a brace delimiter ({} []
|
||||
|
|
|
@ -195,10 +195,10 @@
|
|||
;; e) properly delete smartparen pairs when they are encountered, without
|
||||
;; the need for strict mode.
|
||||
;; f) do none of this when inside a string
|
||||
(advice-add #'delete-backward-char :override #'+default*delete-backward-char))
|
||||
(advice-add #'delete-backward-char :override #'+default--delete-backward-char-a))
|
||||
|
||||
;; Makes `newline-and-indent' continue comments (and more reliably)
|
||||
(advice-add #'newline-and-indent :override #'+default*newline-indent-and-continue-comments))
|
||||
(advice-add #'newline-and-indent :override #'+default--newline-indent-and-continue-comments-a))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
(after! helm (helm-migemo-mode +1)))))
|
||||
|
||||
|
||||
(use-package pangu-spacing
|
||||
(use-package! pangu-spacing
|
||||
:hook (text-mode . pangu-spacing-mode)
|
||||
:init
|
||||
;; replacing `chinese-two-byte' by `japanese'
|
||||
|
|
|
@ -56,9 +56,10 @@
|
|||
"b" #'omnisharp-unit-test-buffer)))
|
||||
|
||||
|
||||
;;;###package shader-mode
|
||||
(when (featurep! +unity)
|
||||
;; `shader-mode' --- unity shaders
|
||||
(add-to-list 'auto-mode-alist '("\\.shader$" . shader-mode))
|
||||
;; Unity shaders
|
||||
(add-to-list 'auto-mode-alist '("\\.shader\\'" . shader-mode))
|
||||
|
||||
(def-project-mode! +csharp-unity-mode
|
||||
:modes '(csharp-mode shader-mode)
|
||||
|
|
|
@ -32,18 +32,6 @@
|
|||
(when (featurep! +lsp)
|
||||
(add-hook 'elixir-mode-local-vars-hook #'lsp!))
|
||||
|
||||
(use-package! alchemist-company
|
||||
:when (featurep! :completion company)
|
||||
:commands alchemist-company
|
||||
:init
|
||||
(set-company-backend! 'elixir-mode '(alchemist-company company-yasnippet))
|
||||
:config
|
||||
;; Alchemist doesn't use hook symbols to add these backends, so we have to
|
||||
;; use the entire closure to get rid of it.
|
||||
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
|
||||
(remove-hook 'alchemist-mode-hook fn)
|
||||
(remove-hook 'alchemist-iex-mode-hook fn)))
|
||||
|
||||
(use-package! flycheck-credo
|
||||
:when (featurep! :tools flycheck)
|
||||
:config (flycheck-credo-setup)))
|
||||
|
@ -51,9 +39,24 @@
|
|||
|
||||
(use-package! alchemist
|
||||
:hook (elixir-mode . alchemist-mode)
|
||||
:init
|
||||
(after! elixir-mode
|
||||
(set-lookup-handlers! 'elixir-mode
|
||||
:definition #'alchemist-goto-definition-at-point
|
||||
:documentation #'alchemist-help-search-at-point)
|
||||
(set-eval-handler! 'elixir-mode #'alchemist-eval-region)
|
||||
(set-repl-handler! 'elixir-mode #'alchemist-iex-project-run)))
|
||||
|
||||
|
||||
(use-package! alchemist-company
|
||||
:when (featurep! :completion company)
|
||||
:commands alchemist-company
|
||||
:init
|
||||
(after! elixir-mode
|
||||
(set-company-backend! 'elixir-mode '(alchemist-company company-yasnippet)))
|
||||
:config
|
||||
(set-lookup-handlers! 'elixir-mode
|
||||
:definition #'alchemist-goto-definition-at-point
|
||||
:documentation #'alchemist-help-search-at-point)
|
||||
(set-eval-handler! 'elixir-mode #'alchemist-eval-region)
|
||||
(set-repl-handler! 'elixir-mode #'alchemist-iex-project-run))
|
||||
;; Alchemist doesn't use hook symbols to add these backends, so we have to use
|
||||
;; the entire closure to get rid of it.
|
||||
(let ((fn (byte-compile (lambda () (add-to-list (make-local-variable 'company-backends) 'alchemist-company)))))
|
||||
(remove-hook 'alchemist-mode-hook fn)
|
||||
(remove-hook 'alchemist-iex-mode-hook fn)))
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
;;; lang/elm/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; `elm-mode'
|
||||
(setq elm-format-on-save t)
|
||||
|
||||
(after! elm-mode
|
||||
(add-hook 'elm-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
;;; lang/erlang/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! erlang
|
||||
:mode ("\\.erlang$" . erlang-mode)
|
||||
:mode ("/rebar\\.config\\(?:\\.script\\)?$" . erlang-mode)
|
||||
:mode ("/\\(?:app\\|sys\\)\\.config$" . erlang-mode))
|
||||
:mode ("\\.erlang\\'" . erlang-mode)
|
||||
:mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode)
|
||||
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode))
|
||||
|
||||
|
||||
(use-package! flycheck-rebar3
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;;; lang/go/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;
|
||||
;; Packages
|
||||
;;; Packages
|
||||
|
||||
(after! go-mode
|
||||
(set-docsets! 'go-mode "Go")
|
||||
|
@ -59,8 +59,8 @@
|
|||
|
||||
|
||||
(use-package! company-go
|
||||
:when (and (featurep! :completion company)
|
||||
(not (featurep! +lsp)))
|
||||
:when (featurep! :completion company)
|
||||
:unless (featurep! +lsp)
|
||||
:after go-mode
|
||||
:config
|
||||
(set-company-backend! 'go-mode 'company-go)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;;; lang/julia/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package julia-mode
|
||||
(use-package! julia-mode
|
||||
:interpreter "julia"
|
||||
:config
|
||||
(set-repl-handler! 'julia-mode #'+julia/repl)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
:desc "gradlew build" "b" (λ! (+kotlin/run-gradlew "build"))
|
||||
:desc "gradlew test" "t" (λ! (+kotlin/run-gradlew "test"))))
|
||||
|
||||
|
||||
(use-package! flycheck-kotlin
|
||||
:when (featurep! :tools flycheck)
|
||||
:after kotlin-mode
|
||||
:config (add-hook 'kotlin-mode-hook #'flycheck-kotlin-setup))
|
||||
:hook (kotlin-mode . flycheck-kotlin-setup))
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
;;; lang/ledger/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; `ledger-mode'
|
||||
;;;###package ledger-mode
|
||||
(setq ledger-clear-whole-transactions 1)
|
||||
|
||||
(defun +ledger*check-version (orig-fn)
|
||||
(defadvice! +ledger--check-version-a (orig-fn)
|
||||
"Fail gracefully if ledger binary isn't available."
|
||||
:around #'ledger-check-version
|
||||
(if (executable-find ledger-binary-path)
|
||||
(funcall orig-fn)
|
||||
(message "Couldn't find '%s' executable" ledger-binary-path)))
|
||||
(advice-add #'ledger-check-version :around #'+ledger*check-version)
|
||||
|
||||
;; Restore leader key in ledger reports
|
||||
(map! :after ledger-mode
|
||||
|
@ -51,7 +51,8 @@
|
|||
(:prefix "g"
|
||||
"s" #'ledger-display-ledger-stats
|
||||
"b" #'ledger-display-balance-at-point))
|
||||
;; Fix inaccurate keybind message
|
||||
(defun +ledger*fix-key-help (&rest _)
|
||||
(message "q to quit; gr to redo; RET to edit; C-c C-s to save"))
|
||||
(advice-add #'ledger-report :after #'+ledger*fix-key-help))
|
||||
|
||||
(defadvice! +ledger--fix-key-help-a (&rest _)
|
||||
"Fix inaccurate keybind message."
|
||||
:after #'ledger-report
|
||||
(message "q to quit; gr to redo; RET to edit; C-c C-s to save")))
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
;;; lang/nim/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! nim-mode
|
||||
(defun +nim|init-nimsuggest-mode ()
|
||||
"Conditionally load `nimsuggest-mode', instead of clumsily erroring out if
|
||||
(add-hook! 'nim-mode-hook
|
||||
(defun +nim-init-nimsuggest-mode-h ()
|
||||
"Conditionally load `nimsuggest-mode', instead of clumsily erroring out if
|
||||
nimsuggest isn't installed."
|
||||
(unless (stringp nimsuggest-path)
|
||||
(setq nimsuggest-path (executable-find "nimsuggest")))
|
||||
(when (and nimsuggest-path (file-executable-p nimsuggest-path))
|
||||
(nimsuggest-mode)))
|
||||
(add-hook 'nim-mode-hook #'+nim|init-nimsuggest-mode)
|
||||
(unless (stringp nimsuggest-path)
|
||||
(setq nimsuggest-path (executable-find "nimsuggest")))
|
||||
(when (and nimsuggest-path (file-executable-p nimsuggest-path))
|
||||
(nimsuggest-mode))))
|
||||
|
||||
(when IS-WINDOWS
|
||||
;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode)
|
||||
|
|
|
@ -28,20 +28,20 @@
|
|||
|
||||
(use-package! utop
|
||||
:when (featurep! :tools eval)
|
||||
:hook (tuareg-mode . +ocaml|init-utop)
|
||||
:hook (tuareg-mode . +ocaml-init-utop-h)
|
||||
:init
|
||||
(set-repl-handler! 'tuareg-mode #'utop)
|
||||
(set-eval-handler! 'tuareg-mode #'utop-eval-region)
|
||||
(defun +ocaml|init-utop ()
|
||||
(defun +ocaml-init-utop-h ()
|
||||
(when (executable-find "utop")
|
||||
(utop-minor-mode)))))
|
||||
|
||||
|
||||
(use-package! merlin
|
||||
:unless (featurep! +lsp)
|
||||
:hook (tuareg-mode . +ocaml|init-merlin)
|
||||
:hook (tuareg-mode . +ocaml-init-merlin-h)
|
||||
:init
|
||||
(defun +ocaml|init-merlin ()
|
||||
(defun +ocaml-init-merlin-h ()
|
||||
"Activate `merlin-mode' if the ocamlmerlin executable exists."
|
||||
(when (executable-find "ocamlmerlin")
|
||||
(merlin-mode)))
|
||||
|
@ -62,9 +62,9 @@
|
|||
|
||||
(use-package! flycheck-ocaml
|
||||
:when (featurep! :tools flycheck)
|
||||
:hook (merlin-mode . +ocaml|init-flycheck)
|
||||
:hook (merlin-mode . +ocaml-init-flycheck-h)
|
||||
:config
|
||||
(defun +ocaml|init-flycheck ()
|
||||
(defun +ocaml-init-flycheck-h ()
|
||||
"Activate `flycheck-ocaml` if the current project possesses a .merlin file."
|
||||
(when (projectile-locate-dominating-file default-directory ".merlin")
|
||||
;; Disable Merlin's own error checking
|
||||
|
@ -90,9 +90,9 @@
|
|||
(use-package! ocp-indent
|
||||
;; must be careful to always defer this, it has autoloads that adds hooks
|
||||
;; which we do not want if the executable can't be found
|
||||
:hook (tuareg-mode . +ocaml|init-ocp-indent)
|
||||
:hook (tuareg-mode . +ocaml-init-ocp-indent-h)
|
||||
:config
|
||||
(defun +ocaml|init-ocp-indent ()
|
||||
(defun +ocaml-init-ocp-indent-h ()
|
||||
"Run `ocp-setup-indent', so long as the ocp-indent binary exists."
|
||||
(when (executable-find "ocp-indent")
|
||||
(ocp-setup-indent))))
|
||||
|
@ -101,12 +101,12 @@
|
|||
(use-package! ocamlformat
|
||||
:when (featurep! :editor format)
|
||||
:commands ocamlformat
|
||||
:hook (tuareg-mode . +ocaml|init-ocamlformat)
|
||||
:hook (tuareg-mode . +ocaml-init-ocamlformat-h)
|
||||
:config
|
||||
(set-formatter! 'ocamlformat #'ocamlformat
|
||||
:modes '(caml-mode tuareg-mode))
|
||||
;; TODO Fix region-based formatting support
|
||||
(defun +ocaml|init-ocamlformat ()
|
||||
(defun +ocaml-init-ocamlformat-h ()
|
||||
(setq +format-with 'ocp-indent)
|
||||
(when (and (executable-find "ocamlformat")
|
||||
(locate-dominating-file default-directory ".ocamlformat"))
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
(+org-present--make-invisible (match-beginning 1) (match-end 1)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-present|remove-overlays ()
|
||||
(defun +org-present-remove-overlays-h ()
|
||||
(mapc #'delete-overlay +org-present--overlays)
|
||||
(remove-from-invisibility-spec '(+org-present)))
|
||||
|
||||
|
@ -66,7 +66,7 @@
|
|||
(text-scale-set 0)
|
||||
(org-remove-latex-fragment-image-overlays)
|
||||
(set-face-attribute 'org-level-2 nil :height 1.0)
|
||||
(+org-present|remove-overlays)
|
||||
(+org-present-remove-overlays-h)
|
||||
(org-remove-inline-images)))))
|
||||
|
||||
|
||||
|
|
|
@ -24,14 +24,3 @@ ignore the cache."
|
|||
(require 'json)
|
||||
(json-read-file package-file)))
|
||||
(puthash project-root data +php-composer-conf))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +php|init-ac-php-core-eldoc ()
|
||||
"Initialize eldoc support for `php-mode' with `ac-php-core'. Fails gracefully
|
||||
if phpctags isn't installed."
|
||||
(require 'ac-php-core)
|
||||
(cond ((not ac-php-ctags-executable))
|
||||
((not (file-exists-p ac-php-ctags-executable))
|
||||
(message "Could not find phpctags executable, eldoc support is disabled")
|
||||
(message "To disable these warnings, set ac-php-ctags-executable to nil"))
|
||||
((ac-php-core-eldoc-setup))))
|
||||
|
|
|
@ -14,17 +14,12 @@
|
|||
:after plantuml-mode
|
||||
:config (flycheck-plantuml-setup))
|
||||
|
||||
;;
|
||||
;; 1. Add `:cmdline -charset utf-8' to org-src-block:plantuml
|
||||
;;
|
||||
;; 2. Fix `@start' prefix execute error
|
||||
;; When `C-c C-c' is executed in org-src-block:plantuml, if the code starts with
|
||||
;; `@', execution will go wrong. Must be preceded by `\' or `,' to execute
|
||||
;; normally. This code is automatically added `\' before `@start' when `C-c C-c'
|
||||
;; is executed, so that the execution can be carried out normally.
|
||||
;;
|
||||
|
||||
(after! ob-plantuml
|
||||
(defadvice! +plantuml--fix-atstart-in-org-src-blocks-a (args)
|
||||
"Fix error when executing plantuml src blocks in org-mode for code that
|
||||
begins with '@'. This character needs to be escaped with a backslash or comma
|
||||
for the block to execute correctly, so we do it automatically."
|
||||
:filter-args #'org-babel-execute:plantuml
|
||||
(cl-destructuring-bind (body params) args
|
||||
(let* ((origin-body body)
|
||||
|
@ -34,5 +29,6 @@
|
|||
"\\\\\\1"
|
||||
origin-body)))
|
||||
(list fix-body params))))
|
||||
|
||||
(add-to-list 'org-babel-default-header-args:plantuml
|
||||
'(:cmdline . "-charset utf-8")))
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
(add-hook! 'racket-mode-hook
|
||||
#'rainbow-delimiters-mode
|
||||
#'highlight-quoted-mode)
|
||||
(set-lookup-handlers! 'racket-mode :definition #'racket-visit-definition)
|
||||
|
||||
(map! :map (racket-mode-map racket-repl-mode-map)
|
||||
:i "[" #'racket-smart-open-bracket)
|
||||
|
|
|
@ -11,12 +11,12 @@
|
|||
(setq-hook! 'restclient-mode-hook
|
||||
imenu-generic-expression '((nil "^[A-Z]+\s+.+" 0)))
|
||||
|
||||
;; Forces underlying SSL verification to prompt for self-signed or invalid
|
||||
;; certs, rather than silently reject them.
|
||||
(defun +rest*permit-self-signed-ssl (orig-fn &rest args)
|
||||
(defadvice! +rest--permit-self-signed-ssl-a (orig-fn &rest args)
|
||||
"Forces underlying SSL verification to prompt for self-signed or invalid
|
||||
certs, rather than silently reject them."
|
||||
:around #'restclient-http-do
|
||||
(let (gnutls-verify-error tls-checktrust)
|
||||
(apply orig-fn args)))
|
||||
(advice-add #'restclient-http-do :around #'+rest*permit-self-signed-ssl)
|
||||
|
||||
(map! :map restclient-mode-map
|
||||
:n [return] #'+rest/dwim-at-point
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
;;; lang/ruby/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;
|
||||
;; Packages
|
||||
;;; Packages
|
||||
|
||||
(use-package! enh-ruby-mode
|
||||
:mode ("\\.\\(?:pry\\|irb\\)rc\\'" . +ruby|init)
|
||||
:mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby|init)
|
||||
:mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby|init)
|
||||
:mode ("\\.\\(?:pry\\|irb\\)rc\\'" . +ruby-init-h)
|
||||
:mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby-init-h)
|
||||
:mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby-init-h)
|
||||
:preface
|
||||
(after! ruby-mode
|
||||
(require 'enh-ruby-mode))
|
||||
(defun +ruby|init ()
|
||||
(defun +ruby-init-h ()
|
||||
"Enable `enh-ruby-mode' if ruby is available, otherwise `ruby-mode'."
|
||||
(if (executable-find "ruby")
|
||||
(enh-ruby-mode)
|
||||
|
@ -33,11 +33,11 @@
|
|||
(use-package! robe
|
||||
:defer t
|
||||
:init
|
||||
(defun +ruby|init-robe-mode-maybe ()
|
||||
"Start `robe-mode' if `lsp-mode' isn't active."
|
||||
(unless (bound-and-true-p lsp-mode)
|
||||
(robe-mode +1)))
|
||||
(add-hook 'enh-ruby-mode-hook #'+ruby|init-robe-mode-maybe)
|
||||
(add-hook! 'enh-ruby-mode-hook
|
||||
(defun +ruby-init-robe-mode-maybe-h ()
|
||||
"Start `robe-mode' if `lsp-mode' isn't active."
|
||||
(unless (bound-and-true-p lsp-mode)
|
||||
(robe-mode +1))))
|
||||
:config
|
||||
(set-repl-handler! 'enh-ruby-mode #'robe-start)
|
||||
(set-company-backend! 'enh-ruby-mode 'company-robe)
|
||||
|
@ -76,7 +76,7 @@
|
|||
|
||||
|
||||
;;
|
||||
;; Package & Ruby version management
|
||||
;;; Package & Ruby version management
|
||||
|
||||
(use-package! rake
|
||||
:defer t
|
||||
|
@ -111,7 +111,7 @@
|
|||
|
||||
|
||||
;;
|
||||
;; Testing frameworks
|
||||
;;; Testing frameworks
|
||||
|
||||
(use-package! rspec-mode
|
||||
:mode ("/\\.rspec\\'" . text-mode)
|
||||
|
|
|
@ -5,7 +5,8 @@
|
|||
;; indent block comments to first asterix, not second
|
||||
scala-indent:use-javadoc-style t)
|
||||
|
||||
(setq-hook! 'scala-mode-hook comment-line-break-function #'+scala-comment-indent-new-line)
|
||||
(setq-hook! 'scala-mode-hook
|
||||
comment-line-break-function #'+scala-comment-indent-new-line)
|
||||
|
||||
(after! dtrt-indent
|
||||
(add-to-list 'dtrt-indent-hook-mapping-list '(scala-mode c/c++/java scala-indent:step)))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
;;
|
||||
;; Packages
|
||||
|
||||
;; `solidity-mode'
|
||||
;;;###package solidity-mode
|
||||
(setq solidity-comment-style 'slash)
|
||||
|
||||
|
||||
|
@ -22,5 +22,5 @@
|
|||
:when (featurep! :completion company)
|
||||
:after solidity-mode
|
||||
:config
|
||||
(setq company-backends (delq 'company-solidity company-backends))
|
||||
(delq! 'company-solidity company-backends)
|
||||
(set-company-backend! 'solidity-mode 'company-solidity))
|
||||
|
|
|
@ -5,15 +5,15 @@
|
|||
|
||||
|
||||
(use-package! flycheck-swift
|
||||
:when (and (featurep! :tools flycheck)
|
||||
(not (featurep! +lsp)))
|
||||
:when (featurep! :tools flycheck)
|
||||
:unless (featurep! +lsp)
|
||||
:after swift-mode
|
||||
:config (flycheck-swift-setup))
|
||||
|
||||
|
||||
(use-package! company-sourcekit
|
||||
:when (and (featurep! :completion company)
|
||||
(not (featurep! +lsp)))
|
||||
:when (featurep! :completion company)
|
||||
:unless (featurep! +lsp)
|
||||
:after swift-mode
|
||||
:config
|
||||
(set-company-backend! 'swift-mode '(company-sourcekit company-yasnippet)))
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
;;; lang/lua/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;
|
||||
;; Major modes
|
||||
;;; Major modes
|
||||
|
||||
(use-package! terra-mode
|
||||
:defer t
|
||||
:config
|
||||
(set-lookup-handlers! 'terra-mode :documentation 'terra-search-documentation)
|
||||
(after! terra-mode
|
||||
(set-lookup-handlers! 'terra-mode
|
||||
:documentation #'terra-search-documentation)
|
||||
(set-electric! 'terra-mode :words '("else" "end"))
|
||||
(set-repl-handler! 'terra-mode #'+terra/open-repl)
|
||||
(set-company-backend! 'terra-mode '(company-lua company-yasnippet)))
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
;;; lang/web/+css.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; An improved newline+continue comment function
|
||||
(setq-hook! css-mode comment-indent-function #'+css/comment-indent-new-line)
|
||||
(setq-hook! css-mode
|
||||
comment-indent-function #'+css/comment-indent-new-line)
|
||||
|
||||
(map! :map (css-mode-map scss-mode-map less-css-mode-map)
|
||||
:localleader
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
;;; lang/web/+html.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! web-mode
|
||||
:mode "\\.p?html?$"
|
||||
:mode "\\.\\(?:tpl\\|blade\\)\\(\\.php\\)?$"
|
||||
:mode "\\.erb$"
|
||||
:mode "\\.jsp$"
|
||||
:mode "\\.as[cp]x$"
|
||||
:mode "\\.hbs$"
|
||||
:mode "\\.mustache$"
|
||||
:mode "\\.tsx$"
|
||||
:mode "\\.vue$"
|
||||
:mode "\\.twig$"
|
||||
:mode "\\.jinja$"
|
||||
:mode "wp-content/themes/.+/.+\\.php$"
|
||||
:mode "templates/.+\\.php$"
|
||||
:mode "\\.p?html?\\'"
|
||||
:mode "\\.\\(?:tpl\\|blade\\)\\(?:\\.php\\)?\\'"
|
||||
:mode "\\.erb\\'"
|
||||
:mode "\\.jsp\\'"
|
||||
:mode "\\.as[cp]x\\'"
|
||||
:mode "\\.hbs\\'"
|
||||
:mode "\\.mustache\\'"
|
||||
:mode "\\.tsx\\'"
|
||||
:mode "\\.vue\\'"
|
||||
:mode "\\.twig\\'"
|
||||
:mode "\\.jinja\\'"
|
||||
:mode "wp-content/themes/.+/.+\\.php\\'"
|
||||
:mode "templates/.+\\.php\\'"
|
||||
:config
|
||||
(set-docsets! 'web-mode "HTML" "CSS" "Twig" "WordPress")
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
|
||||
;;
|
||||
;; Framework-based minor-modes
|
||||
;;; Framework-based minor-modes
|
||||
|
||||
(def-project-mode! +web-jekyll-mode
|
||||
:modes '(web-mode js-mode coffee-mode css-mode haml-mode pug-mode)
|
||||
|
|
|
@ -55,13 +55,13 @@
|
|||
(defvar-local +magit--vc-is-stale-p nil)
|
||||
|
||||
;;;###autoload
|
||||
(defun +magit|refresh-vc-state-maybe ()
|
||||
(defun +magit-refresh-vc-state-maybe-h ()
|
||||
"Update `vc' and `git-gutter' if out of date."
|
||||
(when +magit--vc-is-stale-p
|
||||
(+magit--refresh-vc-in-buffer (current-buffer))))
|
||||
|
||||
;;;###autoload
|
||||
(add-hook 'doom-switch-buffer-hook #'+magit|refresh-vc-state-maybe)
|
||||
(add-hook 'doom-switch-buffer-hook #'+magit-refresh-vc-state-maybe-h)
|
||||
|
||||
;;;###autoload
|
||||
(defun +magit/quit (&optional _kill-buffer)
|
||||
|
|
|
@ -33,19 +33,19 @@
|
|||
(put (car sym) 'safe-local-variable (cdr sym)))
|
||||
|
||||
;; Maybe auto-upload on save
|
||||
(defun +upload|init-after-save ()
|
||||
(when (and (bound-and-true-p ssh-deploy-root-remote)
|
||||
ssh-deploy-on-explicit-save)
|
||||
(ssh-deploy-upload-handler)))
|
||||
(add-hook 'after-save-hook #'+upload|init-after-save)
|
||||
(add-hook! 'after-save-hook
|
||||
(defun +upload-init-after-save-h ()
|
||||
(when (and (bound-and-true-p ssh-deploy-root-remote)
|
||||
ssh-deploy-on-explicit-save)
|
||||
(ssh-deploy-upload-handler))))
|
||||
|
||||
;; Enable ssh-deploy if variables are set, and check for changes on open file
|
||||
;; (if possible)
|
||||
(defun +upload|init-find-file ()
|
||||
(when (bound-and-true-p ssh-deploy-root-remote)
|
||||
(require 'ssh-deploy)
|
||||
(unless ssh-deploy-root-local
|
||||
(setq ssh-deploy-root-local (doom-project-root)))
|
||||
(when ssh-deploy-automatically-detect-remote-changes
|
||||
(ssh-deploy-remote-changes-handler))))
|
||||
(add-hook 'find-file-hook #'+upload|init-find-file))
|
||||
(add-hook! 'find-file-hook
|
||||
(defun +upload-init-find-file-h ()
|
||||
(when (bound-and-true-p ssh-deploy-root-remote)
|
||||
(require 'ssh-deploy)
|
||||
(unless ssh-deploy-root-local
|
||||
(setq ssh-deploy-root-local (doom-project-root)))
|
||||
(when ssh-deploy-automatically-detect-remote-changes
|
||||
(ssh-deploy-remote-changes-handler))))))
|
||||
|
|
|
@ -112,11 +112,11 @@
|
|||
("~~>" . #Xe169)
|
||||
("%%" . #Xe16a)))
|
||||
|
||||
(defun +pretty-code|setup-fira-ligatures ()
|
||||
(defun +pretty-code-setup-fira-ligatures-h ()
|
||||
(set-fontset-font t '(#Xe100 . #Xe16f) +pretty-code-fira-code-font-name)
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
(mapcar #'+pretty-code--correct-symbol-bounds
|
||||
+pretty-code-fira-code-font-ligatures))))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code|setup-fira-ligatures)
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-fira-ligatures-h)
|
||||
|
|
|
@ -48,11 +48,11 @@
|
|||
("<->" . #Xe129)))
|
||||
|
||||
|
||||
(defun +pretty-code|setup-hasklig-ligatures ()
|
||||
(defun +pretty-code-setup-hasklig-ligatures-h ()
|
||||
(set-fontset-font t '(#Xe100 . #Xe129) +pretty-code-hasklig-font-name)
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
(mapcar #'+pretty-code--correct-symbol-bounds
|
||||
+pretty-code-hasklig-font-ligatures))))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code|setup-hasklig-ligatures)
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-hasklig-ligatures-h)
|
||||
|
|
|
@ -223,11 +223,10 @@
|
|||
("+>" . #Xe1cc))
|
||||
"Defines the character mappings for ligatures for Iosevka.")
|
||||
|
||||
(defun +pretty-code|setup-iosevka-ligatures ()
|
||||
(defun +pretty-code-setup-iosevka-ligatures-h ()
|
||||
(set-fontset-font t '(#Xe100 . #Xe1cc) +pretty-code-iosevka-font-name)
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
+pretty-code-iosevka-font-ligatures)))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code|setup-iosevka-ligatures)
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-iosevka-ligatures-h)
|
||||
|
|
|
@ -198,10 +198,10 @@
|
|||
("\">" . #XEA90))
|
||||
"Defines the character mappings for ligatures for Pragmata Pro.")
|
||||
|
||||
(defun +pretty-code|setup-pragmata-pro-ligatures ()
|
||||
(defun +pretty-code-setup-pragmata-pro-ligatures-h ()
|
||||
(setq-default prettify-symbols-alist
|
||||
(append prettify-symbols-alist
|
||||
(mapcar #'+pretty-code--correct-symbol-bounds
|
||||
+pretty-code-pragmata-pro-font-ligatures))))
|
||||
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code|setup-pragmata-pro-ligatures)
|
||||
(add-hook 'doom-init-ui-hook #'+pretty-code-setup-pragmata-pro-ligatures-h)
|
||||
|
|
|
@ -17,7 +17,7 @@ besides what is listed.")
|
|||
;; When you get to the right edge, it goes back to how it normally prints
|
||||
(setq prettify-symbols-unprettify-at-point 'right-edge)
|
||||
|
||||
(defun +pretty-code|init-pretty-symbols ()
|
||||
(defun +pretty-code-init-pretty-symbols-h ()
|
||||
"Enable `prettify-symbols-mode'.
|
||||
|
||||
If in fundamental-mode, or a mode derived from special, comint, eshell or term
|
||||
|
@ -39,4 +39,4 @@ Otherwise it builds `prettify-code-symbols-alist' according to
|
|||
(prettify-symbols-mode -1))
|
||||
(prettify-symbols-mode +1))))
|
||||
|
||||
(add-hook 'after-change-major-mode-hook #'+pretty-code|init-pretty-symbols)
|
||||
(add-hook 'after-change-major-mode-hook #'+pretty-code-init-pretty-symbols-h)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue