Merge remote-tracking branch 'upstream/develop' into develop
merge upsteam
This commit is contained in:
commit
d5d241b36e
125 changed files with 1272 additions and 879 deletions
|
@ -86,6 +86,11 @@ This module requires:
|
|||
| =<localleader> n N= | =cider-browse-ns-all= |
|
||||
| =<localleader> n n= | =cider-browse-ns= |
|
||||
| =<localleader> n r= | =cider-ns-refresh= |
|
||||
| =<localleader> p d= | =cider-pprint-eval-defun-at-point= |
|
||||
| =<localleader> p D= | =cider-pprint-eval-defun-to-comment= |
|
||||
| =<localleader> p p= | =cider-pprint-eval-last-sexp= |
|
||||
| =<localleader> p P= | =cider-pprint-eval-last-sexp-to-comment= |
|
||||
| =<localleader> p r= | =cider-pprint-eval-last-sexp-to-repl= |
|
||||
| =<localleader> r B= | =+clojure/cider-switch-to-repl-buffer-and-switch-ns= |
|
||||
| =<localleader> r L= | =cider-load-buffer-and-switch-to-repl-buffer= |
|
||||
| =<localleader> r R= | =cider-restart= |
|
||||
|
|
|
@ -126,6 +126,12 @@
|
|||
"n" #'cider-browse-ns
|
||||
"N" #'cider-browse-ns-all
|
||||
"r" #'cider-ns-refresh)
|
||||
(:prefix ("p" . "print")
|
||||
"p" #'cider-pprint-eval-last-sexp
|
||||
"P" #'cider-pprint-eval-last-sexp-to-comment
|
||||
"d" #'cider-pprint-eval-defun-at-point
|
||||
"D" #'cider-pprint-eval-defun-to-comment
|
||||
"r" #'cider-pprint-eval-last-sexp-to-repl)
|
||||
(:prefix ("r" . "repl")
|
||||
"n" #'cider-repl-set-ns
|
||||
"q" #'cider-quit
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
;;; lang/clojure/packages.el
|
||||
|
||||
(package! clojure-mode :pin "53ef8ac076ae7811627fbdd408e519ab7fca9a0b")
|
||||
(package! cider :pin "ef47c1de151c212b8d2ddeb9af6c8b0dfc0e300f")
|
||||
(package! clj-refactor :pin "6db85b37b57497b56d97d5e5512160e5db85f798")
|
||||
(package! cider :pin "1a34f893e1fe81982fb5099192122a72ee8e94ea")
|
||||
(package! clj-refactor :pin "9dcc50da7ce6f3c10276c87f09022e80c03e8bef")
|
||||
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-clj-kondo :pin "a558bda44c4cb65b69fa53df233e8941ebd195c5"))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;;; lang/common-lisp/doctor.el -*- lexical-binding: t; -*-
|
||||
|
||||
(when (require 'sly nil t)
|
||||
(unless (executable-find inferior-lisp-program)
|
||||
(warn! "Couldn't find your `inferior-lisp-program' (%s). Is it installed?"
|
||||
inferior-lisp-program)))
|
||||
(let ((prog-name (car (split-string inferior-lisp-program))))
|
||||
(unless (executable-find prog-name)
|
||||
(warn! "Couldn't find your `inferior-lisp-program' (%s). Is it installed?"
|
||||
inferior-lisp-program))))
|
||||
|
|
|
@ -7,6 +7,26 @@
|
|||
(set-rotate-patterns! 'csharp-mode
|
||||
:symbols '(("public" "protected" "private")
|
||||
("class" "struct")))
|
||||
(set-ligatures! 'csharp-mode
|
||||
;; Functional
|
||||
:lambda "() =>"
|
||||
;; Types
|
||||
:null "null"
|
||||
:true "true"
|
||||
:false "false"
|
||||
:int "int"
|
||||
:float "float"
|
||||
:str "string"
|
||||
:bool "bool"
|
||||
:list "List"
|
||||
;; Flow
|
||||
:not "!"
|
||||
:in "in"
|
||||
:and "&&"
|
||||
:or "||"
|
||||
:for "for"
|
||||
:return "return"
|
||||
:yield "yield")
|
||||
|
||||
(sp-local-pair 'csharp-mode "<" ">"
|
||||
:when '(+csharp-sp-point-in-type-p)
|
||||
|
|
|
@ -61,7 +61,9 @@ to a pop up buffer."
|
|||
(defun +emacs-lisp-lookup-definition (_thing)
|
||||
"Lookup definition of THING."
|
||||
(if-let (module (+emacs-lisp--module-at-point))
|
||||
(doom/help-modules (car module) (cadr module) 'visit-dir)
|
||||
;; FIXME: this is probably a bug in `counsel'. See
|
||||
;; https://github.com/abo-abo/swiper/pull/2752.
|
||||
(progn (doom/help-modules (car module) (cadr module) 'visit-dir) 'deferred)
|
||||
(call-interactively #'elisp-def)))
|
||||
|
||||
;;;###autoload
|
||||
|
|
|
@ -99,15 +99,17 @@ employed so that flycheck still does *some* helpful linting.")
|
|||
"Display variable value next to documentation in eldoc."
|
||||
:around #'elisp-get-var-docstring
|
||||
(when-let (ret (funcall orig-fn sym))
|
||||
(concat ret " "
|
||||
(let* ((truncated " [...]")
|
||||
(print-escape-newlines t)
|
||||
(str (symbol-value sym))
|
||||
(str (prin1-to-string str))
|
||||
(limit (- (frame-width) (length ret) (length truncated) 1)))
|
||||
(format (format "%%0.%ds%%s" (max limit 0))
|
||||
(propertize str 'face 'warning)
|
||||
(if (< (length str) limit) "" truncated))))))
|
||||
(if (fboundp sym)
|
||||
(concat ret " "
|
||||
(let* ((truncated " [...]")
|
||||
(print-escape-newlines t)
|
||||
(str (symbol-value sym))
|
||||
(str (prin1-to-string str))
|
||||
(limit (- (frame-width) (length ret) (length truncated) 1)))
|
||||
(format (format "%%0.%ds%%s" (max limit 0))
|
||||
(propertize str 'face 'warning)
|
||||
(if (< (length str) limit) "" truncated))))
|
||||
ret)))
|
||||
|
||||
(map! :localleader
|
||||
:map emacs-lisp-mode-map
|
||||
|
@ -181,12 +183,12 @@ employed so that flycheck still does *some* helpful linting.")
|
|||
"Add Doom's own demos to help buffers."
|
||||
:around #'elisp-demos--search
|
||||
(or (funcall orig-fn symbol)
|
||||
(when-let (demos-file (doom-glob doom-docs-dir "api.org"))
|
||||
(when-let (demos-file (doom-module-locate-path :lang 'emacs-lisp "demos.org"))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents demos-file)
|
||||
(goto-char (point-min))
|
||||
(when (re-search-forward
|
||||
(format "^\\*\\*\\* %s$" (regexp-quote (symbol-name symbol)))
|
||||
(format "^\\*\\* %s$" (regexp-quote (symbol-name symbol)))
|
||||
nil t)
|
||||
(let (beg end)
|
||||
(forward-line 1)
|
||||
|
|
537
modules/lang/emacs-lisp/demos.org
Normal file
537
modules/lang/emacs-lisp/demos.org
Normal file
|
@ -0,0 +1,537 @@
|
|||
#+TITLE: API Demos
|
||||
#+PROPERTY: header-args:elisp :results pp
|
||||
|
||||
This file contains demos of Doom's public API; its core library, macros, and
|
||||
autodefs. It is used by the =elisp-demos= package to display examples of their
|
||||
usage from their documentation (e.g. =SPC h f add-hook\!=).
|
||||
|
||||
* Table of Contents :TOC_3:
|
||||
- [[#core-lib][core-lib]]
|
||||
- [[#add-hook][add-hook!]]
|
||||
- [[#add-transient-hook][add-transient-hook!]]
|
||||
- [[#after][after!]]
|
||||
- [[#appendq][appendq!]]
|
||||
- [[#custom-set-faces][custom-set-faces!]]
|
||||
- [[#custom-theme-set-faces][custom-theme-set-faces!]]
|
||||
- [[#defer-feature][defer-feature!]]
|
||||
- [[#defer-until][defer-until!]]
|
||||
- [[#disable-packages][disable-packages!]]
|
||||
- [[#doom][doom!]]
|
||||
- [[#file-exists-p][file-exists-p!]]
|
||||
- [[#cmd][cmd!]]
|
||||
- [[#cmd-1][cmd!!]]
|
||||
- [[#cmds][cmds!]]
|
||||
- [[#kbd][kbd!]]
|
||||
- [[#letenv][letenv!]]
|
||||
- [[#load][load!]]
|
||||
- [[#map][map!]]
|
||||
- [[#package][package!]]
|
||||
- [[#pushnew][pushnew!]]
|
||||
- [[#prependq][prependq!]]
|
||||
- [[#quiet][quiet!]]
|
||||
- [[#remove-hook][remove-hook!]]
|
||||
- [[#setq][setq!]]
|
||||
- [[#setq-hook][setq-hook!]]
|
||||
- [[#unsetq-hook][unsetq-hook!]]
|
||||
- [[#use-package][use-package!]]
|
||||
|
||||
* core-lib
|
||||
** add-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; With only one hook and one function, this is identical to `add-hook'. In that
|
||||
;; case, use that instead.
|
||||
(add-hook! 'some-mode-hook #'enable-something)
|
||||
|
||||
;; Adding many-to-many functions to hooks
|
||||
(add-hook! some-mode #'enable-something #'and-another)
|
||||
(add-hook! some-mode #'(enable-something and-another))
|
||||
(add-hook! '(one-mode-hook second-mode-hook) #'enable-something)
|
||||
(add-hook! (one-mode second-mode) #'enable-something)
|
||||
|
||||
;; Appending and local hooks
|
||||
(add-hook! (one-mode second-mode) :append #'enable-something)
|
||||
(add-hook! (one-mode second-mode) :local #'enable-something)
|
||||
|
||||
;; With arbitrary forms
|
||||
(add-hook! (one-mode second-mode) (setq v 5) (setq a 2))
|
||||
(add-hook! (one-mode second-mode) :append :local (setq v 5) (setq a 2))
|
||||
|
||||
;; Inline named hook functions
|
||||
(add-hook! '(one-mode-hook second-mode-hook)
|
||||
(defun do-something ()
|
||||
...)
|
||||
(defun do-another-thing ()
|
||||
...))
|
||||
#+END_SRC
|
||||
|
||||
** TODO add-transient-hook!
|
||||
** after!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;;; `after!' will take:
|
||||
|
||||
;; An unquoted package symbol (the name of a package)
|
||||
(after! helm ...)
|
||||
|
||||
;; An unquoted list of package symbols (i.e. BODY is evaluated once both magit
|
||||
;; and git-gutter have loaded)
|
||||
(after! (magit git-gutter) ...)
|
||||
|
||||
;; An unquoted, nested list of compound package lists, using any combination of
|
||||
;; :or/:any and :and/:all
|
||||
(after! (:or package-a package-b ...) ...)
|
||||
(after! (:and package-a package-b ...) ...)
|
||||
(after! (:and package-a (:or package-b package-c) ...) ...)
|
||||
;; (Without :or/:any/:and/:all, :and/:all are implied.)
|
||||
|
||||
;; A common mistake is to pass it the names of major or minor modes, e.g.
|
||||
(after! rustic-mode ...)
|
||||
(after! python-mode ...)
|
||||
;; But the code in them will never run! rustic-mode is in the `rustic' package
|
||||
;; and python-mode is in the `python' package. This is what you want:
|
||||
(after! rustic ...)
|
||||
(after! python ...)
|
||||
#+END_SRC
|
||||
** appendq!
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c)))
|
||||
(appendq! x '(c d e))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (a b c c d e)
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c))
|
||||
(y '(c d e))
|
||||
(z '(f g)))
|
||||
(appendq! x y z '(h))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (a b c c d e f g h)
|
||||
|
||||
** custom-set-faces!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(custom-set-faces!
|
||||
'(outline-1 :weight normal)
|
||||
'(outline-2 :weight normal)
|
||||
'(outline-3 :weight normal)
|
||||
'(outline-4 :weight normal)
|
||||
'(outline-5 :weight normal)
|
||||
'(outline-6 :weight normal)
|
||||
'(default :background "red" :weight bold)
|
||||
'(region :background "red" :weight bold))
|
||||
|
||||
(custom-set-faces!
|
||||
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
|
||||
:weight normal)
|
||||
'((default region)
|
||||
:background "red" :weight bold))
|
||||
|
||||
(let ((red-bg-faces '(default region)))
|
||||
(custom-set-faces!
|
||||
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
|
||||
:weight normal)
|
||||
`(,red-bg-faces
|
||||
:background "red" :weight bold)))
|
||||
|
||||
;; If you want to make use of the `doom-themes' package API (e.g. `doom-color',
|
||||
;; `doom-lighten', `doom-darken', etc.), you must use `custom-set-faces!'
|
||||
;; *after* the theme has been loaded. e.g.
|
||||
(load-theme 'doom-one t)
|
||||
(custom-set-faces!
|
||||
`(outline-1 :foreground ,(doom-color 'red))
|
||||
`(outline-2 :background ,(doom-color 'blue)))
|
||||
#+END_SRC
|
||||
|
||||
** custom-theme-set-faces!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(custom-theme-set-faces! 'doom-one
|
||||
'(outline-1 :weight normal)
|
||||
'(outline-2 :weight normal)
|
||||
'(outline-3 :weight normal)
|
||||
'(outline-4 :weight normal)
|
||||
'(outline-5 :weight normal)
|
||||
'(outline-6 :weight normal)
|
||||
'(default :background "red" :weight bold)
|
||||
'(region :background "red" :weight bold))
|
||||
|
||||
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
|
||||
'((outline-1 outline-2 outline-3 outline-4 outline-5 outline-6)
|
||||
:weight normal)
|
||||
'((default region)
|
||||
:background "red" :weight bold))
|
||||
|
||||
(let ((red-bg-faces '(default region)))
|
||||
(custom-theme-set-faces! '(doom-one-theme doom-one-light-theme)
|
||||
`(,(cl-loop for i from 0 to 6 collect (intern (format "outline-%d" i)))
|
||||
:weight normal)
|
||||
`(,red-bg-faces
|
||||
:background "red" :weight bold)))
|
||||
|
||||
;; If you want to make use of the `doom-themes' package API (e.g. `doom-color',
|
||||
;; `doom-lighten', `doom-darken', etc.), you must use `custom-set-faces!'
|
||||
;; *after* the theme has been loaded. e.g.
|
||||
(load-theme 'doom-one t)
|
||||
(custom-theme-set-faces! 'doom-one
|
||||
`(outline-1 :foreground ,(doom-color 'red))
|
||||
`(outline-2 :background ,(doom-color 'blue)))
|
||||
#+END_SRC
|
||||
|
||||
** TODO defer-feature!
|
||||
** TODO defer-until!
|
||||
** disable-packages!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Disable packages enabled by DOOM
|
||||
(disable-packages! some-package second-package)
|
||||
#+END_SRC
|
||||
|
||||
** doom!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(doom! :completion
|
||||
company
|
||||
ivy
|
||||
;;helm
|
||||
|
||||
:tools
|
||||
(:if IS-MAC macos)
|
||||
docker
|
||||
lsp
|
||||
|
||||
:lang
|
||||
(cc +lsp)
|
||||
(:cond ((string= system-name "work-pc")
|
||||
python
|
||||
rust
|
||||
web)
|
||||
((string= system-name "writing-pc")
|
||||
(org +dragndrop)
|
||||
ruby))
|
||||
(:if IS-LINUX
|
||||
(web +lsp)
|
||||
web)
|
||||
|
||||
:config
|
||||
literate
|
||||
(default +bindings +smartparens))
|
||||
#+END_SRC
|
||||
|
||||
** file-exists-p!
|
||||
#+BEGIN_SRC elisp
|
||||
(file-exists-p! "init.el" doom-emacs-dir)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: /home/hlissner/.emacs.d/init.el
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(file-exists-p! (and (or "doesnotexist" "init.el")
|
||||
"LICENSE")
|
||||
doom-emacs-dir)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: /home/hlissner/.emacs.d/LICENSE
|
||||
|
||||
** cmd!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! "C-j" (cmd! (newline) (indent-according-to-mode)))
|
||||
#+END_SRC
|
||||
|
||||
** cmd!!
|
||||
When ~newline~ is passed a numerical prefix argument (=C-u 5 M-x newline=), it
|
||||
inserts N newlines. We can use ~cmd!!~ to easily create a keybinds that bakes in
|
||||
the prefix arg into the command call:
|
||||
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! "C-j" (cmd!! #'newline 5))
|
||||
#+END_SRC
|
||||
|
||||
Or to create aliases for functions that behave differently:
|
||||
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(fset 'insert-5-newlines (cmd!! #'newline 5))
|
||||
|
||||
;; The equivalent of C-u M-x org-global-cycle, which resets the org document to
|
||||
;; its startup visibility settings.
|
||||
(fset 'org-reset-global-visibility (cmd!! #'org-global-cycle '(4))
|
||||
#+END_SRC
|
||||
|
||||
** cmds!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! :i [tab] (cmds! (and (featurep! :editor snippets)
|
||||
(bound-and-true-p yas-minor-mode)
|
||||
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
||||
#'yas-expand
|
||||
(featurep! :completion company +tng)
|
||||
#'company-indent-or-complete-common)
|
||||
:m [tab] (cmds! (and (bound-and-true-p yas-minor-mode)
|
||||
(evil-visual-state-p)
|
||||
(or (eq evil-visual-selection 'line)
|
||||
(not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\))))))
|
||||
#'yas-insert-snippet
|
||||
(and (featurep! :editor fold)
|
||||
(save-excursion (end-of-line) (invisible-p (point))))
|
||||
#'+fold/toggle
|
||||
(fboundp 'evil-jump-item)
|
||||
#'evil-jump-item))
|
||||
#+END_SRC
|
||||
|
||||
** kbd!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! "," (kbd! "SPC")
|
||||
";" (kbd! ":"))
|
||||
#+END_SRC
|
||||
|
||||
** letenv!
|
||||
#+BEGIN_SRC elisp
|
||||
(letenv! (("SHELL" "/bin/sh"))
|
||||
(shell-command-to-string "echo $SHELL"))
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: "/bin/sh\n"
|
||||
|
||||
** load!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;;; Lets say we're in ~/.doom.d/config.el
|
||||
(load! "lisp/module") ; loads ~/.doom.d/lisp/module.el
|
||||
(load! "somefile" doom-emacs-dir) ; loads ~/.emacs.d/somefile.el
|
||||
(load! "anotherfile" doom-private-dir) ; loads ~/.doom.d/anotherfile.el
|
||||
|
||||
;; If you don't want a `load!' call to throw an error if the file doesn't exist:
|
||||
(load! "~/.maynotexist" nil t)
|
||||
#+END_SRC
|
||||
|
||||
** map!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(map! :map magit-mode-map
|
||||
:m "C-r" 'do-something ; C-r in motion state
|
||||
:nv "q" 'magit-mode-quit-window ; q in normal+visual states
|
||||
"C-x C-r" 'a-global-keybind
|
||||
:g "C-x C-r" 'another-global-keybind ; same as above
|
||||
|
||||
(:when IS-MAC
|
||||
:n "M-s" 'some-fn
|
||||
:i "M-o" (cmd! (message "Hi"))))
|
||||
|
||||
(map! (:when (featurep! :completion company) ; Conditional loading
|
||||
:i "C-@" #'+company/complete
|
||||
(:prefix "C-x" ; Use a prefix key
|
||||
:i "C-l" #'+company/whole-lines)))
|
||||
|
||||
(map! (:when (featurep! :lang latex) ; local conditional
|
||||
(:map LaTeX-mode-map
|
||||
:localleader ; Use local leader
|
||||
:desc "View" "v" #'TeX-view)) ; Add which-key description
|
||||
:leader ; Use leader key from now on
|
||||
:desc "Eval expression" ";" #'eval-expression)
|
||||
#+END_SRC
|
||||
|
||||
These are side-by-side comparisons, showing how to bind keys with and without
|
||||
~map!~:
|
||||
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; bind a global key
|
||||
(global-set-key (kbd "C-x y") #'do-something)
|
||||
(map! "C-x y" #'do-something)
|
||||
|
||||
;; bind a key on a keymap
|
||||
(define-key emacs-lisp-mode-map (kbd "C-c p") #'do-something)
|
||||
(map! :map emacs-lisp-mode-map "C-c p" #'do-something)
|
||||
|
||||
;; unbind a key defined elsewhere
|
||||
(define-key lua-mode-map (kbd "SPC m b") nil)
|
||||
(map! :map lua-mode-map "SPC m b" nil)
|
||||
|
||||
;; bind multiple keys
|
||||
(global-set-key (kbd "C-x x") #'do-something)
|
||||
(global-set-key (kbd "C-x y") #'do-something-else)
|
||||
(global-set-key (kbd "C-x z") #'do-another-thing)
|
||||
(map! "C-x x" #'do-something
|
||||
"C-x y" #'do-something-else
|
||||
"C-x z" #'do-another-thing)
|
||||
|
||||
;; bind global keys in normal mode
|
||||
(evil-define-key* 'normal 'global
|
||||
(kbd "C-x x") #'do-something
|
||||
(kbd "C-x y") #'do-something-else
|
||||
(kbd "C-x z") #'do-another-thing)
|
||||
(map! :n "C-x x" #'do-something
|
||||
:n "C-x y" #'do-something-else
|
||||
:n "C-x z" #'do-another-thing)
|
||||
|
||||
;; or on a deferred keymap
|
||||
(evil-define-key 'normal emacs-lisp-mode-map
|
||||
(kbd "C-x x") #'do-something
|
||||
(kbd "C-x y") #'do-something-else
|
||||
(kbd "C-x z") #'do-another-thing)
|
||||
(map! :map emacs-lisp-mode-map
|
||||
:n "C-x x" #'do-something
|
||||
:n "C-x y" #'do-something-else
|
||||
:n "C-x z" #'do-another-thing)
|
||||
|
||||
;; or multiple maps
|
||||
(dolist (map (list emacs-lisp-mode go-mode-map ivy-minibuffer-map))
|
||||
(evil-define-key '(normal insert) map
|
||||
"a" #'a
|
||||
"b" #'b
|
||||
"c" #'c))
|
||||
(map! :map (emacs-lisp-mode go-mode-map ivy-minibuffer-map)
|
||||
:ni "a" #'a
|
||||
:ni "b" #'b
|
||||
:ni "c" #'c)
|
||||
|
||||
;; or in multiple states (order of states doesn't matter)
|
||||
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
|
||||
(evil-define-key* 'insert emacs-lisp-mode-map (kbd "C-x x") #'do-something-else)
|
||||
(evil-define-key* '(visual normal insert emacs) emacs-lisp-mode-map (kbd "C-x z") #'do-another-thing)
|
||||
(map! :map emacs-lisp-mode
|
||||
:nv "C-x x" #'do-something ; normal+visual
|
||||
:i "C-x y" #'do-something-else ; insert
|
||||
:vnie "C-x z" #'do-another-thing) ; visual+normal+insert+emacs
|
||||
|
||||
;; You can nest map! calls:
|
||||
(evil-define-key* '(normal visual) emacs-lisp-mode-map (kbd "C-x x") #'do-something)
|
||||
(evil-define-key* 'normal go-lisp-mode-map (kbd "C-x x") #'do-something-else)
|
||||
(map! (:map emacs-lisp-mode :nv "C-x x" #'do-something)
|
||||
(:map go-lisp-mode :n "C-x x" #'do-something-else))
|
||||
#+END_SRC
|
||||
|
||||
** package!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; To install a package that can be found on ELPA or any of the sources
|
||||
;; specified in `straight-recipe-repositories':
|
||||
(package! evil)
|
||||
(package! js2-mode)
|
||||
(package! rainbow-delimiters)
|
||||
|
||||
;; To disable a package included with Doom (which will no-op all its `after!'
|
||||
;; and `use-package!' blocks):
|
||||
(package! evil :disable t)
|
||||
(package! rainbow-delimiters :disable t)
|
||||
|
||||
;; To install a package from a github repo
|
||||
(package! so-long :recipe (:host github :repo "hlissner/emacs-so-long"))
|
||||
|
||||
;; If a package is particularly big and comes with submodules you don't need,
|
||||
;; you can tell the package manager not to clone the repo recursively:
|
||||
(package! ansible :recipe (:nonrecursive t))
|
||||
|
||||
;; To pin a package to a specific commit:
|
||||
(package! evil :pin "e7bc39de2f9")
|
||||
;; ...or branch:
|
||||
(package! evil :recipe (:branch "stable"))
|
||||
;; To unpin a pinned package:
|
||||
(package! evil :pin nil)
|
||||
|
||||
;; If you share your config between two computers, and don't want bin/doom
|
||||
;; refresh to delete packages used only on one system, use :ignore
|
||||
(package! evil :ignore (not (equal system-name "my-desktop")))
|
||||
#+END_SRC
|
||||
|
||||
** pushnew!
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((list '(a b c)))
|
||||
(pushnew! list 'c 'd 'e)
|
||||
list)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (e d a b c)
|
||||
|
||||
** prependq!
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c)))
|
||||
(prependq! x '(c d e))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (c d e a b c)
|
||||
|
||||
#+BEGIN_SRC elisp
|
||||
(let ((x '(a b c))
|
||||
(y '(c d e))
|
||||
(z '(f g)))
|
||||
(prependq! x y z '(h))
|
||||
x)
|
||||
#+END_SRC
|
||||
|
||||
#+RESULTS:
|
||||
: (c d e f g h a b c)
|
||||
|
||||
** quiet!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Enters recentf-mode without extra output
|
||||
(quiet! (recentf-mode +1))
|
||||
#+END_SRC
|
||||
** remove-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; With only one hook and one function, this is identical to `remove-hook'. In
|
||||
;; that case, use that instead.
|
||||
(remove-hook! 'some-mode-hook #'enable-something)
|
||||
|
||||
;; Removing N functions from M hooks
|
||||
(remove-hook! some-mode #'enable-something #'and-another)
|
||||
(remove-hook! some-mode #'(enable-something and-another))
|
||||
(remove-hook! '(one-mode-hook second-mode-hook) #'enable-something)
|
||||
(remove-hook! (one-mode second-mode) #'enable-something)
|
||||
|
||||
;; Removing buffer-local hooks
|
||||
(remove-hook! (one-mode second-mode) :local #'enable-something)
|
||||
|
||||
;; Removing arbitrary forms (must be exactly the same as the definition)
|
||||
(remove-hook! (one-mode second-mode) (setq v 5) (setq a 2))
|
||||
#+END_SRC
|
||||
** setq!
|
||||
#+BEGIN_SRC elisp
|
||||
;; Each of these have a setter associated with them, which must be triggered in
|
||||
;; order for their new values to have an effect.
|
||||
(setq! evil-want-Y-yank-to-eol nil
|
||||
evil-want-C-u-scroll nil
|
||||
evil-want-C-d-scroll nil)
|
||||
#+END_SRC
|
||||
** setq-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Set multiple variables after a hook
|
||||
(setq-hook! 'markdown-mode-hook
|
||||
line-spacing 2
|
||||
fill-column 80)
|
||||
|
||||
;; Set variables after multiple hooks
|
||||
(setq-hook! '(eshell-mode-hook term-mode-hook)
|
||||
hscroll-margin 0)
|
||||
#+END_SRC
|
||||
|
||||
** unsetq-hook!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
(unsetq-hook! 'markdown-mode-hook line-spacing)
|
||||
|
||||
;; Removes the following variable hook
|
||||
(setq-hook! 'markdown-mode-hook line-spacing 2)
|
||||
|
||||
;; Removing N variables from M hooks
|
||||
(unsetq-hook! some-mode enable-something and-another)
|
||||
(unsetq-hook! some-mode (enable-something and-another))
|
||||
(unsetq-hook! '(one-mode-hook second-mode-hook) enable-something)
|
||||
(unsetq-hook! (one-mode second-mode) enable-something)
|
||||
#+END_SRC
|
||||
|
||||
** use-package!
|
||||
#+BEGIN_SRC elisp :eval no
|
||||
;; Use after-call to load package before hook
|
||||
(use-package! projectile
|
||||
:after-call (pre-command-hook after-find-file dired-before-readin-hook))
|
||||
|
||||
;; defer recentf packages one by one
|
||||
(use-package! recentf
|
||||
:defer-incrementally easymenu tree-widget timer
|
||||
:after-call after-find-file)
|
||||
|
||||
;; This is equivalent to :defer-incrementally (abc)
|
||||
(use-package! abc
|
||||
:defer-incrementally t)
|
||||
#+END_SRC
|
|
@ -31,9 +31,9 @@ This module adds [[https://fsharp.org/][F#]] support.
|
|||
** Module Flags
|
||||
+ =+lsp= Enables lsp-fsharp (this requires ~:tools lsp~ to be enabled).
|
||||
** Plugins
|
||||
+ [[https://github.com/fsharp/emacs-fsharp-mod+e][fsharp-mode]]
|
||||
+ [[https://github.com/fsharp/emacs-fsharp-mode][fsharp-mode]]
|
||||
+ =+lsp=
|
||||
+ [[https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-fsharp.el][lsp-fsharp]]
|
||||
+ [[https://github.com/emacs-lsp/lsp-mode/blob/master/clients/lsp-fsharp.el][lsp-fsharp]]
|
||||
** Hacks
|
||||
None so far.
|
||||
|
||||
|
@ -47,7 +47,7 @@ Do *NOT* install mono via brew. See this [[https://github.com/fsharp/FsAutoCompl
|
|||
sudo pacman -S mono
|
||||
#+END_SRC
|
||||
** LSP
|
||||
The language server is automatically installed by [[https://github.com/emacs-lsp/lsp-mode/blob/master/lsp-fsharp.el][lsp-fsharp]].
|
||||
The language server is automatically installed by [[https://github.com/emacs-lsp/lsp-mode/blob/master/clients/lsp-fsharp.el][lsp-fsharp]].
|
||||
* Features
|
||||
An in-depth list of features, how to use them, and their dependencies.
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
;; Major modes
|
||||
(package! coffee-mode :pin "35a41c7d8233eac0b267d9593e67fb8b6235e134")
|
||||
(package! js2-mode :pin "ffb70990c1a4d4616034cb810b4ce36953aecb47")
|
||||
(package! js2-mode :pin "f7816bdd3e8e84ed1d64b6a13c9ba488363b7e91")
|
||||
(package! rjsx-mode :pin "b697fe4d92cc84fa99a7bcb476f815935ea0d919")
|
||||
(package! typescript-mode :pin "54f14c482701c4f937bf51469f70812624e07f87")
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
(set-repl-handler! 'julia-mode #'+julia/open-repl)
|
||||
|
||||
;; Borrow matlab.el's fontification of math operators. From
|
||||
;; <https://ogbe.net/emacsconfig.html>
|
||||
;; <https://web.archive.org/web/20170326183805/https://ogbe.net/emacsconfig.html>
|
||||
(dolist (mode '(julia-mode ess-julia-mode))
|
||||
(font-lock-add-keywords
|
||||
mode
|
||||
|
|
|
@ -39,19 +39,28 @@ This module has no dedicated maintainers.
|
|||
|
||||
* Prerequisites
|
||||
** Language Server Protocol servers
|
||||
Currently the servers supported depend on the =:tools lsp= flavor you are using
|
||||
LSP server support depends on which flavor of the =:tools lsp= module you have
|
||||
installed (Eglot or LSP-mode).
|
||||
|
||||
*** LSP-mode
|
||||
This server is built in Java, so a ~java~ environment will be necessary
|
||||
+ [[https://github.com/EmmyLua/EmmyLua-LanguageServer][EmmyLua-LanguageServer]] must be installed and configured to use the
|
||||
configuration provided by emacs-lsp.
|
||||
Three servers are supported, ordered from highest to lowest priority:
|
||||
|
||||
+ [[https://github.com/EmmyLua/EmmyLua-LanguageServer][EmmyLua-LanguageServer]] :: Must be in =~/.emacs.d/.local/etc/lsp/EmmyLua-LS-all.jar=. See ~lsp-clients-emmy-lua-jar-path~ variable to change this.
|
||||
+ [[https://github.com/sumneko/lua-language-server][Sumneko language server]] (lua-language-server) :: Must be in
|
||||
=~/.config/emacs/.local/etc/lsp/lua-language-server/=. See
|
||||
~lsp-clients-lua-language-server-bin~ variable to change this.
|
||||
+ [[https://github.com/Alloyed/lua-lsp][lua-lsp]] :: Must be available in =~/.luarocks/bin/lua-lsp=. See
|
||||
~lsp-clients-lua-lsp-server-install-dir~ variable to change this.
|
||||
|
||||
[[https://emacs-lsp.github.io/lsp-mode/page/lsp-emmy-lua/][LSP-mode documentation]] has more information about setting up the server and the
|
||||
configuration variables correctly (use a bare ~(setq
|
||||
lsp-clients-emmy-lua-java-path value)~ in your =config.el=)
|
||||
configuration variables correctly.
|
||||
|
||||
*** Eglot
|
||||
This server is built in Lua, so a =lua= environment will be necessary
|
||||
+ [[https://github.com/sumneko/lua-language-server][lua-language-server]] must be installed and built locally, with =+lua-lsp-dir=
|
||||
variable pointing to the root of the repository
|
||||
Eglot currently only supports one of the above servers out of the box:
|
||||
|
||||
+ [[https://github.com/sumneko/lua-language-server][Sumneko language server]] (lua-language-server) :: Must be in
|
||||
=~/.config/emacs/.local/etc/lsp/lua-language-server/=. See
|
||||
~+lua-lsp-dir~ variable to change this.
|
||||
|
||||
* TODO Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
;;; lang/lua/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
(defvar +lua-lsp-dir (concat doom-etc-dir "lsp/lua-language-server/")
|
||||
"Absolute path to the directory of sumneko's lua-language-server.
|
||||
|
||||
This directory MUST contain the 'main.lua' file and be the in-source build of
|
||||
lua-language-server.")
|
||||
|
||||
;; sp's default rules are obnoxious, so disable them
|
||||
(provide 'smartparens-lua)
|
||||
|
||||
|
@ -25,27 +19,29 @@ lua-language-server.")
|
|||
(set-company-backend! 'lua-mode '(company-lua company-yasnippet))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(defun +lua-generate-lsp-server-command ()
|
||||
;; The absolute path to lua-language-server binary is necessary because
|
||||
;; the bundled dependencies aren't found otherwise. The only reason this
|
||||
;; is a function is to dynamically change when/if `+lua-lsp-dir' does
|
||||
(list (doom-path +lua-lsp-dir
|
||||
(cond (IS-MAC "bin/macOS")
|
||||
(IS-LINUX "bin/Linux")
|
||||
(IS-WINDOWS "bin/Windows"))
|
||||
"lua-language-server")
|
||||
"-E" "-e" "LANG=en"
|
||||
(doom-path +lua-lsp-dir "main.lua")))
|
||||
(add-hook 'lua-mode-local-vars-hook #'lsp!)
|
||||
|
||||
(if (featurep! :tools lsp +eglot)
|
||||
(set-eglot-client! 'lua-mode (+lua-generate-lsp-server-command))
|
||||
(after! lsp-mode
|
||||
(lsp-register-client
|
||||
(make-lsp-client :new-connection (lsp-stdio-connection '+lua-generate-lsp-server-command)
|
||||
:major-modes '(lua-mode)
|
||||
:priority -1
|
||||
:server-id 'lua-langserver))))
|
||||
(add-hook 'lua-mode-local-vars-hook #'lsp!)))
|
||||
(when (featurep! :tools lsp +eglot)
|
||||
(defvar +lua-lsp-dir (concat doom-etc-dir "lsp/lua-language-server/")
|
||||
"Absolute path to the directory of sumneko's lua-language-server.
|
||||
|
||||
This directory MUST contain the 'main.lua' file and be the in-source build of
|
||||
lua-language-server.")
|
||||
|
||||
(defun +lua-generate-lsp-server-command ()
|
||||
;; The absolute path to lua-language-server binary is necessary because
|
||||
;; the bundled dependencies aren't found otherwise. The only reason this
|
||||
;; is a function is to dynamically change when/if `+lua-lsp-dir' does
|
||||
(list (or (executable-find "lua-language-server")
|
||||
(doom-path +lua-lsp-dir
|
||||
(cond (IS-MAC "bin/macOS")
|
||||
(IS-LINUX "bin/Linux")
|
||||
(IS-WINDOWS "bin/Windows"))
|
||||
"lua-language-server"))
|
||||
"-E" "-e" "LANG=en"
|
||||
(doom-path +lua-lsp-dir "main.lua")))
|
||||
|
||||
(set-eglot-client! 'lua-mode (+lua-generate-lsp-server-command)))))
|
||||
|
||||
|
||||
(use-package! moonscript
|
||||
|
|
|
@ -2,31 +2,37 @@
|
|||
|
||||
;;;###autoload
|
||||
(defun +markdown-flyspell-word-p ()
|
||||
"Return t if `flyspell' should check work before point.
|
||||
"Return t if `flyspell' should check word before point.
|
||||
|
||||
Used for `flyspell-generic-check-word-predicate'. Augments
|
||||
`markdown-flyspell-check-word-p' to:
|
||||
Used for `flyspell-generic-check-word-predicate'. Like
|
||||
`markdown-flyspell-check-word-p', but also:
|
||||
|
||||
a) Do spell check in code comments and
|
||||
b) Inhibit spell check in html markup"
|
||||
(and (markdown-flyspell-check-word-p)
|
||||
(save-excursion
|
||||
(goto-char (1- (point)))
|
||||
(if (or
|
||||
;; Spell check in code comments
|
||||
(not (and (markdown-code-block-at-point-p)
|
||||
(markdown--face-p (point) '(font-lock-comment-face))))
|
||||
;; Don't spell check in html markup
|
||||
(markdown--face-p (point) '(markdown-html-attr-name-face
|
||||
markdown-html-attr-value-face
|
||||
markdown-html-tag-name-face)))
|
||||
(prog1 nil
|
||||
;; If flyspell overlay is put, then remove it
|
||||
(when-let (bounds (bounds-of-thing-at-point 'word))
|
||||
(cl-loop for ov in (overlays-in (car bounds) (cdr bounds))
|
||||
when (overlay-get ov 'flyspell-overlay)
|
||||
do (delete-overlay ov))))
|
||||
t))))
|
||||
a) Performs spell check in code comments and
|
||||
b) Inhibits spell check in html markup"
|
||||
(save-excursion
|
||||
(goto-char (1- (point)))
|
||||
(if (or (and (markdown-code-block-at-point-p)
|
||||
(not (or (markdown-text-property-at-point 'markdown-yaml-metadata-section)
|
||||
(markdown--face-p (point) '(font-lock-comment-face)))))
|
||||
(markdown-inline-code-at-point-p)
|
||||
(markdown-in-comment-p)
|
||||
(markdown--face-p (point) '(markdown-reference-face
|
||||
markdown-markup-face
|
||||
markdown-plain-url-face
|
||||
markdown-inline-code-face
|
||||
markdown-url-face
|
||||
markdown-html-attr-name-face
|
||||
markdown-html-attr-value-face
|
||||
markdown-html-tag-name-face)))
|
||||
(prog1 nil
|
||||
;; If flyspell overlay is put, then remove it
|
||||
(let ((bounds (bounds-of-thing-at-point 'word)))
|
||||
(when bounds
|
||||
(cl-loop for ov in (overlays-in (car bounds) (cdr bounds))
|
||||
when (overlay-get ov 'flyspell-overlay)
|
||||
do
|
||||
(delete-overlay ov)))))
|
||||
t)))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -86,12 +86,35 @@ capture, the end position, and the output buffer.")
|
|||
"p" #'markdown-preview
|
||||
"e" #'markdown-export
|
||||
(:when (featurep! +grip)
|
||||
"p" #'grip-mode)
|
||||
"p" #'grip-mode)
|
||||
(:prefix ("i" . "insert")
|
||||
"t" #'markdown-toc-generate-toc
|
||||
"i" #'markdown-insert-image
|
||||
"l" #'markdown-insert-link)))
|
||||
|
||||
:desc "Table Of Content" "T" #'markdown-toc-generate-toc
|
||||
:desc "Image" "i" #'markdown-insert-image
|
||||
:desc "Link" "l" #'markdown-insert-link
|
||||
:desc "<hr>" "-" #'markdown-insert-hr
|
||||
:desc "Heading 1" "1" #'markdown-insert-header-atx-1
|
||||
:desc "Heading 2" "2" #'markdown-insert-header-atx-2
|
||||
:desc "Heading 3" "3" #'markdown-insert-header-atx-3
|
||||
:desc "Heading 4" "4" #'markdown-insert-header-atx-4
|
||||
:desc "Heading 5" "5" #'markdown-insert-header-atx-5
|
||||
:desc "Heading 6" "6" #'markdown-insert-header-atx-6
|
||||
:desc "Code block" "C" #'markdown-insert-gfm-code-block
|
||||
:desc "Pre region" "P" #'markdown-pre-region
|
||||
:desc "Blockquote region" "Q" #'markdown-blockquote-region
|
||||
:desc "Checkbox" "[" #'markdown-insert-gfm-checkbox
|
||||
:desc "Bold" "b" #'markdown-insert-bold
|
||||
:desc "Inline code" "c" #'markdown-insert-code
|
||||
:desc "Italic" "e" #'markdown-insert-italic
|
||||
:desc "Footnote" "f" #'markdown-insert-footnote
|
||||
:desc "Header dwim" "h" #'markdown-insert-header-dwim
|
||||
:desc "Italic" "i" #'markdown-insert-italic
|
||||
:desc "Kbd" "k" #'markdown-insert-kbd
|
||||
:desc "Link" "l" #'markdown-insert-link
|
||||
:desc "Pre" "p" #'markdown-insert-pre
|
||||
:desc "New blockquote" "q" #'markdown-insert-blockquote
|
||||
:desc "Strike through" "s" #'markdown-insert-strike-through
|
||||
:desc "Table" "t" #'markdown-insert-table
|
||||
:desc "Wiki link" "w" #'markdown-insert-wiki-link)))
|
||||
|
||||
(use-package! evil-markdown
|
||||
:when (featurep! :editor evil +everywhere)
|
||||
|
|
|
@ -53,7 +53,8 @@
|
|||
(save-excursion
|
||||
(goto-char (point-min))
|
||||
(save-match-data
|
||||
(if (not (re-search-forward "#! *\\(?:cached-\\)?nix-shell +-i +\\([^ \n]+\\)" 256 t))
|
||||
(if (not (and (re-search-forward "\\_<nix-shell " (line-end-position 2) t)
|
||||
(re-search-forward "-i +\"?\\([^ \"\n]+\\)" (line-end-position) t)))
|
||||
(message "Couldn't determine mode for this script")
|
||||
(let* ((interp (match-string 1))
|
||||
(mode
|
||||
|
@ -67,4 +68,8 @@
|
|||
(when mode
|
||||
(prog1 (set-auto-mode-0 mode)
|
||||
(when (eq major-mode 'sh-mode)
|
||||
(sh-set-shell interp)))))))))
|
||||
(sh-set-shell interp))
|
||||
;; HACK Without this, quickrun tries to evaluate code directly
|
||||
;; with (cached)?nix-shell.
|
||||
;; TODO Use the nix-shell/cached-nix-shell-given interpreter
|
||||
(setq-local quickrun-option-shebang nil))))))))
|
||||
|
|
|
@ -10,6 +10,14 @@
|
|||
(use-package! nix-mode
|
||||
:interpreter ("\\(?:cached-\\)?nix-shell" . +nix-shell-init-mode)
|
||||
:mode "\\.nix\\'"
|
||||
:init
|
||||
;; Treat flake.lock files as json. Fall back to js-mode because it's faster
|
||||
;; than js2-mode, and its extra features aren't needed there.
|
||||
(add-to-list 'auto-mode-alist
|
||||
(cons "/flake\\.lock\\'"
|
||||
(if (featurep! :lang json)
|
||||
'json-mode
|
||||
'js-mode)))
|
||||
:config
|
||||
(set-repl-handler! 'nix-mode #'+nix/open-repl)
|
||||
(set-company-backend! 'nix-mode 'company-nixos-options)
|
||||
|
|
|
@ -74,17 +74,17 @@ tools.
|
|||
|
||||
* Appendix
|
||||
** Commands
|
||||
| Command | Key | Description |
|
||||
|------------------------------+-----------+-----------------------------------------------------------|
|
||||
| =merlin-type-enclosing= | =SPC m t= | display type under point |
|
||||
| =tuareg-find-alternate-file= | =SPC m a= | switch between =.ml= and =.mli= |
|
||||
| =merlin-locate= | =gd= | lookup definition |
|
||||
| =merlin-occurences= | =SPC c D= | lookup references |
|
||||
| =merlin-document= | =K= | lookup documentation |
|
||||
| =merlin-imenu= | =SPC / i= | symbol lookup in file |
|
||||
| =merlin-iedit-occurrences= | =v R= | visual refactor identifier under point (multiple cursors) |
|
||||
| =utop= | =SPC o r= | open =utop= as REPL |
|
||||
| =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= |
|
||||
| Command | Key | Description |
|
||||
|------------------------------+-------------------+-----------------------------------------------------------|
|
||||
| =merlin-type-enclosing= | =<localleader> t= | display type under point |
|
||||
| =tuareg-find-alternate-file= | =<localleader> a= | switch between =.ml= and =.mli= |
|
||||
| =merlin-locate= | =g d= | lookup definition |
|
||||
| =merlin-occurences= | =SPC c D= | lookup references |
|
||||
| =merlin-document= | =K= | lookup documentation |
|
||||
| =merlin-imenu= | =SPC s i= | symbol lookup in file |
|
||||
| =merlin-iedit-occurrences= | =v R= | visual refactor identifier under point (multiple cursors) |
|
||||
| =utop= | =SPC o r= | open =utop= as REPL |
|
||||
| =utop-eval-region= | =SPC c e= | evaluate selected region in =utop= |
|
||||
|
||||
** Hacks
|
||||
+ =set-ligatures!= is called with the full tuareg prettify symbol list, this
|
||||
|
|
|
@ -173,6 +173,8 @@ esoteric features:
|
|||
+ To execute babel code blocks, you need whatever dependencies those languages
|
||||
need. It is recommended you enable the associated =:lang= module and ensure
|
||||
its dependencies are met, e.g. install the =ruby= executable for ruby support.
|
||||
To use ~jupyter kernels~ you need the =+jupyter= flag, the associated kernel as
|
||||
well as the ~jupyter~ program.
|
||||
+ =org-roam= (with the =+roam= flag) requires =sqlite3= to be installed.
|
||||
|
||||
** MacOS
|
||||
|
@ -185,6 +187,7 @@ brew install gnuplot
|
|||
#+BEGIN_SRC sh
|
||||
pacman -S texlive-core texlive-bin texlive-science
|
||||
pacman -S gnuplot
|
||||
pacman -S jupyter # required by +jupyter
|
||||
#+END_SRC
|
||||
|
||||
** NixOS
|
||||
|
@ -192,6 +195,8 @@ pacman -S gnuplot
|
|||
environment.systemPackages = with pkgs; [
|
||||
# any less than medium isn't guaranteed to work
|
||||
texlive.combined.scheme-medium
|
||||
# required by +jupyter
|
||||
(python38.withPackages(ps: with ps; [jupyter]))
|
||||
];
|
||||
#+END_SRC
|
||||
|
||||
|
|
|
@ -387,7 +387,8 @@ another level of headings on each invocation."
|
|||
Made for `org-tab-first-hook' in evil-mode."
|
||||
(interactive)
|
||||
(cond ((not (and (bound-and-true-p evil-local-mode)
|
||||
(evil-insert-state-p)))
|
||||
(or (evil-insert-state-p)
|
||||
(evil-emacs-state-p))))
|
||||
nil)
|
||||
((org-at-item-p)
|
||||
(if (eq this-command 'org-shifttab)
|
||||
|
@ -424,7 +425,8 @@ Made for `org-tab-first-hook'."
|
|||
;; 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))
|
||||
(evil-insert-state-p)
|
||||
(evil-emacs-state-p))
|
||||
(yas--templates-for-key-at-point))
|
||||
(yas-expand)
|
||||
t)
|
||||
|
|
|
@ -541,12 +541,6 @@ the exported output (i.e. formatters)."
|
|||
: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
|
||||
;; to be performant.
|
||||
(setq-hook! 'org-mode-hook gcmh-high-cons-threshold (* 2 gcmh-high-cons-threshold))
|
||||
|
||||
(defadvice! +org--recenter-after-follow-link-a (&rest _args)
|
||||
"Recenter after following a link, but only internal or file links."
|
||||
:after '(org-footnote-action
|
||||
|
@ -556,20 +550,14 @@ the exported output (i.e. formatters)."
|
|||
(when (get-buffer-window)
|
||||
(recenter)))
|
||||
|
||||
(defadvice! +org--strip-properties-from-outline-a (orig-fn path &optional width prefix separator)
|
||||
"Remove link syntax and fix variable height text (e.g. org headings) in the
|
||||
eldoc string."
|
||||
(defadvice! +org--strip-properties-from-outline-a (orig-fn &rest args)
|
||||
"Fix variable height faces in eldoc breadcrumbs."
|
||||
:around #'org-format-outline-path
|
||||
(funcall orig-fn
|
||||
(cl-loop for part in path
|
||||
;; Remove full link syntax
|
||||
for fixedpart = (replace-regexp-in-string org-link-any-re "\\4" (or part ""))
|
||||
for n from 0
|
||||
for face = (nth (% n org-n-level-faces) org-level-faces)
|
||||
collect
|
||||
(org-add-props fixedpart
|
||||
nil 'face `(:foreground ,(face-foreground face nil t) :weight bold)))
|
||||
width prefix separator))
|
||||
(let ((org-level-faces
|
||||
(cl-loop for face in org-level-faces
|
||||
collect `(:foreground ,(face-foreground face nil t)
|
||||
:weight bold))))
|
||||
(apply orig-fn args)))
|
||||
|
||||
(after! org-eldoc
|
||||
;; HACK Fix #2972: infinite recursion when eldoc kicks in in 'org' or
|
||||
|
@ -588,8 +576,7 @@ eldoc string."
|
|||
|
||||
(add-hook! 'org-agenda-finalize-hook
|
||||
(defun +org-exclude-agenda-buffers-from-workspace-h ()
|
||||
"Prevent temporary agenda buffers being associated with current
|
||||
workspace."
|
||||
"Don't associate temporary agenda buffers with current workspace."
|
||||
(when (and org-agenda-new-buffers
|
||||
(bound-and-true-p persp-mode)
|
||||
(not org-agenda-sticky))
|
||||
|
@ -598,11 +585,12 @@ workspace."
|
|||
(get-current-persp)
|
||||
nil))))
|
||||
(defun +org-defer-mode-in-agenda-buffers-h ()
|
||||
"Org agenda opens temporary agenda incomplete org-mode buffers.
|
||||
These are great for extracting agenda information from, but what if the user
|
||||
tries to visit one of these buffers? Then we remove it from the to-be-cleaned
|
||||
queue and restart `org-mode' so they can grow up to be full-fledged org-mode
|
||||
buffers."
|
||||
"`org-agenda' opens temporary, incomplete org-mode buffers.
|
||||
I've disabled a lot of org-mode's startup processes for these invisible buffers
|
||||
to speed them up (in `+org--exclude-agenda-buffers-from-recentf-a'). However, if
|
||||
the user tries to visit one of these buffers they'll see a gimped, half-broken
|
||||
org buffer. To avoid that, restart `org-mode' when they're switched to so they
|
||||
can grow up to be fully-fledged org-mode buffers."
|
||||
(dolist (buffer org-agenda-new-buffers)
|
||||
(with-current-buffer buffer
|
||||
(add-hook 'doom-switch-buffer-hook #'+org--restart-mode-h
|
||||
|
@ -612,7 +600,7 @@ buffers."
|
|||
"Prevent temporarily opened agenda buffers from polluting recentf."
|
||||
:around #'org-get-agenda-file-buffer
|
||||
(let ((recentf-exclude (list (lambda (_file) t)))
|
||||
(doom-large-file-p t)
|
||||
(doom-inhibit-large-file-detection t)
|
||||
find-file-hook
|
||||
org-mode-hook)
|
||||
(funcall orig-fn file)))
|
||||
|
@ -1128,7 +1116,9 @@ compelling reason, so..."
|
|||
(run-hooks 'org-load-hook))
|
||||
|
||||
:config
|
||||
(set-company-backend! 'org-mode 'company-capf 'company-dabbrev)
|
||||
(add-to-list 'doom-debug-variables 'org-export-async-debug)
|
||||
|
||||
(set-company-backend! 'org-mode 'company-capf)
|
||||
(set-eval-handler! 'org-mode #'+org-eval-handler)
|
||||
(set-lookup-handlers! 'org-mode
|
||||
:definition #'+org-lookup-definition-handler
|
||||
|
|
|
@ -45,6 +45,8 @@
|
|||
|
||||
(set-popup-rule! "^\\*Org-journal search" :select t :quit t)
|
||||
|
||||
(set-company-backend! 'org-journal-mode 'company-capf 'company-dabbrev)
|
||||
|
||||
(map! (:map org-journal-mode-map
|
||||
:n "]f" #'org-journal-next-entry
|
||||
:n "[f" #'org-journal-previous-entry
|
||||
|
|
|
@ -21,4 +21,5 @@
|
|||
|
||||
(use-package! org-fancy-priorities ; priority icons
|
||||
:hook (org-mode . org-fancy-priorities-mode)
|
||||
:hook (org-agenda-mode . org-fancy-priorities-mode)
|
||||
:config (setq org-fancy-priorities-list '("⚑" "⬆" "■")))
|
||||
|
|
|
@ -9,4 +9,20 @@
|
|||
(unless (executable-find "sqlite3")
|
||||
(warn! "Couldn't find the sqlite3 executable. org-roam will not work."))
|
||||
(unless (executable-find "dot")
|
||||
(warn! "Couldn't find the dot executable (from graphviz). org-roam will not be able to generate graph visuallizations.")))
|
||||
(warn! "Couldn't find the dot executable (from graphviz). org-roam will not be able to generate graph visualizations.")))
|
||||
|
||||
(when (featurep! +dragndrop)
|
||||
(when IS-MAC
|
||||
(unless (executable-find "pngpaste")
|
||||
(warn! "Couldn't find the pngpaste executable. org-download-clipboard will not work.")))
|
||||
(when IS-LINUX
|
||||
(unless (or (executable-find "maim") (executable-find "scrot") (executable-find "gnome-screenshot"))
|
||||
(warn! "Couldn't find the maim, scrot or gnome-screenshot executable. org-download-clipboard will not work."))
|
||||
(if (string= "wayland" (getenv "XDG_SESSION_TYPE"))
|
||||
(unless (executable-find "wl-paste")
|
||||
(warn! "Couldn't find the wl-paste executable (from wl-clipboard). org-download-clipboard will not work."))
|
||||
(unless (executable-find "xclip")
|
||||
(warn! "Couldn't find the xclip executable. org-download-clipboard will not work."))))
|
||||
(when IS-WINDOWS
|
||||
(unless (executable-find "convert")
|
||||
(warn! "Couldn't find the convert program (from ImageMagick). org-download-clipboard will not work."))))
|
||||
|
|
|
@ -14,11 +14,12 @@
|
|||
;; root. Of course, this command won't work in a sparse clone,
|
||||
;; and more than that, initiating these compilation step is a
|
||||
;; hassle, so...
|
||||
:build (with-temp-file (expand-file-name "org-version.el" (straight--repos-dir "org-mode"))
|
||||
(insert "(fset 'org-release (lambda () \"9.5\"))\n"
|
||||
"(fset 'org-git-version #'ignore)\n"
|
||||
"(provide 'org-version)\n")))
|
||||
:pin "7c8dce72bd5d86157dd1dda2ba0a21ac86084426"
|
||||
:pre-build
|
||||
(with-temp-file (doom-path (straight--repos-dir "org-mode") "org-version.el")
|
||||
(insert "(fset 'org-release (lambda () \"9.5\"))\n"
|
||||
"(fset 'org-git-version #'ignore)\n"
|
||||
"(provide 'org-version)\n")))
|
||||
:pin "6b83c6e4eaec4af47a90d05c3410d4637d8cb8da"
|
||||
;; 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
|
||||
|
@ -38,22 +39,22 @@
|
|||
:recipe (:host github :repo "hlissner/evil-org-mode")
|
||||
:pin "a9706da260c45b98601bcd72b1d2c0a24a017700"))
|
||||
(when (featurep! :tools pdf)
|
||||
(package! org-pdftools :pin "3c2b9a413eb841c781cfb49d8c343bf07aa0ad1f"))
|
||||
(package! org-pdftools :pin "bcf0084883ede36e91c72be73c0fbd7098439c99"))
|
||||
(when (featurep! :tools magit)
|
||||
(package! orgit :pin "ac9b1a42863a864fde9d225890ef5464bffdc646"))
|
||||
(when (featurep! +brain)
|
||||
(package! org-brain :pin "1ae4fd46165fc56f34f36ce38cb2ae816b07e207"))
|
||||
(package! org-brain :pin "f7939ef5071895930eebccf490ea7cb25cc54b2c"))
|
||||
(when (featurep! +dragndrop)
|
||||
(package! org-download :pin "42ac361ef5502017e6fc1bceb00333eba90402f4"))
|
||||
(package! org-download :pin "97bec7412e1a4d6e9031c7a0568d0f065cd9fd00"))
|
||||
(when (featurep! +gnuplot)
|
||||
(package! gnuplot :pin "f0001c30010b2899e36d7d89046322467e923088")
|
||||
(package! gnuplot :pin "116cad8e09024223f97e81b0a4503cef20de9bf5")
|
||||
(package! gnuplot-mode :pin "601f6392986f0cba332c87678d31ae0d0a496ce7"))
|
||||
(when (featurep! +ipython) ; DEPRECATED
|
||||
(package! ob-ipython :pin "7147455230841744fb5b95dcbe03320313a77124"))
|
||||
(when (featurep! +jupyter)
|
||||
(package! jupyter :pin "360cae2c70ab28c7a7848c0c56473d984f0243e5"))
|
||||
(when (featurep! +journal)
|
||||
(package! org-journal :pin "14ce0119fe2d89f2f2207788be2edce0b9372822"))
|
||||
(package! org-journal :pin "c0836483ae43e525bf7547b7a789d171eda84c84"))
|
||||
(when (featurep! +noter)
|
||||
(package! org-noter :pin "9ead81d42dd4dd5074782d239b2efddf9b8b7b3d"))
|
||||
(when (featurep! +pomodoro)
|
||||
|
@ -65,14 +66,14 @@
|
|||
(package! centered-window
|
||||
:recipe (:host github :repo "anler/centered-window-mode")
|
||||
:pin "f50859941ab5c7cbeaee410f2d38716252b552ac")
|
||||
(package! org-tree-slide :pin "18034c476038adcc1c4697168b8068f4d0ce62fe")
|
||||
(package! org-re-reveal :pin "0062756e9a5b6ec96c7de5ca94372cc6495296a1")
|
||||
(package! org-tree-slide :pin "d6e8e91433dfe4968f1343b483f2680f45a77d52")
|
||||
(package! org-re-reveal :pin "47339ef6772c79849a9764716df8361649ea7bdc")
|
||||
(package! revealjs
|
||||
:recipe (:host github :repo "hakimel/reveal.js"
|
||||
:files ("css" "dist" "js" "plugin"))
|
||||
:pin "0582f57517c97a4c7bfeb58762138c78883f94c5"))
|
||||
(when (featurep! +roam)
|
||||
(package! org-roam :pin "be95b42d32d9707309ab373f1d8182c84db41c5c"))
|
||||
(package! org-roam :pin "15d864a500d90c9dc2e16d888e93343528ec3941"))
|
||||
|
||||
;;; Babel
|
||||
(package! ob-async :pin "de1cd6c93242a4cb8773bbe115b7be3d4dd6b97e")
|
||||
|
@ -89,7 +90,7 @@
|
|||
:recipe (:host github :repo "DEADB17/ob-racket")
|
||||
:pin "d8fd51bddb019b0eb68755255f88fc800cfe03cb"))
|
||||
(when (featurep! :lang rest)
|
||||
(package! ob-restclient :pin "f7449b2068498fe9d8ab9589e0a638148861533f"))
|
||||
(package! ob-restclient :pin "0ebfc7c5ebf96d2fe1a476439831363a5a43b9b6"))
|
||||
(when (featurep! :lang scala)
|
||||
(package! ob-ammonite :pin "39937dff395e70aff76a4224fa49cf2ec6c57cca"))
|
||||
|
||||
|
@ -99,6 +100,6 @@
|
|||
(when (featurep! +hugo)
|
||||
(package! ox-hugo
|
||||
:recipe (:host github :repo "kaushalmodi/ox-hugo" :nonrecursive t)
|
||||
:pin "f24c9bd522ae22bee2327c2b53858d0a5066707d"))
|
||||
:pin "6bc8ee08023695fa167ac0ddf1fc61e1975fa1ce"))
|
||||
(when (featurep! :lang rst)
|
||||
(package! ox-rst :pin "99fa790da55b57a3f2e9aa187493ba434a64250e"))
|
||||
|
|
|
@ -100,29 +100,41 @@ sudo zypper install nodejs npm
|
|||
#+END_SRC
|
||||
|
||||
** Dependencies
|
||||
The features in this module optionally depend on the following php packages:
|
||||
This module has no required dependencies, but it has a couple optional ones.
|
||||
|
||||
+ ~boris~ (REPL)
|
||||
+ ~phpctags~ (better code completion)
|
||||
+ ~phpunit~ (unit test commands)
|
||||
+ ~php-cs-fixer~ (for code formatting)
|
||||
+ ~php-cs-fixer~ and ~@prettier/plugin-php~ (for code formatting)
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
composer global require \
|
||||
d11wtq/boris \
|
||||
phpunit/phpunit \
|
||||
techlivezheng/phpctags
|
||||
techlivezheng/phpctags \
|
||||
friendsofphp/php-cs-fixer
|
||||
|
||||
# Needed by php-cs-fixer, otherwise you'll get "Couldn't resolve parser
|
||||
# 'php'" errors
|
||||
npm install -g @prettier/plugin-php
|
||||
#+END_SRC
|
||||
|
||||
Ensure that ~\~/.composer/vendor/bin~ is in ~PATH~:
|
||||
You must ensure that ~\~/.composer/vendor/bin~ is in ~PATH~, so these
|
||||
executables are visible to Emacs:
|
||||
|
||||
#+BEGIN_SRC sh
|
||||
# place this in your profile file, like ~/.bash_profile or ~/.zshenv
|
||||
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.
|
||||
You may also need to regenerate your envvar file by running ~doom env~ on the
|
||||
command line.
|
||||
|
||||
#+begin_quote
|
||||
To use intelephense instead of , run =M-x lsp-install-server= and choose ~iph~ to
|
||||
install lsp-intelephense.
|
||||
#+end_quote
|
||||
|
||||
* TODO Features
|
||||
# An in-depth list of features, how to use them, and their dependencies.
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ Adds Python support to Doom Emacs.
|
|||
+ [[https://github.com/pythonic-emacs/anaconda-mode][anaconda-mode]]*
|
||||
+ [[https://github.com/Wilfred/pyimport][pyimport]]*
|
||||
+ [[https://github.com/paetzke/py-isort.el][py-isort]]*
|
||||
+ [[https://melpa.org/#/nose][nose]]*
|
||||
+ [[https://github.com/emacsattic/nose/][nose]]*
|
||||
+ [[https://github.com/wbolster/emacs-python-pytest][python-pytest]]*
|
||||
+ [[https://github.com/Wilfred/pip-requirements.el][pip-requirements]]*
|
||||
+ [[https://github.com/pwalsh/pipenv.el][pipenv]]*
|
||||
|
|
|
@ -102,7 +102,7 @@
|
|||
(unless (or (bound-and-true-p lsp-mode)
|
||||
(bound-and-true-p eglot--managed-mode)
|
||||
(bound-and-true-p lsp--buffer-deferred)
|
||||
(not (executable-find python-shell-interpreter)))
|
||||
(not (executable-find python-shell-interpreter t)))
|
||||
(anaconda-mode +1))))
|
||||
:config
|
||||
(set-company-backend! 'anaconda-mode '(company-anaconda))
|
||||
|
@ -207,7 +207,7 @@
|
|||
(set-eval-handler! 'python-mode
|
||||
'((:command . (lambda () python-shell-interpreter))
|
||||
(:exec (lambda ()
|
||||
(if-let* ((bin (executable-find "pipenv"))
|
||||
(if-let* ((bin (executable-find "pipenv" t))
|
||||
(_ (pipenv-project-p)))
|
||||
(format "PIPENV_MAX_DEPTH=9999 %s run %%c %%o %%s %%a" bin)
|
||||
"%c %o %s %a")))
|
||||
|
|
|
@ -4,10 +4,12 @@
|
|||
(featurep! :tools lsp))
|
||||
"This module requires (:tools lsp)")
|
||||
|
||||
(if (not (executable-find "python"))
|
||||
(if (not (or (executable-find "python")
|
||||
(executable-find "python3")))
|
||||
(error! "Couldn't find python in your PATH")
|
||||
(unless (featurep! +lsp)
|
||||
(unless (zerop (shell-command "python -c 'import setuptools'"))
|
||||
(unless (or (zerop (shell-command "python -c 'import setuptools'"))
|
||||
(zerop (shell-command "python3 -c 'import setuptools'")))
|
||||
(warn! "setuptools wasn't detected, which anaconda-mode requires"))))
|
||||
|
||||
(when (featurep! +pyenv)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
;; Major modes
|
||||
(package! pip-requirements :pin "216cd1690f80cc965d4ae47b8753fc185f778ff6")
|
||||
(when (featurep! +cython)
|
||||
(package! cython-mode :pin "21b4e533747507c4dad5e6908df1f157dff4de89")
|
||||
(package! cython-mode :pin "17e03b8658a07b6d6da49300b39b57ed9c59ddb1")
|
||||
(when (featurep! :checkers syntax)
|
||||
(package! flycheck-cython :pin "ecc4454d35ab5317ab66a04406f36f0c1dbc0b76")))
|
||||
|
||||
|
@ -12,21 +12,21 @@
|
|||
(when (featurep! +lsp)
|
||||
(unless (featurep! :tools lsp +eglot)
|
||||
(if (featurep! +pyright)
|
||||
(package! lsp-pyright :pin "d9e7d3cf1bdc8ee0395c8df4408b05ee3ba9c22a")
|
||||
(package! lsp-python-ms :pin "c4ebc7a11398733055a1dc07f9cffacd04d1c2dc"))))
|
||||
(package! lsp-pyright :pin "71ff088ac4c93b0edd012f305a3dfd1602c5d21e")
|
||||
(package! lsp-python-ms :pin "5470ada6cde6e68fe6ce13ff1146c89c3bae0cc8"))))
|
||||
|
||||
;; Programming environment
|
||||
(package! anaconda-mode :pin "39b1cf88c8c459901630d248d6135d8644075648")
|
||||
(package! anaconda-mode :pin "b1875a5d0ec9885c1c42558c126b93ee6bcedaa6")
|
||||
(when (featurep! :completion company)
|
||||
(package! company-anaconda :pin "da1566db41a68809ef7f91ebf2de28118067c89b"))
|
||||
|
||||
;; Environment management
|
||||
(package! pipenv :pin "b730bb509e8b60af9f5ab1f1e6c3458d1d95d789")
|
||||
(package! pyvenv :pin "0bf4b87068e9040fc99afa85af1992247dd7aacd")
|
||||
(package! pipenv :pin "f516a1a8677a6a1ce9683056e9f77b1e785e8431")
|
||||
(package! pyvenv :pin "9b3678bc29192d2dba64df90fbdb17393ef8d877")
|
||||
(when (featurep! +pyenv)
|
||||
(package! pyenv-mode :pin "b818901b8eac0e260ced66a6a5acabdbf6f5ba99"))
|
||||
(when (featurep! +conda)
|
||||
(package! conda :pin "9f7eea16e9ad3eb34fe3d1cbd9d6162b8046c2f8"))
|
||||
(package! conda :pin "dce431b25f5a13af58cc7cacfa7968b5a888609c"))
|
||||
(when (featurep! +poetry)
|
||||
(package! poetry :pin "d5163fe065239bb7b46ed8b3ff3b85b1f3229af3"))
|
||||
|
||||
|
@ -35,7 +35,7 @@
|
|||
;; REVIEW Remove this when emacsmirror/epkgs updates its emacsattic index
|
||||
:recipe (:host github :repo "emacsattic/nose")
|
||||
:pin "f8528297519eba911696c4e68fa88892de9a7b72")
|
||||
(package! python-pytest :pin "4a1c4c8915c12e540d41aae1d4e326a2362da541")
|
||||
(package! python-pytest :pin "3fadf1f8bc363d57c54eedd1bf98e6d9db9f0a62")
|
||||
|
||||
;; Import managements
|
||||
(package! pyimport :pin "a6f63cf7ed93f0c0f7c207e6595813966f8852b9")
|
||||
|
|
|
@ -97,7 +97,7 @@ selected by default. Modify ~rustic-lsp-server~ to change the default:
|
|||
(setq rustic-lsp-server 'rls))
|
||||
#+END_SRC
|
||||
|
||||
** Enabling elgot support for Rust
|
||||
** Enabling eglot support for Rust
|
||||
Doom's =:tools lsp= module has an =+eglot= flag. Enable it and this module will
|
||||
use eglot instead.
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
;; -*- no-byte-compile: t; -*-
|
||||
;;; lang/rust/packages.el
|
||||
|
||||
(package! rustic :pin "91ad5db27b86bb2ba6f3019b764d0f45ec93f484")
|
||||
(package! rustic :pin "f7d5ac0c930ae435421f3f5bc827e8c61ce73662")
|
||||
(unless (featurep! +lsp)
|
||||
(package! racer :pin "a0bdf778f01e8c4b8a92591447257422ac0b455b"))
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
(setq geiser-active-implementations '(guile chicken mit chibi chez)
|
||||
geiser-autodoc-identifier-format "%s → %s"
|
||||
geiser-repl-current-project-function 'doom-project-root)
|
||||
(unless (featurep! :lang racket)
|
||||
(if (featurep! :lang racket)
|
||||
(setq auto-mode-alist
|
||||
(remove '("\\.rkt\\'" . scheme-mode) auto-mode-alist))
|
||||
(push 'racket geiser-active-implementations))
|
||||
(after! scheme ; built-in
|
||||
(set-repl-handler! 'scheme-mode #'+scheme/open-repl)
|
||||
|
|
|
@ -65,12 +65,9 @@
|
|||
|
||||
(add-to-list 'web-mode-engines-alist '("elixir" . "\\.eex\\'"))
|
||||
|
||||
(let ((types '("javascript" "jsx")))
|
||||
(setq web-mode-comment-formats
|
||||
(cl-remove-if (lambda (item) (member (car item) types))
|
||||
web-mode-comment-formats))
|
||||
(dolist (type types)
|
||||
(push (cons type "//") web-mode-comment-formats)))
|
||||
;; Use // instead of /* as the default comment delimited in JS
|
||||
(setf (alist-get "javascript" web-mode-comment-formats nil nil #'equal)
|
||||
"//")
|
||||
|
||||
(add-hook! 'web-mode-hook
|
||||
(defun +web--fix-js-comments-h ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue