Minor edits.

This commit is contained in:
Derek Taylor
2020-11-05 13:27:52 -06:00
parent 8fbacc6392
commit 35112d3f8c
170 changed files with 1304 additions and 756 deletions

View File

@@ -7,33 +7,34 @@
(unless (require 'agda2 nil t)
(message "Failed to find the `agda2' package")))
(map! :after agda2-mode
:map agda2-mode-map
:localleader
"?" #'agda2-show-goals
"." #'agda2-goal-and-context-and-inferred
"," #'agda2-goal-and-context
"=" #'agda2-show-constraints
"SPC" #'agda2-give
"a" #'agda2-auto-maybe-all
"b" #'agda2-previous-goal
"c" #'agda2-make-case
"d" #'agda2-infer-type-maybe-toplevel
"e" #'agda2-show-context
"f" #'agda2-next-goal
"gG" #'agda2-go-back
"h" #'agda2-helper-function-type
"l" #'agda2-load
"n" #'agda2-compute-normalised-maybe-toplevel
"p" #'agda2-module-contents-maybe-toplevel
"r" #'agda2-refine
"s" #'agda2-solveAll
"t" #'agda2-goal-type
"w" #'agda2-why-in-scope-maybe-toplevel
(:prefix "x"
"c" #'agda2-compile
"d" #'agda2-remove-annotations
"h" #'agda2-display-implicit-arguments
"q" #'agda2-quit
"r" #'agda2-restart))
(after! agda2-mode
(set-lookup-handlers! 'agda2-mode
:definition #'agda2-goto-definition-keyboard)
(map! :map agda2-mode-map
:localleader
"?" #'agda2-show-goals
"." #'agda2-goal-and-context-and-inferred
"," #'agda2-goal-and-context
"=" #'agda2-show-constraints
"SPC" #'agda2-give
"a" #'agda2-auto-maybe-all
"b" #'agda2-previous-goal
"c" #'agda2-make-case
"d" #'agda2-infer-type-maybe-toplevel
"e" #'agda2-show-context
"f" #'agda2-next-goal
"gG" #'agda2-go-back
"h" #'agda2-helper-function-type
"l" #'agda2-load
"n" #'agda2-compute-normalised-maybe-toplevel
"p" #'agda2-module-contents-maybe-toplevel
"r" #'agda2-refine
"s" #'agda2-solveAll
"t" #'agda2-goal-type
"w" #'agda2-why-in-scope-maybe-toplevel
(:prefix "x"
"c" #'agda2-compile
"d" #'agda2-remove-annotations
"h" #'agda2-display-implicit-arguments
"q" #'agda2-quit
"r" #'agda2-restart)))

View File

@@ -6,11 +6,11 @@
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/agda-input.el")
:nonrecursive t)
:pin "36738c13e2e85f1029083e974cdcff6927d48980")
:pin "08191e66e65a4870bf43e21007909fc03150eabf")
(package! agda2-mode
:recipe (:host github :repo "agda/agda"
:files ("src/data/emacs-mode/*.el"
(:exclude "agda-input.el"))
:nonrecursive t)
:pin "36738c13e2e85f1029083e974cdcff6927d48980"))
:pin "08191e66e65a4870bf43e21007909fc03150eabf"))

View File

@@ -129,7 +129,7 @@ simpler."
;; Eglot specific helper, courtesy of MaskRay
;;;###autoload
(defun +cc/eglot-ccls-inheritance-hierarchy (&optional derived)
(defun +cc/eglot-ccls-show-inheritance-hierarchy (&optional derived)
"Show inheritance hierarchy for the thing at point.
If DERIVED is non-nil (interactively, with prefix argument), show
the children of class at point."
@@ -224,3 +224,95 @@ header files."
(`c-mode 'ffap-c-path)
(`c++-mode 'ffap-c++-path))
(expand-file-name dir project-root)))))
;;
;;; CCLS specific helpers
;; ccls-show-vars ccls-show-base ccls-show-derived ccls-show-members have a
;; parameter while others are interactive.
;;
;; (+cc/ccls-show-base 1) direct bases
;; (+cc/ccls-show-derived 1) direct derived
;; (+cc/ccls-show-member 2) => 2 (Type) => nested classes / types in a namespace
;; (+cc/ccls-show-member 3) => 3 (Func) => member functions / functions in a namespace
;; (+cc/ccls-show-member 0) => member variables / variables in a namespace
;; (+cc/ccls-show-vars 1) => field
;; (+cc/ccls-show-vars 2) => local variable
;; (+cc/ccls-show-vars 3) => field or local variable. 3 = 1 | 2
;; (+cc/ccls-show-vars 4) => parameter
;;;###autoload
(defun +cc/ccls-show-callee ()
"Show callees of symbol under point."
(interactive)
(lsp-ui-peek-find-custom "$ccls/call" '(:callee t)))
;;;###autoload
(defun +cc/ccls-show-caller ()
"Show callers of symbol under point."
(interactive)
(lsp-ui-peek-find-custom "$ccls/call"))
;;;###autoload
(defun +cc/ccls-show-vars (kind)
"Show variables of type KIND as symbol under point.
1 -> field
2 -> local variable
3 -> field or local variables. 3 = 1 | 2.
4 -> parameter"
(lsp-ui-peek-find-custom "$ccls/vars" `(:kind ,kind)))
;;;###autoload
(defun +cc/ccls-show-base (levels)
"Show bases of class under point up to LEVELS levels (1 for direct bases)."
(lsp-ui-peek-find-custom "$ccls/inheritance" `(:levels ,levels)))
;;;###autoload
(defun +cc/ccls-show-derived (levels)
"Show derived classes from class under point down to LEVELS levels (1 for direct derived)."
(lsp-ui-peek-find-custom "$ccls/inheritance" `(:levels ,levels :derived t)))
;;;###autoload
(defun +cc/ccls-show-member (kind)
"Show member elements of kind KIND for class/namespace under point.
0 -> member variables/ variables in a namespace
2 -> nested classes / types in a namespace
3 -> member functions / functions in a namespace"
(lsp-ui-peek-find-custom "$ccls/member" `(:kind ,kind)))
;; The meaning of :role corresponds to https://github.com/maskray/ccls/blob/master/src/symbol.h
;;;###autoload
(defun +cc/ccls-show-references-address ()
"References w/ Role::Address bit (e.g. variables explicitly being taken addresses)"
(interactive)
(lsp-ui-peek-find-custom "textDocument/references"
(plist-put (lsp--text-document-position-params) :role 128)))
;;;###autoload
(defun +cc/ccls-show-references-macro ()
"References w/ Role::Dynamic bit (macro expansions)"
(interactive)
(lsp-ui-peek-find-custom "textDocument/references"
(plist-put (lsp--text-document-position-params) :role 64)))
;;;###autoload
(defun +cc/ccls-show-references-not-call ()
"References w/o Role::Call bit (e.g. where functions are taken addresses)"
(interactive)
(lsp-ui-peek-find-custom "textDocument/references"
(plist-put (lsp--text-document-position-params) :excludeRole 32)))
;;;###autoload
(defun +cc/ccls-show-references-read ()
"References w/ Role::Read"
(interactive)
(lsp-ui-peek-find-custom "textDocument/references"
(plist-put (lsp--text-document-position-params) :role 8)))
;;;###autoload
(defun +cc/ccls-show-references-write ()
"References w/ Role::Write"
(interactive)
(lsp-ui-peek-find-custom "textDocument/references"
(plist-put (lsp--text-document-position-params) :role 16)))

View File

@@ -230,14 +230,33 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
(add-hook! '(c-mode-local-vars-hook
c++-mode-local-vars-hook
objc-mode-local-vars-hook)
#'lsp!)
#'lsp!)
(map! :after ccls
:map (c-mode-map c++-mode-map)
:n "C-h" (cmd! (ccls-navigate "U"))
:n "C-j" (cmd! (ccls-navigate "R"))
:n "C-k" (cmd! (ccls-navigate "L"))
:n "C-l" (cmd! (ccls-navigate "D"))
(:localleader
:desc "Preprocess file" "lp" #'ccls-preprocess-file
:desc "Reload cache & CCLS" "lf" #'ccls-reload)
(:after lsp-ui-peek
(:localleader
:desc "Callers list" "c" #'+cc/ccls-show-caller
:desc "Callees list" "C" #'+cc/ccls-show-callee
:desc "References (address)" "a" #'+cc/ccls-show-references-address
:desc "References (not call)" "f" #'+cc/ccls-show-references-not-call
:desc "References (Macro)" "m" #'+cc/ccls-show-references-macro
:desc "References (Read)" "r" #'+cc/ccls-show-references-read
:desc "References (Write)" "w" #'+cc/ccls-show-references-write)))
(when (featurep! :tools lsp +eglot)
;; Map eglot specific helper
(map! :localleader
:after cc-mode
:map c++-mode-map
:n :desc "Show type inheritance hierarchy" "ct" #'+cc/eglot-ccls-inheritance-hierarchy)
:desc "Show type inheritance hierarchy" "ct" #'+cc/eglot-ccls-inheritance-hierarchy)
;; NOTE : This setting is untested yet
(after! eglot
@@ -249,20 +268,37 @@ If rtags or rdm aren't available, fail silently instead of throwing a breaking e
"-isystem/usr/local/include"]
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir"))))))))))))
(use-package! ccls
:when (featurep! +lsp)
:unless (featurep! :tools lsp +eglot)
:after lsp-mode
:hook (lsp-lens-mode . ccls-code-lens-mode)
:init
(defvar ccls-sem-highlight-method 'font-lock)
(after! projectile
(add-to-list 'projectile-globally-ignored-directories ".ccls-cache")
(add-to-list 'projectile-project-root-files-bottom-up ".ccls-root")
(add-to-list 'projectile-project-root-files-top-down-recurring "compile_commands.json"))
;; Avoid using `:after' because it ties the :config below to when `lsp-mode'
;; loads, rather than `ccls' loads.
(after! lsp-mode (require 'ccls))
:config
(set-evil-initial-state! 'ccls-tree-mode 'emacs)
;; Disable `ccls-sem-highlight-method' if `lsp-enable-semantic-highlighting'
;; is nil. Otherwise, it appears ccls bypasses it.
(setq-hook! 'lsp-configure-hook
ccls-sem-highlight-method (if lsp-enable-semantic-highlighting
ccls-sem-highlight-method))
(when (or IS-MAC IS-LINUX)
(let ((cpu-count-command (cond (IS-MAC '("sysctl" "-n" "hw.ncpu"))
(IS-LINUX '("nproc"))
(t (error "unreachable code")))))
(setq ccls-initialization-options
`(:index (:trackDependency 1
:threads ,(max 1 (/ (string-to-number (cdr (apply #'doom-call-process cpu-count-command))) 2)))))))
(when IS-MAC
(setq ccls-initialization-options
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
"-isystem/usr/local/include"]
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir")))))))
(append ccls-initialization-options
`(:clang ,(list :extraArgs ["-isystem/Library/Developer/CommandLineTools/usr/include/c++/v1"
"-isystem/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"
"-isystem/usr/local/include"]
:resourceDir (cdr (doom-call-process "clang" "-print-resource-dir"))))))))

View File

@@ -5,7 +5,7 @@
:recipe (:host github :repo "emacsmirror/cmake-mode" :files (:defaults "*"))
:pin "e58c41145a879f0314b2821eada7fd0dc898b6b6")
(package! cuda-mode :pin "9ae9eacfdba3559b5456342d0d03296290df8ff5")
(package! demangle-mode :pin "697c1dbde93f164eac7ea0dc530d7e8b799272d6")
(package! demangle-mode :pin "aaef0bd77a3ea9ce9132e9a53ac021b0f5d33e12")
(package! disaster :pin "10a785facc60d89d78e0d5177985ab1af1741bb4")
(package! modern-cpp-font-lock :pin "865955d0035382a17a7f03add0d00d0bd812b103")
(package! opencl-mode :pin "55cb49c8243e6420961d719faced035bc547c1ef")
@@ -27,7 +27,7 @@
(when (featurep! :completion company)
(package! company-irony :pin "b44711dfce445610c1ffaec4951c6ff3882b216a")
(package! company-irony-c-headers :pin "72c386aeb079fb261d9ec02e39211272f76bbd97")))
(when (package! rtags :pin "b57b36039f6411f23009c4ec0315ca5a7adb6824")
(when (package! rtags :pin "e6c7005bfad5df335ce86378b642ebd33aa66f26")
(when (featurep! :completion ivy)
(package! ivy-rtags))
(when (featurep! :completion helm)

View File

@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; lang/clojure/packages.el
(package! clojure-mode :pin "84ed16c5ddb6561620886485e20669d0c81f88a1")
(package! cider :pin "a89b694cc3cec0294d84bf9dbe1163ad2373e8db")
(package! clj-refactor :pin "97095682580bbc5bfebcbc5349f03f5bd7121c96")
(package! clojure-mode :pin "75c28897c7e91aa130c71c076aa2a6ce2e02da8f")
(package! cider :pin "f1c2a797291fd3d2a44cb32372852950d5ecf8a2")
(package! clj-refactor :pin "6db85b37b57497b56d97d5e5512160e5db85f798")
(when (featurep! :checkers syntax)
(package! flycheck-clj-kondo :pin "5472c26ffdf754a0661357564874ffd4f8598805"))
(package! flycheck-clj-kondo :pin "152df7ffa1ba3ea6dfcb238fabbf50e1e1a4dc97"))

View File

@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/common-lisp/packages.el
(when (package! sly :pin "34239bc5954ef41a4db49144925290dc794a6c4d")
(when (package! sly :pin "fce4f9be39b6a40a4128458ff34151eecb5e27de")
(package! sly-macrostep :pin "5113e4e926cd752b1d0bcc1508b3ebad5def5fad")
(package! sly-repl-ansi-color :pin "b9cd52d1cf927bf7e08582d46ab0bcf1d4fb5048"))

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; lang/coq/packages.el
(package! proof-general :pin "03e427a8f19485e12b2f95387ed3e0bff7cc944c")
(package! proof-general :pin "0fdb1ae633baeb9afb07bbd8632bece5976f95f2")
(package! company-coq :pin "b096cb528de1e0bb31cc1059d0bd698b98a6cc6a")

View File

@@ -1,9 +1,9 @@
;; -*- no-byte-compile: t; -*-
;;; lang/csharp/packages.el
(package! csharp-mode :pin "48851778e0f01a2b0395e054e418a1d8a1687a06")
(package! csharp-mode :pin "f46d656fc4ceefeb0ed8f5df8baaf0809a7a495d")
(package! csproj-mode :pin "a7f0f4610c976a28c41b9b8299892f88b5d0336c")
(unless (featurep! +lsp)
(package! omnisharp :pin "e658a18a762438c3e1737612737b05d02a21ca2a"))
(package! omnisharp :pin "e26ff8b8d34a247cd4a93be5d62a5f21859b7b57"))
(when (featurep! +unity)
(package! shader-mode :pin "d7dc8d0d6fe8914e8b6d5cf2081ad61e6952359c"))

View File

@@ -4,7 +4,6 @@
:mode "\\.p\\(?:list\\|om\\)\\'" ; plist, pom
:mode "\\.xs\\(?:d\\|lt\\)\\'" ; xslt, xsd
:mode "\\.rss\\'"
:magic "<\\?xml"
:config
(setq nxml-slash-auto-complete-flag t
nxml-auto-insert-xml-declaration-flag t)

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/data/packages.el
(package! csv-mode :pin "635337407c")
(package! csv-mode :pin "635337407c44c1c3e9f7052afda7e27cf8a05c14")

View File

@@ -274,6 +274,7 @@ library/userland functions"
((let ((symbol (intern-soft (match-string-no-properties 0))))
(and (cond ((null symbol) nil)
((eq symbol t) nil)
((keywordp symbol) nil)
((special-variable-p symbol)
(setq +emacs-lisp--face 'font-lock-variable-name-face))
((and (fboundp symbol)

View File

@@ -10,9 +10,9 @@
(package! macrostep :pin "424e3734a1ee526a1bd7b5c3cd1d3ef19d184267")
(package! overseer :pin "02d49f582e80e36b4334c9187801c5ecfb027789")
(package! elisp-def :pin "da1f76391ac0d277e3c5758203e0150f6bae0beb")
(package! elisp-demos :pin "8c9748134f7c017ae1536dbd0b76434afb52e64d")
(package! elisp-demos :pin "3cca49676894134437273d63a43a003b57fa84ec")
(when (featurep! :checkers syntax)
(package! flycheck-cask :pin "3457ae553c4feaf8168008f063d78fdde8fb5f94"))
(package! flycheck-cask :pin "4b2ede6362ded4a45678dfbef1876faa42edbd58"))
;; Libraries
(package! buttercup :pin "0e5eae0766a33b5c8997e1477e3914d5c8ba3d29")
(package! buttercup :pin "cccdedff38208ad4aa989ccdab8e0b059adf3728")

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/erlang/packages.el
(package! erlang :pin "d9bc7858e985143a433953ba286422511b466a0c")
(package! erlang :pin "36b4ba407e6f3c70ff88f8e3321622372601f6f6")
(when (featurep! :checkers syntax)
(package! flycheck-rebar3 :pin "3cca1268c54643204b5bae52e3f0bf5bc921018c"))
(unless (featurep! +lsp)

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/ess/packages.el
(package! ess :pin "1baf8bf1403fe5956a25475b03be0d8f02b3f3ca")
(package! ess :pin "a694b2627992bda5489c1b4b5bb750c590aa8d85")
(package! ess-R-data-view :pin "d6e98d3ae1e2a2ea39a56eebcdb73e99d29562e9")
(package! polymode :pin "3284ff10017d280ba82f27dc20fe5223b0df709c")
(package! poly-R :pin "51ffeb6ec45dd44eafa4d22ad2d6150cc4b248fc")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/factor/packages.el
(package! fuel :pin "3fdb0325ca2a6d80e4111af43b1b166808022020")
(package! fuel :pin "c6e15bd49e9d37dfe6dce167210fde22031d0d88")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/fsharp/packages.el
(package! fsharp-mode :pin "3e41fe1391b64eefa66a8a02fce27a12a04e1e01")
(package! fsharp-mode :pin "68dfc223561d85b5408348ab77bc98b19cbcc0ed")

View File

@@ -2,8 +2,8 @@
;;; lang/go/packages.el
(package! go-eldoc :pin "cbbd2ea1e94a36004432a9ac61414cb5a95a39bd")
(package! go-guru :pin "734d5232455ffde088021ea5908849ac570e890f")
(package! go-mode :pin "734d5232455ffde088021ea5908849ac570e890f")
(package! go-guru :pin "d17d21060b16a77f9ee28ff453e674225acbf1b1")
(package! go-mode :pin "d17d21060b16a77f9ee28ff453e674225acbf1b1")
(package! gorepl-mode :pin "6a73bf352e8d893f89cad36c958c4db2b5e35e07")
(package! go-tag :pin "59b243f2fa079d9de9d56f6e2d94397e9560310a")
(package! go-gen-test :pin "44c202ac97e728e93a35cee028a0ea8dd6e4292c")

View File

@@ -4,10 +4,8 @@
:after lsp-mode
: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))
(setq lsp-haskell-server-path "ghcide"
lsp-haskell-server-args nil))
;; Does some strange indentation if it pastes in the snippet
(setq-hook! 'haskell-mode-hook yas-indent-line 'fixed))

View File

@@ -10,7 +10,7 @@
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#cabal][Cabal]]
- [[#lsp-haskell-ide-engine][LSP (haskell-ide-engine)]]
- [[#lsp-haskell-language-server][LSP (haskell-language-server)]]
- [[#lsp-ghcide][LSP (ghcide)]]
- [[#stack][Stack]]
- [[#haskell-packages][Haskell packages]]
@@ -43,7 +43,7 @@ Here are a few resources I've found indispensable in my Haskell adventures:
doesn't depend on =stack=, supports both ~cabal~-only and ~stack~ projects,
but lacks eldoc support.
+ =+ghcide= Enables LSP support with ghcide (requires the ~:tools lsp~ module).
+ =+lsp= Enables LSP support with haskell-ide-engine (requires the ~:tools lsp~
+ =+lsp= Enables LSP support with haskell-language-server (requires the ~:tools lsp~
module).
** Plugins
@@ -59,7 +59,7 @@ 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 OR =ghcide=
+ LSP users need the =haskell-language-server= LSP server OR =ghcide=
+ All users will need the =hoogle= package
** Cabal
@@ -81,27 +81,15 @@ sudo pacman -S cabal-install ghc
sudo zypper install cabal-install ghc
#+END_SRC
** LSP (haskell-ide-engine)
** LSP (haskell-language-server)
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
project page]], but here's a TL;DR:
*** MacOS
haskell-ide-engine must be build and installed manually on MacOS, e.g.
You will find a comprehensive [[https://github.com/haskell/haskell-language-server#installation][instructions for haskell-language-server on its project page]], but if you are using [[https://www.haskell.org/ghcup/][ghcup]]:
#+BEGIN_SRC bash
git clone https://github.com/haskell/haskell-ide-engine
cd haskell-ide-engine
make
ghcup install hls
#+END_SRC
*** Arch Linux
=haskell-ide-engine-git= is available on the AUR
#+BEGIN_SRC bash
yay -S haskell-ide-engine-git
#+END_SRC
** LSP (ghcide)
See https://github.com/digital-asset/ghcide for install instructions.

View File

@@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; lang/haskell/packages.el
(package! haskell-mode :pin "41683c0e634bb3f54eac8747919a82132e1714fe")
(package! haskell-mode :pin "e72677668f5fc7cc148008e885a0f256e245dd43")
(when (featurep! +dante)
(package! dante :pin "c516bc9e8f09e0f928de9a93e82acfb382636f5c")
(package! attrap :pin "4cf3e4a16255997e7c3c39682a72866a0a37dd4b"))
(package! dante :pin "e2acbf6dd37818cbf479c9c3503d8a59192e34af")
(package! attrap :pin "9c881548debcf59b8aadda0ef4abca3c9a68dd80"))
(when (or (and (featurep! +lsp)
(not (featurep! :tools lsp +eglot)))
(featurep! +ghcide))
(package! lsp-haskell :pin "17d7d4c6615b5e6c7442828720730bfeda644af8"))
(package! lsp-haskell :pin "4d85cb3693d893ec34d8a0be9794d468a0a28b7b"))

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/hy/packages.el
(package! hy-mode :pin "55e84cadbdb63427a8d531992df3990414a26688")
(package! hy-mode :pin "7256844f24a3b727e252a008d7a142fd3b3921da")

View File

@@ -1,3 +1,30 @@
#+TITLE: :lang idris
#+TITLE: lang/idris
#+DATE: October 6, 2020
#+SINCE: v2.0.9
#+STARTUP: inlineimages nofold
Adds support for the [[https://www.idris-lang.org/][idris]] programming language.
* Table of Contents :TOC_3:noexport:
- [[#description][Description]]
- [[#maintainers][Maintainers]]
- [[#module-flags][Module Flags]]
- [[#plugins][Plugins]]
- [[#prerequisites][Prerequisites]]
- [[#features][Features]]
* Description
This module adds rudimentary Idris support.
** Maintainers
This module has no dedicated maintainers.
** Module Flags
This module provides no flags.
** Plugins
# A list of linked plugins
+ [[https://github.com/idris-hackers/idris-mode/][idris-mode]]
* Prerequisites
This module has no prerequisites.
* Features
In addition to =idris-mode= goodness, adds frequently used functions under the localleader key.

View File

@@ -1,5 +1,5 @@
;;; lang/java/+lsp.el -*- lexical-binding: t; -*-
;;;###if (featurep! +lsp)
;;;###if (and (featurep! +lsp) (not (featurep! :tools lsp +eglot)))
(use-package! lsp-java
:after lsp-mode

View File

@@ -26,8 +26,9 @@ If the depth is 2, the first two directories are removed: net.lissner.game.")
(add-hook 'java-mode-hook #'rainbow-delimiters-mode)
(cond ((featurep! +lsp) (load! "+lsp"))
((featurep! +meghanada) (load! "+meghanada")))
(cond ((featurep! +meghanada) (load! "+meghanada"))
((featurep! :tools lsp +eglot))
((featurep! +lsp) (load! "+lsp")))
;;

View File

@@ -7,3 +7,7 @@
(unless (executable-find "javac")
(warn! "Couldn't find the javac executable, are you sure the JDK is installed?"))
(when (featurep! :editor format)
(unless (executable-find "clang-format")
(warn! "Couldn't find clang-format. Code formatting will not work.")))

View File

@@ -13,4 +13,5 @@
(package! company-emacs-eclim :pin "222ddd48fcf0ee01592dec77c58e0cf3f2ea1100")))
(when (featurep! +lsp)
(package! lsp-java :pin "260016236fa0520b5b6ec7f51ca2086288524cba"))
(unless (featurep! :tools lsp +eglot)
(package! lsp-java :pin "3f1ed1762fd7cb2fece606df6fc63d35d0a6b835")))

View File

@@ -3,9 +3,9 @@
;; Major modes
(package! coffee-mode :pin "35a41c7d8233eac0b267d9593e67fb8b6235e134")
(package! js2-mode :pin "40aab27581279d0fdbfeb9afeb85f39d401a927f")
(package! js2-mode :pin "ffb70990c1a4d4616034cb810b4ce36953aecb47")
(package! rjsx-mode :pin "0061587a06cdc2579a8d0e90863498d96bf982d8")
(package! typescript-mode :pin "42a60e5c881082db2ec2c541a5c154308c4863e6")
(package! typescript-mode :pin "e6f68ab2dd998af0b50ae89a781e1c04539d23d6")
;; Tools
(package! js2-refactor :pin "d4c40b5fc86d3edd7c6a7d83ac86483ee1cb7a28")
@@ -17,6 +17,6 @@
(package! skewer-mode :pin "e5bed351939c92a1f788f78398583c2f83f1bb3c")
;; Programming environment
(package! tide :pin "fa617f54629dc53a3182251dd8076c9e7ac9effa")
(package! tide :pin "ac5f070138fbc3657082412c3911d46a1107f39d")
(when (featurep! :tools lookup)
(package! xref-js2 :pin "6f1ed5dae0c2485416196a51f2fa92f32e4b8262"))

View File

@@ -1,5 +1,5 @@
;; -*- no-byte-compile: t; -*-
;;; lang/julia/packages.el
(package! julia-mode :pin "b5f5983d2b232c8bba4c5eff75cccdb787c19d98")
(package! julia-mode :pin "8ea90c7927f6d87a291cfb0216f34dacf43c722e")
(package! julia-repl :pin "d073acb6339e99edf77833f82277afd9a076f16a")

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/kotlin/packages.el
(package! kotlin-mode :pin "8e6dd578f2b3d77ac33b6384d2bfe1b1f6799a1a")
(package! kotlin-mode :pin "0e4bafb31d1fc2a0a420a521c2723d5526646c0b")
(when (featurep! :checkers syntax)
(package! flycheck-kotlin :pin "5104ee9a3fdb7f0a0a3d3bcfd8dd3c45a9929310"))

View File

@@ -50,6 +50,17 @@
(after! latex-preview-pane
(setq latex-preview-pane-multifile-mode 'auctex)
;; TODO PR this to maintained fork. Original project appears abandoned
(defadvice! +latex--dont-reopen-preview-pane-a (orig-fn &rest args)
"Once the preview pane has been closed it should not be reopened."
:around #'latex-preview-pane-update
(letf! (defun init-latex-preview-pane (&rest _)
;; HACK Avoid the function because it tries to delete the current
;; window, but it's already gone, so it ends up deleting the
;; wrong window.
(setq-local latex-preview-pane-mode nil))
(apply orig-fn args)))
(define-key! doc-view-mode-map
"ESC" #'delete-window
"q" #'delete-window

View File

@@ -64,7 +64,7 @@ apt-get install texlive
** Arch Linux
#+BEGIN_SRC sh
pacman -S texlive
pacman -S texlive-core
#+END_SRC
** TODO macOS

View File

@@ -1,43 +1,44 @@
;;; lang/latex/autoload.el -*- lexical-binding: t; -*-
;;;###autoload
(defun +latex/LaTeX-indent-item ()
"Provide proper indentation for LaTeX \"itemize\",\"enumerate\", and
\"description\" environments.
(defun +latex-indent-item-fn ()
"Indent LaTeX \"itemize\",\"enumerate\", and \"description\" environments.
\"\\item\" is indented `LaTeX-indent-level' spaces relative to the the beginning
of the environment.
Continuation lines are indented either twice `LaTeX-indent-level', or
`LaTeX-indent-level-item-continuation' if the latter is bound."
See `LaTeX-indent-level-item-continuation' for the indentation strategy this
function uses."
(save-match-data
(let* ((offset LaTeX-indent-level)
(contin (or (and (boundp '+latex-indent-level-item-continuation)
+latex-indent-level-item-continuation)
(* 4 offset)))
(re-beg "\\\\begin{")
(let* ((re-beg "\\\\begin{")
(re-end "\\\\end{")
(re-env "\\(itemize\\|\\enumerate\\|description\\)")
(re-env "\\(?:itemize\\|\\enumerate\\|description\\)")
(indent (save-excursion
(when (looking-at (concat re-beg re-env "}"))
(end-of-line))
(LaTeX-find-matching-begin)
(current-column))))
(current-column)))
(contin (pcase +latex-indent-item-continuation-offset
(`auto LaTeX-indent-level)
(`align 6)
(`nil (- LaTeX-indent-level))
(x x))))
(cond ((looking-at (concat re-beg re-env "}"))
(or (save-excursion
(beginning-of-line)
(ignore-errors
(LaTeX-find-matching-begin)
(+ (current-column)
LaTeX-indent-level
(if (looking-at (concat re-beg re-env "}"))
contin
offset))))
0))))
indent))
((looking-at (concat re-end re-env "}"))
indent)
((looking-at "\\\\item")
(+ offset indent))
((+ contin indent))))))
(+ LaTeX-indent-level indent))
((+ contin LaTeX-indent-level indent))))))
;;;###autoload
(defun +latex-fold-last-macro-a (&rest _)

View File

@@ -1,7 +1,27 @@
;;; lang/latex/config.el -*- lexical-binding: t; -*-
(defvar +latex-indent-level-item-continuation 4
"Custom indentation level for items in enumeration-type environments")
(defconst +latex-indent-item-continuation-offset 'align
"Level to indent continuation of enumeration-type environments.
i.e. This affects \\item, \\enumerate, and \\description.
Set this to `align' for:
\\item lines aligned
like this.
Set to `auto' for continuation lines to be offset by `LaTeX-indent-line':
\\item lines aligned
like this, assuming LaTeX-indent-line == 2
Any other fixed integer will be added to `LaTeX-item-indent' and the current
indentation level.
Set this to `nil' to disable all this behavior.
You'll need to adjust `LaTeX-item-indent' to control indentation of \\item
itself.")
(defvar +latex-enable-unicode-math nil
"If non-nil, use `company-math-symbols-unicode' backend in LaTeX-mode,
@@ -75,7 +95,10 @@ If no viewers are found, `latex-preview-pane' is used.")
(when (featurep! +lsp)
(add-hook! '(tex-mode-local-vars-hook
latex-mode-local-vars-hook)
#'lsp!)))
#'lsp!))
(map! :map LaTeX-mode-map
:localleader
:desc "View" "v" #'TeX-view))
(use-package! tex-fold
@@ -130,16 +153,17 @@ Math faces should stay fixed by the mixed-pitch blacklist, this is mostly for
;; Provide proper indentation for LaTeX "itemize","enumerate", and
;; "description" environments. See
;; http://emacs.stackexchange.com/questions/3083/how-to-indent-items-in-latex-auctex-itemize-environments
;; Set `+latex-indent-item-continuation-offset' to 0 to disable this
(dolist (env '("itemize" "enumerate" "description"))
(add-to-list 'LaTeX-indent-environment-list `(,env +latex/LaTeX-indent-item)))
(add-to-list 'LaTeX-indent-environment-list `(,env +latex-indent-item-fn)))
;; Fix #1849: allow fill-paragraph in itemize/enumerate
(defadvice! +latex--re-indent-itemize-and-enumerate-a (orig-fn &rest args)
:around #'LaTeX-fill-region-as-para-do
(let ((LaTeX-indent-environment-list
(append LaTeX-indent-environment-list
'(("itemize" +latex/LaTeX-indent-item)
("enumerate" +latex/LaTeX-indent-item)))))
'(("itemize" +latex-indent-item-fn)
("enumerate" +latex-indent-item-fn)))))
(apply orig-fn args)))
(defadvice! +latex--dont-indent-itemize-and-enumerate-a (orig-fn &rest args)
:around #'LaTeX-fill-region-as-paragraph

View File

@@ -5,7 +5,7 @@
(package! adaptive-wrap :pin "319db649fb083db3ad07b4c71ee6c9429497043b")
(package! latex-preview-pane :pin "5297668a89996b50b2b62f99cba01cc544dbed2e")
(when (featurep! :editor evil +everywhere)
(package! evil-tex :pin "06234c9ea4a7ffac91f7b4f3fd683014bb8137af"))
(package! evil-tex :pin "a3b6875d4027c675cf490622026a15a12fe1a911"))
;; Optional module features:

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/lean/packages.el
(package! lean-mode :pin "6b4377686128d5c2fb55d8fe61b92a9991d40fbd")
(package! lean-mode :pin "cc1f5fadf8e9ae08aa25828985edc97df04d94a7")
(when (featurep! :completion company)
(package! company-lean :pin "6b4377686128d5c2fb55d8fe61b92a9991d40fbd"))
(package! company-lean :pin "cc1f5fadf8e9ae08aa25828985edc97df04d94a7"))

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/lua/packages.el
(package! lua-mode :pin "35b6e4c20b8b4eaf783ccc8e613d0dd06dbd165c")
(package! lua-mode :pin "345ebfc1e236d9676e7e9f7364493785e7756348")
(when (featurep! +moonscript)
(package! moonscript :pin "56f90471e2ced2b0a177aed4d8c2f854797e9cc7")

View File

@@ -23,7 +23,6 @@ capture, the end position, and the output buffer.")
markdown-italic-underscore t
markdown-asymmetric-header t
markdown-fontify-code-blocks-natively t
markdown-gfm-uppercase-checkbox t ; for compat with org-mode
markdown-gfm-additional-languages '("sh")
markdown-make-gfm-checkboxes-buttons t
@@ -45,6 +44,7 @@ capture, the end position, and the output buffer.")
markdown-xhtml-header-content
(concat "<meta name='viewport' content='width=device-width, initial-scale=1, shrink-to-fit=no'>"
"<style> body { box-sizing: border-box; max-width: 740px; width: 100%; margin: 40px auto; padding: 0 10px; } </style>"
"<script id='MathJax-script' async src='https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js'></script>"
"<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>"))

View File

@@ -1,12 +1,12 @@
;; -*- no-byte-compile: t; -*-
;;; lang/markdown/packages.el
(package! markdown-mode :pin "ef2cb4d94af68908a4963afa492afba876725128")
(package! markdown-mode :pin "152eae2415258141043e559af97d37a72de6c4e5")
(package! markdown-toc :pin "9565eeaa1d26bc0ab83eb65bd30470888f724044")
(package! edit-indirect :pin "bdc8f542fe8430ba55f9a24a7910639d4c434422")
(when (featurep! +grip)
(package! grip-mode :pin "281ada2c93bac7043c6f665fac065a17d4247bdc"))
(package! grip-mode :pin "91da46f29c455c3cd24b2a6b20ff2db2c4ce8cd6"))
(when (featurep! :editor evil +everywhere)
(package! evil-markdown

View File

@@ -1,5 +1,12 @@
;;; lang/nix/config.el -*- lexical-binding: t; -*-
(after! tramp
(add-to-list 'tramp-remote-path "/run/current-system/sw/bin"))
;;
;;; Plugins
(use-package! nix-mode
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
:mode "\\.nix\\'"
@@ -8,6 +15,11 @@
(set-company-backend! 'nix-mode 'company-nixos-options)
(set-lookup-handlers! 'nix-mode
:documentation '(+nix/lookup-option :async t))
(set-popup-rule! "^\\*nixos-options-doc\\*$" :ttl 0 :quit t)
;; Fix #3927: disable idle completion because `company-nixos-options' is
;; dreadfully slow. It can still be invoked manually..
(setq-hook! 'nix-mode-hook company-idle-delay nil)
(map! :localleader
:map nix-mode-map

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/nix/packages.el
(package! nix-mode :pin "0cf1ea1e0ed330b59f47056d927797e625ba8f53")
(package! nix-mode :pin "bb0b49e3ac1579d3d811529ed274272c54a9fe3c")
(package! nix-update :pin "fc6c39c2da3fcfa62f4796816c084a6389c8b6e7")
(when (featurep! :completion company)

View File

@@ -4,7 +4,7 @@
(package! tuareg :pin "ccde45bbc292123ec20617f1af7f7e19f7481545")
(unless (featurep! +lsp)
(package! merlin :pin "3751cbfff75022c396c4ff4dc1729048f80daa4f")
(package! merlin :pin "06833e9dab5d5bb5ece68f11eb15797b6cd00933")
(package! merlin-eldoc :pin "db7fab1eddfe34781b7e79694f8923b285698032")
(when (featurep! :checkers syntax)
(package! flycheck-ocaml :pin "8707a7bf545a8639a6a5c600a98d9a2ea1487dc9")))
@@ -17,8 +17,8 @@
(when (featurep! :editor format)
(package! ocamlformat
:recipe (:host github :repo "ocaml-ppx/ocamlformat" :files ("emacs/*.el"))
:pin "cd0eaa8bbb7df431276cf65741c53eaa913f7807"))
:pin "1dec6c3ffb2572b21d43e99653cabdf0406e7eef"))
(package! dune
:recipe (:host github :repo "ocaml/dune" :files ("editor-integration/emacs/*.el"))
:pin "daea74e5366c8571af8674860a733b0c9e1eaf81")
:pin "f967df6f51f690eab612cdeb458926a4bdd41e11")

View File

@@ -66,13 +66,13 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
(defun +org-init-org-directory-h ()
(unless org-directory
(setq org-directory "~/org"))
(setq-default 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 org-agenda-files (list org-directory)))
(setq-default
;; Different colors for different priority levels
org-agenda-deadline-faces
@@ -129,19 +129,9 @@ Is relative to `org-directory', unless it is absolute. Is used in Doom's default
org-refile-use-outline-path 'file
org-outline-path-complete-in-steps nil)
;; Previews are rendered with the incorrect 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))))
(plist-put org-format-latex-options :background 'default) ; match the background
;; 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
@@ -407,7 +397,7 @@ relative to `org-directory', unless it is an absolute path."
:config
(unless org-attach-id-dir
;; Centralized attachments directory by default
(setq org-attach-id-dir (expand-file-name ".attach/" org-directory)))
(setq-default org-attach-id-dir (expand-file-name ".attach/" org-directory)))
(after! projectile
(add-to-list 'projectile-globally-ignored-directories org-attach-id-dir)))
@@ -421,6 +411,8 @@ relative to `org-directory', unless it is an absolute path."
"file"
:face (lambda (path)
(if (or (file-remote-p path)
;; filter out network shares on windows (slow)
(and IS-WINDOWS (string-prefix-p "//" path))
(file-exists-p path))
'org-link
'error)))
@@ -493,13 +485,14 @@ the exported output (i.e. formatters)."
:around #'org-export-to-file
(if (not org-export-in-background)
(apply orig-fn args)
(setq org-export-async-init-file (make-temp-file "doom-org-async-export"))
(with-temp-file org-export-async-init-file
(prin1 `(progn (setq org-export-async-debug ,debug-on-error
load-path ',load-path)
(load ,user-init-file nil t))
(current-buffer)))
(apply orig-fn args))))
(let ((user-init-file (or org-export-async-init-file user-init-file)))
(setq org-export-async-init-file (make-temp-file "doom-org-async-export"))
(with-temp-file org-export-async-init-file
(prin1 `(progn (setq org-export-async-debug ,debug-on-error
load-path ',load-path)
(load ,user-init-file nil t))
(current-buffer)))
(apply orig-fn args)))))
(defun +org-init-habit-h ()
@@ -529,6 +522,14 @@ the exported output (i.e. formatters)."
;; Open directory links in dired
(add-to-list 'org-file-apps '(directory . emacs))
;; Some uses of `org-fix-tags-on-the-fly' occur without a check on
;; `org-auto-align-tags', such as in `org-self-insert-command' and
;; `org-delete-backward-char'.
;; TODO Should be reported/PR'ed upstream
(defadvice! +org--respect-org-auto-align-tags-a (&rest _)
:before-while #'org-fix-tags-on-the-fly
org-auto-align-tags)
;; HACK Org is known to use a lot of unicode symbols (and large org files tend
;; to be especially memory hungry). Compounded with
;; `inhibit-compacting-font-caches' being non-nil, org needs more memory

View File

@@ -38,17 +38,18 @@
;; we wanted to keep visible.
org-journal-find-file #'find-file)
;; Setup carryover to include all configured TODO states.
;; Setup carryover to include all configured TODO states. We cannot carry over
;; [ ] keywords because `org-journal-carryover-items's syntax cannot correctly
;; interpret it as anything other than a date.
(setq org-journal-carryover-items "TODO=\"TODO\"|TODO=\"PROJ\"|TODO=\"STRT\"|TODO=\"WAIT\"|TODO=\"HOLD\"")
(set-popup-rule! "^\\*Org-journal search" :select t :quit t)
(map! (:map org-journal-mode-map
:n "]f" #'org-journal-open-next-entry
:n "[f" #'org-journal-open-previous-entry
:n "C-n" #'org-journal-open-next-entry
:n "C-p" #'org-journal-open-previous-entry)
:n "]f" #'org-journal-next-entry
:n "[f" #'org-journal-previous-entry
:n "C-n" #'org-journal-next-entry
:n "C-p" #'org-journal-previous-entry)
(:map org-journal-search-mode-map
"C-n" #'org-journal-search-next
"C-p" #'org-journal-search-previous)
@@ -56,8 +57,8 @@
(:map org-journal-mode-map
"c" #'org-journal-new-entry
"d" #'org-journal-new-date-entry
"n" #'org-journal-open-next-entry
"p" #'org-journal-open-previous-entry
"n" #'org-journal-next-entry
"p" #'org-journal-previous-entry
(:prefix "s"
"s" #'org-journal-search
"f" #'org-journal-search-forever

View File

@@ -21,7 +21,7 @@
:recipe (:host github
:repo "emacs-straight/org-mode"
:files ("*.el" "lisp/*.el" "contrib/lisp/*.el"))
:pin "220f2b0d93a6927eb673978c0042a1d4673e86aa"
:pin "a88806b554b15461a88a4e00c9e0e338fe59ac37"
;; Prevents built-in Org from sneaking into the byte-compilation of
;; `org-plus-contrib', and inform other packages that `org-mode' satisfies the
;; `org' dependency: https://github.com/raxod502/straight.el/issues/352
@@ -33,21 +33,21 @@
:recipe (:host github :repo "TobiasZawada/org-yt")
:pin "40cc1ac76d741055cbefa13860d9f070a7ade001")
(package! ox-clip :pin "f5eac28734ea33d0b7a3dbe10b777907a91cf9f9")
(package! toc-org :pin "5deaec41ed0e5c51715737d7f74c5ae1b3c00387")
(package! toc-org :pin "ff8d49c2c7daab0061250b581d3eebc7265ee267")
(package! org-cliplink :pin "82402cae7e118d67de7328417fd018a18f95fac2")
(when (featurep! :editor evil +everywhere)
(package! evil-org
:recipe (:host github :repo "hlissner/evil-org-mode")
:pin "2e9c4a295ee6aea7c97c5b1f3892b1c6e28a32d9"))
:pin "658dadfe2700f08323ece3efb1af48657b9446df"))
(when (featurep! :tools pdf)
(package! org-pdftools :pin "8cc15bb8014ed1f047eecc0abd8bf447f86c0505"))
(package! org-pdftools :pin "3c2b9a413eb841c781cfb49d8c343bf07aa0ad1f"))
(when (featurep! :tools magit)
(package! orgit :pin "ac9b1a42863a864fde9d225890ef5464bffdc646"))
(when (featurep! +brain)
(package! org-brain :pin "671db0e08b91c7d2637d765a7afca8b2561275c8"))
(package! org-brain :pin "e703ae0f3fbdf488bf7442276a90fcb52e11cde7"))
(when (featurep! +dragndrop)
(package! org-download :pin "67b3c744f94cf0bf50f7052ce428e95af5a6ff3f"))
(package! org-download :pin "42ac361ef5502017e6fc1bceb00333eba90402f4"))
(when (featurep! +gnuplot)
(package! gnuplot :pin "f0001c30010b2899e36d7d89046322467e923088")
(package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7"))
@@ -56,31 +56,29 @@
(when (featurep! +jupyter)
(package! jupyter :pin "360cae2c70ab28c7a7848c0c56473d984f0243e5"))
(when (featurep! +journal)
(package! org-journal :pin "a2728e25b854af21cea8e8d313714c993eb1c848"))
(package! org-journal :pin "fce4fa7e7286280ecd7b42c2f67f0d73048d2c7a"))
(when (featurep! +noter)
(package! org-noter :pin "9ead81d42dd4dd5074782d239b2efddf9b8b7b3d"))
(when (featurep! +pomodoro)
(package! org-pomodoro :pin "aa07c11318f91219336197e62c47bc7a3d090479"))
(when (featurep! +pretty)
(package! org-superstar :pin "94f35c20f8b84a63defa145e3e6ae735fa33dd5d")
(package! org-superstar :pin "7f83636db215bf5a10edbfdf11d12a132864a914")
(package! org-fancy-priorities :pin "819bb993b71e7253cefef7047306ab4e0f9d0a86"))
(when (featurep! +present)
(package! centered-window
:recipe (:host github :repo "anler/centered-window-mode")
:pin "f50859941ab5c7cbeaee410f2d38716252b552ac")
(package! org-tree-slide :pin "7126a4365072a32898f169ead8fb59265dabc605")
(package! org-re-reveal :pin "7fe39d5d03ccc75d2811445d25cbbb473b53de76")
(package! org-tree-slide :pin "18034c476038adcc1c4697168b8068f4d0ce62fe")
(package! org-re-reveal :pin "2035217ae9f9dbd20bf054daa8dabf7c6aa3938d")
(package! revealjs
:recipe (:host github :repo "hakimel/reveal.js"
:files ("css" "dist" "js" "plugin"))
:pin "15815efe05ca69c35ce66cfdbf93316e1db66ecb"))
:pin "0582f57517c97a4c7bfeb58762138c78883f94c5"))
(when (featurep! +roam)
(package! org-roam :pin "c33867e6bc282ff0a69d4ef4a020db82604039bb")
(when (featurep! :completion company)
(package! company-org-roam :pin "1132663bd68022aa7ea005ff53c7c7571890769d")))
(package! org-roam :pin "a7cf48ea895ee5aae93ad6d5b4550fb803f6ef8a"))
;;; Babel
(package! ob-async :pin "80a30b96a007d419ece12c976a81804ede340311")
(package! ob-async :pin "de1cd6c93242a4cb8773bbe115b7be3d4dd6b97e")
(when (featurep! :lang crystal)
(package! ob-crystal :pin "d84c1adee4b269cdba06a97caedb8071561a09af"))
(when (featurep! :lang go)
@@ -104,6 +102,6 @@
(when (featurep! +hugo)
(package! ox-hugo
:recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t)
:pin "75b849e9561c4a6022babf6eaf0e037310ded7c1"))
:pin "1909c6effe578cf41fcf436da881f1cd430a498a"))
(when (featurep! :lang rst)
(package! ox-rst :pin "99fa790da55b57a3f2e9aa187493ba434a64250e"))

View File

@@ -45,9 +45,8 @@ This module has no dedicated maintainers.
** 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.
+ =+lsp= Enable LSP support through phpactor or intelephense. Requires the
~:tools lsp~ module and the [[https://phpactor.readthedocs.io/en/develop/usage/standalone.html][phpactor server]] to be installed on your system.
** Plugins
+ [[https://github.com/tomterl/php-boris][async]]
+ [[https://github.com/tomterl/php-boris][php-boris]]
@@ -65,7 +64,11 @@ This module has no dedicated maintainers.
* Prerequisites
** PHP
To get started with PHP, you'll need ~php~ (5.3+) and ~composer~:
To get started with PHP, you'll need ~php~ (5.3+) and ~composer~.
Note for =+lsp=:
1. In order to make full use of phpactor server, ~php~ (7.3+) is recommended.
2. If you use intelephense, ~node~ and ~npm~ are needed.
*** MacOS
PHP 5.5 comes prepackaged with newer versions of MacOS. These instructions are provided for reference:
@@ -74,16 +77,26 @@ PHP 5.5 comes prepackaged with newer versions of MacOS. These instructions are p
brew tap homebrew/homebrew-php
brew install php71 # or php53, php54, php55
brew install composer
# If you use intelephense:
brew install node
brew install npm
#+END_SRC
*** Arch Linux
#+BEGIN_SRC sh :dir /sudo:: :tangle (if (doom-system-os 'arch) "yes")
sudo pacman --needed --noconfirm -S php composer # or php53, php54, php55
# If you use intelephense:
sudo pacman -S nodejs npm
#+END_SRC
*** openSUSE
#+BEGIN_SRC sh :dir /sudo::
sudo zypper install php-composer
# If you use intelephense:
sudo zypper install nodejs npm
#+END_SRC
** Dependencies
@@ -108,6 +121,8 @@ Ensure that ~\~/.composer/vendor/bin~ is in ~PATH~:
export PATH="~/.composer/vendor/bin:$PATH"
#+END_SRC
By the way, if you use intelephense, running =M-x lsp-install-server= and
choose ~iph~ to install lsp-intelephense.
* TODO Features
# An in-depth list of features, how to use them, and their dependencies.

View File

@@ -39,14 +39,16 @@
:return "return"
:yield "use")
(if (featurep! +lsp)
(add-hook 'php-mode-local-vars-hook #'lsp!)
;; `+php-company-backend' uses `company-phpactor', `php-extras-company' or
;; `company-dabbrev-code', in that order.
(when +php--company-backends
(set-company-backend! 'php-mode
(cons :separate +php--company-backends)
'company-dabbrev-code)))
(if (not (featurep! +lsp))
;; `+php-company-backend' uses `company-phpactor', `php-extras-company' or
;; `company-dabbrev-code', in that order.
(when +php--company-backends
(set-company-backend! 'php-mode
(cons :separate +php--company-backends)
'company-dabbrev-code))
(when (executable-find "php-language-server.php")
(setq lsp-clients-php-server-command "php-language-server.php"))
(add-hook 'php-mode-local-vars-hook #'lsp!))
;; Use the smallest `sp-max-pair-length' for optimum `smartparens' performance
(setq-hook! 'php-mode-hook sp-max-pair-length 5)

View File

@@ -12,7 +12,7 @@
(when (featurep! +hack)
(package! hack-mode
:recipe (:host github :repo "hhvm/hack-mode")
:pin "572c3b41bed91ea543434c04914a7a0c45fec7c7"))
:pin "9079bc333e715a13e57ab366522b15d0307e32cd"))
(unless (featurep! +lsp)
(package! phpactor :pin "62d2372ea55c0c5fb4e77076988472ebb5d85f24")
@@ -23,4 +23,4 @@
(package! php-cs-fixer :pin "95eace9bc0ace128d5166e303c76df2b778c4ddb"))
;; For building php-extras
(package! async :pin "36a10151e70e956e2f766ed9e65f4a9cfc8479b2")
(package! async :pin "14f48de586b0977e3470f053b810d77b07ea427a")

View File

@@ -181,18 +181,19 @@
(use-package! python-pytest
:defer t
:commands python-pytest-dispatch
:init
(map! :after python
:localleader
:map python-mode-map
:prefix ("t" . "test")
"a" #'python-pytest
"f" #'python-pytest-file-dwim
"F" #'python-pytest-file
"t" #'python-pytest-function-dwim
"T" #'python-pytest-function
"r" #'python-pytest-repeat
"p" #'python-pytest-popup))
"p" #'python-pytest-dispatch))
;;
@@ -266,6 +267,7 @@
"~/.miniconda3"
"~/anaconda3"
"~/miniconda3"
"~/opt/miniconda3"
"/usr/bin/anaconda3"
"/usr/local/anaconda3"
"/usr/local/miniconda3"
@@ -286,7 +288,9 @@
(use-package! poetry
:when (featurep! +poetry)
:after python)
:after python
:init
(add-hook 'python-mode-hook #'poetry-tracking-mode))
(use-package! cython-mode

View File

@@ -4,7 +4,7 @@
;; Major modes
(package! pip-requirements :pin "216cd1690f80cc965d4ae47b8753fc185f778ff6")
(when (featurep! +cython)
(package! cython-mode :pin "fcfd16c7467c31f255287a73f36cf66b32bc096c")
(package! cython-mode :pin "ba6cbed8193775c80402bc5112cbaf16246ee6bd")
(when (featurep! :checkers syntax)
(package! flycheck-cython :pin "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76")))
@@ -12,11 +12,11 @@
(when (featurep! +lsp)
(unless (featurep! :tools lsp +eglot)
(if (featurep! +pyright)
(package! lsp-pyright :pin "9603dda12afaae9c82608c7d3762f98b24b8563f")
(package! lsp-python-ms :pin "a884a9a4eb1a3acd3d70c776aec5e968bbdc1731"))))
(package! lsp-pyright :pin "ccd00074622520acb7a65357a59d8c8426c12a00")
(package! lsp-python-ms :pin "a0c56f429e14cc9086fd06aa764e9aab697970d7"))))
;; Programming environment
(package! anaconda-mode :pin "73266a48fa964d44268c3f3478597e553b9843f1")
(package! anaconda-mode :pin "39b1cf88c8c459901630d248d6135d8644075648")
(when (featurep! :completion company)
(package! company-anaconda :pin "da1566db41a68809ef7f91ebf2de28118067c89b"))
@@ -24,18 +24,18 @@
(package! pipenv :pin "b730bb509e8b60af9f5ab1f1e6c3458d1d95d789")
(package! pyvenv :pin "861998b6d157ae73b829f02a5a6c8a9118310831")
(when (featurep! +pyenv)
(package! pyenv-mode :pin "d191037fe62ed8d4fee5888845da3e2c386d8e89"))
(package! pyenv-mode :pin "b818901b8eac0e260ced66a6a5acabdbf6f5ba99"))
(when (featurep! +conda)
(package! conda :pin "9f7eea16e9ad3eb34fe3d1cbd9d6162b8046c2f8"))
(when (featurep! +poetry)
(package! poetry :pin "22a76cdcba180b4689a6b45c97669e3c76cd36ed"))
(package! poetry :pin "eb238d9085d884ffb2b7fda985cca1ce81747d58"))
;; Testing frameworks
(package! nose
;; REVIEW Remove this when emacsmirror/epkgs updates its emacsattic index
:recipe (:host github :repo "emacsattic/nose")
:pin "f8528297519eba911696c4e68fa88892de9a7b72")
(package! python-pytest :pin "fc056faf2757c42641ed94d36a090e56eb13572f")
(package! python-pytest :pin "a2f88b197cc1c38c6d5a20c46d801f3377c54822")
;; Import managements
(package! pyimport :pin "a6f63cf7ed93f0c0f7c207e6595813966f8852b9")

View File

@@ -1,4 +1,4 @@
;; -*- no-byte-compile: t; -*-
;;; lang/racket/packages.el
(package! racket-mode :pin "c55fd70c5e9a371f262486f7d5d8837481388b95")
(package! racket-mode :pin "0ca8b26e69de2bada6ff7e08d3722d9259b18d3f")

View File

@@ -7,7 +7,6 @@
:config
(set-popup-rule! "^\\*HTTP Response" :size 0.4 :quit 'other)
;; TODO PR this upstream! This adds imenu support to `restclient-mode'
(setq-hook! 'restclient-mode-hook
imenu-generic-expression '((nil "^[A-Z]+\s+.+" 0)))

View File

@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/rest/packages.el
(package! restclient :pin "ac8aad6c6b9e9d918062fa3c89c22c2f4ec48bc3")
(package! restclient :pin "abc307b965bf6720bc466281f2e204cd5ce37dc3")
(when (featurep! :completion company)
(package! company-restclient :pin "e5a3ec54edb44776738c13e13e34c85b3085277b"))

View File

@@ -6,7 +6,7 @@
(package! yard-mode :pin "ba74a47463b0320ae152bd42a7dd7aeecd7b5748")
;; REPL
(package! inf-ruby :pin "9f0f79ff459c7c417e8931ca020db121e24b45b5")
(package! inf-ruby :pin "b0124578db09b64902c8ca981b02e74bec92ef36")
(when (featurep! :completion company)
(package! company-inf-ruby :pin "fe3e4863bc971fbb81edad447efad5795ead1b17"))
@@ -22,7 +22,7 @@
(when (featurep! +rbenv)
(package! rbenv :pin "2ea1a5bdc1266caef1dd77700f2c8f42429b03f1"))
(when (featurep! +rvm)
(package! rvm :pin "081d5173158054c6d0780b9462c74c5697eac1fc"))
(package! rvm :pin "6897576bb068b967347fabd7fb15f4ae7ec13462"))
(when (featurep! +chruby)
(package! chruby :pin "42bc6d521f832eca8e2ba210f30d03ad5529788f"))
@@ -32,5 +32,5 @@
;; Rails
(when (featurep! +rails)
(package! projectile-rails :pin "11980b2bcb99208888856a9b8666ff329b6f0142")
(package! projectile-rails :pin "7a256b1b1444fe0001f97095d99252e946dd9777")
(package! inflections :pin "e4f1372cf22e811faca52fc86bdd5d817498a4d8"))

View File

@@ -17,6 +17,7 @@
- [[#enable-rls-by-default][Enable RLS by default]]
- [[#enabling-elgot-support-for-rust][Enabling elgot support for Rust]]
- [[#troubleshooting][Troubleshooting]]
- [[#errore0670-async-fn-is-not-permitted-in-the-2015-edition][error[E0670]: `async fn` is not permitted in the 2015 edition]]
* Description
This module adds support for the Rust language and integration for its tools,
@@ -100,4 +101,11 @@ selected by default. Modify ~rustic-lsp-server~ to change the default:
Doom's =:tools lsp= module has an =+eglot= flag. Enable it and this module will
use eglot instead.
* TODO Troubleshooting
* Troubleshooting
** error[E0670]: `async fn` is not permitted in the 2015 edition
You may be seeing this error, despite having ~edition = "2018"~ in your
=Cargo.toml=. This error actually originates from ~rustfmt~, which the LSP
server tries to invoke on save (if you have ~rustic-format-on-save~ or =:editor
format= enabled).
To fix this your project needs a =rustfmt.toml= with ~edition = "2018"~ in it.

View File

@@ -1,6 +1,6 @@
;; -*- no-byte-compile: t; -*-
;;; lang/rust/packages.el
(package! rustic :pin "75b99201bb4e7a0bd990c006896ad7897f284ca2")
(package! rustic :pin "7c9d55bdd47e98d2ac12e13dcb12703e6ffe377f")
(unless (featurep! +lsp)
(package! racer :pin "a0bdf778f01e8c4b8a92591447257422ac0b455b"))

View File

@@ -16,6 +16,7 @@
comment-line-break-function #'+scala-comment-indent-new-line-fn)
(when (featurep! +lsp)
(setq-hook! 'scala-mode-hook lsp-enable-indentation nil)
(add-hook 'scala-mode-local-vars-hook #'lsp!))
(set-ligatures! 'scala-mode

View File

@@ -5,4 +5,4 @@
(package! scala-mode :pin "1d08e885b1489313666c7f15a3962432a4f757ee")
(when (featurep! +lsp)
(package! lsp-metals :pin "039aa72439e3c52cfef4bcde416ba49d88ac0991"))
(package! lsp-metals :pin "e42c0b2448847f5de8ae73beae4dd695b560c4e0"))

View File

@@ -1,7 +1,7 @@
;; -*- no-byte-compile: t; -*-
;;; lang/scheme/packages.el
(package! geiser :pin "adc5c4ab5ff33cf94cb3fcd892bb9503b5fa2aa2")
(package! geiser :pin "2accab72e289ed82707237d2013ba034c88ff6c2")
(when (featurep! :checkers syntax)
(package! flycheck-guile

View File

@@ -23,10 +23,12 @@ This module adds support for shell scripting languages.
+ =+lsp= Enables LSP support for sh-mode. This requires the =:tools lsp= module
to be enabled and [[https://github.com/mads-hartmann/bash-language-server][bash-language-server]] to be installed on your system.
+ =+fish= Add syntax highlighting for fish script files.
+ =+powershell= Add syntax highlighting for Powershell script files .ps1 and .psm1
** Plugins
+ [[https://github.com/Alexander-Miller/company-shell][company-shell]]* (=:completion company=)
+ [[https://github.com/wwwjfy/emacs-fish][fish-mode]]* (=+fish=)
+ [[https://github.com/jschaf/powershell.el][powershell-mode]]* (=+powershell=)
** Hacks
+ Interpolated variables are fontified.

View File

@@ -65,7 +65,6 @@
;; autoclose backticks
(sp-local-pair 'sh-mode "`" "`" :unless '(sp-point-before-word-p sp-point-before-same-p)))
(use-package! company-shell
:when (featurep! :completion company)
:unless (featurep! +lsp)
@@ -74,8 +73,14 @@
(set-company-backend! 'sh-mode '(company-shell company-files))
(setq company-shell-delete-duplicates t))
(use-package! fish-mode
:when (featurep! +fish)
:defer t
:config (set-formatter! 'fish-mode #'fish_indent))
(use-package! powershell
:when (featurep! +powershell)
:defer t
:config
(when (featurep! +lsp)
(add-hook 'powershell-mode-local-vars-hook #'lsp!)))

View File

@@ -6,3 +6,6 @@
(when (featurep! +fish)
(package! fish-mode :pin "db257db81058b0b12f788c324c264cc59b9a5bf4"))
(when (featurep! +powershell)
(package! powershell :pin "d1b3f95669343399f199f291ef76c09a0ede5e60"))

View File

@@ -1,10 +1,10 @@
;; -*- no-byte-compile: t; -*-
;;; lang/swift/packages.el
(package! swift-mode :pin "d266fbd300a1bf1592e1462ead4be093b8b68f98")
(package! swift-mode :pin "e65a80a659c74d0a62b00dff183a0f7fc8385ce1")
(if (featurep! +lsp)
(package! lsp-sourcekit :pin "130f7a8f7a37869515953aa7715b3b969c3d7a0b")
(package! lsp-sourcekit :pin "948c3a35fd05496a77af2d8935e754db112cb4c3")
(when (featurep! :completion company)
(package! company-sourcekit :pin "abf9bc5a0102eb666d3aa6d6bf22f6efcc852781"))
(when (featurep! :checkers syntax)

View File

@@ -12,6 +12,7 @@
:mode "\\.svelte\\'"
:mode "\\.twig\\'"
:mode "\\.jinja2?\\'"
:mode "\\.eco\\'"
:mode "wp-content/themes/.+/.+\\.php\\'"
:mode "templates/.+\\.php\\'"
:init

View File

@@ -124,7 +124,8 @@ snippet, or `emmet-expand-yas'/`emmet-expand-line', depending on whether
(call-interactively
(cond ((or (<= (current-column) (current-indentation))
(not (eolp))
(not (memq (char-after) (list ?\n ?\s ?\t))))
(not (or (memq (char-after) (list ?\n ?\s ?\t))
(eobp))))
#'indent-for-tab-command)
((bound-and-true-p yas-minor-mode)
(if (yas--templates-for-key-at-point)

View File

@@ -6,7 +6,7 @@
(package! haml-mode :pin "bf5b6c11b1206759d2b28af48765e04882dd1fc4")
(package! pug-mode :pin "685fd3414d89736bf232f5d1a6bed9e0353b98fe")
(package! slim-mode :pin "3636d18ab1c8b316eea71c4732eb44743e2ded87")
(when (package! web-mode :pin "60ffd878c4371644bd964f00fea38054645e3e47")
(when (package! web-mode :pin "b4b0a857088d12cf254f6a2105c58039f29a0d04")
(when (featurep! :completion company)
(package! company-web :pin "f0cc9187c9c34f72ad71f5649a69c74f996bae9a")))
@@ -17,7 +17,7 @@
(package! sass-mode :pin "247a0d4b509f10b28e4687cd8763492bca03599b")
(package! stylus-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e")
(package! sws-mode :pin "4dbde92542fc7ad61df38776980905a4721d642e")
(package! rainbow-mode :pin "f780ddb18c2a73a666d093f606df92058e5601ea")
(package! rainbow-mode :pin "fdff98b12e62df7a6dbb009321430c90a47bb89b")
(when (featurep! :completion ivy)
(package! counsel-css :pin "6427dfcbda0d2bbd81db03f9d6b56b06c260ac02"))
(when (featurep! :completion helm)