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)
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||

|
||||
[][Discord]
|
||||
|
@ -98,7 +98,7 @@ Check out [the FAQ][FAQ] for answers to common questions about the project.
|
|||
|
||||
# Prerequisites
|
||||
+ 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+
|
||||
+ GNU `find`
|
||||
+ *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)))
|
||||
(setq plist (cddr plist)))
|
||||
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)
|
||||
(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."
|
||||
(if keymap
|
||||
(lookup-key keymap keys)
|
||||
(if keymaps
|
||||
(cl-some (doom-rpartial #'lookup-key keys) keymaps)
|
||||
(cl-loop for keymap
|
||||
in (append (cl-loop for alist in emulation-mode-map-alists
|
||||
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."
|
||||
(declare (doc-string 4))
|
||||
`(progn (defalias ,obsolete-name ,current-name ,docstring)
|
||||
(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))))
|
||||
(make-obsolete ,obsolete-name ,current-name ,when))))
|
||||
|
||||
(provide 'core-lib)
|
||||
;;; 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
|
||||
(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
|
||||
|
|
|
@ -97,7 +97,7 @@ us know!
|
|||
This is what you'll have installed by the end of this section:
|
||||
|
||||
- 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+
|
||||
- GNU Find
|
||||
- (Optional) [[https://github.com/sharkdp/fd][fd]] 7.3.0+ (known as ~fd-find~ on Debian, Ubuntu & derivatives) --
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
|
||||
:checkers
|
||||
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
|
||||
|
||||
:tools
|
||||
|
|
|
@ -42,13 +42,24 @@
|
|||
(bound-and-true-p yas-minor-mode)
|
||||
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
||||
#'yas-expand
|
||||
(and (featurep! :completion company +tng)
|
||||
(+company-has-completion-p))
|
||||
#'company-complete-common)
|
||||
:v [tab] (cmds! (and (bound-and-true-p yas-minor-mode)
|
||||
(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)
|
||||
#'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
|
||||
:n "o" #'link-hint-open-link)
|
||||
|
|
|
@ -420,7 +420,6 @@ directives. By default, this only recognizes C directives.")
|
|||
|
||||
(map! :v "@" #'+evil:apply-macro
|
||||
:m [C-i] #'evil-jump-forward
|
||||
:m [tab] #'evil-jump-item
|
||||
|
||||
;; implement dictionary keybinds
|
||||
;; evil already defines 'z=' to `ispell-word' = correct word at point
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
|
||||
(use-package! js2-mode
|
||||
:mode "\\.m?js\\'"
|
||||
:mode "\\.es6\\'"
|
||||
:interpreter "node"
|
||||
:commands js2-line-break
|
||||
:config
|
||||
|
|
|
@ -6,5 +6,5 @@
|
|||
(package! realgud-trepan-ni :pin "6e38cf838c7b47b5f1353d00901b939ffa36d707")))
|
||||
|
||||
(when (featurep! +lsp)
|
||||
(package! dap-mode :pin "612388d0b85e77972a9c28391bac6224a63408c7")
|
||||
(package! posframe :pin "efd7ea490defc53a5b78e7469a3a35d225b766cc"))
|
||||
(package! dap-mode :pin "c52c1a530dab420b24640a4b4710cf1e6a0177e0")
|
||||
(package! posframe :pin "8097276022676f73fc14d5311cba94aa9b3ac444"))
|
||||
|
|
|
@ -4,6 +4,9 @@
|
|||
"The backends to prepend to `company-backends' in `lsp-mode' buffers.
|
||||
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
|
||||
|
@ -108,7 +111,18 @@ server getting expensively restarted when reverting buffers."
|
|||
(let ((lsp-restart 'ignore))
|
||||
(funcall orig-fn))
|
||||
(+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
|
||||
|
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
(if (featurep! +eglot)
|
||||
(progn
|
||||
(package! eglot :pin "4c85df2b04e467b8ed0eca68bd202fd0e7b671f4")
|
||||
(package! project :pin "a1997af9a6de5b10cebe8c06875508249ad559ea"))
|
||||
(package! lsp-mode :pin "dbfbe1a221de78e5d42e93ab2833d68c7f27f1b7")
|
||||
(package! lsp-ui :pin "94673cd08c35acc3b6c34301f74f1852487a5558")
|
||||
(package! eglot :pin "398b81eeec44b35b39480a38f1b1357bc8550a1c")
|
||||
(package! project :pin "f743ca2e5c3343c71b85040aac6a94f1b123f832"))
|
||||
(package! lsp-mode :pin "62cd1b2e569c72638ba4bd42a0290192c224c28d")
|
||||
(package! lsp-ui :pin "732992aa41bb78b7341e28c980817de488b7a317")
|
||||
(when (featurep! :completion ivy)
|
||||
(package! lsp-ivy :pin "c70ee8b54357c56d1b972393ee53e57a2e545fbb"))
|
||||
(when (featurep! :completion helm)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue