Merge branch 'develop' into lsp-tex
This commit is contained in:
commit
96276a688d
263 changed files with 4049 additions and 2644 deletions
|
@ -6,11 +6,11 @@
|
|||
:recipe (:host github :repo "agda/agda"
|
||||
:files ("src/data/emacs-mode/agda-input.el")
|
||||
:nonrecursive t)
|
||||
:pin "74d9fd53cd")
|
||||
:pin "ff9173e14e")
|
||||
|
||||
(package! agda2-mode
|
||||
:recipe (:host github :repo "agda/agda"
|
||||
:files ("src/data/emacs-mode/*.el"
|
||||
(:exclude "agda-input.el"))
|
||||
:nonrecursive t)
|
||||
:pin "74d9fd53cd"))
|
||||
:pin "ff9173e14e"))
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
;;; lang/assembly/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(add-to-list 'auto-mode-alist '("\\.hax\\'" . haxor-mode))
|
|
@ -1,6 +0,0 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/assembly/packages.el
|
||||
|
||||
(package! mips-mode :pin "75152fc78b")
|
||||
(package! haxor-mode :pin "6fa25a8e6b")
|
||||
(package! nasm-mode :pin "65ca6546fc")
|
|
@ -33,28 +33,24 @@ This is ignored by ccls.")
|
|||
;;; Packages
|
||||
|
||||
(use-package! cc-mode
|
||||
:commands (c-mode c++-mode objc-mode java-mode)
|
||||
:mode ("\\.mm\\'" . objc-mode)
|
||||
:init
|
||||
;; Activate `c-mode', `c++-mode' or `objc-mode' depending on heuristics
|
||||
(add-to-list 'auto-mode-alist '("\\.h\\'" . +cc-c-c++-objc-mode))
|
||||
|
||||
;; Ensure find-file-at-point works in C modes, must be added before irony
|
||||
;; and/or lsp hooks are run.
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook
|
||||
objc-mode-local-vars-hook)
|
||||
#'+cc-init-ffap-integration-h)
|
||||
|
||||
;; Use `c-mode'/`c++-mode'/`objc-mode' depending on heuristics
|
||||
:mode ("\\.h\\'" . +cc-c-c++-objc-mode)
|
||||
;; Ensure find-file-at-point recognize system libraries in C modes. It must be
|
||||
;; set up before the likes of irony/lsp are initialized. Also, we use
|
||||
;; local-vars hooks to ensure these only run in their respective major modes,
|
||||
;; and not their derived modes.
|
||||
:hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-ffap-integration-h)
|
||||
;;; Improve fontification in C/C++ (also see `modern-cpp-font-lock')
|
||||
:hook (c-mode-common . rainbow-delimiters-mode)
|
||||
:hook ((c-mode c++-mode) . +cc-fontify-constants-h)
|
||||
:config
|
||||
(set-electric! '(c-mode c++-mode objc-mode java-mode) :chars '(?\n ?\} ?\{))
|
||||
(set-docsets! 'c-mode "C")
|
||||
(set-docsets! 'c++-mode "C++" "Boost")
|
||||
|
||||
(set-electric! '(c-mode c++-mode objc-mode java-mode) :chars '(?\n ?\} ?\{))
|
||||
(set-rotate-patterns! 'c++-mode
|
||||
:symbols '(("public" "protected" "private")
|
||||
("class" "struct")))
|
||||
|
||||
(set-pretty-symbols! '(c-mode c++-mode)
|
||||
;; Functional
|
||||
;; :def "void "
|
||||
|
@ -71,9 +67,12 @@ This is ignored by ccls.")
|
|||
:return "return"
|
||||
:yield "#require")
|
||||
|
||||
;;; Better fontification (also see `modern-cpp-font-lock')
|
||||
(add-hook 'c-mode-common-hook #'rainbow-delimiters-mode)
|
||||
(add-hook! '(c-mode-hook c++-mode-hook) #'+cc-fontify-constants-h)
|
||||
;; HACK Suppress 'Args out of range' error in when multiple modifications are
|
||||
;; performed at once in a `c++-mode' buffer, e.g. with `iedit' or
|
||||
;; multiple cursors.
|
||||
(undefadvice! +cc--suppress-silly-errors-a (orig-fn &rest args)
|
||||
:around #'c-after-change-mark-abnormal-strings
|
||||
(ignore-errors (apply orig-fn args)))
|
||||
|
||||
;; Custom style, based off of linux
|
||||
(setq c-basic-offset tab-width
|
||||
|
@ -122,23 +121,21 @@ This is ignored by ccls.")
|
|||
|
||||
(use-package! irony
|
||||
:unless (featurep! +lsp)
|
||||
:commands (irony-install-server irony-mode)
|
||||
:preface
|
||||
(setq irony-server-install-prefix (concat doom-etc-dir "irony-server/"))
|
||||
:init
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook
|
||||
objc-mode-local-vars-hook)
|
||||
(defun +cc-init-irony-mode-h ()
|
||||
(if (file-directory-p irony-server-install-prefix)
|
||||
(irony-mode +1)
|
||||
(message "Irony server isn't installed"))))
|
||||
:config
|
||||
(setq irony-cdb-search-directory-list '("." "build" "build-conda"))
|
||||
|
||||
:commands irony-install-server
|
||||
;; Initialize compilation database, if present. Otherwise, fall back on
|
||||
;; `+cc-default-compiler-options'.
|
||||
(add-hook 'irony-mode-hook #'+cc-init-irony-compile-options-h)
|
||||
:hook (irony-mode . +cc-init-irony-compile-options-h)
|
||||
;; Only initialize `irony-mode' if the server is available. Otherwise fail
|
||||
;; quietly and gracefully.
|
||||
:hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-irony-mode-maybe-h)
|
||||
:preface (setq irony-server-install-prefix (concat doom-etc-dir "irony-server/"))
|
||||
:config
|
||||
(defun +cc-init-irony-mode-maybe-h ()
|
||||
(if (file-directory-p irony-server-install-prefix)
|
||||
(irony-mode +1)
|
||||
(message "Irony server isn't installed")))
|
||||
|
||||
(setq irony-cdb-search-directory-list '("." "build" "build-conda"))
|
||||
|
||||
(use-package! irony-eldoc
|
||||
:hook (irony-mode . irony-eldoc))
|
||||
|
@ -149,19 +146,15 @@ This is ignored by ccls.")
|
|||
|
||||
(use-package! company-irony
|
||||
:when (featurep! :completion company)
|
||||
:init
|
||||
(set-company-backend! 'irony-mode
|
||||
'(:separate company-irony-c-headers company-irony))
|
||||
:config
|
||||
(require 'company-irony-c-headers)))
|
||||
:init (set-company-backend! 'irony-mode '(:separate company-irony-c-headers company-irony))
|
||||
:config (require 'company-irony-c-headers)))
|
||||
|
||||
|
||||
;;
|
||||
;; Major modes
|
||||
|
||||
(use-package! cmake-mode
|
||||
:defer t
|
||||
:config (set-docsets! 'cmake-mode "CMake"))
|
||||
(after! cmake-mode
|
||||
(set-docsets! 'cmake-mode "CMake"))
|
||||
|
||||
(use-package! company-cmake ; for `cmake-mode'
|
||||
:when (featurep! :completion company)
|
||||
|
@ -184,19 +177,17 @@ This is ignored by ccls.")
|
|||
|
||||
(use-package! rtags
|
||||
:unless (featurep! +lsp)
|
||||
:commands rtags-executable-find
|
||||
:preface
|
||||
(setq rtags-install-path (concat doom-etc-dir "rtags/"))
|
||||
:init
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook
|
||||
objc-mode-local-vars-hook)
|
||||
(defun +cc-init-rtags-h ()
|
||||
"Start an rtags server in c-mode and c++-mode buffers."
|
||||
(when (and (require 'rtags nil t)
|
||||
(rtags-executable-find rtags-rdm-binary-name))
|
||||
(rtags-start-process-unless-running))))
|
||||
;; Only initialize rtags-mode if rtags and rdm are available.
|
||||
:hook ((c-mode-local-vars c++-mode-local-vars objc-mode-local-vars) . +cc-init-rtags-maybe-h)
|
||||
:preface (setq rtags-install-path (concat doom-etc-dir "rtags/"))
|
||||
:config
|
||||
(defun +cc-init-rtags-maybe-h ()
|
||||
"Start an rtags server in c-mode and c++-mode buffers.
|
||||
If rtags or rdm aren't available, fail silently instead of throwing a breaking error."
|
||||
(and (require 'rtags nil t)
|
||||
(rtags-executable-find rtags-rdm-binary-name)
|
||||
(rtags-start-process-unless-running)))
|
||||
|
||||
(setq rtags-autostart-diagnostics t
|
||||
rtags-use-bookmarks nil
|
||||
rtags-completions-enabled nil
|
||||
|
@ -221,11 +212,13 @@ This is ignored by ccls.")
|
|||
:definition #'rtags-find-symbol-at-point
|
||||
:references #'rtags-find-references-at-point)
|
||||
|
||||
(add-hook! 'kill-emacs-hook (ignore-errors (rtags-cancel-process)))
|
||||
|
||||
;; Use rtags-imenu instead of imenu/counsel-imenu
|
||||
(define-key! (c-mode-map c++-mode-map) [remap imenu] #'+cc/imenu)
|
||||
|
||||
;; Ensure rtags cleans up after itself properly when exiting Emacs, rather
|
||||
;; than display a jarring confirmation prompt for killing it.
|
||||
(add-hook! 'kill-emacs-hook (ignore-errors (rtags-cancel-process)))
|
||||
|
||||
(add-hook 'rtags-jump-hook #'better-jumper-set-jump)
|
||||
(add-hook 'rtags-after-find-file-hook #'recenter))
|
||||
|
||||
|
|
|
@ -17,16 +17,16 @@
|
|||
:pin "404cd0694a")))
|
||||
|
||||
(if (featurep! +lsp)
|
||||
(package! ccls :pin "e5cc4c3e6f")
|
||||
(when (package! irony :pin "8387098286")
|
||||
(package! ccls :pin "17ec7bb4cf")
|
||||
(when (package! irony :pin "5f75fc0c92")
|
||||
(package! irony-eldoc :pin "0df5831eaa")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-irony :pin "42dbecd4a8"))
|
||||
(when (featurep! :completion company)
|
||||
(package! company-irony :pin "b44711dfce")
|
||||
(package! company-irony-c-headers :pin "72c386aeb0")))
|
||||
(when (package! rtags :pin "31f7842015")
|
||||
(when (package! rtags :pin "d370c09007")
|
||||
(when (featurep! :completion ivy)
|
||||
(package! ivy-rtags :pin "31f7842015"))
|
||||
(package! ivy-rtags))
|
||||
(when (featurep! :completion helm)
|
||||
(package! helm-rtags :pin "31f7842015"))))
|
||||
(package! helm-rtags))))
|
||||
|
|
|
@ -15,11 +15,14 @@
|
|||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
# A summary of what this module does.
|
||||
This module adds support for the Clojure(Script) language.
|
||||
|
||||
+ If possible, include a brief list of feature highlights here
|
||||
+ Like code completion, syntax checking or available snippets
|
||||
+ Include links to packages & external things where possible
|
||||
+ Interactive development environment (~cider~): REPL, compilation, debugging,
|
||||
running tests, definitions & documentation lookup, code completion, and many
|
||||
more
|
||||
+ Refactoring (~clj-refactor~)
|
||||
+ Linting (~clj-kondo~), requires ~:checkers syntax~
|
||||
+ LSP support
|
||||
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
|
@ -30,7 +33,7 @@ This module has no dedicated maintainers.
|
|||
** Plugins
|
||||
+ [[https://github.com/clojure-emacs/cider][cider]]
|
||||
+ [[https://github.com/clojure-emacs/clj-refactor.el][clj-refactor]]
|
||||
+ [[https://github.com/candid82/flycheck-joker][flycheck-joker]]
|
||||
+ [[https://github.com/borkdude/flycheck-clj-kondo][flycheck-clj-kondo]]
|
||||
|
||||
** Hacks
|
||||
+ Error messages emitted from CIDER are piped into the REPL buffer when it is
|
||||
|
@ -44,8 +47,8 @@ This module requires:
|
|||
+ With =+lsp=
|
||||
+ clojure-lsp
|
||||
+ Without =+lsp=
|
||||
+ leiningen (REPL)
|
||||
+ joker (linter)
|
||||
+ [[https://leiningen.org/][leiningen]] (REPL)
|
||||
+ [[https://github.com/borkdude/clj-kondo][clj-kondo]] (linter)
|
||||
|
||||
* TODO Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
|
|
|
@ -11,21 +11,22 @@
|
|||
;;
|
||||
;;; Packages
|
||||
|
||||
;;;###package clojure-mode
|
||||
(add-hook 'clojure-mode-hook #'rainbow-delimiters-mode)
|
||||
(when (featurep! +lsp)
|
||||
(add-hook! '(clojure-mode-local-vars-hook
|
||||
clojurec-mode-local-vars-hook
|
||||
clojurescript-mode-local-vars-hook)
|
||||
(defun +clojure-disable-lsp-indentation-h ()
|
||||
(setq-local lsp-enable-indentation nil))
|
||||
#'lsp!)
|
||||
(after! lsp-clojure
|
||||
(dolist (m '(clojure-mode
|
||||
clojurec-mode
|
||||
clojurescript-mode
|
||||
clojurex-mode))
|
||||
(add-to-list 'lsp-language-id-configuration (cons m "clojure")))))
|
||||
(use-package! clojure-mode
|
||||
:hook (clojure-mode . rainbow-delimiters-mode)
|
||||
:config
|
||||
(when (featurep! +lsp)
|
||||
(add-hook! '(clojure-mode-local-vars-hook
|
||||
clojurec-mode-local-vars-hook
|
||||
clojurescript-mode-local-vars-hook)
|
||||
(defun +clojure-disable-lsp-indentation-h ()
|
||||
(setq-local lsp-enable-indentation nil))
|
||||
#'lsp!)
|
||||
(after! lsp-clojure
|
||||
(dolist (m '(clojure-mode
|
||||
clojurec-mode
|
||||
clojurescript-mode
|
||||
clojurex-mode))
|
||||
(add-to-list 'lsp-language-id-configuration (cons m "clojure"))))))
|
||||
|
||||
|
||||
(use-package! cider
|
||||
|
@ -58,13 +59,18 @@
|
|||
cider-repl-history-quit-action 'delete-and-restore
|
||||
cider-repl-history-highlight-inserted-item t
|
||||
cider-repl-history-size 1000
|
||||
cider-repl-pop-to-buffer-on-connect 'display-only
|
||||
cider-repl-result-prefix ";; => "
|
||||
cider-repl-print-length 100
|
||||
cider-repl-use-clojure-font-lock t
|
||||
cider-repl-use-pretty-printing t
|
||||
cider-repl-wrap-history nil
|
||||
cider-stacktrace-default-filters '(tooling dup))
|
||||
cider-stacktrace-default-filters '(tooling dup)
|
||||
|
||||
;; Don't focus the CIDER REPL when it starts. Since it can take so long
|
||||
;; to start up, you either wait for a minute doing nothing or be
|
||||
;; prepared for your cursor to suddenly change buffers without warning.
|
||||
;; See https://github.com/clojure-emacs/cider/issues/1872
|
||||
cider-repl-pop-to-buffer-on-connect 'display-only)
|
||||
|
||||
;; Error messages emitted from CIDER is silently funneled into *nrepl-server*
|
||||
;; rather than the *cider-repl* buffer. How silly. We might want to see that
|
||||
|
@ -90,6 +96,8 @@
|
|||
"\"" #'cider-jack-in-cljs
|
||||
"c" #'cider-connect-clj
|
||||
"C" #'cider-connect-cljs
|
||||
"m" #'cider-macroexpand-1
|
||||
"M" #'cider-macroexpand-all
|
||||
(:prefix ("e" . "eval")
|
||||
"b" #'cider-eval-buffer
|
||||
"d" #'cider-eval-defun-at-point
|
||||
|
@ -114,9 +122,6 @@
|
|||
"e" #'cider-enlighten-mode
|
||||
"i" #'cider-inspect
|
||||
"r" #'cider-inspect-last-result)
|
||||
(:prefix ("m" . "macro")
|
||||
"e" #'cider-macroexpand-1
|
||||
"E" #'cider-macroexpand-all)
|
||||
(:prefix ("n" . "namespace")
|
||||
"n" #'cider-browse-ns
|
||||
"N" #'cider-browse-ns-all
|
||||
|
@ -159,6 +164,25 @@
|
|||
:i "U" #'cider-repl-history-undo-other-window)))
|
||||
|
||||
|
||||
(after! cider-doc
|
||||
;; Fixes raxod502/radian#446: CIDER tries to do color calculations when it's
|
||||
;; loaded, sometimes too early, causing errors. Better to wait until something
|
||||
;; is actually rendered.
|
||||
(setq cider-docview-code-background-color nil)
|
||||
|
||||
(defadvice! +clojure--defer-color-calculation-a (&rest _)
|
||||
"Set `cider-docview-code-background-color'.
|
||||
This is needed because we have ripped out the code that would normally set it
|
||||
(since that code will run during early init, which is a problem)."
|
||||
:before #'cider-docview-fontify-code-blocks
|
||||
(setq cider-docview-code-background-color (cider-scale-background-color)))
|
||||
|
||||
;; HACK Disable cider's advice on these; and hope no one else is using these
|
||||
;; old-style advice.
|
||||
(ad-deactivate #'enable-theme)
|
||||
(ad-deactivate #'disable-theme))
|
||||
|
||||
|
||||
(use-package! clj-refactor
|
||||
:hook (clojure-mode . clj-refactor-mode)
|
||||
:config
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/clojure/packages.el
|
||||
|
||||
(package! cider :pin "7437c67f0e")
|
||||
(package! clj-refactor :pin "e24ba62843")
|
||||
(package! clojure-mode :pin "c970c4605c")
|
||||
(package! cider :pin "d63e5652fd")
|
||||
(package! clj-refactor :pin "8259791e05")
|
||||
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-clj-kondo :pin "f652a8dc4c"))
|
||||
(package! flycheck-clj-kondo :pin "5472c26ffd"))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/common-lisp/packages.el
|
||||
|
||||
(package! sly :pin "cfecd21410")
|
||||
(package! sly :pin "1382bda945")
|
||||
(package! sly-macrostep :pin "5113e4e926")
|
||||
(package! sly-repl-ansi-color :pin "b9cd52d1cf")
|
||||
|
|
|
@ -72,11 +72,11 @@
|
|||
(setq company-coq-disabled-features '(hello company-defaults))
|
||||
|
||||
(if (featurep! :completion company)
|
||||
(map! :map coq-mode-map [remap company-complete-common]
|
||||
#'company-indent-or-complete-common)
|
||||
(define-key coq-mode-map [remap company-complete-common]
|
||||
#'company-indent-or-complete-common)
|
||||
;; `company-coq''s company defaults impose idle-completion on folks, so
|
||||
;; we'll set up company ourselves.
|
||||
;; See https://github.com/cpitclaudel/company-coq/issues/42
|
||||
;; we'll set up company ourselves. See
|
||||
;; https://github.com/cpitclaudel/company-coq/issues/42
|
||||
(add-to-list 'company-coq-disabled-features 'company))
|
||||
|
||||
(map! :map coq-mode-map
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/coq/packages.el
|
||||
|
||||
(package! proof-general :pin "2a17093f6a")
|
||||
|
||||
(package! company-coq :pin "6e8bc2e367")
|
||||
(package! proof-general :pin "9196749d55")
|
||||
(package! company-coq :pin "f9dba9ddff")
|
||||
|
|
|
@ -8,3 +8,8 @@
|
|||
(sp-point-after-word-p id action context))
|
||||
((eq action 'autoskip)
|
||||
(/= (char-before) 32)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +csharp-kill-omnisharp-server-h ()
|
||||
(unless (doom-buffers-in-mode 'csharp-mode (buffer-list))
|
||||
(omnisharp-stop-server)))
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
;;; lang/csharp/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! csharp-mode
|
||||
(add-hook 'csharp-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
(use-package! csharp-mode
|
||||
:hook (csharp-mode . rainbow-delimiters-mode)
|
||||
:config
|
||||
(set-electric! 'csharp-mode :chars '(?\n ?\}))
|
||||
(set-rotate-patterns! 'csharp-mode
|
||||
:symbols '(("public" "protected" "private")
|
||||
("class" "struct")))
|
||||
|
||||
(sp-local-pair 'csharp-mode "<" ">"
|
||||
:when '(+csharp-sp-point-in-type-p)
|
||||
:post-handlers '(("| " "SPC")))
|
||||
|
@ -17,25 +18,22 @@
|
|||
|
||||
(use-package! omnisharp
|
||||
:unless (featurep! +lsp)
|
||||
:hook (csharp-mode-local-vars . omnisharp-mode)
|
||||
:commands omnisharp-install-server
|
||||
:hook (csharp-mode-local-vars . omnisharp-mode)
|
||||
:preface
|
||||
(setq omnisharp-auto-complete-want-documentation nil
|
||||
omnisharp-cache-directory (concat doom-etc-dir "omnisharp"))
|
||||
:config
|
||||
(defun +csharp-cleanup-omnisharp-server-h ()
|
||||
"Clean up the omnisharp server once you kill the last csharp-mode buffer."
|
||||
(unless (doom-buffers-in-mode 'csharp-mode (buffer-list))
|
||||
(omnisharp-stop-server)))
|
||||
(add-hook! 'omnisharp-mode-hook
|
||||
(add-hook 'kill-buffer-hook #'+csharp-cleanup-omnisharp-server-h nil t))
|
||||
|
||||
(set-company-backend! 'omnisharp-mode 'company-omnisharp)
|
||||
(set-lookup-handlers! 'omnisharp-mode
|
||||
:definition #'omnisharp-go-to-definition
|
||||
:references #'omnisharp-find-usages
|
||||
:documentation #'omnisharp-current-type-documentation)
|
||||
|
||||
;; Kill the omnisharp server once the last csharp-mode buffer is killed
|
||||
(add-hook! 'omnisharp-mode-hook
|
||||
(add-hook 'kill-buffer-hook #'+csharp-kill-omnisharp-server-h nil t))
|
||||
|
||||
(map! :localleader
|
||||
:map omnisharp-mode-map
|
||||
"b" #'omnisharp-recompile
|
||||
|
@ -60,11 +58,11 @@
|
|||
"b" #'omnisharp-unit-test-buffer)))
|
||||
|
||||
|
||||
;;;###package shader-mode
|
||||
(when (featurep! +unity)
|
||||
;; Unity shaders
|
||||
(add-to-list 'auto-mode-alist '("\\.shader\\'" . shader-mode))
|
||||
|
||||
;; Unity shaders
|
||||
(use-package! shader-mode
|
||||
:when (featurep! +unity)
|
||||
:mode "\\.shader\\'"
|
||||
:config
|
||||
(def-project-mode! +csharp-unity-mode
|
||||
:modes '(csharp-mode shader-mode)
|
||||
:files (and "Assets" "Library/MonoManager.asset" "Library/ScriptMapper")))
|
||||
|
|
|
@ -2,9 +2,7 @@
|
|||
;;; lang/csharp/packages.el
|
||||
|
||||
(package! csharp-mode :pin "57bd21bda4")
|
||||
|
||||
(unless (featurep! +lsp)
|
||||
(package! omnisharp :pin "e658a18a76"))
|
||||
|
||||
(when (featurep! +unity)
|
||||
(package! shader-mode :pin "d7dc8d0d6f"))
|
||||
|
|
105
modules/lang/dart/README.org
Normal file
105
modules/lang/dart/README.org
Normal file
|
@ -0,0 +1,105 @@
|
|||
#+TITLE: lang/dart
|
||||
#+DATE: February 16, 2020
|
||||
#+SINCE: v3.0.0
|
||||
#+STARTUP: inlineimages nofold
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#installing-dart-sdk][Installing Dart SDK]]
|
||||
- [[#installing-flutter-sdk][Installing Flutter SDK]]
|
||||
- [[#features][Features]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#dart--flutter][Dart & Flutter]]
|
||||
- [[#android][Android]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
[[https://dart.dev/][Dart]] is a client-optimized language by Google for fast apps on any platform.
|
||||
It is fast and optimized for UI, Famous for the [[https://flutter.io/][Flutter]] framework, also
|
||||
made by Google. Both Flutter and Dart are free and open-source.
|
||||
|
||||
This module wraps ~dart-mode~, with LSP code completion for =.dart= files,
|
||||
syntax highlighting, etc.
|
||||
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
|
||||
** Module Flags
|
||||
+ =+lsp= Enable LSP server integration.
|
||||
+ =+flutter= Adds ~flutter~ integration and some sane defaults for Flutter
|
||||
development along with ~hover~ for desktop development.
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/bradyt/dart-mode][dart-mode]]
|
||||
+ [[https://github.com/amake/flutter.el][flutter.el]]
|
||||
+ [[https://github.com/ericdallo/hover.el][hover.el]]
|
||||
|
||||
* Prerequisites
|
||||
Make sure that the Dart SDK is on your ~PATH~, and if using Flutter, make sure
|
||||
the Flutter binary is on your ~PATH~ as well.
|
||||
|
||||
** Installing Dart SDK
|
||||
Before starting note that Flutter SDK will have a version of Dart. Therefore,
|
||||
there is no need to install Dart. If you want to use Flutter just see
|
||||
the next part.
|
||||
|
||||
The stable version of the SDK is in most major distributions repositories.
|
||||
If you find it necessary to install any other version or build from source,
|
||||
please refer to the official website at: https://dart.dev/get-dart
|
||||
|
||||
+ *On Debian (also Ubuntu and its derivations):*
|
||||
#+BEGIN_SRC shell
|
||||
sudo apt-get install dart
|
||||
#+END_SRC
|
||||
+ *On Arch Linux (and derivations like Manjaro):*
|
||||
#+BEGIN_SRC shell
|
||||
sudo pacman -S dart
|
||||
#+END_SRC
|
||||
+ *On macOS*:
|
||||
#+BEGIN_SRC shell
|
||||
brew tap dart-lang/dart
|
||||
brew install dart#+END_SRC
|
||||
#+END_SRC
|
||||
|
||||
** Installing Flutter SDK
|
||||
Due to complications with permissions, it is suggested not to use AUR or any
|
||||
automatic installation tools for Flutter SDK.
|
||||
|
||||
On any system just run the following commands to install Flutter, once you have
|
||||
met dependencies named on [[https://flutter.dev/docs/get-started/install/][the site]]:
|
||||
|
||||
#+BEGIN_SRC shell
|
||||
git clone https://github.com/flutter/flutter --branch stable # to download Flutter
|
||||
export PATH="$PATH:$(pwd)/flutter/bin" # to add it to PATH
|
||||
flutter doctor # for Dependency check and further instructions
|
||||
#+END_SRC
|
||||
|
||||
* Features
|
||||
+ Syntax highlighting and formatting for ~.dart~ files provided by LSP
|
||||
+ Emacs functions for running and debugging Flutter projects
|
||||
|
||||
* Configuration
|
||||
** Dart & Flutter
|
||||
On Linux, the installers for Dart and Flutter use the ~/opt~ directory, and this
|
||||
module assumes that. However, you may set ~lsp-dart-sdk-dir~ to your Dart
|
||||
install directory and ~flutter-sdk-path~ to you flutter SDK folder, to make sure
|
||||
LSP can find the language server included with the Dart SDK.
|
||||
|
||||
Alternatively, these variables shouldn't be necessary if you just include Dart
|
||||
and Flutter on your `PATH` variable.
|
||||
** Android
|
||||
You will also need to setup your system for Android development if you intend to
|
||||
use Flutter to develop mobile applications. Refer to your distributions package
|
||||
manager for details. In most distributions the ~/opt/android-sdk~ directory is
|
||||
used, and you might have to change some permissions in this directory since it's
|
||||
owned by root. The [[https://wiki.archlinux.org/index.php/Android][Arch Linux wiki has a great guide on this here.]]
|
||||
|
||||
* Troubleshooting
|
||||
See the configuration section for information on the binaries for Dart and
|
||||
Flutter. On new installs to the ~/opt~ directory, you will likely need to edit
|
||||
the permissions of the ~/opt/dart-sdk~ and ~/opt/flutter~ directories (not to
|
||||
mention the Android SDK, as discussed above).
|
28
modules/lang/dart/config.el
Normal file
28
modules/lang/dart/config.el
Normal file
|
@ -0,0 +1,28 @@
|
|||
;;; lang/dart/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! dart-mode
|
||||
:when (featurep! +lsp)
|
||||
:hook (dart-mode-local-vars . lsp!)
|
||||
:config
|
||||
(when (and (featurep! +flutter) IS-LINUX)
|
||||
(when-let (path (doom-glob "/opt/flutter/bin/cache/dart-sdk"))
|
||||
(setq flutter-sdk-path path))))
|
||||
|
||||
|
||||
(use-package! flutter
|
||||
:when (featurep! +flutter)
|
||||
:defer t
|
||||
:config
|
||||
(map! :map dart-mode-map
|
||||
:localleader
|
||||
"r" #'flutter-run-or-hot-reload))
|
||||
|
||||
|
||||
(use-package! hover
|
||||
:when (featurep! +flutter)
|
||||
:defer t
|
||||
:config
|
||||
(map! :map dart-mode-map
|
||||
:localleader
|
||||
"h r" #'hover-run-or-hot-reload
|
||||
"h R" #'hover-run-or-hot-restart))
|
8
modules/lang/dart/doctor.el
Normal file
8
modules/lang/dart/doctor.el
Normal file
|
@ -0,0 +1,8 @@
|
|||
;;; lang/dart/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(assert! (or (not (featurep! +lsp))
|
||||
(featurep! :tools lsp))
|
||||
"This module requires (:tools lsp)")
|
||||
|
||||
(unless (executable-find "dart")
|
||||
(warn! "Dart isn't on PATH."))
|
11
modules/lang/dart/packages.el
Normal file
11
modules/lang/dart/packages.el
Normal file
|
@ -0,0 +1,11 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/dart/packages.el
|
||||
|
||||
(package! dart-mode :pin "04fcd649f1")
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(package! lsp-dart :pin "4cd73b77f4"))
|
||||
|
||||
(when (featurep! +flutter)
|
||||
(package! flutter :pin "293b7225b9")
|
||||
(package! hover :pin "6f9ed1a651"))
|
|
@ -1,9 +1,5 @@
|
|||
;;; lang/data/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; Built in plugins
|
||||
(add-to-list 'auto-mode-alist '("/sxhkdrc\\'" . conf-mode))
|
||||
(add-to-list 'auto-mode-alist '("\\.\\(?:hex\\|nes\\)\\'" . hexl-mode))
|
||||
|
||||
(use-package! nxml-mode
|
||||
:mode "\\.p\\(?:list\\|om\\)\\'" ; plist, pom
|
||||
:mode "\\.xs\\(?:d\\|lt\\)\\'" ; xslt, xsd
|
||||
|
@ -16,9 +12,6 @@
|
|||
(setq-hook! 'nxml-mode-hook tab-width nxml-child-indent))
|
||||
|
||||
|
||||
;;
|
||||
;;; Third-party plugins
|
||||
|
||||
;;;###package csv-mode
|
||||
(map! :after csv-mode
|
||||
:localleader
|
||||
|
@ -29,25 +22,3 @@
|
|||
"S" #'csv-sort-numeric-fields
|
||||
"k" #'csv-kill-fields
|
||||
"t" #'csv-transpose)
|
||||
|
||||
(use-package! graphql-mode
|
||||
:mode "\\.gql\\'"
|
||||
:config (setq-hook! 'graphql-mode-hook tab-width graphql-indent-level))
|
||||
|
||||
(use-package! json-mode
|
||||
:mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'"
|
||||
:config
|
||||
(set-electric! 'json-mode :chars '(?\n ?: ?{ ?})))
|
||||
|
||||
(after! jsonnet-mode
|
||||
(set-electric! 'jsonnet-mode :chars '(?\n ?: ?{ ?})))
|
||||
|
||||
(after! yaml-mode
|
||||
(setq-hook! 'yaml-mode-hook tab-width yaml-indent-offset))
|
||||
|
||||
|
||||
;;
|
||||
;;; Frameworks
|
||||
|
||||
(def-project-mode! +data-vagrant-mode
|
||||
:files ("Vagrantfile"))
|
||||
|
|
|
@ -1,12 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/data/packages.el
|
||||
|
||||
(package! graphql-mode :pin "7c37aee28b")
|
||||
(package! json-mode :pin "0e819e519a")
|
||||
(package! jsonnet-mode :pin "2b90b4e12a")
|
||||
(package! yaml-mode :pin "cecf4b106b")
|
||||
(package! csv-mode :pin "fbf942e127")
|
||||
(package! dhall-mode :pin "ef4d33debe")
|
||||
(package! protobuf-mode
|
||||
:recipe (:host github :repo "emacsmirror/protobuf-mode" :files (:defaults "*"))
|
||||
:pin "94b7bd7e8b")
|
||||
(package! csv-mode :pin "635337407c")
|
||||
|
|
|
@ -37,31 +37,30 @@
|
|||
(sp-local-pair "fn " " end" :unless '(sp-in-comment-p sp-in-string-p)))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'elixir-mode-local-vars-hook #'lsp!))
|
||||
(add-hook 'elixir-mode-local-vars-hook #'lsp!)))
|
||||
|
||||
(use-package! flycheck-credo
|
||||
:when (featurep! :checkers syntax)
|
||||
:config (flycheck-credo-setup)))
|
||||
|
||||
(use-package! flycheck-credo
|
||||
:when (featurep! :checkers syntax)
|
||||
:after elixir-mode
|
||||
:config (flycheck-credo-setup))
|
||||
|
||||
|
||||
(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)))
|
||||
:config
|
||||
(set-lookup-handlers! 'alchemist-mode
|
||||
:definition #'alchemist-goto-definition-at-point
|
||||
:documentation #'alchemist-help-search-at-point)
|
||||
(set-eval-handler! 'alchemist-mode #'alchemist-eval-region)
|
||||
(set-repl-handler! 'alchemist-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-company-backend! 'alchemist-mode '(alchemist-company company-yasnippet))
|
||||
;; 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)))))
|
||||
|
|
|
@ -1,12 +1,10 @@
|
|||
;;; lang/elm/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(after! elm-mode
|
||||
(add-hook 'elm-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'elm-mode-local-vars-hook #'lsp!))
|
||||
|
||||
(set-company-backend! 'elm-mode 'company-elm)
|
||||
(if (featurep! +lsp)
|
||||
(add-hook 'elm-mode-local-vars-hook #'lsp!)
|
||||
(set-company-backend! 'elm-mode 'company-elm))
|
||||
|
||||
(set-repl-handler! 'elm-mode #'run-elm-interactive)
|
||||
(set-pretty-symbols! 'elm-mode
|
||||
:null "null"
|
||||
|
@ -22,4 +20,4 @@
|
|||
(use-package! flycheck-elm
|
||||
:when (featurep! :checkers syntax)
|
||||
:after elm-mode
|
||||
:config (add-to-list 'flycheck-checkers 'elm nil #'eq))
|
||||
:config (add-to-list 'flycheck-checkers 'elm))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/elm/packages.el
|
||||
|
||||
(package! elm-mode :pin "dd868e55ff")
|
||||
(package! elm-mode :pin "7782be0814")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-elm :pin "debd0af563"))
|
||||
(package! flycheck-elm :pin "1b60050efd"))
|
||||
|
|
|
@ -48,9 +48,6 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
|||
;; variable-width indentation is superior in elisp
|
||||
(add-to-list 'doom-detect-indentation-excluded-modes 'emacs-lisp-mode nil #'eq)
|
||||
|
||||
;; Use helpful instead of describe-* from `company'
|
||||
(advice-add #'elisp--company-doc-buffer :around #'doom-use-helpful-a)
|
||||
|
||||
(add-hook! 'emacs-lisp-mode-hook
|
||||
#'outline-minor-mode
|
||||
;; fontificiation
|
||||
|
@ -100,7 +97,8 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
|||
"v" #'find-variable
|
||||
"l" #'find-library)))
|
||||
|
||||
;; Adapted from http://www.modernemacs.com/post/comint-highlighting/
|
||||
;; Adapted from http://www.modernemacs.com/post/comint-highlighting/ to add
|
||||
;; syntax highlighting to ielm REPLs.
|
||||
(add-hook! 'ielm-mode-hook
|
||||
(defun +emacs-lisp-init-syntax-highlighting-h ()
|
||||
(font-lock-add-keywords
|
||||
|
@ -125,7 +123,7 @@ This marks a foldable marker for `outline-minor-mode' in elisp buffers.")
|
|||
|
||||
;;;###package overseer
|
||||
(autoload 'overseer-test "overseer" nil t)
|
||||
(remove-hook 'emacs-lisp-mode-hook 'overseer-enable-mode)
|
||||
(remove-hook 'emacs-lisp-mode-hook #'overseer-enable-mode)
|
||||
|
||||
|
||||
(use-package! flycheck-cask
|
||||
|
|
|
@ -4,12 +4,14 @@
|
|||
(package! elisp-mode :built-in t)
|
||||
|
||||
(package! highlight-quoted :pin "2410347815")
|
||||
|
||||
;; Tools
|
||||
(package! macrostep :pin "424e3734a1")
|
||||
(package! overseer :pin "02d49f582e")
|
||||
(package! elisp-def :pin "368b04da68")
|
||||
(package! elisp-demos :pin "bec206bf1b")
|
||||
|
||||
(package! elisp-demos :pin "57dd4ae3e4")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-cask :pin "3457ae553c"))
|
||||
|
||||
(package! buttercup :pin "178c7954f8")
|
||||
;; Libraries
|
||||
(package! buttercup :pin "a91f282025")
|
||||
|
|
|
@ -3,7 +3,10 @@
|
|||
(use-package! erlang
|
||||
:mode ("\\.erlang\\'" . erlang-mode)
|
||||
:mode ("/rebar\\.config\\(?:\\.script\\)?\\'" . erlang-mode)
|
||||
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode))
|
||||
:mode ("/\\(?:app\\|sys\\)\\.config\\'" . erlang-mode)
|
||||
:config
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'erlang-mode-local-vars-hook #'lsp!)))
|
||||
|
||||
|
||||
(use-package! flycheck-rebar3
|
||||
|
@ -12,18 +15,10 @@
|
|||
:config (flycheck-rebar3-setup))
|
||||
|
||||
|
||||
(use-package! ivy-erlang-complete
|
||||
:when (featurep! :completion ivy)
|
||||
:hook (erlang-mode . ivy-erlang-complete-init)
|
||||
:config
|
||||
(add-hook! 'erlang-mode-hook
|
||||
(add-hook 'after-save-hook #'ivy-erlang-complete-reparse nil t)))
|
||||
|
||||
|
||||
(use-package! company-erlang
|
||||
:when (featurep! :completion company)
|
||||
:unless (featurep! +lsp)
|
||||
:hook (erlang-mode . company-erlang-init))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'erlang-mode-local-vars-hook #'lsp!))
|
||||
:hook (erlang-mode . company-erlang-init)
|
||||
:config
|
||||
(add-hook! 'erlang-mode-hook
|
||||
(add-hook 'after-save-hook #'ivy-erlang-complete-reparse nil t)))
|
||||
|
|
|
@ -1,11 +1,9 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; private/erlang/packages.el
|
||||
|
||||
(package! erlang :pin "c15eb5fdf7")
|
||||
(package! erlang :pin "3065fbf434")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-rebar3 :pin "3cca1268c5"))
|
||||
(unless (featurep! +lsp)
|
||||
(when (featurep! :completion ivy)
|
||||
(package! ivy-erlang-complete :pin "7d60ed111d"))
|
||||
(when (featurep! :completion company)
|
||||
(package! company-erlang :pin "bc0524a16f")))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/ess/packages.el
|
||||
|
||||
(package! ess :pin "a2be8cb97c")
|
||||
(package! ess :pin "625041ad51")
|
||||
(package! ess-R-data-view :pin "d6e98d3ae1")
|
||||
(package! polymode :pin "3eab3c9eed")
|
||||
(package! poly-R :pin "0443c89b4d")
|
||||
(package! polymode :pin "44265e3516")
|
||||
(package! poly-R :pin "51ffeb6ec4")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/factor/packages.el
|
||||
|
||||
(package! fuel :pin "a62ea78d73")
|
||||
(package! fuel :pin "497d6491e6")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/fstar/packages.el
|
||||
|
||||
(package! fstar-mode)
|
||||
(package! fstar-mode :pin "aaaf256888")
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
This module adds [[https://golang.org][Go]] support.
|
||||
This module adds [[https://golang.org][Go]] support, with optional (but recommended) LSP support via
|
||||
[[https://github.com/golang/tools/blob/master/gopls/README.md][gopls]].
|
||||
|
||||
+ Code completion (~gocode~)
|
||||
+ Documentation lookup (~godoc~)
|
||||
|
@ -30,7 +31,8 @@ This module adds [[https://golang.org][Go]] support.
|
|||
+ Code checking (~flycheck-golangci-lint~)
|
||||
|
||||
** Module Flags
|
||||
+ =+lsp= Enables integration for the gopls LSP server.
|
||||
+ =+lsp= Enables integration for the gopls LSP server. It is highly recommended
|
||||
you use this, as the non-LSP experience is deprecated (and poor).
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/dominikh/go-mode.el][go-mode]]
|
||||
|
@ -38,7 +40,7 @@ This module adds [[https://golang.org][Go]] support.
|
|||
+ [[https://github.com/dominikh/go-mode.el][go-guru]]
|
||||
+ [[https://github.com/manute/gorepl-mode][gorepl-mode]]
|
||||
+ [[https://github.com/brantou/emacs-go-tag][go-tag]]
|
||||
+ [[https://github.com/mdempsky/gocode][company-go]]*
|
||||
+ [[https://github.com/mdempsky/gocode][company-go]]* =DEPRECATED=
|
||||
+ [[https://github.com/s-kostyaev/go-gen-test][go-gen-test]]
|
||||
+ [[https://github.com/weijiangan/flycheck-golangci-lint][flycheck-golangci-lint]] (if =:checkers syntax= is enabled)
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
(:prefix ("ri" . "imports")
|
||||
"a" #'go-import-add
|
||||
"r" #'go-remove-unused-imports)
|
||||
(:prefix ( "b" . "build")
|
||||
(:prefix ("b" . "build")
|
||||
:desc "go run ." "r" (λ! (compile "go run ."))
|
||||
:desc "go build" "b" (λ! (compile "go build"))
|
||||
:desc "go clean" "c" (λ! (compile "go clean")))
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
;;; lang/go/packages.el
|
||||
|
||||
(package! go-eldoc :pin "cbbd2ea1e9")
|
||||
(package! go-guru :pin "85a20dac6c")
|
||||
(package! go-mode :pin "85a20dac6c")
|
||||
(package! go-guru :pin "10d6ab43d9")
|
||||
(package! go-mode :pin "10d6ab43d9")
|
||||
(package! gorepl-mode :pin "6a73bf352e")
|
||||
(package! go-tag :pin "59b243f2fa")
|
||||
(package! go-gen-test :pin "44c202ac97")
|
||||
|
||||
(when (featurep! :completion company)
|
||||
(package! company-go :pin "939b4a677f"))
|
||||
(package! company-go :pin "4acdcbdea7"))
|
||||
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-golangci-lint :pin "8e446c6831"))
|
||||
|
|
|
@ -1,30 +0,0 @@
|
|||
;;; lang/haskell/+intero.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +intero)
|
||||
|
||||
(use-package! intero
|
||||
:commands intero-mode
|
||||
:init
|
||||
(add-hook! 'haskell-mode-local-vars-hook
|
||||
(defun +haskell-init-intero-h ()
|
||||
"Initializes `intero-mode' in haskell-mode, unless stack isn't installed.
|
||||
This is necessary because `intero-mode' doesn't do its own error checks."
|
||||
(when (derived-mode-p 'haskell-mode)
|
||||
(if (executable-find "stack")
|
||||
(intero-mode +1)
|
||||
(message "Couldn't find stack. Refusing to enable intero-mode.")))))
|
||||
:config
|
||||
(setq haskell-compile-cabal-build-command "stack build --fast")
|
||||
(set-lookup-handlers! 'intero-mode :definition #'intero-goto-definition)
|
||||
(set-company-backend! 'intero-mode 'intero-company)
|
||||
(when (featurep! :checkers syntax)
|
||||
(flycheck-add-next-checker 'intero '(warning . haskell-hlint)))
|
||||
|
||||
(when (featurep 'evil)
|
||||
(add-hook 'intero-mode-hook #'evil-normalize-keymaps))
|
||||
(map! :localleader
|
||||
:map intero-mode-map
|
||||
"t" #'intero-type-at
|
||||
"i" #'intero-info
|
||||
"l" #'intero-repl-load
|
||||
"e" #'intero-repl-eval-region
|
||||
"a" #'intero-apply-suggestions))
|
|
@ -1,10 +1,13 @@
|
|||
;;; lang/haskell/+lsp.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! lsp-haskell
|
||||
:after haskell-mode
|
||||
:init (add-hook 'haskell-mode-hook #'lsp!)
|
||||
:after lsp-clients
|
||||
:preface (add-hook 'haskell-mode-local-vars-hook #'lsp!)
|
||||
:config
|
||||
(when IS-MAC
|
||||
(setq lsp-haskell-process-path-hie "hie-wrapper"))
|
||||
(when (featurep! +ghcide)
|
||||
(setq lsp-haskell-process-path-hie "ghcide"
|
||||
lsp-haskell-process-args-hie nil))
|
||||
;; Does some strange indentation if it pastes in the snippet
|
||||
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))
|
||||
|
|
|
@ -10,7 +10,8 @@
|
|||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#cabal][Cabal]]
|
||||
- [[#lsp][LSP]]
|
||||
- [[#lsp-haskell-ide-engine][LSP (haskell-ide-engine)]]
|
||||
- [[#lsp-ghcide][LSP (ghcide)]]
|
||||
- [[#stack][Stack]]
|
||||
- [[#haskell-packages][Haskell packages]]
|
||||
- [[#configuration][Configuration]]
|
||||
|
@ -18,8 +19,8 @@
|
|||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default), LSP or
|
||||
[[https://haskell-lang.org/intero][intero]].
|
||||
This module adds [[https://www.haskell.org/][Haskell]] support, powered by either [[https://github.com/jyp/dante][dante]] (the default) or LSP
|
||||
(haskell-language-server or ghcide).
|
||||
|
||||
+ Code completion (~company-ghc~)
|
||||
+ Look up documentation (~hoogle~)
|
||||
|
@ -41,9 +42,9 @@ Here are a few resources I've found indispensable in my Haskell adventures:
|
|||
+ =+dante= Enables dante; a fork of intero aimed at lightweightedness. It
|
||||
doesn't depend on =stack=, supports both ~cabal~-only and ~stack~ projects,
|
||||
but lacks eldoc support.
|
||||
+ =+lsp= Enables lsp-haskell (this requires the ~:tools lsp~ to be enabled).
|
||||
+ =+intero= (Deprecated) Enables intero; a comprehensive, stack-based
|
||||
development environment for Haskell.
|
||||
+ =+ghcide= Enables LSP support with ghcide (requires the ~:tools lsp~ module).
|
||||
+ =+lsp= Enables LSP support with haskell-ide-engine (requires the ~:tools lsp~
|
||||
module).
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/haskell/haskell-mode][haskell-mode]]
|
||||
|
@ -52,16 +53,13 @@ Here are a few resources I've found indispensable in my Haskell adventures:
|
|||
+ [[https://github.com/jyp/attrap][attrap]]
|
||||
+ =+lsp=
|
||||
+ [[https://github.com/emacs-lsp/lsp-haskell][lsp-haskell]]
|
||||
+ =+intero=
|
||||
+ [[https://github.com/chrisdone/intero][intero]]
|
||||
|
||||
* Prerequisites
|
||||
Depending on whether you use Intero, Dante or LSP, your dependencies will
|
||||
differ:
|
||||
Depending on whether you use Dante, haskell-language-server or ghcide, your
|
||||
dependencies will differ:
|
||||
|
||||
+ Dante users need =cabal=, =ghc= and =ghc-mod=
|
||||
+ LSP users need the =haskell-ide-engine= LSP server
|
||||
+ Intero and LSP users need =stack=
|
||||
+ LSP users need the =haskell-ide-engine= LSP server OR =ghcide=
|
||||
+ All users will need the =hoogle= package
|
||||
|
||||
** Cabal
|
||||
|
@ -83,7 +81,7 @@ sudo pacman -S cabal-install ghc
|
|||
sudo zypper install cabal-install ghc
|
||||
#+END_SRC
|
||||
|
||||
** LSP
|
||||
** LSP (haskell-ide-engine)
|
||||
You will need =stack= and =git= installed.
|
||||
|
||||
You will find a comprehensive [[https://github.com/haskell/haskell-ide-engine#installation][install guide for haskell-ide-engine on its
|
||||
|
@ -92,7 +90,7 @@ project page]], but here's a TL;DR:
|
|||
*** MacOS
|
||||
haskell-ide-engine must be build and installed manually on MacOS, e.g.
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
#+BEGIN_SRC bash
|
||||
git clone https://github.com/haskell/haskell-ide-engine
|
||||
cd haskell-ide-engine
|
||||
make
|
||||
|
@ -101,12 +99,14 @@ make
|
|||
*** Arch Linux
|
||||
=haskell-ide-engine-git= is available on the AUR
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
#+BEGIN_SRC bash
|
||||
yay -S haskell-ide-engine-git
|
||||
#+END_SRC
|
||||
** LSP (ghcide)
|
||||
See https://github.com/digital-asset/ghcide for install instructions.
|
||||
|
||||
** Stack
|
||||
To use Intero or LSP, you need =stack=:
|
||||
To use LSP, you need =stack=:
|
||||
|
||||
*** MacOS
|
||||
#+BEGIN_SRC sh
|
||||
|
|
|
@ -4,12 +4,9 @@
|
|||
(defun +haskell/open-repl (&optional arg)
|
||||
"Opens a Haskell REPL."
|
||||
(interactive "P")
|
||||
(if-let*
|
||||
((window
|
||||
(display-buffer
|
||||
(if (featurep! +intero)
|
||||
(intero-repl-buffer arg)
|
||||
(haskell-session-interactive-buffer (haskell-session))))))
|
||||
(if-let (window
|
||||
(display-buffer
|
||||
(haskell-session-interactive-buffer (haskell-session))))
|
||||
(window-buffer window)
|
||||
(error "Failed to display Haskell REPL")))
|
||||
|
||||
|
|
|
@ -3,14 +3,9 @@
|
|||
(after! projectile
|
||||
(add-to-list 'projectile-project-root-files "stack.yaml"))
|
||||
|
||||
;; TODO ghcide?
|
||||
(cond ((featurep! +intero) (load! "+intero")) ; DEPRECATED
|
||||
((featurep! +dante) (load! "+dante"))
|
||||
((featurep! +lsp) (load! "+lsp")))
|
||||
|
||||
|
||||
;;
|
||||
;; Common packages
|
||||
;;; Common packages
|
||||
|
||||
(after! haskell-mode
|
||||
(setq haskell-process-suggest-remove-import-lines t ; warnings for redundant imports etc
|
||||
|
@ -40,8 +35,16 @@
|
|||
|
||||
(map! :localleader
|
||||
:map haskell-mode-map
|
||||
;; this is set to use cabal for dante users and stack for intero users:
|
||||
"b" #'haskell-process-cabal-build
|
||||
"c" #'haskell-cabal-visit-file
|
||||
"h" #'haskell-hide-toggle
|
||||
"H" #'haskell-hide-toggle-all))
|
||||
|
||||
|
||||
;;
|
||||
;;; Backends
|
||||
|
||||
(cond ((featurep! +dante) (load! "+dante"))
|
||||
((or (featurep! +lsp)
|
||||
(featurep! +ghcide))
|
||||
(load! "+lsp")))
|
||||
|
|
|
@ -7,12 +7,6 @@
|
|||
|
||||
(when (featurep! +dante)
|
||||
(unless (executable-find "cabal")
|
||||
(warn! "Couldn't find cabal, haskell-mode may have issues")))
|
||||
|
||||
(when (featurep! +intero)
|
||||
(unless (executable-find "stack")
|
||||
(warn! "Couldn't find stack. Intero will not work")))
|
||||
|
||||
(when (or (featurep! +dante) (featurep! +intero))
|
||||
(warn! "Couldn't find cabal, haskell-mode may have issues"))
|
||||
(unless (executable-find "hlint")
|
||||
(warn! "Couldn't find hlint. Flycheck may have issues in haskell-mode")))
|
||||
|
|
|
@ -1,13 +1,11 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/haskell/packages.el
|
||||
|
||||
(package! haskell-mode :pin "4a87d72589")
|
||||
(package! haskell-mode :pin "7032966ee7")
|
||||
|
||||
(when (featurep! +dante)
|
||||
(package! dante :pin "4955bc7363")
|
||||
(package! attrap :pin "4cf3e4a162"))
|
||||
(when (featurep! +lsp)
|
||||
(package! lsp-haskell :pin "6d481f97e6"))
|
||||
;; DEPRECATED
|
||||
(when (featurep! +intero)
|
||||
(package! intero :pin "fdb0550a2d"))
|
||||
(when (or (featurep! +lsp)
|
||||
(featurep! +ghcide))
|
||||
(package! lsp-haskell :pin "582fa27c88"))
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
(use-package! lsp-java
|
||||
:after lsp-clients
|
||||
:init
|
||||
(add-hook 'java-mode-local-vars-hook #'lsp!)
|
||||
:hook (java-mode-local-vars . lsp!)
|
||||
:preface
|
||||
(setq lsp-java-server-install-dir (concat doom-etc-dir "eclipse.jdt.ls/server/")
|
||||
lsp-java-workspace-dir (concat doom-etc-dir "java-workspace"))
|
||||
:config
|
||||
|
|
|
@ -22,7 +22,7 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
|
|||
|
||||
|
||||
;;
|
||||
;; java-mode
|
||||
;;; java-mode
|
||||
|
||||
(add-hook 'java-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
|
@ -31,7 +31,7 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
|
|||
|
||||
|
||||
;;
|
||||
;; Common packages
|
||||
;;; Common packages
|
||||
|
||||
(use-package! android-mode
|
||||
:commands android-mode
|
||||
|
|
|
@ -13,4 +13,4 @@
|
|||
(package! company-emacs-eclim :pin "23f5b294f8")))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(package! lsp-java :pin "dbeeee9c74"))
|
||||
(package! lsp-java :pin "6efb741845"))
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
- [[#macos][MacOS]]
|
||||
- [[#arch-linux][Arch Linux]]
|
||||
- [[#opensuse][openSUSE]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
- [[#tide-sort-completions-by-kind-isnt-respected][~tide-sort-completions-by-kind~ isn't respected]]
|
||||
- [[#appendix][Appendix]]
|
||||
- [[#commands][Commands]]
|
||||
|
||||
|
@ -35,7 +37,6 @@ This module adds JavaScript and TypeScript support.
|
|||
+ [[https://github.com/mooz/js2-mode][js2-mode]]
|
||||
+ [[https://github.com/felipeochoa/rjsx-mode][rjsx-mode]]
|
||||
+ [[https://github.com/emacs-typescript/typescript.el][typescript-mode]]
|
||||
+ [[https://github.com/aaronjensen/eslintd-fix][eslintd-fix]]
|
||||
+ [[https://github.com/magnars/js2-refactor.el][js2-refactor]]
|
||||
+ [[https://github.com/mojochao/npm-mode][npm-mode]]
|
||||
+ [[https://github.com/abicky/nodejs-repl.el][nodejs-repl]]
|
||||
|
@ -62,6 +63,12 @@ sudo pacman --needed --noconfirm -S nodejs npm
|
|||
sudo zypper install nodejs npm
|
||||
#+END_SRC
|
||||
|
||||
* Troubleshooting
|
||||
** ~tide-sort-completions-by-kind~ isn't respected
|
||||
The =:completion company= module uses =company-prescient= to sort completion by
|
||||
[[https://developer.mozilla.org/en-US/docs/Mozilla/Tech/Places/Frecency_algorithm][frecency]], which overrules specialized sorting provided by some company backends
|
||||
(like ~company-tide~).
|
||||
|
||||
* Appendix
|
||||
** Commands
|
||||
*** JS2-mode
|
||||
|
|
|
@ -83,18 +83,6 @@ Run this for any buffer you want to skewer."
|
|||
;;
|
||||
;; Hooks
|
||||
|
||||
;;;###autoload
|
||||
(defun +javascript-add-node-modules-path-h ()
|
||||
"Add current project's `node_modules/.bin` to `exec-path', so js tools
|
||||
prioritize project-local packages over global ones."
|
||||
(make-local-variable 'exec-path)
|
||||
(cl-pushnew (expand-file-name "node_modules/.bin/"
|
||||
(or (locate-dominating-file
|
||||
(or (buffer-file-name) default-directory)
|
||||
"node_modules")
|
||||
(doom-project-root)))
|
||||
exec-path :test #'string=))
|
||||
|
||||
;;;###autoload
|
||||
(defun +javascript-cleanup-tide-processes-h ()
|
||||
"Clean up dangling tsserver processes if there are no more buffers with
|
||||
|
|
|
@ -58,11 +58,7 @@
|
|||
mode-name "JS2")
|
||||
|
||||
(set-electric! 'js2-mode :chars '(?\} ?\) ?. ?:))
|
||||
(set-repl-handler! 'js2-mode #'+javascript/open-repl)
|
||||
|
||||
(map! :map js2-mode-map
|
||||
:localleader
|
||||
"S" #'+javascript/skewer-this-buffer))
|
||||
(set-repl-handler! 'js2-mode #'+javascript/open-repl))
|
||||
|
||||
|
||||
(use-package! rjsx-mode
|
||||
|
@ -84,10 +80,10 @@
|
|||
;; jshint doesn't know how to deal with jsx
|
||||
(push 'javascript-jshint flycheck-disabled-checkers)))
|
||||
|
||||
;; `rjsx-electric-gt' relies on js2's parser to tell it when the cursor is in
|
||||
;; a self-closing tag, so that it can insert a matching ending tag at point.
|
||||
;; However, the parser doesn't run immediately, so a fast typist can outrun
|
||||
;; it, causing tags to stay unclosed, so we force it to parse.
|
||||
;; HACK `rjsx-electric-gt' relies on js2's parser to tell it when the cursor
|
||||
;; is in a self-closing tag, so that it can insert a matching ending tag
|
||||
;; at point. The parser doesn't run immediately however, so a fast typist
|
||||
;; can outrun it, causing tags to stay unclosed, so force it to parse:
|
||||
(defadvice! +javascript-reparse-a (n)
|
||||
;; if n != 1, rjsx-electric-gt calls rjsx-maybe-reparse itself
|
||||
:before #'rjsx-electric-gt
|
||||
|
@ -95,7 +91,7 @@
|
|||
|
||||
|
||||
(use-package! typescript-mode
|
||||
:defer t
|
||||
:hook (typescript-mode . rainbow-delimiters-mode)
|
||||
:init
|
||||
;; REVIEW Fix #2252. This is overwritten if the :lang web module is enabled.
|
||||
;; We associate TSX files with `web-mode' by default instead because
|
||||
|
@ -104,9 +100,6 @@
|
|||
(unless (featurep! :lang web)
|
||||
(add-to-list 'auto-mode-alist '("\\.tsx\\'" . typescript-mode)))
|
||||
:config
|
||||
(add-hook 'typescript-mode-hook #'rainbow-delimiters-mode)
|
||||
(setq-hook! 'typescript-mode-hook
|
||||
comment-line-break-function #'js2-line-break)
|
||||
(set-electric! 'typescript-mode
|
||||
:chars '(?\} ?\)) :words '("||" "&&"))
|
||||
(set-docsets! 'typescript-mode "TypeScript" "AngularTS")
|
||||
|
@ -125,7 +118,10 @@
|
|||
:not "!"
|
||||
:and "&&" :or "||"
|
||||
:for "for"
|
||||
:return "return" :yield "import"))
|
||||
:return "return" :yield "import")
|
||||
;; HACK Fixes comment continuation on newline
|
||||
(setq-hook! 'typescript-mode-hook
|
||||
comment-line-break-function #'js2-line-break))
|
||||
|
||||
|
||||
;;;###package coffee-mode
|
||||
|
@ -137,7 +133,9 @@
|
|||
;;
|
||||
;;; Tools
|
||||
|
||||
(add-hook! '(js-mode-hook typescript-mode-hook web-mode-hook)
|
||||
(add-hook! '(js2-mode-local-vars-hook
|
||||
typescript-mode-local-vars-hook
|
||||
web-mode-local-vars-hook)
|
||||
(defun +javascript-init-lsp-or-tide-maybe-h ()
|
||||
"Start `lsp' or `tide' in the current buffer.
|
||||
|
||||
|
@ -169,7 +167,11 @@ to tide."
|
|||
:defer t
|
||||
:config
|
||||
(setq tide-completion-detailed t
|
||||
tide-always-show-documentation t)
|
||||
tide-always-show-documentation t
|
||||
;; Fix #1792: by default, tide ignores payloads larger than 100kb. This
|
||||
;; is too small for larger projects that produce long completion lists,
|
||||
;; so we up it to 512kb.
|
||||
tide-server-max-response-length 524288)
|
||||
;; code completion
|
||||
(after! company
|
||||
;; tide affects the global `company-backends', undo this so doom can handle
|
||||
|
@ -177,9 +179,11 @@ to tide."
|
|||
(setq-default company-backends (delq 'company-tide (default-value 'company-backends))))
|
||||
(set-company-backend! 'tide-mode 'company-tide)
|
||||
;; navigation
|
||||
(set-lookup-handlers! 'tide-mode
|
||||
:definition '(tide-jump-to-definition :async t)
|
||||
:references '(tide-references :async t))
|
||||
(set-lookup-handlers! 'tide-mode :async t
|
||||
:definition #'tide-jump-to-definition
|
||||
:references #'tide-references
|
||||
:documentation #'tide-documentation-at-point)
|
||||
(set-popup-rule! "^\\*tide-documentation" :quit t)
|
||||
;; resolve to `doom-project-root' if `tide-project-root' fails
|
||||
(advice-add #'tide-project-root :override #'+javascript-tide-project-root-a)
|
||||
;; cleanup tsserver when no tide buffers are left
|
||||
|
@ -192,8 +196,6 @@ to tide."
|
|||
;; `tide-mode-hook' is too early, so...
|
||||
(advice-add #'tide-setup :after #'eldoc-mode)
|
||||
|
||||
(define-key tide-mode-map [remap +lookup/documentation] #'tide-documentation-at-point)
|
||||
|
||||
(map! :localleader
|
||||
:map tide-mode-map
|
||||
"R" #'tide-restart-server
|
||||
|
@ -239,17 +241,11 @@ to tide."
|
|||
(js2r-add-keybindings-with-prefix (format "%s r" doom-localleader-key)))))
|
||||
|
||||
|
||||
(use-package! eslintd-fix
|
||||
:commands eslintd-fix
|
||||
:config
|
||||
(setq-hook! 'eslintd-fix-mode-hook
|
||||
flycheck-javascript-eslint-executable eslintd-fix-executable))
|
||||
|
||||
|
||||
;;;###package skewer-mode
|
||||
(map! :localleader
|
||||
(:after js2-mode
|
||||
:map js2-mode-map
|
||||
"S" #'+javascript/skewer-this-buffer
|
||||
:prefix ("s" . "skewer"))
|
||||
:prefix "s"
|
||||
(:after skewer-mode
|
||||
|
@ -274,13 +270,12 @@ to tide."
|
|||
(use-package! npm-mode
|
||||
:hook ((js-mode typescript-mode) . npm-mode)
|
||||
:config
|
||||
(map! (:localleader
|
||||
:map npm-mode-keymap
|
||||
(map! :localleader
|
||||
(:map npm-mode-keymap
|
||||
"n" npm-mode-command-keymap)
|
||||
(:after js2-mode
|
||||
:map js2-mode-map
|
||||
:localleader
|
||||
(:prefix ("n" . "npm")))))
|
||||
:prefix ("n" . "npm"))))
|
||||
|
||||
|
||||
;;
|
||||
|
@ -292,10 +287,11 @@ to tide."
|
|||
web-mode
|
||||
markdown-mode
|
||||
js-mode
|
||||
json-mode
|
||||
typescript-mode
|
||||
solidity-mode)
|
||||
:when (locate-dominating-file default-directory "package.json")
|
||||
:add-hooks '(+javascript-add-node-modules-path-h npm-mode))
|
||||
:add-hooks '(add-node-modules-path npm-mode))
|
||||
|
||||
(def-project-mode! +javascript-gulp-mode
|
||||
:when (locate-dominating-file default-directory "gulpfile.js"))
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
;;; lang/javascript/packages.el
|
||||
|
||||
;; Major modes
|
||||
(package! coffee-mode :pin "86ab8aae86")
|
||||
(package! coffee-mode :pin "35a41c7d82")
|
||||
(package! js2-mode :pin "fe53814dc2")
|
||||
(package! rjsx-mode :pin "014c760138")
|
||||
(package! typescript-mode :pin "a0f2c3ebd4")
|
||||
(package! rjsx-mode :pin "0061587a06")
|
||||
(package! typescript-mode :pin "102587e458")
|
||||
|
||||
;; Tools
|
||||
(package! eslintd-fix :pin "98c669e365")
|
||||
(package! js2-refactor :pin "d4c40b5fc8")
|
||||
(package! npm-mode :pin "3ee7c0bad5")
|
||||
(package! add-node-modules-path :pin "f31e69ccb6")
|
||||
|
||||
;; Eval
|
||||
(package! nodejs-repl :pin "8b90948265")
|
||||
(package! skewer-mode :pin "123215dd9b")
|
||||
(package! nodejs-repl :pin "6fad7d764f")
|
||||
(package! skewer-mode :pin "e5bed35193")
|
||||
|
||||
;; Programming environment
|
||||
(package! tide :pin "1878a097fc")
|
||||
(package! tide :pin "3b45610faa")
|
||||
(when (featurep! :tools lookup)
|
||||
(package! xref-js2 :pin "6f1ed5dae0"))
|
||||
|
|
40
modules/lang/json/README.org
Normal file
40
modules/lang/json/README.org
Normal file
|
@ -0,0 +1,40 @@
|
|||
#+TITLE: lang/json
|
||||
#+DATE: April 23, 2020
|
||||
#+SINCE: v3.0.0
|
||||
#+STARTUP: inlineimages nofold
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#features][Features]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
This module provides JSON support.
|
||||
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
|
||||
** Module Flags
|
||||
+ =+lsp= Enable integration with LSP servers, if one is available. Requires the
|
||||
=:tools lsp= module to be enabled.
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/joshwnj/json-mode][json-mode]]
|
||||
+ [[https://github.com/Sterlingg/json-snatcher][json-snatcher]]
|
||||
|
||||
* Prerequisites
|
||||
This module has no prereqisites.
|
||||
|
||||
* TODO Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
|
||||
* TODO Configuration
|
||||
# How to configure this module, including common problems and how to address them.
|
||||
|
||||
* TODO Troubleshooting
|
||||
# Common issues and their solution, or places to look for help.
|
14
modules/lang/json/config.el
Normal file
14
modules/lang/json/config.el
Normal file
|
@ -0,0 +1,14 @@
|
|||
;;; lang/json/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! json-mode
|
||||
:mode "\\.js\\(?:on\\|[hl]int\\(?:rc\\)?\\)\\'"
|
||||
:init
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'json-mode-local-vars-hook #'lsp!))
|
||||
:config
|
||||
(set-electric! 'json-mode :chars '(?\n ?: ?{ ?}))
|
||||
|
||||
(map! :after json-mode
|
||||
:map json-mode-map
|
||||
:localleader
|
||||
"s" #'jsons-print-path))
|
5
modules/lang/json/packages.el
Normal file
5
modules/lang/json/packages.el
Normal file
|
@ -0,0 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/json/packages.el
|
||||
|
||||
(package! json-mode :pin "0e819e519a")
|
||||
(package! json-snatcher :pin "c4cecc0a50")
|
67
modules/lang/julia/README.org
Normal file
67
modules/lang/julia/README.org
Normal file
|
@ -0,0 +1,67 @@
|
|||
#+TITLE: lang/julia
|
||||
#+DATE: April 8, 2020
|
||||
#+SINCE: {replace with next tagged release version}
|
||||
#+STARTUP: inlineimages nofold
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#language-server][Language Server]]
|
||||
- [[#features][Features]]
|
||||
- [[#language-server-1][Language Server]]
|
||||
- [[#configuration][Configuration]]
|
||||
|
||||
* Description
|
||||
Adds Julia support to Doom Emacs
|
||||
|
||||
+ Syntax highlighting and latex symbols from ~julia-mode~
|
||||
+ REPL integration from ~julia-repl~
|
||||
+ Code completion and syntax checking, requires ~:tools lsp~ and ~+lsp~
|
||||
|
||||
** Module Flags
|
||||
+ =+lsp= Language Server Protocol support
|
||||
** Plugins
|
||||
+ [[https://github.com/tpapp/julia-repl][julia-mode]]
|
||||
+ [[https://github.com/JuliaEditorSupport/julia-emacs/][julia-repl]]
|
||||
+ =+lsp= and =:tools lsp=
|
||||
+ [[https://github.com/non-jedi/lsp-julia][lsp-julia]]*
|
||||
+ [[https://github.com/emacs-lsp/lsp-mode][lsp]]
|
||||
|
||||
* Prerequisites
|
||||
This module has no direct prerequisites.
|
||||
|
||||
** Language Server
|
||||
|
||||
~+lsp~ requires the a manual installation of ~lsp-julia~ as it comes with a
|
||||
packaged version of ~LanguageServer.jl~ and its dependencies.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
;; ~/.doom.d/packages.el
|
||||
(package! lsp-julia :recipe (:host github :repo "non-jedi/lsp-julia"))
|
||||
#+END_SRC
|
||||
|
||||
* Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
** Language Server
|
||||
~+lsp~ adds code completion, syntax checking, formatting and other ~lsp-mode~
|
||||
features. This requires a manual installation of ~lsp-julia~ as it bundles
|
||||
~LanguageServer.jl~ and its dependencies.
|
||||
|
||||
* Configuration
|
||||
~lsp-julia~ requires a variable be set for the Julia environment. This is set to
|
||||
v1.0 by default as it is the current LTS.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
;; ~/.doom.d/config.el
|
||||
(setq lsp-julia-default-environment "~/.julia/environments/v1.0")
|
||||
#+END_SRC
|
||||
|
||||
If you would like to use your own installation of ~LanguageServer.jl~, put the
|
||||
following in your personal ~config.el~.
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
;; ~/.doom.d/config.el
|
||||
(setq lsp-julia-package-dir nil)
|
||||
#+END_SRC
|
|
@ -10,7 +10,8 @@
|
|||
"Run an inferior instance of `julia' inside Emacs."
|
||||
(interactive)
|
||||
(if (require 'julia-repl nil t)
|
||||
(julia-repl)
|
||||
(prog1 (julia-repl)
|
||||
(julia-repl-use-emacsclient))
|
||||
(let ((buffer (get-buffer-create "*Julia*")))
|
||||
(unless (comint-check-proc "*Julia*")
|
||||
(apply #'make-comint-in-buffer "Julia" "*Julia*" julia-program julia-arguments))
|
||||
|
|
|
@ -5,19 +5,19 @@
|
|||
:config
|
||||
(set-repl-handler! 'julia-mode #'+julia/open-repl)
|
||||
|
||||
;; Borrow matlab.el's fontification of math operators
|
||||
;; From <https://ogbe.net/emacsconfig.html>
|
||||
;; Borrow matlab.el's fontification of math operators. From
|
||||
;; <https://ogbe.net/emacsconfig.html>
|
||||
(dolist (mode '(julia-mode ess-julia-mode))
|
||||
(font-lock-add-keywords
|
||||
mode
|
||||
`((,(let ((OR "\\|"))
|
||||
(concat "\\(" ;; stolen `matlab.el' operators first
|
||||
(concat "\\(" ; stolen `matlab.el' operators first
|
||||
"[<>!]=?" OR
|
||||
"\\.[/*^']" OR
|
||||
"==" OR
|
||||
"=>" OR
|
||||
"\\<xor\\>" OR
|
||||
"[-+*\\/^&|$]=?" OR ;; this has to come before next (updating operators)
|
||||
"[-+*\\/^&|$]=?" OR ; this has to come before next (updating operators)
|
||||
"[-!^&|*+\\/~:]" OR
|
||||
;; more extra julia operators follow
|
||||
"[%$]" OR
|
||||
|
@ -30,5 +30,35 @@
|
|||
1 font-lock-type-face)))))
|
||||
|
||||
|
||||
(after! julia-repl
|
||||
(add-hook 'julia-repl-hook #'julia-repl-use-emacsclient))
|
||||
(use-package! julia-repl
|
||||
:preface (defvar +julia-repl-start-hook nil)
|
||||
:hook (julia-mode . julia-repl-mode)
|
||||
:hook (+julia-repl-start . +julia-override-repl-escape-char-h)
|
||||
:hook (+julia-repl-start . julia-repl-use-emacsclient)
|
||||
:config
|
||||
(set-popup-rule! "^\\*julia.*\\*$" :ttl nil)
|
||||
|
||||
(when (featurep! :ui workspaces)
|
||||
(defadvice! +julia--namespace-repl-buffer-to-workspace-a (&optional executable-key suffix)
|
||||
"Name for a Julia REPL inferior buffer. Uses workspace name for doom emacs"
|
||||
:override #'julia-repl--inferior-buffer-name
|
||||
(concat julia-repl-inferior-buffer-name-base ":" (+workspace-current-name))))
|
||||
|
||||
(defadvice! +julia--run-start-hook-a (inferior-buffer)
|
||||
"Run `+julia-repl-start-hook' before displaying the REPL."
|
||||
:after #'julia-repl--setup-term
|
||||
(with-current-buffer inferior-buffer
|
||||
(run-hooks '+julia-repl-start-hook)))
|
||||
|
||||
(defun +julia-override-repl-escape-char-h ()
|
||||
"Use C-c instead of C-x for escaping."
|
||||
(term-set-escape-char ?\C-c)))
|
||||
|
||||
|
||||
(use-package! lsp-julia
|
||||
:when (featurep! +lsp)
|
||||
:after lsp-clients
|
||||
:preface
|
||||
(setq lsp-julia-default-environment "~/.julia/environments/v1.0")
|
||||
(when (featurep! +lsp)
|
||||
(add-hook 'julia-mode-local-vars-hook #'lsp!)))
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/julia/packages.el
|
||||
|
||||
(package! julia-mode :pin "5238f9adb7")
|
||||
(package! julia-repl :pin "b11a572970")
|
||||
(package! julia-mode :pin "1c122f1dff")
|
||||
(package! julia-repl :pin "5fa04de4e7")
|
||||
|
|
|
@ -1,10 +1,5 @@
|
|||
;;; lang/latex/+ref.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (stringp +latex-bibtex-file)
|
||||
(setq bibtex-completion-bibliography (list (expand-file-name +latex-bibtex-file))
|
||||
reftex-default-bibliography bibtex-completion-bibliography))
|
||||
|
||||
|
||||
(use-package! reftex
|
||||
:hook (LaTeX-mode . reftex-mode)
|
||||
:config
|
||||
|
|
|
@ -8,6 +8,10 @@
|
|||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#ubuntu][Ubuntu]]
|
||||
- [[#arch-linux][Arch Linux]]
|
||||
- [[#macos][macOS]]
|
||||
- [[#nixos][NixOS]]
|
||||
- [[#features][Features]]
|
||||
- [[#customization][Customization]]
|
||||
- [[#specifying-the-location-of-a-bibtex-file--corresponding-pdfs][Specifying the location of a bibtex file & corresponding PDFs]]
|
||||
|
@ -24,7 +28,6 @@ Provide a helping hand when working with LaTeX documents.
|
|||
+ Change PDF viewer to Okular or ~latex-preview-pane~
|
||||
+ Bibtex editor
|
||||
+ Autocompletion using ~company-mode~
|
||||
+ Ivy or Helm for selecting bibliography
|
||||
+ Compile your .tex code only once using LatexMk
|
||||
|
||||
** Module Flags
|
||||
|
@ -32,6 +35,8 @@ Provide a helping hand when working with LaTeX documents.
|
|||
+ =+cdlatex= Enable [[https://github.com/cdominik/cdlatex][cdlatex]] for fast math insertion.
|
||||
+ =+lsp= Start LSP automatically in `tex-mode-hook`. This requires the =:tools
|
||||
lsp= module. Supported servers are `digestif` and `TexLab`.
|
||||
+ =+fold= Use TeX-fold (from auctex) to fold LaTeX macros to unicode, and make
|
||||
folding hook-based and less manual.
|
||||
|
||||
** Plugins
|
||||
+ [[http://www.gnu.org/software/auctex/][auctex]]
|
||||
|
@ -41,23 +46,51 @@ Provide a helping hand when working with LaTeX documents.
|
|||
+ [[https://github.com/alexeyr/company-auctex][company-auctex]]*
|
||||
+ [[https://github.com/TheBB/company-reftex][company-reftex]]*
|
||||
+ [[https://github.com/vspinu/company-math][company-math]]*
|
||||
+ [[https://github.com/tmalsburg/helm-bibtex][ivy-bibtex]]* or [[https://github.com/tmalsburg/helm-bibtex][helm-bibtex]]*
|
||||
+ [[https://github.com/cdominik/cdlatex][cdlatex]] (=+cdlatex=)
|
||||
|
||||
* TODO Prerequisites
|
||||
* Prerequisites
|
||||
You will need ghostscript and a latex compiler. All this is provided by
|
||||
the =texlive= bundle, available through many OS package managers.
|
||||
|
||||
Ghostscript <= 9.27 is [[https://www.gnu.org/software/auctex/manual/preview-latex/No-images-are-displayed-with-gs-9_002e27-and-earlier.html][reported buggy]] and doesn't work with auctex's math
|
||||
previews. (You can check you ghostscript version with ~gs --version~.) Most
|
||||
package managers already have newer versions, but if not you might have to build
|
||||
gs from source.
|
||||
** Ubuntu
|
||||
#+BEGIN_SRC sh
|
||||
apt-get install texlive
|
||||
#+END_SRC
|
||||
|
||||
** Arch Linux
|
||||
#+BEGIN_SRC sh
|
||||
pacman -S texlive
|
||||
#+END_SRC
|
||||
|
||||
** TODO macOS
|
||||
#+BEGIN_SRC sh
|
||||
brew cask install basictex
|
||||
# If the above doesn't work, then
|
||||
brew cask install mactex # WARNING: large 4gb download!
|
||||
#+END_SRC
|
||||
|
||||
#+begin_quote
|
||||
This has not been verified.
|
||||
#+end_quote
|
||||
|
||||
** NixOS
|
||||
#+BEGIN_SRC nix
|
||||
environment.systemPackages = [ pkgs.texlive.combined.scheme-medium ];
|
||||
#+END_SRC
|
||||
|
||||
* TODO Features
|
||||
|
||||
* Customization
|
||||
** Specifying the location of a bibtex file & corresponding PDFs
|
||||
The reftex and bibtex-completion packages have two variables that allow you to
|
||||
specify where it should find your bibliography file(s) and their corresponding
|
||||
PDFs:
|
||||
Reftex has a variable that allow you to
|
||||
specify where it should find your bibliography file(s):
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
(setq reftex-default-bibliography "/your/bib/file.bib")
|
||||
;; Optionally specifying a location for the corresponding PDFs
|
||||
(setq bibtex-completion-library-path (list "/your/bib/pdfs"))
|
||||
#+END_SRC
|
||||
|
||||
** Changing the PDFs viewer
|
||||
|
|
|
@ -39,6 +39,18 @@ Continuation lines are indented either twice `LaTeX-indent-level', or
|
|||
(+ offset indent))
|
||||
((+ contin indent))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +latex-fold-last-macro-a (&rest _)
|
||||
"Advice to auto-fold LaTeX macros after functions that
|
||||
typically insert macros."
|
||||
;; A simpler approach would be to just fold the whole line, but if point was
|
||||
;; inside a macro that would would kick it out. So instead we fold the last
|
||||
;; macro before point, hoping its the one newly inserted.
|
||||
(TeX-fold-region (save-excursion
|
||||
(search-backward "\\" (line-beginning-position) t)
|
||||
(point))
|
||||
(1+ (point))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +latex-symbols-company-backend (command &optional arg &rest _ignored)
|
||||
"A wrapper backend for `company-mode' that either uses
|
||||
|
|
|
@ -3,9 +3,6 @@
|
|||
(defvar +latex-indent-level-item-continuation 4
|
||||
"Custom indentation level for items in enumeration-type environments")
|
||||
|
||||
(defvar +latex-bibtex-file nil
|
||||
"File AUCTeX (specifically RefTeX) uses to search for citations.")
|
||||
|
||||
(defvar +latex-enable-unicode-math nil
|
||||
"If non-nil, use `company-math-symbols-unicode' backend in LaTeX-mode,
|
||||
enabling unicode symbols in math regions. This requires the unicode-math latex
|
||||
|
@ -39,6 +36,7 @@ If no viewers are found, `latex-preview-pane' is used.")
|
|||
;; automatically insert braces after sub/superscript in math mode
|
||||
TeX-electric-sub-and-superscript t)
|
||||
|
||||
|
||||
(after! tex
|
||||
;; fontify common latex commands
|
||||
(load! "+fontification")
|
||||
|
@ -55,8 +53,6 @@ If no viewers are found, `latex-preview-pane' is used.")
|
|||
fill-nobreak-predicate (cons #'texmathp fill-nobreak-predicate))
|
||||
;; Enable word wrapping
|
||||
(add-hook 'TeX-mode-hook #'visual-line-mode)
|
||||
;; Fold TeX macros
|
||||
(add-hook 'TeX-mode-hook #'TeX-fold-mode)
|
||||
;; Enable rainbow mode after applying styles to the buffer
|
||||
(add-hook 'TeX-update-style-hook #'rainbow-delimiters-mode)
|
||||
;; display output of latex commands in popup
|
||||
|
@ -82,6 +78,45 @@ If no viewers are found, `latex-preview-pane' is used.")
|
|||
#'lsp!)))
|
||||
|
||||
|
||||
(use-package! tex-fold
|
||||
:when (featurep! +fold)
|
||||
:hook (TeX-mode . TeX-fold-buffer)
|
||||
:hook (TeX-mode . TeX-fold-mode)
|
||||
|
||||
:config
|
||||
;; Fold after all auctex macro insertions
|
||||
(advice-add #'TeX-insert-macro :after #'+latex-fold-last-macro-a)
|
||||
;; Fold after cdlatex macro insertions
|
||||
(advice-add #'cdlatex-math-symbol :after #'+latex-fold-last-macro-a)
|
||||
(advice-add #'cdlatex-math-modify :after #'+latex-fold-last-macro-a)
|
||||
;; Fold after snippets
|
||||
(when (featurep! :editor snippets)
|
||||
(add-hook 'TeX-fold-mode-hook
|
||||
(defun +latex-fold-set-yas-hook-h ()
|
||||
"Set a local after-snippet-hook to fold the snippet contents."
|
||||
(add-hook! 'yas-after-exit-snippet-hook :local
|
||||
(TeX-fold-region yas-snippet-beg yas-snippet-end)))))
|
||||
|
||||
(add-hook 'mixed-pitch-mode-hook
|
||||
(defun +latex-fold-set-variable-pitch-h ()
|
||||
"Fix folded things invariably getting fixed pitch when using mixed-pitch.
|
||||
Math faces should stay fixed by the mixed-pitch blacklist, this
|
||||
is mostly for \\section etc."
|
||||
(when mixed-pitch-mode
|
||||
;; Adding to this list makes mixed-pitch clean the face remaps after us
|
||||
(add-to-list 'mixed-pitch-fixed-cookie
|
||||
(face-remap-add-relative
|
||||
'TeX-fold-folded-face
|
||||
:family (face-attribute 'variable-pitch :family)
|
||||
:height (face-attribute 'variable-pitch :height))))))
|
||||
|
||||
(map! :map TeX-fold-mode-map
|
||||
:localleader
|
||||
:desc "Fold paragraph" "f" #'TeX-fold-paragraph
|
||||
:desc "Unfold paragraph" "F" #'TeX-fold-clearout-paragraph
|
||||
:desc "Unfold buffer" "C-f" #'TeX-fold-clearout-buffer))
|
||||
|
||||
|
||||
(after! latex
|
||||
(setq LaTeX-section-hook ; Add the toc entry to the sectioning hooks.
|
||||
'(LaTeX-section-heading
|
||||
|
@ -125,9 +160,9 @@ If no viewers are found, `latex-preview-pane' is used.")
|
|||
|
||||
|
||||
(use-package! cdlatex
|
||||
:defer t
|
||||
:when (featurep! +cdlatex)
|
||||
:hook (LaTeX-mode . cdlatex-mode)
|
||||
:hook (org-mode . org-cdlatex-mode)
|
||||
:config
|
||||
;; Use \( ... \) instead of $ ... $
|
||||
(setq cdlatex-use-dollar-to-ensure-math nil)
|
||||
|
@ -135,22 +170,22 @@ If no viewers are found, `latex-preview-pane' is used.")
|
|||
(map! :map cdlatex-mode-map
|
||||
;; smartparens takes care of inserting closing delimiters, and if you
|
||||
;; don't use smartparens you probably won't want these also.
|
||||
:g "$" nil
|
||||
:g "(" nil
|
||||
:g "{" nil
|
||||
:g "[" nil
|
||||
:g "|" nil
|
||||
:g "<" nil
|
||||
"$" nil
|
||||
"(" nil
|
||||
"{" nil
|
||||
"[" nil
|
||||
"|" nil
|
||||
"<" nil
|
||||
;; TAB is used for cdlatex's snippets and navigation. But we have
|
||||
;; yasnippet for that.
|
||||
(:when (featurep! :editor snippets)
|
||||
:g "TAB" nil)
|
||||
"TAB" nil)
|
||||
;; AUCTeX takes care of auto-inserting {} on _^ if you want, with
|
||||
;; `TeX-electric-sub-and-superscript'
|
||||
:g "^" nil
|
||||
:g "_" nil
|
||||
"^" nil
|
||||
"_" nil
|
||||
;; AUCTeX already provides this with `LaTeX-insert-item'
|
||||
:g [(control return)] nil))
|
||||
[(control return)] nil))
|
||||
|
||||
|
||||
;; Nicely indent lines that have wrapped when visual line mode is activated
|
||||
|
|
|
@ -19,7 +19,3 @@
|
|||
(package! company-auctex :pin "48c42c58ce")
|
||||
(package! company-reftex :pin "275ef708f0")
|
||||
(package! company-math :pin "a796053590"))
|
||||
(when (featurep! :completion ivy)
|
||||
(package! ivy-bibtex :pin "d4471232be"))
|
||||
(when (featurep! :completion helm)
|
||||
(package! helm-bibtex :pin "d4471232be"))
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/lean/packages.el
|
||||
|
||||
(package! lean-mode :pin "f26e40daad")
|
||||
(package! lean-mode :pin "65b55b1711")
|
||||
|
||||
(when (featurep! :completion company)
|
||||
(package! company-lean :pin "f26e40daad"))
|
||||
(package! company-lean :pin "65b55b1711"))
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/ledger/packages.el
|
||||
|
||||
(package! ledger-mode :pin "a514953d6a")
|
||||
(package! ledger-mode :pin "7d78645479")
|
||||
|
||||
(when (featurep! :editor evil)
|
||||
(package! evil-ledger :pin "7a9f9f5d39"))
|
||||
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-ledger :pin "2065beab56"))
|
||||
(package! flycheck-ledger :pin "628e25ba66"))
|
||||
|
|
|
@ -42,6 +42,10 @@ capture, the end position, and the output buffer.")
|
|||
"<script src='https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/highlight.min.js'></script>"
|
||||
"<script>document.addEventListener('DOMContentLoaded', () => { document.body.classList.add('markdown-body'); document.querySelectorAll('pre[lang] > code').forEach((code) => { code.classList.add(code.parentElement.lang); }); document.querySelectorAll('pre > code').forEach((code) => { hljs.highlightBlock(code); }); });</script>"))
|
||||
|
||||
;; A shorter alias for org src blocks than "markdown"
|
||||
(after! org-src
|
||||
(add-to-list 'org-src-lang-modes '("md" . markdown)))
|
||||
|
||||
:config
|
||||
(set-flyspell-predicate! '(markdown-mode gfm-mode)
|
||||
#'+markdown-flyspell-word-p)
|
||||
|
@ -66,6 +70,7 @@ capture, the end position, and the output buffer.")
|
|||
|
||||
(map! :map markdown-mode-map
|
||||
:localleader
|
||||
"'" #'markdown-edit-code-block
|
||||
"o" #'markdown-open
|
||||
"p" #'markdown-preview
|
||||
"e" #'markdown-export
|
||||
|
@ -80,6 +85,10 @@ capture, the end position, and the output buffer.")
|
|||
(use-package! evil-markdown
|
||||
:when (featurep! :editor evil +everywhere)
|
||||
:hook (markdown-mode . evil-markdown-mode)
|
||||
:init
|
||||
;; REVIEW Until Somelauw/evil-markdown#1 is resolved:
|
||||
(defun evil-disable-insert-state-bindings ()
|
||||
evil-disable-insert-state-bindings)
|
||||
:config
|
||||
(add-hook 'evil-markdown-mode-hook #'evil-normalize-keymaps)
|
||||
(map! :map evil-markdown-mode-map
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
(package! edit-indirect :pin "935ded353b")
|
||||
|
||||
(when (featurep! +grip)
|
||||
(package! grip-mode :pin "1a61bb71a7"))
|
||||
(package! grip-mode :pin "9615c47747"))
|
||||
|
||||
(when (featurep! :editor evil +everywhere)
|
||||
(package! evil-markdown
|
||||
|
|
|
@ -46,7 +46,8 @@
|
|||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(save-match-data
|
||||
(when (re-search-forward "#! *\\(?:cached-\\)?nix-shell +-i +\\([^ \n]+\\)" 256 t)
|
||||
(if (not (re-search-forward "#! *\\(?:cached-\\)?nix-shell +-i +\\([^ \n]+\\)" 256 t))
|
||||
(message "Couldn't determine mode for this script")
|
||||
(let* ((interp (match-string 1))
|
||||
(mode
|
||||
(assoc-default
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
;;; lang/nix/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(use-package! nix-mode
|
||||
:interpreter ("cached-nix-shell" . +nix-shell-init-mode)
|
||||
:interpreter ("nix-shell" . +nix-shell-init-mode)
|
||||
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
|
||||
:mode "\\.nix\\'"
|
||||
:config
|
||||
(set-company-backend! 'nix-mode 'company-nixos-options)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
(package! tuareg :pin "c12061eb80")
|
||||
|
||||
(unless (featurep! +lsp)
|
||||
(package! merlin :pin "f6954e953b")
|
||||
(package! merlin :pin "37e38e44f5")
|
||||
(package! merlin-eldoc :pin "db7fab1edd")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-ocaml :pin "8707a7bf54")))
|
||||
|
@ -12,14 +12,14 @@
|
|||
(package! ocp-indent :pin "9e26c0a269")
|
||||
|
||||
(when (featurep! :tools eval)
|
||||
(package! utop :pin "7c99d8c904"))
|
||||
(package! utop :pin "30c77ce4d7"))
|
||||
|
||||
(when (featurep! :editor format)
|
||||
;; by default quelpa generated a version 0pre0.20180929.192844, which got
|
||||
;; parsed into (0 -1 0 ...), which when compared with version nil (0) in
|
||||
;; package-installed-p always yielded false
|
||||
(package! ocamlformat :recipe
|
||||
(:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el")) :pin "dba4487820"))
|
||||
(:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el")) :pin "5282e047bb"))
|
||||
|
||||
(package! dune :recipe
|
||||
(:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el")) :pin "f3df7abe64")
|
||||
(:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el")) :pin "1944d0fb52")
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
- [[#built-in-custom-link-types][Built-in custom link types]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#changing-org-directory][Changing ~org-directory~]]
|
||||
- [[#changing-org-noter-notes-search-path][Changing ~org-noter-notes-search-path~]]
|
||||
|
||||
* Description
|
||||
This module adds org-mode support to Doom Emacs, along with a number of
|
||||
|
@ -63,16 +64,18 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode
|
|||
+ =+ipython= (**DEPRECATED**) Enables ipython integration for babel.
|
||||
+ =+journal= Enables [[https://github.com/bastibe/org-journal][org-journal]] integration.
|
||||
+ =+jupyter= Enables Jupyter integration for babel.
|
||||
+ =+noter= Enables org-noter integration. Keeps notes in sync with a document.
|
||||
Requires [[https://github.com/politza/pdf-tools][pdf-tools]] (=:tools pdf=) or [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Document-View.html][DocView]] or [[https://github.com/wasamasa/nov.el][nov.el]] to be enabled.
|
||||
+ =+pandoc= Enables pandoc integration into the Org exporter.
|
||||
+ =+pomodoro= Enables a pomodoro timer for clocking time on tasks.
|
||||
+ =+present= Enables integration with reveal.js, beamer and org-tree-slide, so
|
||||
Emacs can be used for presentations.
|
||||
+ =+roam= Enables org-roam integration.
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/hniksic/emacs-htmlize][htmlize]]
|
||||
+ [[https://github.com/astahlman/ob-async][ob-async]]
|
||||
+ [[https://github.com/alphapapa/org-bookmark-heading][org-bookmark-heading]]
|
||||
+ [[https://github.com/sabof/org-bullets][org-bullets]]
|
||||
+ [[https://github.com/integral-dw/org-superstar-mode][org-superstar]]
|
||||
+ [[https://github.com/rexim/org-cliplink][org-cliplink]]
|
||||
+ [[https://github.com/magit/orgit][orgit]]
|
||||
+ [[https://orgmode.org/][org-plus-contrib]]
|
||||
|
@ -89,17 +92,23 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode
|
|||
+ [[https://github.com/DEADB17/ob-racket][ob-racket]]
|
||||
+ =:lang rest=
|
||||
+ [[https://github.com/alf/ob-restclient.el][ob-restclient]]
|
||||
+ =:lang rst=
|
||||
+ [[https://github.com/msnoigrs/ox-rst][ox-rst]]
|
||||
+ =:lang rust=
|
||||
+ [[https://github.com/micanzhang/ob-rust][ob-rust]]
|
||||
+ =:lang scala=
|
||||
+ [[https://github.com/zwild/ob-ammonite][ob-ammonite]]
|
||||
+ =:editor evil=
|
||||
+ [[https://github.com/Somelauw/evil-org-mode][evil-org]]
|
||||
+ =:tools pdf=
|
||||
+ [[https://github.com/markus1189/org-pdfview/tree/09ef4bf8ff8319c1ac78046c7e6b89f6a0beb82c][org-pdfview]]
|
||||
+ [[https://github.com/fuxialexander/org-pdftools][org-pdftools]]
|
||||
+ =+dragndrop=
|
||||
+ [[https://github.com/abo-abo/org-download][org-download]]
|
||||
+ =+gnuplot=
|
||||
+ [[https://github.com/mkmcc/gnuplot-mode][gnuplot]]
|
||||
+ [[https://github.com/bruceravel/gnuplot-mode][gnuplot-mode]]
|
||||
+ =+hugo=
|
||||
+ [[https://github.com/kaushalmodi/ox-hugo][ox-hugo]]
|
||||
+ =+ipython=
|
||||
+ [[https://github.com/gregsexton/ob-ipython][ob-ipython]]
|
||||
+ =+jupyter=
|
||||
|
@ -112,8 +121,12 @@ https://www.mfoot.com/blog/2015/11/22/literate-emacs-configuration-with-org-mode
|
|||
+ [[https://github.com/anler/centered-window-mode][centered-window]]
|
||||
+ [[https://github.com/takaxp/org-tree-slide][org-tree-slide]]
|
||||
+ [[https://gitlab.com/oer/org-re-reveal][org-re-reveal]]
|
||||
+ =+hugo=
|
||||
+ [[https://github.com/kaushalmodi/ox-hugo][ox-hugo]]
|
||||
+ =+roam=
|
||||
+ [[https://github.com/jethrokuan/org-roam][org-roam]]
|
||||
+ [[https://github.com/jethrokuan/company-org-roam][company-org-roam]]
|
||||
+ =+noter=
|
||||
+ [[https://github.com/weirdNox/org-noter][org-noter]]
|
||||
|
||||
|
||||
** Hacks
|
||||
+ The window is recentered when following links.
|
||||
|
@ -216,3 +229,10 @@ To modify ~org-directory~ it must be set /before/ =org= has loaded:
|
|||
;; ~/.doom.d/config.el
|
||||
(setq org-directory "~/new/org/location/")
|
||||
#+END_SRC
|
||||
** Changing ~org-noter-notes-search-path~
|
||||
To modify ~org-noter-notes-search-path~ set:
|
||||
|
||||
#+BEGIN_SRC emacs-lisp
|
||||
;; ~/.doom.d/config.el
|
||||
(setq org-noter-notes-search-path '("~/notes/path/"))
|
||||
#+END_SRC
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
;;; lang/org/autoload/contrib-present.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +present)
|
||||
|
||||
(defvar +org-present--overlays nil)
|
||||
|
||||
|
||||
;;
|
||||
;;; Helpers
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ PATH (a string) can be an url, a local file path, or a base64 encoded datauri."
|
|||
(unless (eq major-mode 'org-mode)
|
||||
(user-error "Not in an org buffer"))
|
||||
(require 'org-download)
|
||||
(condition-case ex
|
||||
(condition-case-unless-debug e
|
||||
(let ((raw-uri (url-unhex-string path)))
|
||||
(cond ((string-match-p "^data:image/png;base64," path)
|
||||
(org-download-dnd-base64 path nil))
|
||||
|
@ -56,4 +56,4 @@ PATH (a string) can be an url, a local file path, or a base64 encoded datauri."
|
|||
;; insert the link
|
||||
(org-download-insert-link raw-uri new-path)))))
|
||||
(error
|
||||
(user-error "Failed to attach file: %s" (error-message-string ex)))))
|
||||
(user-error "Failed to attach file: %s" (error-message-string e)))))
|
||||
|
|
|
@ -29,7 +29,8 @@
|
|||
(defun +org-capture-frame-p (&rest _)
|
||||
"Return t if the current frame is an org-capture frame opened by
|
||||
`+org-capture/open-frame'."
|
||||
(and (equal "doom-capture" (frame-parameter nil 'name))
|
||||
(and (equal (alist-get 'name +org-capture-frame-parameters)
|
||||
(frame-parameter nil 'name))
|
||||
(frame-parameter nil 'transient)))
|
||||
|
||||
;;;###autoload
|
||||
|
@ -49,14 +50,13 @@ you're done. This can be called from an external shell script."
|
|||
(with-selected-frame frame
|
||||
(require 'org-capture)
|
||||
(condition-case ex
|
||||
(cl-letf (((symbol-function #'pop-to-buffer)
|
||||
(symbol-function #'switch-to-buffer)))
|
||||
(cl-letf (((symbol-function #'pop-to-buffer) #'switch-to-buffer))
|
||||
(switch-to-buffer (doom-fallback-buffer))
|
||||
(let ((org-capture-initial initial-input)
|
||||
org-capture-entry)
|
||||
(when (and key (not (string-empty-p key)))
|
||||
(setq org-capture-entry (org-capture-select-template key)))
|
||||
(call-interactively +org-capture-fn)))
|
||||
(funcall +org-capture-fn)))
|
||||
('error
|
||||
(message "org-capture: %s" (error-message-string ex))
|
||||
(delete-frame frame))))))
|
||||
|
|
|
@ -1,43 +1,72 @@
|
|||
;;; lang/org/autoload/org-link.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defun +org--relpath (path root)
|
||||
(defun +org--relative-path (path root)
|
||||
(if (and buffer-file-name (file-in-directory-p buffer-file-name root))
|
||||
(file-relative-name path)
|
||||
path))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-def-link (key dir)
|
||||
(org-link-set-parameters
|
||||
key
|
||||
:complete (lambda () (+org--relpath (+org-link-read-file key dir) dir))
|
||||
:follow (lambda (link) (find-file (expand-file-name link dir)))
|
||||
:face (lambda (link)
|
||||
(if (file-exists-p (expand-file-name link dir))
|
||||
'org-link
|
||||
'error))))
|
||||
(defun +org--read-link-path (key dir &optional fn)
|
||||
(let ((file (funcall (or fn #'read-file-name) (format "%s: " (capitalize key)) dir)))
|
||||
(format "%s:%s" key (file-relative-name file dir))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-link-read-file (key dir)
|
||||
(let ((file (read-file-name (format "%s: " (capitalize key)) dir)))
|
||||
(format "%s:%s"
|
||||
key
|
||||
(file-relative-name file dir))))
|
||||
(defun +org-define-basic-link (key dir-var &rest plist)
|
||||
"Define a link with some basic completion & fontification.
|
||||
|
||||
KEY is the name of the link type. DIR-VAR is the directory variable to resolve
|
||||
links relative to. PLIST is passed to `org-link-set-parameters' verbatim.
|
||||
|
||||
Links defined with this will be rendered in the `error' face if the file doesn't
|
||||
exist, and `org-link' otherwise."
|
||||
(declare (indent 2))
|
||||
(let ((requires (plist-get plist :requires))
|
||||
(dir-fn (if (functionp dir-var)
|
||||
dir-var
|
||||
(lambda () (symbol-value dir-var)))))
|
||||
(apply #'org-link-set-parameters
|
||||
key
|
||||
:complete (lambda ()
|
||||
(if requires (mapc #'require (doom-enlist requires)))
|
||||
(+org--relative-path (+org--read-link-path key (funcall dir-fn))
|
||||
(funcall dir-fn)))
|
||||
:follow (lambda (link)
|
||||
(org-link-open-as-file (expand-file-name link (funcall dir-fn)) nil))
|
||||
:face (lambda (link)
|
||||
(if (file-exists-p (expand-file-name link (funcall dir-fn)))
|
||||
'org-link
|
||||
'error))
|
||||
(doom-plist-delete plist :requires))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Image data functions (for custom inline images)
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-link-read-directory (key dir)
|
||||
(let ((file (read-directory-name (format "%s: " (capitalize key)) dir)))
|
||||
(format "%s:%s"
|
||||
key
|
||||
(file-relative-name file dir))))
|
||||
(defun +org-image-file-data-fn (protocol link _description)
|
||||
"Intepret LINK as an image file path and return its data."
|
||||
(setq
|
||||
link (expand-file-name
|
||||
link
|
||||
(pcase protocol
|
||||
("download" (or org-download-image-dir org-attach-id-dir default-directory))
|
||||
("attachment" org-attach-id-dir)
|
||||
(_ default-directory))))
|
||||
(when (and (file-exists-p link)
|
||||
(image-type-from-file-name link))
|
||||
(with-temp-buffer
|
||||
(set-buffer-multibyte nil)
|
||||
(setq buffer-file-coding-system 'binary)
|
||||
(insert-file-contents-literally link)
|
||||
(buffer-substring-no-properties (point-min) (point-max)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-inline-data-image (_protocol link _description)
|
||||
(defun +org-inline-image-data-fn (_protocol link _description)
|
||||
"Interpret LINK as base64-encoded image data."
|
||||
(base64-decode-string link))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-image-link (protocol link _description)
|
||||
"Interpret LINK as base64-encoded image data."
|
||||
(defun +org-http-image-data-fn (protocol link _description)
|
||||
"Interpret LINK as an URL to an image file."
|
||||
(when (image-type-from-file-name link)
|
||||
(if-let* ((buf (url-retrieve-synchronously (concat protocol ":" link))))
|
||||
(with-current-buffer buf
|
||||
|
|
|
@ -46,11 +46,10 @@ re-align the table if necessary. (Necessary because org-mode has a
|
|||
|
||||
;;;###autoload
|
||||
(defun +org-realign-table-maybe-h ()
|
||||
"Auto-align table under cursor and re-calculate formulas."
|
||||
"Auto-align table under cursor."
|
||||
(when (and (org-at-table-p) org-table-may-need-update)
|
||||
(let ((pt (point))
|
||||
(inhibit-message t))
|
||||
(org-table-recalculate)
|
||||
(if org-table-may-need-update (org-table-align))
|
||||
(goto-char pt))))
|
||||
|
||||
|
|
|
@ -235,7 +235,12 @@ If on a:
|
|||
(let ((match (and (org-at-item-checkbox-p) (match-string 1))))
|
||||
(org-toggle-checkbox (if (equal match "[ ]") '(16)))))
|
||||
|
||||
(_ (+org--refresh-inline-images-in-subtree)))))
|
||||
(_
|
||||
(if (or (org-in-regexp org-ts-regexp-both nil t)
|
||||
(org-in-regexp org-tsr-regexp-both nil t)
|
||||
(org-in-regexp org-any-link-re nil t))
|
||||
(call-interactively #'org-open-at-point)
|
||||
(+org--refresh-inline-images-in-subtree))))))
|
||||
|
||||
|
||||
;; I use this instead of `org-insert-item' or `org-insert-heading' which are too
|
||||
|
@ -381,26 +386,25 @@ Made for `org-tab-first-hook' in evil-mode."
|
|||
"Tries to expand a yasnippet snippet, if one is available. Made for
|
||||
`org-tab-first-hook'."
|
||||
(when (bound-and-true-p yas-minor-mode)
|
||||
(let ((major-mode (if (org-in-src-block-p t)
|
||||
(org-src-get-lang-mode (org-eldoc-get-src-lang))
|
||||
major-mode))
|
||||
(org-src-tab-acts-natively nil) ; causes breakages
|
||||
;; Smart indentation doesn't work with yasnippet, and painfully slow
|
||||
;; in the few cases where it does.
|
||||
(yas-indent-line 'fixed))
|
||||
;; HACK Yasnippet field overlays break org-bullet-mode. Don't ask me why.
|
||||
(add-hook! 'yas-after-exit-snippet-hook :local
|
||||
(when (bound-and-true-p org-bullets-mode)
|
||||
(org-bullets-mode -1)
|
||||
(org-bullets-mode +1)))
|
||||
(cond ((and (or (not (bound-and-true-p evil-local-mode))
|
||||
(evil-insert-state-p))
|
||||
(yas--templates-for-key-at-point))
|
||||
(yas-expand)
|
||||
t)
|
||||
((use-region-p)
|
||||
(yas-insert-snippet)
|
||||
t)))))
|
||||
(and (let ((major-mode (if (org-in-src-block-p t)
|
||||
(org-src-get-lang-mode (org-eldoc-get-src-lang))
|
||||
major-mode))
|
||||
(org-src-tab-acts-natively nil) ; causes breakages
|
||||
;; Smart indentation doesn't work with yasnippet, and painfully slow
|
||||
;; in the few cases where it does.
|
||||
(yas-indent-line 'fixed))
|
||||
(cond ((and (or (not (bound-and-true-p evil-local-mode))
|
||||
(evil-insert-state-p))
|
||||
(yas--templates-for-key-at-point))
|
||||
(yas-expand)
|
||||
t)
|
||||
((use-region-p)
|
||||
(yas-insert-snippet)
|
||||
t)))
|
||||
;; HACK Yasnippet breaks org-superstar-mode because yasnippets is
|
||||
;; overzealous about cleaning up overlays.
|
||||
(when (bound-and-true-p org-superstar-mode)
|
||||
(org-superstar-restart)))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +org-cycle-only-current-subtree-h (&optional arg)
|
||||
|
@ -431,12 +435,14 @@ with `org-cycle')."
|
|||
|
||||
;;;###autoload
|
||||
(defun +org-unfold-to-2nd-level-or-point-h ()
|
||||
"My version of the 'overview' #+STARTUP option: expand first-level headings.
|
||||
Expands the first level, but no further. If point was left somewhere deeper,
|
||||
unfold to point on startup."
|
||||
"Alters '#+STARTUP overview' to only expand first-level headings.
|
||||
Expands the first level, but no further. If a different startup option was
|
||||
provided, do that instead."
|
||||
(unless org-agenda-inhibit-startup
|
||||
;; TODO Implement a custom #+STARTUP option?
|
||||
(when (eq org-startup-folded t)
|
||||
(outline-hide-sublevels +org-initial-fold-level))
|
||||
;; If point was left somewhere deeper, unfold to point on startup.
|
||||
(when (outline-invisible-p)
|
||||
(ignore-errors
|
||||
(save-excursion
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
"An alist mapping languages to babel libraries. This is necessary for babel
|
||||
libraries (ob-*.el) that don't match the name of the language.
|
||||
|
||||
For example, with (fish . shell) will cause #+BEGIN_SRC fish to load ob-shell.el
|
||||
when executed.")
|
||||
For example, (fish . shell) will cause #+BEGIN_SRC fish blocks to load
|
||||
ob-shell.el when executed.")
|
||||
|
||||
(defvar +org-babel-load-functions ()
|
||||
"A list of functions executed to load the current executing src block. They
|
||||
|
@ -65,13 +65,18 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
;;
|
||||
;;; `org-load' hooks
|
||||
|
||||
(defun +org-init-org-directory-h ()
|
||||
(unless org-directory
|
||||
(setq org-directory "~/org"))
|
||||
(setq org-id-locations-file (expand-file-name ".orgids" org-directory)))
|
||||
|
||||
|
||||
(defun +org-init-agenda-h ()
|
||||
(unless org-agenda-files
|
||||
(setq org-agenda-files (list org-directory)))
|
||||
(setq-default
|
||||
;; Don't monopolize the whole frame just for the agenda
|
||||
org-agenda-window-setup 'current-window
|
||||
org-agenda-inhibit-startup t
|
||||
org-agenda-skip-unavailable-files t
|
||||
;; Move the agenda to show the previous 3 days and the next 7 days for a bit
|
||||
;; better context instead of just the current week which is a bit confusing
|
||||
|
@ -117,24 +122,35 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
|
||||
;; Fontify latex blocks and entities, but not natively -- that's too slow
|
||||
(setq org-highlight-latex-and-related '(latex script entities))
|
||||
(plist-put! org-format-latex-options
|
||||
:scale 1.5 ; larger previews
|
||||
:foreground 'auto ; match the theme foreground
|
||||
:background 'auto) ; ... and its background
|
||||
|
||||
(plist-put org-format-latex-options :scale 1.5) ; larger previews
|
||||
(add-hook! 'doom-load-theme-hook
|
||||
(defun +org-refresh-latex-background-h ()
|
||||
"Previews are rendered with the incorrect background.
|
||||
This forces it to read the background before rendering."
|
||||
(plist-put! org-format-latex-options
|
||||
:background
|
||||
(face-attribute (if-let (remap (cadr (assq 'default face-remapping-alist)))
|
||||
(if (keywordp (car-safe remap))
|
||||
(plist-get remap :background)
|
||||
remap)
|
||||
'default)
|
||||
:background nil t))))
|
||||
|
||||
;; HACK Face specs fed directly to `org-todo-keyword-faces' don't respect
|
||||
;; underlying faces like the `org-todo' face does, so we define our own
|
||||
;; intermediary faces that extend from org-todo.
|
||||
(with-no-warnings
|
||||
(custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "")
|
||||
(custom-declare-face '+org-todo-active '((t (:inherit (bold font-lock-constant-face org-todo)))) "")
|
||||
(custom-declare-face '+org-todo-project '((t (:inherit (bold font-lock-doc-face org-todo)))) "")
|
||||
(custom-declare-face '+org-todo-onhold '((t (:inherit (bold warning org-todo)))) ""))
|
||||
(custom-declare-face '+org-todo-onhold '((t (:inherit (bold warning org-todo)))) ""))
|
||||
(setq org-todo-keywords
|
||||
'((sequence
|
||||
"TODO(t)" ; A task that needs doing & is ready to do
|
||||
"PROJ(p)" ; An ongoing project that cannot be completed in one step
|
||||
"PROJ(p)" ; A project, which usually contains other tasks
|
||||
"STRT(s)" ; A task that is in progress
|
||||
"WAIT(w)" ; Something is holding up this task; or it is paused
|
||||
"WAIT(w)" ; Something external is holding up this task
|
||||
"HOLD(h)" ; This task is paused/on hold because of me
|
||||
"|"
|
||||
"DONE(d)" ; Task successfully completed
|
||||
"KILL(k)") ; Task was cancelled, aborted or is no longer applicable
|
||||
|
@ -149,6 +165,7 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
("STRT" . +org-todo-active)
|
||||
("[?]" . +org-todo-onhold)
|
||||
("WAIT" . +org-todo-onhold)
|
||||
("HOLD" . +org-todo-onhold)
|
||||
("PROJ" . +org-todo-project)))
|
||||
|
||||
(defadvice! +org-display-link-in-eldoc-a (orig-fn &rest args)
|
||||
|
@ -159,12 +176,19 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
(apply orig-fn args)))
|
||||
|
||||
;; Automatic indent detection in org files is meaningless
|
||||
(cl-pushnew 'org-mode doom-detect-indentation-excluded-modes :test #'eq)
|
||||
(add-to-list 'doom-detect-indentation-excluded-modes 'org-mode)
|
||||
|
||||
(set-pretty-symbols! 'org-mode
|
||||
:name "#+NAME:"
|
||||
:name "#+name:"
|
||||
:src_block "#+BEGIN_SRC"
|
||||
:src_block_end "#+END_SRC"))
|
||||
:src_block "#+begin_src"
|
||||
:src_block_end "#+END_SRC"
|
||||
:src_block_end "#+end_src"
|
||||
:quote "#+BEGIN_QUOTE"
|
||||
:quote "#+begin_quote"
|
||||
:quote_end "#+END_QUOTE"
|
||||
:quote_end "#+end_quote"))
|
||||
|
||||
|
||||
(defun +org-init-babel-h ()
|
||||
|
@ -178,9 +202,6 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
;; Our :lang common-lisp module uses sly, so...
|
||||
org-babel-lisp-eval-fn #'sly-eval)
|
||||
|
||||
;; Add convenience lang alias for markdown blocks
|
||||
(add-to-list 'org-src-lang-modes '("md" . markdown))
|
||||
|
||||
;; I prefer C-c C-c over C-c ' (more consistent)
|
||||
(define-key org-src-mode-map (kbd "C-c C-c") #'org-edit-src-exit)
|
||||
|
||||
|
@ -197,16 +218,30 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
|
||||
;; Fix 'require(...).print is not a function' error from `ob-js' when
|
||||
;; executing JS src blocks
|
||||
(setq org-babel-js-function-wrapper "console.log(require('util').inspect(function(){\n%s\n}()));"))
|
||||
(setq org-babel-js-function-wrapper "console.log(require('util').inspect(function(){\n%s\n}()));")
|
||||
|
||||
(after! python
|
||||
(setq org-babel-python-command python-shell-interpreter)))
|
||||
|
||||
|
||||
(defun +org-init-babel-lazy-loader-h ()
|
||||
"Load babel libraries lazily when babel blocks are executed."
|
||||
(defun +org--babel-lazy-load (lang)
|
||||
(cl-check-type lang symbol)
|
||||
(or (run-hook-with-args-until-success '+org-babel-load-functions lang)
|
||||
(require (intern (format "ob-%s" lang)) nil t)
|
||||
(require lang nil t)))
|
||||
(defun +org--babel-lazy-load (lang &optional async)
|
||||
(cl-check-type lang (or symbol null))
|
||||
(unless (cdr (assq lang org-babel-load-languages))
|
||||
(when async
|
||||
;; ob-async has its own agenda for lazy loading packages (in the child
|
||||
;; process), so we only need to make sure it's loaded.
|
||||
(require 'ob-async nil t))
|
||||
(prog1 (or (run-hook-with-args-until-success '+org-babel-load-functions lang)
|
||||
(require (intern (format "ob-%s" lang)) nil t)
|
||||
(require lang nil t))
|
||||
(add-to-list 'org-babel-load-languages (cons lang t)))))
|
||||
|
||||
(defadvice! +org--export-lazy-load-library-h ()
|
||||
"Lazy load a babel package when a block is executed during exporting."
|
||||
:before #'org-babel-exp-src-block
|
||||
(+org--babel-lazy-load-library-a (org-babel-get-src-block-info)))
|
||||
|
||||
(defadvice! +org--src-lazy-load-library-a (lang)
|
||||
"Lazy load a babel package to ensure syntax highlighting."
|
||||
|
@ -214,7 +249,7 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
(or (cdr (assoc lang org-src-lang-modes))
|
||||
(+org--babel-lazy-load lang)))
|
||||
|
||||
;; This also works for tangling and exporting
|
||||
;; This also works for tangling
|
||||
(defadvice! +org--babel-lazy-load-library-a (info)
|
||||
"Load babel libraries lazily when babel blocks are executed."
|
||||
:after-while #'org-babel-confirm-evaluate
|
||||
|
@ -223,21 +258,10 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
|
|||
((stringp lang) (intern lang))))
|
||||
(lang (or (cdr (assq lang +org-babel-mode-alist))
|
||||
lang)))
|
||||
(when (and lang
|
||||
(not (cdr (assq lang org-babel-load-languages)))
|
||||
(+org--babel-lazy-load lang))
|
||||
(when (assq :async (nth 2 info))
|
||||
;; ob-async has its own agenda for lazy loading packages (in the
|
||||
;; child process), so we only need to make sure it's loaded.
|
||||
(require 'ob-async nil t))
|
||||
(add-to-list 'org-babel-load-languages (cons lang t)))
|
||||
(+org--babel-lazy-load lang (assq :async (nth 2 info)))
|
||||
t))
|
||||
|
||||
(defadvice! +org--noop-org-babel-do-load-languages-a (&rest _)
|
||||
:override #'org-babel-do-load-languages
|
||||
(message
|
||||
(concat "`org-babel-do-load-languages' is redundant with Doom's lazy loading mechanism for babel "
|
||||
"packages. There is no need to use it, so it has been disabled"))))
|
||||
(advice-add #'org-babel-do-load-languages :override #'ignore))
|
||||
|
||||
|
||||
(defun +org-init-capture-defaults-h ()
|
||||
|
@ -322,7 +346,7 @@ relative to `org-directory', unless it is an absolute path."
|
|||
(defadvice! +org--prevent-save-prompts-when-refiling-a (&rest _)
|
||||
"Fix #462: when refiling from org-capture, Emacs prompts to kill the
|
||||
underlying, modified buffer. This fixes that."
|
||||
:after 'org-refile
|
||||
:after #'org-refile
|
||||
(when (bound-and-true-p org-capture-is-refiling)
|
||||
(org-save-all-org-buffers)))
|
||||
|
||||
|
@ -348,14 +372,15 @@ underlying, modified buffer. This fixes that."
|
|||
|
||||
(defun +org-init-attachments-h ()
|
||||
"Sets up org's attachment system."
|
||||
(setq org-attach-store-link-p t ; store link after attaching files
|
||||
org-attach-use-inheritance t) ; inherit properties from parent nodes
|
||||
|
||||
;; Centralized attachments directory
|
||||
(setq org-attach-id-dir (doom-path org-directory org-attach-id-dir)
|
||||
;; Store a link to attachments when they are attached
|
||||
org-attach-store-link-p t
|
||||
;; Inherit attachment properties from parent nodes
|
||||
org-attach-use-inheritance t)
|
||||
(after! projectile
|
||||
(add-to-list 'projectile-globally-ignored-directories org-attach-id-dir)))
|
||||
(after! org-attach
|
||||
(unless org-attach-id-dir
|
||||
(setq org-attach-id-dir (expand-file-name ".attach/" org-directory)))
|
||||
(after! projectile
|
||||
(add-to-list 'projectile-globally-ignored-directories org-attach-id-dir))))
|
||||
|
||||
|
||||
(defun +org-init-custom-links-h ()
|
||||
|
@ -379,15 +404,15 @@ underlying, modified buffer. This fixes that."
|
|||
'("wolfram" . "https://wolframalpha.com/input/?i=%s")
|
||||
'("doom-repo" . "https://github.com/hlissner/doom-emacs/%s"))
|
||||
|
||||
(+org-def-link "org" org-directory)
|
||||
(+org-def-link "doom" doom-emacs-dir)
|
||||
(+org-def-link "doom-docs" doom-docs-dir)
|
||||
(+org-def-link "doom-modules" doom-modules-dir)
|
||||
(+org-define-basic-link "org" 'org-directory)
|
||||
(+org-define-basic-link "doom" 'doom-emacs-dir)
|
||||
(+org-define-basic-link "doom-docs" 'doom-docs-dir)
|
||||
(+org-define-basic-link "doom-modules" 'doom-modules-dir)
|
||||
|
||||
;; Allow inline image previews of http(s)? urls or data uris
|
||||
(org-link-set-parameters "http" :image-data-fun #'+org-image-link)
|
||||
(org-link-set-parameters "https" :image-data-fun #'+org-image-link)
|
||||
(org-link-set-parameters "img" :image-data-fun #'+org-inline-data-image)
|
||||
(org-link-set-parameters "http" :image-data-fun #'+org-http-image-data-fn)
|
||||
(org-link-set-parameters "https" :image-data-fun #'+org-http-image-data-fn)
|
||||
(org-link-set-parameters "img" :image-data-fun #'+org-inline-image-data-fn)
|
||||
|
||||
;; Add support for youtube links + previews
|
||||
(require 'org-yt nil t))
|
||||
|
@ -440,9 +465,9 @@ underlying, modified buffer. This fixes that."
|
|||
|
||||
(defun +org-init-hacks-h ()
|
||||
"Getting org to behave."
|
||||
;; Don't open separate windows
|
||||
;; Open file links in current window, rather than new ones
|
||||
(setf (alist-get 'file org-link-frame-setup) #'find-file)
|
||||
;; Open directory links in Emacs
|
||||
;; Open directory links in dired
|
||||
(add-to-list 'org-file-apps '(directory . emacs))
|
||||
|
||||
;; When you create a sparse tree and `org-indent-mode' is enabled, the
|
||||
|
@ -516,7 +541,14 @@ current workspace (and clean them up)."
|
|||
(lambda (file-or-data &optional type data-p &rest props)
|
||||
(let ((type (if (plist-get props :width) type)))
|
||||
(apply old-create-image file-or-data type data-p props)))))
|
||||
(apply orig-fn args))))
|
||||
(apply orig-fn args)))
|
||||
|
||||
(defadvice! +org--fix-inconsistent-uuidgen-case-a (uuid)
|
||||
"Ensure uuidgen always produces lowercase output regardless of system."
|
||||
:filter-return #'org-id-new
|
||||
(if (eq org-id-method 'uuid)
|
||||
(downcase uuid)
|
||||
uuid)))
|
||||
|
||||
|
||||
(defun +org-init-keybinds-h ()
|
||||
|
@ -555,7 +587,10 @@ between the two."
|
|||
[remap doom/forward-to-last-non-comment-or-eol] #'org-end-of-line
|
||||
|
||||
:localleader
|
||||
"#" #'org-update-statistics-cookies
|
||||
"'" #'org-edit-special
|
||||
"*" #'org-ctrl-c-star
|
||||
"+" #'org-ctrl-c-minus
|
||||
"," #'org-switchb
|
||||
"." #'org-goto
|
||||
(:when (featurep! :completion ivy)
|
||||
|
@ -565,7 +600,6 @@ between the two."
|
|||
"." #'helm-org-in-buffer-headings
|
||||
"/" #'helm-org-agenda-files-headings)
|
||||
"A" #'org-archive-subtree
|
||||
"d" #'org-deadline
|
||||
"e" #'org-export-dispatch
|
||||
"f" #'org-footnote-new
|
||||
"h" #'org-toggle-heading
|
||||
|
@ -575,7 +609,6 @@ between the two."
|
|||
"o" #'org-set-property
|
||||
"p" #'org-priority
|
||||
"q" #'org-set-tags-command
|
||||
"s" #'org-schedule
|
||||
"t" #'org-todo
|
||||
"T" #'org-todo-list
|
||||
(:prefix ("a" . "attachments")
|
||||
|
@ -598,24 +631,38 @@ between the two."
|
|||
(:prefix ("b" . "tables")
|
||||
"-" #'org-table-insert-hline
|
||||
"a" #'org-table-align
|
||||
"b" #'org-table-blank-field
|
||||
"c" #'org-table-create-or-convert-from-region
|
||||
"dc" #'org-table-delete-column
|
||||
"dr" #'org-table-kill-row
|
||||
"e" #'org-table-edit-field
|
||||
"f" #'org-table-edit-formulas
|
||||
"h" #'org-table-field-info
|
||||
"s" #'org-table-sort-lines
|
||||
"r" #'org-table-recalculate
|
||||
"R" #'org-table-recalculate-buffer-tables
|
||||
(:when (featurep! +gnuplot)
|
||||
"p" #'org-plot/gnuplot))
|
||||
(:prefix ("c" . "clock")
|
||||
"c" #'org-clock-in
|
||||
"C" #'org-clock-out
|
||||
"c" #'org-clock-cancel
|
||||
"d" #'org-clock-mark-default-task
|
||||
"e" #'org-clock-modify-effort-estimate
|
||||
"E" #'org-set-effort
|
||||
"l" #'org-clock-in-last
|
||||
"g" #'org-clock-goto
|
||||
"G" (λ! (org-clock-goto 'select))
|
||||
"r" #'org-clock-report
|
||||
"x" #'org-clock-cancel
|
||||
"i" #'org-clock-in
|
||||
"I" #'org-clock-in-last
|
||||
"o" #'org-clock-out
|
||||
"r" #'org-resolve-clocks
|
||||
"R" #'org-clock-report
|
||||
"t" #'org-evaluate-time-range
|
||||
"=" #'org-clock-timestamps-up
|
||||
"-" #'org-clock-timestamps-down)
|
||||
(:prefix ("d" . "date/deadline")
|
||||
"d" #'org-deadline
|
||||
"s" #'org-schedule
|
||||
"t" #'org-time-stamp
|
||||
"T" #'org-time-stamp-inactive)
|
||||
(:prefix ("g" . "goto")
|
||||
"g" #'org-goto
|
||||
(:when (featurep! :completion ivy)
|
||||
|
@ -632,12 +679,13 @@ between the two."
|
|||
"x" #'org-capture-goto-last-stored)
|
||||
(:prefix ("l" . "links")
|
||||
"c" #'org-cliplink
|
||||
"d" #'+org/remove-link
|
||||
"i" #'org-id-store-link
|
||||
"l" #'org-insert-link
|
||||
"L" #'org-insert-all-links
|
||||
"s" #'org-store-link
|
||||
"S" #'org-insert-last-stored-link
|
||||
"i" #'org-id-store-link
|
||||
"d" #'+org/remove-link)
|
||||
"t" #'org-toggle-link-display)
|
||||
(:prefix ("r" . "refile")
|
||||
"." #'+org/refile-to-current-file
|
||||
"c" #'+org/refile-to-running-clock
|
||||
|
@ -672,8 +720,9 @@ between the two."
|
|||
("^ ?\\*\\(?:Agenda Com\\|Calendar\\|Org Export Dispatcher\\)"
|
||||
:slot -1 :vslot -1 :size #'+popup-shrink-to-fit :ttl 0)
|
||||
("^\\*Org \\(?:Select\\|Attach\\)" :slot -1 :vslot -2 :ttl 0 :size 0.25)
|
||||
("^\\*Org Agenda" :ignore t)
|
||||
("^\\*Org Src" :size 0.4 :quit nil :select t :autosave t :modeline t :ttl nil)
|
||||
("^\\*Org Agenda" :ignore t)
|
||||
("^\\*Org Src" :size 0.4 :quit nil :select t :autosave t :modeline t :ttl nil)
|
||||
("^\\*Org-Babel")
|
||||
("^CAPTURE-.*\\.org$" :size 0.25 :quit nil :select t :autosave t))))
|
||||
|
||||
|
||||
|
@ -716,46 +765,45 @@ compelling reason, so..."
|
|||
)
|
||||
|
||||
|
||||
(defun +org-init-smartparens-h ()
|
||||
"TODO"
|
||||
(after! smartparens
|
||||
(defun +org-sp-point-in-checkbox-p (_id action _context)
|
||||
(and (eq action 'insert)
|
||||
(sp--looking-at-p "\\s-*]")))
|
||||
|
||||
(defun +org-sp-point-at-bol-p (_id action _context)
|
||||
(and (eq action 'insert)
|
||||
(save-excursion
|
||||
(skip-chars-backward "*")
|
||||
(bolp))))
|
||||
|
||||
(defun +org-sp-in-src-block-p (_id action _context)
|
||||
(and (eq action 'insert)
|
||||
(org-in-src-block-p)))
|
||||
|
||||
;; make delimiter auto-closing a little more conservative
|
||||
(sp-with-modes 'org-mode
|
||||
(sp-local-pair "*" "*" :unless '(:add sp-point-before-word-p sp-in-math-p +org-sp-point-at-bol-p +org-sp-in-src-block-p))
|
||||
(sp-local-pair "_" "_" :unless '(:add sp-point-before-word-p sp-in-math-p +org-sp-in-src-block-p))
|
||||
(sp-local-pair "/" "/" :unless '(:add sp-point-before-word-p sp-in-math-p +org-sp-point-in-checkbox-p +org-sp-in-src-block-p))
|
||||
(sp-local-pair "~" "~" :unless '(:add sp-point-before-word-p +org-sp-in-src-block-p))
|
||||
(sp-local-pair "=" "=" :unless '(:add sp-point-before-word-p sp-in-math-p +org-sp-in-src-block-p)))))
|
||||
|
||||
|
||||
;;
|
||||
;;; Packages
|
||||
|
||||
(use-package! toc-org ; auto-table of contents
|
||||
:hook (org-mode . toc-org-enable)
|
||||
:config (setq toc-org-hrefify-default "gh"))
|
||||
:config
|
||||
(setq toc-org-hrefify-default "gh")
|
||||
|
||||
(defadvice! +org-inhibit-scrolling-a (orig-fn &rest args)
|
||||
"Prevent the jarring scrolling that occurs when the-ToC is regenerated."
|
||||
:around #'toc-org-insert-toc
|
||||
(let ((p (set-marker (make-marker) (point)))
|
||||
(s (window-start)))
|
||||
(prog1 (apply orig-fn args)
|
||||
(goto-char p)
|
||||
(set-window-start nil s t)
|
||||
(set-marker p nil)))))
|
||||
|
||||
|
||||
(use-package! org-bullets ; "prettier" bullets
|
||||
:hook (org-mode . org-bullets-mode))
|
||||
(use-package! org-superstar ; "prettier" bullets
|
||||
:hook (org-mode . org-superstar-mode)
|
||||
:config
|
||||
;; Make leading stars truly invisible, by rendering them as spaces!
|
||||
(setq org-superstar-leading-bullet ?\s
|
||||
org-hide-leading-stars nil)
|
||||
;; Don't do anything special for item bullets or TODOs by default; these slow
|
||||
;; down larger org buffers.
|
||||
(setq org-superstar-prettify-item-bullets nil
|
||||
org-superstar-special-todo-items nil
|
||||
;; ...but configure it in case the user wants it later
|
||||
org-superstar-todo-bullet-alist
|
||||
'(("TODO" . 9744)
|
||||
("[ ]" . 9744)
|
||||
("DONE" . 9745)
|
||||
("[X]" . 9745))))
|
||||
|
||||
|
||||
(use-package! org-crypt ; built-in
|
||||
:commands org-encrypt-entries
|
||||
:commands org-encrypt-entries org-encrypt-entry org-decrypt-entries org-decrypt-entry
|
||||
:hook (org-reveal-start . org-decrypt-entry)
|
||||
:config
|
||||
(add-hook! 'org-mode-hook
|
||||
|
@ -783,16 +831,23 @@ compelling reason, so..."
|
|||
(add-hook 'kill-emacs-hook #'org-clock-save))
|
||||
|
||||
|
||||
(use-package! org-pdfview
|
||||
(use-package! org-pdftools
|
||||
:when (featurep! :tools pdf)
|
||||
:commands org-pdfview-open
|
||||
:commands org-pdftools-export
|
||||
:init
|
||||
(after! org
|
||||
(delete '("\\.pdf\\'" . default) org-file-apps)
|
||||
;; org links to pdf files are opened in pdf-view-mode
|
||||
(add-to-list 'org-file-apps '("\\.pdf\\'" . (lambda (_file link) (org-pdfview-open link))))
|
||||
;; support for links to specific pages
|
||||
(add-to-list 'org-file-apps '("\\.pdf::\\([[:digit:]]+\\)\\'" . (lambda (_file link) (org-pdfview-open link))))))
|
||||
(org-link-set-parameters (or (bound-and-true-p org-pdftools-link-prefix) "pdf")
|
||||
:follow #'org-pdftools-open
|
||||
:complete #'org-pdftools-complete-link
|
||||
:store #'org-pdftools-store-link
|
||||
:export #'org-pdftools-export)
|
||||
(add-hook! 'org-open-link-functions
|
||||
(defun +org-open-legacy-pdf-links-fn (link)
|
||||
"Open pdftools:* and pdfviews:* links as if they were pdf:* links."
|
||||
(let ((regexp "^pdf\\(?:tools\\|view\\):"))
|
||||
(when (string-match-p regexp link)
|
||||
(org-pdftools-open (replace-regexp-in-string regexp "" link))
|
||||
t))))))
|
||||
|
||||
|
||||
(use-package! evil-org
|
||||
|
@ -883,12 +938,16 @@ compelling reason, so..."
|
|||
org-list org-pcomplete org-src org-footnote org-macro ob org org-agenda
|
||||
org-capture
|
||||
:preface
|
||||
;; Change org defaults (should be set before org loads)
|
||||
(setq org-directory "~/org/"
|
||||
org-attach-id-dir ".attach/"
|
||||
org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/")
|
||||
;; Set these to nil now so we can detect user changes to them later (and fall
|
||||
;; back on defaults otherwise)
|
||||
(defvar org-directory nil)
|
||||
(defvar org-attach-id-dir nil)
|
||||
|
||||
(setq org-publish-timestamp-directory (concat doom-cache-dir "org-timestamps/")
|
||||
org-preview-latex-image-directory (concat doom-cache-dir "org-latex/"))
|
||||
|
||||
;; Make most of the default modules opt-in, because I sincerely doubt most
|
||||
;; users use all of them.
|
||||
(defvar org-modules
|
||||
'(;; ol-w3m
|
||||
;; ol-bbdb
|
||||
|
@ -902,8 +961,19 @@ compelling reason, so..."
|
|||
;; ol-eww
|
||||
))
|
||||
|
||||
(add-hook 'org-mode-local-vars-hook #'eldoc-mode)
|
||||
;;; Custom org modules
|
||||
(if (featurep! +brain) (load! "contrib/brain"))
|
||||
(if (featurep! +dragndrop) (load! "contrib/dragndrop"))
|
||||
(if (featurep! +ipython) (load! "contrib/ipython"))
|
||||
(if (featurep! +journal) (load! "contrib/journal"))
|
||||
(if (featurep! +jupyter) (load! "contrib/jupyter"))
|
||||
(if (featurep! +pomodoro) (load! "contrib/pomodoro"))
|
||||
(if (featurep! +present) (load! "contrib/present"))
|
||||
(if (featurep! +roam) (load! "contrib/roam"))
|
||||
(if (featurep! +noter) (load! "contrib/noter"))
|
||||
|
||||
;; Add our general hooks after the submodules, so that any hooks the
|
||||
;; submodules add run after them, and can overwrite any defaults if necessary.
|
||||
(add-hook! 'org-mode-hook
|
||||
;; `show-paren-mode' causes flickering with indent overlays made by
|
||||
;; `org-indent-mode', so we turn off show-paren-mode altogether
|
||||
|
@ -915,6 +985,7 @@ compelling reason, so..."
|
|||
#'+org-unfold-to-2nd-level-or-point-h)
|
||||
|
||||
(add-hook! 'org-load-hook
|
||||
#'+org-init-org-directory-h
|
||||
#'+org-init-appearance-h
|
||||
#'+org-init-agenda-h
|
||||
#'+org-init-attachments-h
|
||||
|
@ -929,17 +1000,11 @@ compelling reason, so..."
|
|||
#'+org-init-keybinds-h
|
||||
#'+org-init-popup-rules-h
|
||||
#'+org-init-protocol-h
|
||||
#'+org-init-protocol-lazy-loader-h
|
||||
#'+org-init-smartparens-h)
|
||||
#'+org-init-protocol-lazy-loader-h)
|
||||
|
||||
;;; Custom org modules
|
||||
(if (featurep! +brain) (load! "contrib/brain"))
|
||||
(if (featurep! +dragndrop) (load! "contrib/dragndrop"))
|
||||
(if (featurep! +ipython) (load! "contrib/ipython"))
|
||||
(if (featurep! +journal) (load! "contrib/journal"))
|
||||
(if (featurep! +jupyter) (load! "contrib/jupyter"))
|
||||
(if (featurep! +pomodoro) (load! "contrib/pomodoro"))
|
||||
(if (featurep! +present) (load! "contrib/present"))
|
||||
;; (Re)activate eldoc-mode in org-mode a little later, because it disables
|
||||
;; itself if started too soon (which is the case with `global-eldoc-mode').
|
||||
(add-hook 'org-mode-local-vars-hook #'eldoc-mode)
|
||||
|
||||
;; In case the user has eagerly loaded org from their configs
|
||||
(when (and (featurep 'org)
|
||||
|
@ -954,7 +1019,6 @@ compelling reason, so..."
|
|||
;; Global ID state means we can have ID links anywhere. This is required for
|
||||
;; `org-brain', however.
|
||||
(setq org-id-track-globally t
|
||||
org-id-locations-file (expand-file-name ".orgids" org-directory)
|
||||
org-id-locations-file-relative t)
|
||||
|
||||
;; HACK `org-id' doesn't check if `org-id-locations-file' exists or is
|
||||
|
|
|
@ -16,59 +16,52 @@
|
|||
|
||||
(after! org
|
||||
;; A shorter link to attachments
|
||||
(+org-def-link "download" org-attach-id-dir)
|
||||
(setf (alist-get "download" org-link-abbrev-alist nil nil #'equal)
|
||||
(abbreviate-file-name org-attach-id-dir)))
|
||||
(+org-define-basic-link "download" (lambda () (or org-download-image-dir org-attach-id-dir "."))
|
||||
:image-data-fun #'+org-image-file-data-fn
|
||||
:requires 'org-download))
|
||||
:config
|
||||
(setq org-download-image-dir org-attach-id-dir
|
||||
org-download-link-format "[[download:%s]]\n"
|
||||
org-download-method 'attach
|
||||
org-download-heading-lvl nil
|
||||
(unless org-download-image-dir
|
||||
(setq org-download-image-dir org-attach-id-dir))
|
||||
(setq org-download-method 'attach
|
||||
org-download-timestamp "_%Y%m%d_%H%M%S"
|
||||
org-download-screenshot-method
|
||||
(cond (IS-MAC "screencapture -i %s")
|
||||
(IS-LINUX
|
||||
(cond ((executable-find "maim") "maim -s %s")
|
||||
((executable-find "scrot") "scrot -s %s")))))
|
||||
((executable-find "scrot") "scrot -s %s")
|
||||
((executable-find "gnome-screenshot") "gnome-screenshot -a -f %s"))))
|
||||
|
||||
;; Handle non-image files a little differently. Images should be inserted
|
||||
;; as-is, as image previews. Other files, like pdfs or zips, should be linked
|
||||
;; to, with an icon indicating the type of file.
|
||||
(defadvice! +org--dragndrop-insert-link-a (_link filename)
|
||||
"Produces and inserts a link to FILENAME into the document.
|
||||
org-download-heading-lvl nil
|
||||
org-download-link-format "[[download:%s]]\n"
|
||||
org-download-annotate-function (lambda (_link) "")
|
||||
org-download-link-format-function
|
||||
(lambda (filename)
|
||||
(if (eq org-download-method 'attach)
|
||||
(format "[[attachment:%s]]\n"
|
||||
(org-link-escape
|
||||
(file-relative-name filename (org-attach-dir))))
|
||||
;; Handle non-image files a little differently. Images should be
|
||||
;; inserted as normal with previews. Other files, like pdfs or zips,
|
||||
;; should be linked to, with an icon indicating the type of file.
|
||||
(format (concat (unless (image-type-from-file-name filename)
|
||||
(concat (+org-attach-icon-for filename)
|
||||
" "))
|
||||
org-download-link-format)
|
||||
(org-link-escape
|
||||
(funcall org-download-abbreviate-filename-function filename)))))
|
||||
org-download-abbreviate-filename-function
|
||||
(lambda (path)
|
||||
(if (file-in-directory-p path org-download-image-dir)
|
||||
(file-relative-name path org-download-image-dir)
|
||||
path)))
|
||||
|
||||
If FILENAME is an image, produce an attach:%s path, otherwise use file:%s (with
|
||||
an file icon produced by `+org-attach-icon-for')."
|
||||
:override #'org-download-insert-link
|
||||
(if (looking-back "^[ \t]+" (line-beginning-position))
|
||||
(delete-region (match-beginning 0) (match-end 0))
|
||||
(newline))
|
||||
(cond ((image-type-from-file-name filename)
|
||||
(insert
|
||||
(concat
|
||||
(if (= org-download-image-html-width 0) ""
|
||||
(format "#+attr_html: :width %dpx\n" org-download-image-html-width))
|
||||
(if (= org-download-image-latex-width 0) ""
|
||||
(format "#+attr_latex: :width %dcm\n" org-download-image-latex-width))
|
||||
(format org-download-link-format
|
||||
(cond ((file-in-directory-p filename org-attach-directory)
|
||||
(file-relative-name filename org-download-image-dir))
|
||||
((file-in-directory-p filename org-directory)
|
||||
(file-relative-name filename org-directory))
|
||||
(filename)))))
|
||||
(org-display-inline-images))
|
||||
((insert
|
||||
(format "%s [[./%s][%s]] "
|
||||
(+org-attach-icon-for filename)
|
||||
(file-relative-name filename (file-name-directory buffer-file-name))
|
||||
(file-name-nondirectory (directory-file-name filename)))))))
|
||||
|
||||
(advice-add #'org-download--dir-2 :override #'ignore)
|
||||
(defadvice! +org--dragndrop-download-fullname-a (path)
|
||||
"Write PATH relative to current file."
|
||||
:filter-return #'org-download--fullname
|
||||
(let ((dir (or (if buffer-file-name (file-name-directory buffer-file-name))
|
||||
default-directory)))
|
||||
(if (file-in-directory-p dir org-directory)
|
||||
(file-relative-name path dir)
|
||||
path))))
|
||||
(defadvice! +org--dragndrop-then-display-inline-images-a (_link filename)
|
||||
:after #'org-download-insert-link
|
||||
(when (image-type-from-file-name filename)
|
||||
(save-excursion
|
||||
(org-display-inline-images
|
||||
t t
|
||||
(progn (org-back-to-heading t) (point))
|
||||
(progn (org-end-of-subtree t t)
|
||||
(when (and (org-at-heading-p) (not (eobp))) (backward-char 1))
|
||||
(point)))))))
|
||||
|
|
|
@ -1,18 +1,45 @@
|
|||
;;; lang/org/contrib/journal.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +journal)
|
||||
|
||||
;; HACK org-journal does some file-path magic at load time that creates
|
||||
;; duplicate `auto-mode-alist' entries, so we suppress it for now, so we
|
||||
;; can do it properly later.
|
||||
(advice-add #'org-journal-update-auto-mode-alist :override #'ignore)
|
||||
(use-package! org-journal
|
||||
:hook (org-mode . +org-journal-mode-maybe)
|
||||
:init
|
||||
;; HACK org-journal does some file-path magic at load time that creates
|
||||
;; duplicate and hard-coded `auto-mode-alist' entries, so we suppress it
|
||||
;; and use the more generalize regexp (above).
|
||||
(advice-add #'org-journal-update-auto-mode-alist :override #'ignore)
|
||||
;; Not using the .org file extension causes so much needless headache with
|
||||
;; file detection, and for no compelling reason, so we make it the default, so
|
||||
;; `org-journal' doesn't have to do all this silly magic.
|
||||
(setq org-journal-file-format "%Y%m%d.org")
|
||||
|
||||
(after! org-journal
|
||||
(setq org-journal-dir (expand-file-name "journal/" org-directory)
|
||||
;; HACK `org-journal-dir' has is surrounded by setter and `auto-mode-alist'
|
||||
;; magic which makes its needlessly difficult to create an "overrideable"
|
||||
;; default for Doom users, so we set this to an empty string (a
|
||||
;; non-string would throw an error) so we can detect changes to it later.
|
||||
(setq org-journal-dir ""
|
||||
org-journal-cache-file (concat doom-cache-dir "org-journal")
|
||||
org-journal-file-pattern (org-journal-dir-and-format->regex
|
||||
org-journal-dir org-journal-file-format))
|
||||
;; Doom opts for an "open in a popup or here" strategy as a default.
|
||||
;; Open in "other window" is less consistent and harder to predict.
|
||||
org-journal-find-file #'find-file)
|
||||
|
||||
(add-to-list 'auto-mode-alist (cons org-journal-file-pattern 'org-journal-mode))
|
||||
:config
|
||||
;; This is necessary if the user decides opens a journal file directly, via
|
||||
;; `find-file' or something, and not through org-journal's commands.
|
||||
(defun +org-journal-mode-maybe ()
|
||||
"Activate `org-journal-mode', maybe."
|
||||
(and (eq major-mode 'org-mode)
|
||||
(stringp buffer-file-name)
|
||||
(stringp org-journal-file-pattern)
|
||||
(string-match-p org-journal-file-pattern buffer-file-name)
|
||||
(let ((org-mode-hook (remq '+org-journal-mode-maybe org-mode-hook)))
|
||||
(org-journal-mode))))
|
||||
|
||||
(when (string-empty-p org-journal-dir)
|
||||
(setq org-journal-dir (expand-file-name "journal/" org-directory)))
|
||||
|
||||
(advice-remove #'org-journal-update-auto-mode-alist #'ignore)
|
||||
(setq! org-journal-dir org-journal-dir)
|
||||
|
||||
(map! (:map org-journal-mode-map
|
||||
:n "]f" #'org-journal-open-next-entry
|
||||
|
@ -22,7 +49,6 @@
|
|||
(:map org-journal-search-mode-map
|
||||
"C-n" #'org-journal-search-next
|
||||
"C-p" #'org-journal-search-previous)
|
||||
|
||||
:localleader
|
||||
(:map org-journal-mode-map
|
||||
"c" #'org-journal-new-entry
|
||||
|
|
14
modules/lang/org/contrib/noter.el
Normal file
14
modules/lang/org/contrib/noter.el
Normal file
|
@ -0,0 +1,14 @@
|
|||
;;; lang/org/contrib/noter.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +noter)
|
||||
|
||||
(use-package! org-noter
|
||||
:defer t
|
||||
:preface
|
||||
;; Allow the user to preempt this and set the document search path
|
||||
;; If not set then use `org-directory'
|
||||
(defvar org-noter-notes-search-path nil)
|
||||
:config
|
||||
(setq org-noter-auto-save-last-location t
|
||||
org-noter-separate-notes-from-heading t)
|
||||
(unless org-noter-notes-search-path
|
||||
(setq org-noter-notes-search-path org-directory)))
|
|
@ -11,15 +11,10 @@
|
|||
;;
|
||||
;;; Packages
|
||||
|
||||
(use-package! ox-reveal
|
||||
(use-package! org-re-reveal
|
||||
:after ox
|
||||
:init
|
||||
;; Fix #1127, where ox-reveal adds an errant entry to
|
||||
;; `org-structure-template-alist'
|
||||
(setq org-reveal-note-key-char nil)
|
||||
:config
|
||||
(setq org-reveal-root "https://cdn.jsdelivr.net/npm/reveal.js@3/"
|
||||
org-reveal-mathjax t))
|
||||
(setq org-re-reveal-root "https://revealjs.com"))
|
||||
|
||||
|
||||
(use-package! org-tree-slide
|
||||
|
|
94
modules/lang/org/contrib/roam.el
Normal file
94
modules/lang/org/contrib/roam.el
Normal file
|
@ -0,0 +1,94 @@
|
|||
;;; lang/org/contrib/roam.el -*- lexical-binding: t; -*-
|
||||
;;;###if (featurep! +roam)
|
||||
|
||||
(defvar +org-roam-open-buffer-on-find-file t
|
||||
"If non-nil, open the org-roam buffer when opening an org roam file.")
|
||||
|
||||
|
||||
;;
|
||||
;;; Packages
|
||||
|
||||
(use-package! org-roam
|
||||
:hook (org-load . org-roam-mode)
|
||||
:hook (org-roam-backlinks-mode . turn-on-visual-line-mode)
|
||||
:commands (org-roam-buffer-toggle-display
|
||||
org-roam-find-file
|
||||
org-roam-graph-show
|
||||
org-roam-insert
|
||||
org-roam-switch-to-buffer
|
||||
org-roam-dailies-date
|
||||
org-roam-dailies-today
|
||||
org-roam-dailies-tomorrow
|
||||
org-roam-dailies-yesterday)
|
||||
:preface
|
||||
;; Set this to nil so we can later detect whether the user has set a custom
|
||||
;; directory for it, and default to `org-directory' if they haven't.
|
||||
(defvar org-roam-directory nil)
|
||||
:init
|
||||
(map! :after org
|
||||
:map org-mode-map
|
||||
:localleader
|
||||
:prefix ("m" . "org-roam")
|
||||
"b" #'org-roam-switch-to-buffer
|
||||
"f" #'org-roam-find-file
|
||||
"g" #'org-roam-graph-show
|
||||
"i" #'org-roam-insert
|
||||
"m" #'org-roam
|
||||
(:prefix ("d" . "by date")
|
||||
:desc "Arbitrary date" "d" #'org-roam-dailies-date
|
||||
:desc "Today" "t" #'org-roam-dailies-today
|
||||
:desc "Tomorrow" "m" #'org-roam-dailies-tomorrow
|
||||
:desc "Yesterday" "y" #'org-roam-dailies-yesterday))
|
||||
:config
|
||||
(setq org-roam-directory (expand-file-name (or org-roam-directory "roam")
|
||||
org-directory)
|
||||
org-roam-verbose nil ; https://youtu.be/fn4jIlFwuLU
|
||||
org-roam-buffer-no-delete-other-windows t ; make org-roam buffer sticky
|
||||
org-roam-completion-system
|
||||
(cond ((featurep! :completion helm) 'helm)
|
||||
((featurep! :completion ivy) 'ivy)
|
||||
((featurep! :completion ido) 'ido)
|
||||
('default))
|
||||
org-roam-completion-fuzzy-match
|
||||
(or (featurep! :completion helm +fuzzy)
|
||||
(featurep! :completion ivy +fuzzy)))
|
||||
|
||||
;; HACK On first invocation, `org-roam-db-build-cache' builds the cache with a
|
||||
;; list of unresolved file paths. If those are symlinks, you will later
|
||||
;; end up with duplicate entries in your roam DB (e.g. after
|
||||
;; `org-roam-capture'ing to an existing file).
|
||||
;; REVIEW When jethrokuan/org-roam#518 is merged
|
||||
(defadvice! +org-roam-resolve-symlinks-a (args)
|
||||
:filter-args #'org-roam--list-files
|
||||
(setcar args (file-truename (car args)))
|
||||
args)
|
||||
|
||||
;; Normally, the org-roam buffer doesn't open until you explicitly call
|
||||
;; `org-roam'. If `+org-roam-open-buffer-on-find-file' is non-nil, the
|
||||
;; org-roam buffer will be opened for you when you use `org-roam-find-file'
|
||||
;; (but not `find-file', to limit the scope of this behavior).
|
||||
(add-hook! 'find-file-hook
|
||||
(defun +org-roam-open-buffer-maybe-h ()
|
||||
(and +org-roam-open-buffer-on-find-file
|
||||
(memq 'org-roam-buffer--update-maybe post-command-hook)
|
||||
(not (window-parameter nil 'window-side)) ; don't proc for popups
|
||||
(not (eq 'visible (org-roam-buffer--visibility)))
|
||||
(with-current-buffer (window-buffer)
|
||||
(org-roam-buffer--get-create)))))
|
||||
|
||||
;; Hide the mode line in the org-roam buffer, since it serves no purpose. This
|
||||
;; makes it easier to distinguish among other org buffers.
|
||||
(add-hook 'org-roam-buffer-prepare-hook #'hide-mode-line-mode))
|
||||
|
||||
|
||||
;; Since the org module lazy loads org-protocol (waits until an org URL is
|
||||
;; detected), we can safely chain `org-roam-protocol' to it.
|
||||
(use-package! org-roam-protocol
|
||||
:after org-protocol)
|
||||
|
||||
|
||||
(use-package! company-org-roam
|
||||
:when (featurep! :completion company)
|
||||
:after org-roam
|
||||
:config
|
||||
(set-company-backend! 'org-mode '(company-org-roam company-yasnippet company-dabbrev)))
|
|
@ -27,16 +27,14 @@
|
|||
:recipe (:host github
|
||||
:repo "emacs-straight/org-mode"
|
||||
:files ("*.el" "lisp/*.el" "contrib/lisp/*.el"))
|
||||
:pin "0a8faecb7f")
|
||||
:pin "14d6f95bec")
|
||||
;; ...And prevent other packages from pulling org; org-plus-contrib satisfies
|
||||
;; the dependency already: https://github.com/raxod502/straight.el/issues/352
|
||||
(package! org :recipe (:local-repo nil))
|
||||
|
||||
(package! avy)
|
||||
(package! htmlize :pin "86f22f211e")
|
||||
(package! org-bullets
|
||||
:recipe (:host github :repo "Kaligule/org-bullets")
|
||||
:pin "8b4f0aab6d")
|
||||
(package! org-superstar :pin "09ddc28383")
|
||||
(package! org-yt
|
||||
:recipe (:host github :repo "TobiasZawada/org-yt")
|
||||
:pin "40cc1ac76d")
|
||||
|
@ -47,22 +45,26 @@
|
|||
(when (featurep! :editor evil +everywhere)
|
||||
(package! evil-org
|
||||
:recipe (:host github :repo "hlissner/evil-org-mode")
|
||||
:pin "4d44e9bbdc"))
|
||||
:pin "9cf661af8f"))
|
||||
(when (featurep! :tools pdf)
|
||||
(package! org-pdfview :pin "8b71f31363"))
|
||||
(package! org-pdftools :pin "8cc15bb801"))
|
||||
(when (featurep! :tools magit)
|
||||
(package! orgit :pin "e7cddf39e3"))
|
||||
(package! orgit :pin "e147f05577"))
|
||||
(when (featurep! +brain)
|
||||
(package! org-brain :pin "6b7fced801"))
|
||||
(package! org-brain :pin "7ffbf6816a"))
|
||||
(when (featurep! +dragndrop)
|
||||
(package! org-download :pin "3c48102793"))
|
||||
(package! org-download :pin "46417e2bd3"))
|
||||
(when (featurep! +gnuplot)
|
||||
(package! gnuplot :pin "a406143d52")
|
||||
(package! gnuplot :pin "f0001c3001")
|
||||
(package! gnuplot-mode :pin "601f639298"))
|
||||
(when (featurep! +ipython) ; DEPRECATED
|
||||
(package! ob-ipython :pin "7147455230"))
|
||||
(when (featurep! +jupyter)
|
||||
(package! jupyter :pin "d4b06c54d3"))
|
||||
(package! jupyter :pin "785edbbff6"))
|
||||
(when (featurep! +journal)
|
||||
(package! org-journal :pin "8bf06b28d6"))
|
||||
(when (featurep! +noter)
|
||||
(package! org-noter :pin "9ead81d42d"))
|
||||
(when (featurep! +pomodoro)
|
||||
(package! org-pomodoro :pin "aa07c11318"))
|
||||
(when (featurep! +present)
|
||||
|
@ -70,9 +72,11 @@
|
|||
:recipe (:host github :repo "anler/centered-window-mode")
|
||||
:pin "24f7c5be9d")
|
||||
(package! org-tree-slide :pin "7bf09a02bd")
|
||||
(package! ox-reveal :pin "0d947cbce6"))
|
||||
(when (featurep! +journal)
|
||||
(package! org-journal :pin "9d40f6260c"))
|
||||
(package! org-re-reveal :pin "61549f4c00"))
|
||||
(when (featurep! +roam)
|
||||
(package! org-roam :pin "963692f353")
|
||||
(when (featurep! :completion company)
|
||||
(package! company-org-roam :pin "0913d86f16")))
|
||||
|
||||
;;; Babel
|
||||
(package! ob-async :pin "80a30b96a0")
|
||||
|
@ -89,7 +93,7 @@
|
|||
:recipe (:host github :repo "DEADB17/ob-racket")
|
||||
:pin "d8fd51bddb"))
|
||||
(when (featurep! :lang rest)
|
||||
(package! ob-restclient :pin "c5c22e6035"))
|
||||
(package! ob-restclient :pin "f7449b2068"))
|
||||
(when (featurep! :lang rust)
|
||||
(package! ob-rust :pin "6a82587598"))
|
||||
(when (featurep! :lang scala)
|
||||
|
@ -101,6 +105,6 @@
|
|||
(when (featurep! +hugo)
|
||||
(package! ox-hugo
|
||||
:recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t)
|
||||
:pin "1c1e3ec467"))
|
||||
:pin "5106b430a1"))
|
||||
(when (featurep! :lang rst)
|
||||
(package! ox-rst :pin "9158bfd180"))
|
||||
|
|
|
@ -1,5 +1,24 @@
|
|||
#+TITLE: :lang php
|
||||
#+TITLE: lang/php
|
||||
#+DATE: January 16, 2017
|
||||
#+SINCE: v1.3
|
||||
#+STARTUP: inlineimages nofold
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#php][PHP]]
|
||||
- [[#macos][MacOS]]
|
||||
- [[#arch-linux][Arch Linux]]
|
||||
- [[#opensuse][openSUSE]]
|
||||
- [[#dependencies][Dependencies]]
|
||||
- [[#features][Features]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
This module adds support for PHP 5.3+ (including PHP7).
|
||||
|
||||
+ ctags-based code completion (~company-php~ and ~phpctags~)
|
||||
|
@ -12,17 +31,39 @@ This module adds support for PHP 5.3+ (including PHP7).
|
|||
+ [[https://github.com/hlissner/doom-snippets/tree/master/php-mode][Snippets]]
|
||||
|
||||
#+begin_quote
|
||||
PHP was the first programming language I got paid to code in, back in the Cretaceous period (2003). My sincerest apologies go out to all the programmers who inherited my earliest PHP work. I know you're out there, writhing in your straitjackets.
|
||||
PHP was the first programming language I got paid to code in, back in the
|
||||
Cretaceous period (2003). My sincerest apologies go out to all the programmers
|
||||
who inherited my earliest PHP work. I know you're out there, writhing in your
|
||||
straitjackets.
|
||||
|
||||
Save a programmer today. Stop a friend from choosing PHP as their first language.
|
||||
Save a programmer today. Stop a friend from choosing PHP as their first
|
||||
language.
|
||||
#+end_quote
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[#install][Install]]
|
||||
- [[#php][PHP]]
|
||||
- [[#dependencies][Dependencies]]
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
|
||||
* Install
|
||||
** Module Flags
|
||||
+ =+hack= Add support for the [[https://hacklang.org/][Hack dialect of PHP]] by Facebook.
|
||||
+ =+lsp= Enable LSP support through phpactor. Requires the ~:tools lsp~ module
|
||||
and the phpactor server to be installed on your system.
|
||||
|
||||
** Plugins
|
||||
+ [[https://github.com/tomterl/php-boris][async]]
|
||||
+ [[https://github.com/tomterl/php-boris][php-boris]]
|
||||
+ [[https://github.com/arnested/php-extras][php-extras]]
|
||||
+ [[https://github.com/emacs-php/php-mode][php-mode]]
|
||||
+ [[https://github.com/keelerm84/php-refactor-mode.el][php-refactor-mode]]
|
||||
+ [[https://github.com/nlamirault/phpunit.el][phpunit]]
|
||||
+ =+hack=
|
||||
+ [[https://github.com/hhvm/hack-mode][hack-mode]]
|
||||
+ =+lsp=
|
||||
+ [[https://github.com/emacs-php/phpactor.el][phpactor]]
|
||||
+ [[https://github.com/emacs-php/phpactor.el][company-phpactor]]
|
||||
+ =:editor format=
|
||||
+ [[https://github.com/OVYA/php-cs-fixer][php-cs-fixer]]
|
||||
|
||||
* Prerequisites
|
||||
** PHP
|
||||
To get started with PHP, you'll need ~php~ (5.3+) and ~composer~:
|
||||
|
||||
|
@ -65,3 +106,12 @@ Ensure that ~\~/.composer/vendor/bin~ is in ~PATH~:
|
|||
# place this in your profile file, like ~/.bash_profile or ~/.zshenv
|
||||
export PATH="~/.composer/vendor/bin:$PATH"
|
||||
#+END_SRC
|
||||
|
||||
* TODO Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
|
||||
* TODO Configuration
|
||||
# How to configure this module, including common problems and how to address them.
|
||||
|
||||
* TODO Troubleshooting
|
||||
# Common issues and their solution, or places to look for help.
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
:mode "\\.inc\\'"
|
||||
:config
|
||||
;; Disable HTML compatibility in php-mode. `web-mode' has superior support for
|
||||
;; php+html. Use the .phtml
|
||||
;; php+html. Use the .phtml extension instead.
|
||||
(setq php-template-compatibility nil)
|
||||
|
||||
(set-docsets! 'php-mode "PHP" "PHPUnit" "Laravel" "CakePHP" "CodeIgniter" "Doctrine_ORM")
|
||||
|
@ -54,7 +54,6 @@
|
|||
:config
|
||||
(set-lookup-handlers! 'php-mode
|
||||
:definition #'phpactor-goto-definition)
|
||||
|
||||
(map! :localleader
|
||||
:map php-mode-map
|
||||
:prefix ("r" . "refactor")
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
(package! php-boris :pin "f2faebf610")
|
||||
(package! php-extras :recipe (:host github :repo "arnested/php-extras") :pin "d410c5af66")
|
||||
(package! php-mode :pin "cade4cef2b")
|
||||
(package! php-mode :pin "b5d9988100")
|
||||
(package! php-refactor-mode :pin "7a794b0618")
|
||||
(package! phpunit :pin "fe6bc91c3b")
|
||||
|
||||
|
@ -11,12 +11,12 @@
|
|||
(package! hack-mode :recipe (:host github :repo "hhvm/hack-mode") :pin "fd6a661b09"))
|
||||
|
||||
(unless (featurep! +lsp)
|
||||
(package! phpactor :pin "5ccf65d59e")
|
||||
(package! phpactor :pin "31fe2ea4db")
|
||||
(when (featurep! :completion company)
|
||||
(package! company-phpactor :pin "5ccf65d59e")))
|
||||
(package! company-phpactor :pin "31fe2ea4db")))
|
||||
|
||||
(when (featurep! :editor format)
|
||||
(package! php-cs-fixer :pin "6540006710"))
|
||||
(package! php-cs-fixer :pin "95eace9bc0"))
|
||||
|
||||
;; For building php-extras
|
||||
(package! async :pin "86aef2c38e")
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
(set-popup-rule! "^\\*PLANTUML" :size 0.4 :select nil :ttl 0)
|
||||
|
||||
(setq plantuml-default-exec-mode
|
||||
(cond ((executable-find "plantuml") 'executable)
|
||||
((file-exists-p plantuml-jar-path) 'jar)
|
||||
(cond ((file-exists-p plantuml-jar-path) 'jar)
|
||||
((executable-find "plantuml") 'executable)
|
||||
(plantuml-default-exec-mode))))
|
||||
|
||||
|
||||
|
|
|
@ -7,5 +7,5 @@
|
|||
;; unnecessary altogether.
|
||||
;;(package! flycheck-purescript :pin "30f0435d5e")
|
||||
|
||||
(package! psc-ide :pin "2a9394422d")
|
||||
(package! psc-ide :pin "7fc2b841be")
|
||||
(package! purescript-mode :pin "8db1d0243c")
|
||||
|
|
|
@ -106,7 +106,7 @@ To enable support for auto-formatting with black enable ~:editor format-all~ in
|
|||
| ~<localleader> t O~ | ~nosetests-pdb-one~ |
|
||||
| ~<localleader> t V~ | ~nosetests-pdb-module~ |
|
||||
| ~<localleader> t f~ | ~python-pytest-file~ |
|
||||
| ~<localleader> t k~ | ~python-pytest-file-dwin~ |
|
||||
| ~<localleader> t k~ | ~python-pytest-file-dwim~ |
|
||||
| ~<localleader> t t~ | ~python-pytest-function~ |
|
||||
| ~<localleader> t m~ | ~python-pytest-function-dwim~ |
|
||||
| ~<localleader> t r~ | ~python-pytest-repeat~ |
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;; Major modes
|
||||
(package! pip-requirements :pin "216cd1690f")
|
||||
(when (featurep! +cython)
|
||||
(package! cython-mode :pin "f6bf6aa9c7")
|
||||
(package! cython-mode :pin "48dc1f0169")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-cython :pin "ecc4454d35")))
|
||||
|
||||
|
@ -23,7 +23,7 @@
|
|||
(when (featurep! +pyenv)
|
||||
(package! pyenv-mode :pin "aec6f2aa28"))
|
||||
(when (featurep! +conda)
|
||||
(package! conda :pin "814439dffa"))
|
||||
(package! conda :pin "335474e409"))
|
||||
|
||||
;; Testing frameworks
|
||||
(package! nose :pin "f852829751")
|
||||
|
|
|
@ -13,8 +13,8 @@
|
|||
:config
|
||||
(set-repl-handler! 'racket-mode #'+racket/open-repl)
|
||||
(set-lookup-handlers! 'racket-mode
|
||||
:definition #'racket-visit-definition
|
||||
:documentation #'racket-describe)
|
||||
:definition #'racket-xp-visit-definition
|
||||
:documentation #'racket-xp-describe)
|
||||
(set-docsets! 'racket-mode "Racket")
|
||||
(set-pretty-symbols! 'racket-mode
|
||||
:lambda "lambda"
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/racket/packages.el
|
||||
|
||||
(package! racket-mode :pin "5f396fa91f")
|
||||
(package! racket-mode :pin "202cc1b784")
|
||||
|
|
|
@ -1,55 +1,58 @@
|
|||
#+TITLE: :lang rest
|
||||
#+TITLE: lang/rest
|
||||
#+DATE: March 17, 2017
|
||||
#+SINCE: v1.3
|
||||
#+STARTUP: inlineimages nofold
|
||||
|
||||
* Table of Contents :TOC_3:noexport:
|
||||
- [[#description][Description]]
|
||||
- [[#maintainers][Maintainers]]
|
||||
- [[#module-flags][Module Flags]]
|
||||
- [[#plugins][Plugins]]
|
||||
- [[#hacks][Hacks]]
|
||||
- [[#prerequisites][Prerequisites]]
|
||||
- [[#features][Features]]
|
||||
- [[#configuration][Configuration]]
|
||||
- [[#troubleshooting][Troubleshooting]]
|
||||
|
||||
* Description
|
||||
This module adds [[https://en.wikipedia.org/wiki/Representational_state_transfer][REST]] support.
|
||||
|
||||
+ Code-completion (~company-restclient~)
|
||||
+ Code evaluation
|
||||
+ Imenu support for ~restclient-mode~
|
||||
+ org-mode: babel support (~ob-restclient~)
|
||||
|
||||
#+begin_quote
|
||||
~restclient-mode~ is tremendously useful for testing REST APIs. My workflow is to open an ~org-mode~ buffer, create a restclient source block and hack away. ~restclient-mode~ and ~company-restclient~ power this arcane wizardry.
|
||||
~restclient-mode~ is tremendously useful for automated or quick testing REST
|
||||
APIs. My workflow is to open an ~org-mode~ buffer, create a restclient source
|
||||
block and hack away. ~restclient-mode~ and ~company-restclient~ power this
|
||||
arcane wizardry.
|
||||
#+end_quote
|
||||
|
||||
* Table of Contents :TOC:
|
||||
- [[#install][Install]]
|
||||
- [[#example][Example]]
|
||||
** Maintainers
|
||||
This module has no dedicated maintainers.
|
||||
|
||||
* Install
|
||||
No additional setup required.
|
||||
** Module Flags
|
||||
This module provides no flags.
|
||||
|
||||
* Example
|
||||
#+BEGIN_SRC restclient
|
||||
GET https://jsonplaceholder.typicode.com/posts/1
|
||||
#+END_SRC
|
||||
** Plugins
|
||||
+ [[https://github.com/pashky/restclient.el][restclient]]
|
||||
+ =:completion company=
|
||||
+ [[https://github.com/iquiw/company-restclient][company-restclient]]
|
||||
|
||||
#+BEGIN_EXAMPLE
|
||||
#+RESULTS:
|
||||
#+BEGIN_SRC js
|
||||
{
|
||||
"userId": 1,
|
||||
"id": 1,
|
||||
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
|
||||
"body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
|
||||
}
|
||||
// GET https://jsonplaceholder.typicode.com/posts/1
|
||||
// HTTP/1.1 200 OK
|
||||
// Date: Thu, 25 May 2017 13:43:42 GMT
|
||||
// Content-Type: application/json; charset=utf-8
|
||||
// Content-Length: 292
|
||||
// Connection: keep-alive
|
||||
// Set-Cookie: __cfduid=d3484257c800700f9882305963fa9d5d91495719822; expires=Fri, 25-May-18 13:43:42 GMT; path=/; domain=.typicode.com; HttpOnly
|
||||
// X-Powered-By: Express
|
||||
// Vary: Origin, Accept-Encoding
|
||||
// Access-Control-Allow-Credentials: true
|
||||
// Cache-Control: public, max-age=14400
|
||||
// Pragma: no-cache
|
||||
// Expires: Thu, 25 May 2017 17:43:42 GMT
|
||||
// X-Content-Type-Options: nosniff
|
||||
// Etag: W/"124-yiKdLzqO5gfBrJFrcdJ8Yq0LGnU"
|
||||
// Via: 1.1 vegur
|
||||
// CF-Cache-Status: HIT
|
||||
// Server: cloudflare-nginx
|
||||
// CF-RAY: 3648ecd7ef833d0d-CPH
|
||||
// Request duration: 0.347179s
|
||||
#+END_SRC
|
||||
#+END_EXAMPLE
|
||||
** Hacks
|
||||
+ restclient has been modified not to silently reject self-signed or invalid
|
||||
certificates.
|
||||
+ Adds imenu support to ~restclient-mode~.
|
||||
|
||||
* Prerequisites
|
||||
This module has no prereqisites.
|
||||
|
||||
* Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
|
||||
* Configuration
|
||||
# How to configure this module, including common problems and how to address them.
|
||||
|
||||
* Troubleshooting
|
||||
# Common issues and their solution, or places to look for help.
|
||||
|
|
|
@ -2,18 +2,18 @@
|
|||
|
||||
(use-package! restclient
|
||||
:mode ("\\.http\\'" . restclient-mode)
|
||||
;; line numbers aren't enabled by default in fundamental-mode-derived modes
|
||||
:hook (restclient-mode . display-line-numbers-mode)
|
||||
:config
|
||||
(set-popup-rule! "^\\*HTTP Response" :size 0.4 :quit 'other)
|
||||
|
||||
;; line numbers aren't enabled by default in fundamental-mode-derived modes
|
||||
(add-hook 'restclient-mode-hook #'display-line-numbers-mode)
|
||||
|
||||
;; TODO PR this upstream! This adds imenu support to `restclient-mode'
|
||||
(setq-hook! 'restclient-mode-hook
|
||||
imenu-generic-expression '((nil "^[A-Z]+\s+.+" 0)))
|
||||
|
||||
(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."
|
||||
certs, rather than reject them silently."
|
||||
:around #'restclient-http-do
|
||||
(let (gnutls-verify-error tls-checktrust)
|
||||
(apply orig-fn args)))
|
||||
|
|
|
@ -178,11 +178,9 @@
|
|||
(when (featurep! :lang web)
|
||||
(add-hook 'web-mode-hook #'projectile-rails-mode))
|
||||
:config
|
||||
(set-popup-rule! "^\\*\\(projectile-\\)?rails" :ttl nil)
|
||||
(when (featurep! :editor evil)
|
||||
(add-hook 'projectile-rails-mode-hook #'evil-normalize-keymaps))
|
||||
(map! :localleader
|
||||
:map projectile-rails-mode-map
|
||||
"r" #'projectile-rails-command-map)
|
||||
(push '((nil . "projectile-rails-\\(.+\\)") . (nil . "\\1"))
|
||||
which-key-replacement-alist)
|
||||
(set-popup-rule! "^\\*\\(projectile-\\)?rails" :ttl nil))
|
||||
"r" #'projectile-rails-command-map))
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
(package! yard-mode :pin "ba74a47463")
|
||||
|
||||
;; REPL
|
||||
(package! inf-ruby :pin "e4ae089218")
|
||||
(package! inf-ruby :pin "41e5ed3a88")
|
||||
(when (featurep! :completion company)
|
||||
(package! company-inf-ruby :pin "fe3e4863bc"))
|
||||
|
||||
;; Programming environment
|
||||
(package! rubocop :pin "03bf15558a")
|
||||
(package! robe :pin "8190cb7c7b")
|
||||
(package! robe :pin "68503b32bb")
|
||||
|
||||
;; Project tools
|
||||
(package! bundler :pin "43efb6be4e")
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
(use-package! rustic
|
||||
:mode ("\\.rs$" . rustic-mode)
|
||||
:commands rustic-run-cargo-command rustic-cargo-outdated
|
||||
:init
|
||||
(after! org-src
|
||||
(add-to-list 'org-src-lang-modes '("rust" . rustic)))
|
||||
:config
|
||||
(set-docsets! 'rustic-mode "Rust")
|
||||
(set-popup-rule! "^\\*rustic-compilation" :vslot -1)
|
||||
|
@ -18,8 +21,6 @@
|
|||
;; use :editor format instead
|
||||
rustic-format-trigger nil)
|
||||
|
||||
(add-hook 'rustic-mode-hook #'rainbow-delimiters-mode)
|
||||
|
||||
(if (featurep! +lsp)
|
||||
(add-hook 'rustic-mode-local-vars-hook #'lsp!)
|
||||
(setq rustic-lsp-server nil)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/rust/packages.el
|
||||
|
||||
(package! rustic :pin "373f5a1940")
|
||||
(package! rustic :pin "61032eacf0")
|
||||
(unless (featurep! +lsp)
|
||||
(package! racer :pin "a0bdf778f0"))
|
||||
|
|
|
@ -1,5 +1,50 @@
|
|||
;;; lang/scheme/autoload.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar calculate-lisp-indent-last-sexp)
|
||||
|
||||
;; Adapted from https://github.com/alezost/emacs-config/blob/master/utils/al-scheme.el#L76-L123
|
||||
;;;###autoload
|
||||
(defun +scheme-scheme-indent-function-a (indent-point state)
|
||||
"Advice to replace `scheme-indent-function'.
|
||||
|
||||
This function is the same as `scheme-indent-function' except it indents property
|
||||
lists properly and names starting with 'default'."
|
||||
(let ((normal-indent (current-column)))
|
||||
(goto-char (1+ (elt state 1)))
|
||||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t)
|
||||
(if (and (elt state 2)
|
||||
;; NOTE looking-at -> looking-at-p
|
||||
(not (looking-at-p "\\sw\\|\\s_")))
|
||||
(unless (> (save-excursion (forward-line 1) (point))
|
||||
calculate-lisp-indent-last-sexp)
|
||||
(goto-char calculate-lisp-indent-last-sexp)
|
||||
(beginning-of-line)
|
||||
(parse-partial-sexp (point) calculate-lisp-indent-last-sexp 0 t))
|
||||
(backward-prefix-chars)
|
||||
(current-column)
|
||||
(let* ((function (buffer-substring
|
||||
(point) (progn (forward-sexp 1) (point))))
|
||||
(method (or (get (intern-soft function) 'scheme-indent-function)
|
||||
(get (intern-soft function) 'scheme-indent-hook))))
|
||||
(cond ((or (eq method 'defun)
|
||||
(and (null method)
|
||||
(> (length function) 3)
|
||||
;; NOTE string-match -> string-match-p
|
||||
;; NOTE The original regexp is "\\`def" but it will mess
|
||||
;; indentation with such names as 'default-...'.
|
||||
(string-match-p "\\`define" function)))
|
||||
(lisp-indent-defform state indent-point))
|
||||
;; NOTE Added this clause to handle alignment of keyword symbols
|
||||
((and (null method)
|
||||
(> (length function) 1)
|
||||
(string-match-p "\\`:" function))
|
||||
(let ((lisp-body-indent 1))
|
||||
(lisp-indent-defform state indent-point)))
|
||||
((integerp method)
|
||||
(lisp-indent-specform method state indent-point normal-indent))
|
||||
(method
|
||||
(funcall method state indent-point normal-indent)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +scheme/open-repl (&optional arg)
|
||||
"Open the Scheme REPL."
|
||||
|
|
|
@ -1,17 +1,20 @@
|
|||
;;; lang/scheme/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###package scheme
|
||||
(add-hook 'scheme-mode-hook #'rainbow-delimiters-mode)
|
||||
(use-package! scheme
|
||||
:hook (scheme-mode . rainbow-delimiters-mode)
|
||||
:config (advice-add #'scheme-indent-function :override #'+scheme-scheme-indent-function-a))
|
||||
|
||||
|
||||
(use-package! geiser
|
||||
:defer t
|
||||
:hook (scheme-mode . geiser-mode)
|
||||
:init
|
||||
(setq geiser-active-implementations '(guile chicken mit chibi chez))
|
||||
(setq geiser-active-implementations '(guile chicken mit chibi chez)
|
||||
geiser-mode-start-repl-p t
|
||||
geiser-smart-tab-p t)
|
||||
(unless (featurep! :lang racket)
|
||||
(push 'racket geiser-active-implementations))
|
||||
(after! scheme ; built-in
|
||||
(set-repl-handler! 'scheme-mode '+scheme/open-repl)
|
||||
(after! scheme ; built-in
|
||||
(set-repl-handler! 'scheme-mode #'+scheme/open-repl)
|
||||
(set-eval-handler! 'scheme-mode #'geiser-eval-region)
|
||||
(set-lookup-handlers! 'scheme-mode
|
||||
:definition #'geiser-edit-symbol-at-point
|
||||
|
@ -22,24 +25,32 @@
|
|||
( "\\* [A-Za-z0-9_-]+ REPL \\*" :quit nil)))
|
||||
(map! :localleader
|
||||
:map scheme-mode-map
|
||||
"'" #'geiser-mode-switch-to-repl
|
||||
"s" #'geiser-set-scheme
|
||||
|
||||
"'" #'geiser-mode-switch-to-repl
|
||||
"\"" #'geiser-connect
|
||||
"[" #'geiser-squarify
|
||||
"\\" #'geiser-insert-lambda
|
||||
"s" #'geiser-set-scheme
|
||||
(:prefix ("e" . "eval")
|
||||
"b" #'geiser-eval-buffer
|
||||
"B" #'geiser-eval-buffer-and-go
|
||||
"e" #'geiser-eval-definition
|
||||
"E" #'geiser-eval-definition-and-go
|
||||
"e" #'geiser-eval-last-sexp
|
||||
"d" #'geiser-eval-definition
|
||||
"D" #'geiser-eval-definition-and-go
|
||||
"r" #'geiser-eval-region
|
||||
"R" #'geiser-eval-region-and-go)
|
||||
|
||||
(:prefix ("h" . "help")
|
||||
"d" 'geiser-autodoc)
|
||||
;; TODO add more help keybindings
|
||||
|
||||
"d" #'geiser-autodoc
|
||||
"<" #'geiser-xref-callers
|
||||
">" #'geiser-xref-callees
|
||||
"i" #'geiser-doc-look-up-manual)
|
||||
(:prefix ("m" . "macro")
|
||||
"r" #'geiser-expand-region
|
||||
"d" #'geiser-expand-definition
|
||||
"e" #'geiser-expand-last-sexp)
|
||||
(:prefix ("r" . "repl")
|
||||
"b" #'geiser-switch-to-repl
|
||||
"q" #'geiser-repl-exit
|
||||
"l" #'geiser-load-current-buffer
|
||||
"r" #'geiser-restart-repl
|
||||
"R" #'geiser-reload
|
||||
"c" #'geiser-repl-clear-buffer)))
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/scheme/packages.el
|
||||
|
||||
(package! geiser :pin "645e477542")
|
||||
(package! geiser :pin "83ad875254")
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
;;; Packages
|
||||
|
||||
(use-package! sh-script ; built-in
|
||||
:mode ("\\.zunit\\'" . sh-mode)
|
||||
:mode ("\\.\\(?:zunit\\|env\\)\\'" . sh-mode)
|
||||
:mode ("/bspwmrc\\'" . sh-mode)
|
||||
:config
|
||||
(set-electric! 'sh-mode :words '("else" "elif" "fi" "done" "then" "do" "esac" ";;"))
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
;;; lang/sh/packages.el
|
||||
|
||||
(when (featurep! :completion company)
|
||||
(package! company-shell))
|
||||
(package! company-shell :pin "52f3bf26b7"))
|
||||
|
||||
(when (featurep! +fish)
|
||||
(package! fish-mode :pin "688c82deca"))
|
||||
(package! fish-mode :pin "db257db810"))
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue