dev: merge branch 'master' of github.com:doomemacs

This commit is contained in:
Matt Nish-Lapidus 2024-09-17 13:04:38 -04:00
commit 1c2a5a1586
177 changed files with 65 additions and 24 deletions

10
lisp/.doommodule Normal file
View file

@ -0,0 +1,10 @@
(3 0 0)
((name . :doom)
(depth . -110)
;; (packages
;; (elpaca :host github
;; :repo "progfolio/elpaca"
;; :pin "213a72646e024af007c610ea7574dc82e992637f")
;; (compat :host github :repo "emacs-compat/compat"
;; :pin "e9203e164903a6bb7de3e58aa0d653bbcff9d3d1"))
)

0
modules/app/.doommodule Normal file
View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

0
modules/core/.doommodule Normal file
View file

View file

View file

View file

View file

View file

View file

View file

@ -79,6 +79,18 @@ This is controlled by `+format-on-save-disabled-modes'."
;; `+format-with-lsp-mode' in the appropriate modes.
(add-to-list 'apheleia-formatters '(lsp . +format-lsp-buffer))
;; Apheleia's default clang-format config doesn't respect `c-basic-offset', so
;; force it to in the absence of a .clang-format file.
(setf (alist-get 'clang-format apheleia-formatters)
`("clang-format"
"-assume-filename"
(or (apheleia-formatters-local-buffer-file-name)
(apheleia-formatters-mode-extension)
".c")
(when apheleia-formatters-respect-indent-level
(unless (locate-dominating-file default-directory ".clang-format")
(format "--style={IndentWidth: %d}" c-basic-offset)))))
;; Apheleia's default config for prettier passes an explicit --tab-width N to
;; all prettier formatters, respecting your indent settings in Emacs, but
;; overriding any indent settings in your prettier config files. This changes

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

0
modules/lang/.doommodule Normal file
View file

View file

View file

View file

View file

@ -160,7 +160,12 @@ This is ignored by ccls.")
cuda-mode-local-vars-hook)
:append #'lsp!)
(when (modulep! :tools lsp +eglot)
(if (not (modulep! :tools lsp +eglot))
(after! lsp-clangd
;; Prevent clangd from consuming all your cores indexing larger projects
;; and grinding your system to a halt.
(cl-pushnew (format "-j=%d" (max 1 (/ (doom-system-cpus) 2)))
lsp-clients-clangd-args))
(set-eglot-client! 'cuda-mode '("clangd"))
;; Map eglot specific helper
@ -203,6 +208,8 @@ This is ignored by ccls.")
(featurep :system 'linux))
(setq ccls-initialization-options
`(:index (:trackDependency 1
;; Prevent ccls from consuming all your cores indexing
;; larger projects and grinding your system to a halt.
:threads ,(max 1 (/ (doom-system-cpus) 2))))))
(when (featurep :system 'macos)
(setq ccls-initialization-options

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

@ -95,6 +95,15 @@ Intended to replace `lisp-outline-level'."
(doom/help-modules (car module) (cadr module) 'visit-dir)
(call-interactively #'elisp-def)))
(defun +emacs-lisp--describe-symbol (symbol)
(if (or (not (fboundp 'helpful-symbol))
(cl-some (lambda (x) (funcall (nth 1 x) symbol))
describe-symbol-backends))
(progn
(describe-symbol symbol)
(pop-to-buffer (help-buffer)))
(helpful-symbol symbol)))
;;;###autoload
(defun +emacs-lisp-lookup-documentation (thing)
"Lookup THING with `helpful-variable' if it's a variable, `helpful-callable'
@ -117,10 +126,12 @@ if it's callable, `apropos' otherwise."
(org-show-hidden-entry))))
'deferred))
(thing
(funcall (if (fboundp #'helpful-symbol)
#'helpful-symbol
#'describe-symbol)
(intern thing)))
(let ((thing (intern thing)))
(if (and (not (cl-find-class thing))
(fboundp 'helpful-symbol))
(helpful-symbol thing)
(describe-symbol thing)
(pop-to-buffer (help-buffer)))))
((call-interactively
(if (fboundp #'helpful-at-point)
#'helpful-at-point

View file

@ -32,15 +32,16 @@ See `+emacs-lisp-non-package-mode' for details.")
:mode ("\\.Cask\\'" . emacs-lisp-mode)
:interpreter ("doomscript" . emacs-lisp-mode)
:config
(set-repl-handler! '(emacs-lisp-mode lisp-interaction-mode) #'+emacs-lisp/open-repl)
(set-eval-handler! '(emacs-lisp-mode lisp-interaction-mode) #'+emacs-lisp-eval)
(set-lookup-handlers! '(emacs-lisp-mode lisp-interaction-mode helpful-mode)
(let ((modes '(emacs-lisp-mode lisp-interaction-mode lisp-data-mode)))
(set-repl-handler! modes #'+emacs-lisp/open-repl)
(set-eval-handler! modes #'+emacs-lisp-eval)
(set-lookup-handlers! `(,@modes helpful-mode)
:definition #'+emacs-lisp-lookup-definition
:documentation #'+emacs-lisp-lookup-documentation)
(set-docsets! '(emacs-lisp-mode lisp-interaction-mode) "Emacs Lisp")
(set-ligatures! 'emacs-lisp-mode :lambda "lambda")
(set-formatter! 'lisp-indent #'apheleia-indent-lisp-buffer :modes '(emacs-lisp-mode))
(set-rotate-patterns! 'emacs-lisp-mode
(set-docsets! modes "Emacs Lisp")
(set-ligatures! modes :lambda "lambda")
(set-formatter! 'lisp-indent #'apheleia-indent-lisp-buffer :modes modes)
(set-rotate-patterns! modes
:symbols '(("t" "nil")
("let" "let*")
("when" "unless")
@ -49,7 +50,7 @@ See `+emacs-lisp-non-package-mode' for details.")
("add-hook" "remove-hook")
("add-hook!" "remove-hook!")
("it" "xit")
("describe" "xdescribe")))
("describe" "xdescribe"))))
(setq-hook! 'emacs-lisp-mode-hook
;; Emacs' built-in elisp files use a hybrid tab->space indentation scheme
@ -83,7 +84,7 @@ See `+emacs-lisp-non-package-mode' for details.")
;; and `editorconfig' would force fixed indentation on elisp.
(add-to-list 'doom-detect-indentation-excluded-modes 'emacs-lisp-mode)
(add-hook! 'emacs-lisp-mode-hook
(add-hook! '(emacs-lisp-mode-hook lisp-data-mode-local-vars-hook)
;; Allow folding of outlines in comments
#'outline-minor-mode
;; Make parenthesis depth easier to distinguish at a glance

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

View file

Some files were not shown because too many files have changed in this diff Show more