Merge remote-tracking branch 'upstream/develop' into develop
This commit is contained in:
commit
f5b7df9694
12 changed files with 83 additions and 61 deletions
|
@ -5,7 +5,7 @@
|
||||||
[Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute)
|
[Install](#install) • [Documentation] • [FAQ] • [Screenshots] • [Contribute](#contribute)
|
||||||
|
|
||||||

|

|
||||||

|

|
||||||

|

|
||||||

|

|
||||||
[][Discord]
|
[][Discord]
|
||||||
|
@ -98,7 +98,7 @@ Check out [the FAQ][FAQ] for answers to common questions about the project.
|
||||||
|
|
||||||
# Prerequisites
|
# Prerequisites
|
||||||
+ Git 2.23+
|
+ Git 2.23+
|
||||||
+ Emacs 26.1+ (*27 is recommended*) with GNUTLS support
|
+ Emacs 26.3+ (*27.1 is recommended*, or [native-comp](https://www.emacswiki.org/emacs/GccEmacs)).
|
||||||
+ [ripgrep] 11.0+
|
+ [ripgrep] 11.0+
|
||||||
+ GNU `find`
|
+ GNU `find`
|
||||||
+ *OPTIONAL:* [fd] 7.3.0+ (improves file indexing performance for some commands)
|
+ *OPTIONAL:* [fd] 7.3.0+ (improves file indexing performance for some commands)
|
||||||
|
|
|
@ -73,3 +73,21 @@ list, the pair is destructured into (CAR . CDR)."
|
||||||
(plist-put! p (car plist) (nth 1 plist)))
|
(plist-put! p (car plist) (nth 1 plist)))
|
||||||
(setq plist (cddr plist)))
|
(setq plist (cddr plist)))
|
||||||
p))
|
p))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-plist-keys (plist)
|
||||||
|
"Return the keys in PLIST."
|
||||||
|
(let (keys)
|
||||||
|
(while plist
|
||||||
|
(push (car plist) keys)
|
||||||
|
(setq plist (cddr plist)))
|
||||||
|
keys))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(defun doom-plist-values (plist)
|
||||||
|
"Return the values in PLIST."
|
||||||
|
(let (keys)
|
||||||
|
(while plist
|
||||||
|
(push (cadr plist) keys)
|
||||||
|
(setq plist (cddr plist)))
|
||||||
|
keys))
|
||||||
|
|
|
@ -94,10 +94,10 @@ at the values with which this function was called."
|
||||||
(lambda (&rest pre-args)
|
(lambda (&rest pre-args)
|
||||||
(apply fn (append pre-args args))))
|
(apply fn (append pre-args args))))
|
||||||
|
|
||||||
(defun doom-lookup-key (keys &optional keymap)
|
(defun doom-lookup-key (keys &rest keymaps)
|
||||||
"Like `lookup-key', but search active keymaps if KEYMAP is omitted."
|
"Like `lookup-key', but search active keymaps if KEYMAP is omitted."
|
||||||
(if keymap
|
(if keymaps
|
||||||
(lookup-key keymap keys)
|
(cl-some (doom-rpartial #'lookup-key keys) keymaps)
|
||||||
(cl-loop for keymap
|
(cl-loop for keymap
|
||||||
in (append (cl-loop for alist in emulation-mode-map-alists
|
in (append (cl-loop for alist in emulation-mode-map-alists
|
||||||
append (mapcar #'cdr
|
append (mapcar #'cdr
|
||||||
|
@ -749,47 +749,7 @@ made obsolete, for example a date or a release number.
|
||||||
See the docstrings of `defalias' and `make-obsolete' for more details."
|
See the docstrings of `defalias' and `make-obsolete' for more details."
|
||||||
(declare (doc-string 4))
|
(declare (doc-string 4))
|
||||||
`(progn (defalias ,obsolete-name ,current-name ,docstring)
|
`(progn (defalias ,obsolete-name ,current-name ,docstring)
|
||||||
(make-obsolete ,obsolete-name ,current-name ,when)))
|
(make-obsolete ,obsolete-name ,current-name ,when))))
|
||||||
|
|
||||||
(defadvice! doom--fix-wrong-number-of-args-during-byte-compile (recipe)
|
|
||||||
:override #'straight--build-compile
|
|
||||||
(let* ((package (plist-get recipe :package))
|
|
||||||
(dir (straight--build-dir package))
|
|
||||||
(program (concat invocation-directory invocation-name))
|
|
||||||
(args
|
|
||||||
`("-Q" "-L" ,dir
|
|
||||||
,@(apply #'append
|
|
||||||
(mapcar (lambda (d)
|
|
||||||
(let ((d (straight--build-dir d)))
|
|
||||||
(when (file-exists-p d) (list "-L" d))))
|
|
||||||
(straight--get-dependencies package)))
|
|
||||||
"--batch"
|
|
||||||
"--eval"
|
|
||||||
,(prin1-to-string
|
|
||||||
'(progn
|
|
||||||
(defmacro define-obsolete-face-alias (obsolete-face current-face &optional when)
|
|
||||||
`(progn (put ,obsolete-face 'face-alias ,current-face)
|
|
||||||
(put ,obsolete-face 'obsolete-face (or (purecopy ,when) t))))
|
|
||||||
(defmacro define-obsolete-function-alias (obsolete-name current-name &optional when docstring)
|
|
||||||
`(progn (defalias ,obsolete-name ,current-name ,docstring)
|
|
||||||
(make-obsolete ,obsolete-name ,current-name ,when)))
|
|
||||||
(defmacro define-obsolete-variable-alias (obsolete-name current-name &optional when docstring)
|
|
||||||
`(progn (defvaralias ,obsolete-name ,current-name ,docstring)
|
|
||||||
(dolist (prop '(saved-value saved-variable-comment))
|
|
||||||
(and (get ,obsolete-name prop)
|
|
||||||
(null (get ,current-name prop))
|
|
||||||
(put ,current-name prop (get ,obsolete-name prop))))
|
|
||||||
(make-obsolete-variable ,obsolete-name ,current-name ,when)))))
|
|
||||||
"--eval"
|
|
||||||
,(format "(byte-recompile-directory %S 0 'force)" dir))))
|
|
||||||
(when straight-byte-compilation-buffer
|
|
||||||
(with-current-buffer (get-buffer-create straight-byte-compilation-buffer)
|
|
||||||
(insert "\n$ " (replace-regexp-in-string
|
|
||||||
"\\(-L [^z-a]*? \\)"
|
|
||||||
"\\1\\\\ \n "
|
|
||||||
(string-join `(,program ,@args) " "))
|
|
||||||
"\n")))
|
|
||||||
(apply #'call-process program nil straight-byte-compilation-buffer nil args))))
|
|
||||||
|
|
||||||
(provide 'core-lib)
|
(provide 'core-lib)
|
||||||
;;; core-lib.el ends here
|
;;; core-lib.el ends here
|
||||||
|
|
|
@ -111,6 +111,25 @@ uses a straight or package.el command directly).")
|
||||||
(append (apply orig-fn args) ; lockfiles still take priority
|
(append (apply orig-fn args) ; lockfiles still take priority
|
||||||
(doom-package-pinned-list)))
|
(doom-package-pinned-list)))
|
||||||
|
|
||||||
|
(defadvice! doom--byte-compile-in-same-session-a (recipe)
|
||||||
|
"Straight recompiles packages from an Emacs child process. This is sensible,
|
||||||
|
but many packages don't properly load their macro dependencies, causing errors,
|
||||||
|
which we can't possibly police, so I revert straight to its old strategy of
|
||||||
|
compiling in the same session."
|
||||||
|
:override #'straight--build-compile
|
||||||
|
(straight--with-plist recipe (package)
|
||||||
|
;; These two `let' forms try very, very hard to make byte-compilation an
|
||||||
|
;; invisible process. Lots of packages have byte-compile warnings; I
|
||||||
|
;; don't need to know about them and neither do straight.el users.
|
||||||
|
(letf! (;; Prevent Emacs from asking the user to save all their
|
||||||
|
;; files before compiling.
|
||||||
|
(#'save-some-buffers #'ignore))
|
||||||
|
(quiet!
|
||||||
|
;; Note that there is in fact no `byte-compile-directory' function.
|
||||||
|
(byte-recompile-directory
|
||||||
|
(straight--build-dir package)
|
||||||
|
0 'force)))))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Bootstrappers
|
;;; Bootstrappers
|
||||||
|
|
|
@ -97,7 +97,7 @@ us know!
|
||||||
This is what you'll have installed by the end of this section:
|
This is what you'll have installed by the end of this section:
|
||||||
|
|
||||||
- Git 2.23+
|
- Git 2.23+
|
||||||
- Emacs 26.1+ *(27.x is recommended)*
|
- Emacs 26.3+ *(27.1 is recommended, or [[https://www.emacswiki.org/emacs/GccEmacs][native-comp]])*
|
||||||
- [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+
|
- [[https://github.com/BurntSushi/ripgrep][ripgrep]] 11.0+
|
||||||
- GNU Find
|
- GNU Find
|
||||||
- (Optional) [[https://github.com/sharkdp/fd][fd]] 7.3.0+ (known as ~fd-find~ on Debian, Ubuntu & derivatives) --
|
- (Optional) [[https://github.com/sharkdp/fd][fd]] 7.3.0+ (known as ~fd-find~ on Debian, Ubuntu & derivatives) --
|
||||||
|
|
|
@ -80,7 +80,7 @@
|
||||||
|
|
||||||
:checkers
|
:checkers
|
||||||
syntax ; tasing you for every semicolon you forget
|
syntax ; tasing you for every semicolon you forget
|
||||||
;;spell ; tasing you for misspelling mispelling
|
;;(spell +flyspell) ; tasing you for misspelling mispelling
|
||||||
;;grammar ; tasing grammar mistake every you make
|
;;grammar ; tasing grammar mistake every you make
|
||||||
|
|
||||||
:tools
|
:tools
|
||||||
|
|
|
@ -42,13 +42,24 @@
|
||||||
(bound-and-true-p yas-minor-mode)
|
(bound-and-true-p yas-minor-mode)
|
||||||
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
||||||
#'yas-expand
|
#'yas-expand
|
||||||
(and (featurep! :completion company +tng)
|
(featurep! :completion company +tng)
|
||||||
(+company-has-completion-p))
|
#'company-indent-or-complete-common)
|
||||||
#'company-complete-common)
|
:m [tab] (cmds! (and (bound-and-true-p yas-minor-mode)
|
||||||
:v [tab] (cmds! (and (bound-and-true-p yas-minor-mode)
|
(evil-visual-state-p)
|
||||||
(or (eq evil-visual-selection 'line)
|
(or (eq evil-visual-selection 'line)
|
||||||
(not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\))))))
|
(not (memq (char-after) (list ?\( ?\[ ?\{ ?\} ?\] ?\))))))
|
||||||
#'yas-insert-snippet)
|
#'yas-insert-snippet
|
||||||
|
(and (featurep! :editor fold)
|
||||||
|
(save-excursion (end-of-line) (invisible-p (point))))
|
||||||
|
#'+fold/toggle
|
||||||
|
;; Fixes #4548: without this, this tab keybind overrides
|
||||||
|
;; mode-local ones for modes that don't have an evil
|
||||||
|
;; keybinding scheme or users who don't have :editor (evil
|
||||||
|
;; +everywhere) enabled.
|
||||||
|
(doom-lookup-key [tab] (list (current-local-map)))
|
||||||
|
it
|
||||||
|
(fboundp 'evil-jump-item)
|
||||||
|
#'evil-jump-item)
|
||||||
|
|
||||||
(:after help :map help-mode-map
|
(:after help :map help-mode-map
|
||||||
:n "o" #'link-hint-open-link)
|
:n "o" #'link-hint-open-link)
|
||||||
|
|
|
@ -420,7 +420,6 @@ directives. By default, this only recognizes C directives.")
|
||||||
|
|
||||||
(map! :v "@" #'+evil:apply-macro
|
(map! :v "@" #'+evil:apply-macro
|
||||||
:m [C-i] #'evil-jump-forward
|
:m [C-i] #'evil-jump-forward
|
||||||
:m [tab] #'evil-jump-item
|
|
||||||
|
|
||||||
;; implement dictionary keybinds
|
;; implement dictionary keybinds
|
||||||
;; evil already defines 'z=' to `ispell-word' = correct word at point
|
;; evil already defines 'z=' to `ispell-word' = correct word at point
|
||||||
|
|
|
@ -33,6 +33,7 @@
|
||||||
|
|
||||||
(use-package! js2-mode
|
(use-package! js2-mode
|
||||||
:mode "\\.m?js\\'"
|
:mode "\\.m?js\\'"
|
||||||
|
:mode "\\.es6\\'"
|
||||||
:interpreter "node"
|
:interpreter "node"
|
||||||
:commands js2-line-break
|
:commands js2-line-break
|
||||||
:config
|
:config
|
||||||
|
|
|
@ -6,5 +6,5 @@
|
||||||
(package! realgud-trepan-ni :pin "6e38cf838c7b47b5f1353d00901b939ffa36d707")))
|
(package! realgud-trepan-ni :pin "6e38cf838c7b47b5f1353d00901b939ffa36d707")))
|
||||||
|
|
||||||
(when (featurep! +lsp)
|
(when (featurep! +lsp)
|
||||||
(package! dap-mode :pin "612388d0b85e77972a9c28391bac6224a63408c7")
|
(package! dap-mode :pin "c52c1a530dab420b24640a4b4710cf1e6a0177e0")
|
||||||
(package! posframe :pin "efd7ea490defc53a5b78e7469a3a35d225b766cc"))
|
(package! posframe :pin "8097276022676f73fc14d5311cba94aa9b3ac444"))
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
"The backends to prepend to `company-backends' in `lsp-mode' buffers.
|
"The backends to prepend to `company-backends' in `lsp-mode' buffers.
|
||||||
Can be a list of backends; accepts any value `company-backends' accepts.")
|
Can be a list of backends; accepts any value `company-backends' accepts.")
|
||||||
|
|
||||||
|
(defvar +lsp-prompt-to-install-server t
|
||||||
|
"If non-nil, prompt to install a server if no server is present.")
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
;;; Packages
|
;;; Packages
|
||||||
|
@ -108,7 +111,18 @@ server getting expensively restarted when reverting buffers."
|
||||||
(let ((lsp-restart 'ignore))
|
(let ((lsp-restart 'ignore))
|
||||||
(funcall orig-fn))
|
(funcall orig-fn))
|
||||||
(+lsp-optimization-mode -1))))
|
(+lsp-optimization-mode -1))))
|
||||||
lsp--cur-workspace)))))
|
lsp--cur-workspace))))
|
||||||
|
|
||||||
|
(defadvice! +lsp-dont-prompt-to-install-servers-maybe-a (orig-fn &rest args)
|
||||||
|
:around #'lsp
|
||||||
|
(lsp--require-packages)
|
||||||
|
(when (buffer-file-name)
|
||||||
|
(if (or (lsp--filter-clients
|
||||||
|
(-andfn #'lsp--matching-clients?
|
||||||
|
#'lsp--server-binary-present?))
|
||||||
|
+lsp-prompt-to-install-server)
|
||||||
|
(apply orig-fn args)
|
||||||
|
(lsp--info "No language server available for %S" major-mode)))))
|
||||||
|
|
||||||
|
|
||||||
(use-package! lsp-ui
|
(use-package! lsp-ui
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
|
|
||||||
(if (featurep! +eglot)
|
(if (featurep! +eglot)
|
||||||
(progn
|
(progn
|
||||||
(package! eglot :pin "4c85df2b04e467b8ed0eca68bd202fd0e7b671f4")
|
(package! eglot :pin "398b81eeec44b35b39480a38f1b1357bc8550a1c")
|
||||||
(package! project :pin "a1997af9a6de5b10cebe8c06875508249ad559ea"))
|
(package! project :pin "f743ca2e5c3343c71b85040aac6a94f1b123f832"))
|
||||||
(package! lsp-mode :pin "dbfbe1a221de78e5d42e93ab2833d68c7f27f1b7")
|
(package! lsp-mode :pin "62cd1b2e569c72638ba4bd42a0290192c224c28d")
|
||||||
(package! lsp-ui :pin "94673cd08c35acc3b6c34301f74f1852487a5558")
|
(package! lsp-ui :pin "732992aa41bb78b7341e28c980817de488b7a317")
|
||||||
(when (featurep! :completion ivy)
|
(when (featurep! :completion ivy)
|
||||||
(package! lsp-ivy :pin "c70ee8b54357c56d1b972393ee53e57a2e545fbb"))
|
(package! lsp-ivy :pin "c70ee8b54357c56d1b972393ee53e57a2e545fbb"))
|
||||||
(when (featurep! :completion helm)
|
(when (featurep! :completion helm)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue