dev: merge branch 'pr7002' into emenel
This commit is contained in:
commit
87daad531e
32 changed files with 241 additions and 168 deletions
|
@ -58,7 +58,7 @@ Possible values are:
|
|||
corfu-preselect 'prompt
|
||||
corfu-count 16
|
||||
corfu-max-width 120
|
||||
corfu-preview-current (if (modulep! +on-type) 'insert t)
|
||||
corfu-preview-current 'insert
|
||||
corfu-on-exact-match nil
|
||||
corfu-quit-at-boundary (if (modulep! +orderless) 'separator t)
|
||||
corfu-quit-no-match (if (modulep! +orderless) 'separator t)
|
||||
|
|
|
@ -372,7 +372,8 @@ orderless."
|
|||
(if (or (eq sym major-mode)
|
||||
(and
|
||||
(memq sym minor-mode-list)
|
||||
(boundp sym)))
|
||||
(boundp sym)
|
||||
(symbol-value sym)))
|
||||
(add-face-text-property 0 (length cmd) 'font-lock-constant-face 'append cmd)))
|
||||
cmd))
|
||||
|
||||
|
|
|
@ -168,13 +168,13 @@
|
|||
:v "C-SPC" (cmd! (call-interactively #'evil-change)
|
||||
(call-interactively #'completion-at-point)))
|
||||
(:map corfu-map
|
||||
"C-SPC" #'corfu-insert-separator
|
||||
"C-k" #'corfu-previous
|
||||
"C-j" #'corfu-next
|
||||
"C-u" (cmd! (let (corfu-cycle)
|
||||
(funcall-interactively #'corfu-next (- corfu-count))))
|
||||
"C-d" (cmd! (let (corfu-cycle)
|
||||
(funcall-interactively #'corfu-next corfu-count)))))
|
||||
:i "C-SPC" #'corfu-insert-separator
|
||||
"C-k" #'corfu-previous
|
||||
"C-j" #'corfu-next
|
||||
"C-u" (cmd! (let (corfu-cycle)
|
||||
(funcall-interactively #'corfu-next (- corfu-count))))
|
||||
"C-d" (cmd! (let (corfu-cycle)
|
||||
(funcall-interactively #'corfu-next corfu-count)))))
|
||||
(:after corfu-popupinfo
|
||||
:map corfu-popupinfo-map
|
||||
"C-h" #'corfu-popupinfo-toggle
|
||||
|
@ -712,7 +712,7 @@
|
|||
:desc "Configure project" "g" #'projectile-configure-project
|
||||
:desc "Invalidate project cache" "i" #'projectile-invalidate-cache
|
||||
:desc "Kill project buffers" "k" #'projectile-kill-buffers
|
||||
:desc "Find other file" "o" #'projectile-find-other-file
|
||||
:desc "Find sibling file" "o" #'find-sibling-file
|
||||
:desc "Switch project" "p" #'projectile-switch-project
|
||||
:desc "Find recent project files" "r" #'projectile-recentf
|
||||
:desc "Run project" "R" #'projectile-run-project
|
||||
|
|
|
@ -52,7 +52,7 @@
|
|||
(evil-ex-define-cmd "pop[up]" #'+popup/buffer)
|
||||
|
||||
;;; Project navigation
|
||||
(evil-ex-define-cmd "a" #'projectile-find-other-file)
|
||||
(evil-ex-define-cmd "a" #'find-sibling-file)
|
||||
(evil-ex-define-cmd "cd" #'+evil:cd)
|
||||
(evil-ex-define-cmd "pwd" #'+evil:pwd)
|
||||
|
||||
|
|
|
@ -35,9 +35,9 @@ If STRICT only accept an unset lock file."
|
|||
(when (or strict (/= (emacs-pid) pid)) t))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +mu4e-lock-file-delete-maybe ()
|
||||
(defun +mu4e-lock-file-delete-maybe (&optional bury)
|
||||
"Check `+mu4e-lock-file', and delete it if this process is responsible for it."
|
||||
(when (+mu4e-lock-available)
|
||||
(when (and (+mu4e-lock-available) (not bury))
|
||||
(delete-file +mu4e-lock-file)
|
||||
(file-notify-rm-watch +mu4e-lock--request-watcher)))
|
||||
|
||||
|
|
|
@ -78,6 +78,8 @@ This is ignored by ccls.")
|
|||
:return "return"
|
||||
:yield "#require")
|
||||
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.c\\(c\\|pp\\)\\'" "\\1.\\(h\\|hh\\|hpp\\)"))
|
||||
|
||||
(when (modulep! +tree-sitter)
|
||||
(add-hook! '(c-mode-local-vars-hook
|
||||
c++-mode-local-vars-hook)
|
||||
|
|
|
@ -44,8 +44,9 @@ It does this by ignoring everything before the nearest package root (see
|
|||
root)."
|
||||
(cond ((doom-special-buffer-p (current-buffer))
|
||||
"{PackageName}")
|
||||
((not (eq major-mode 'java-mode))
|
||||
(user-error "Not in java-mode"))
|
||||
((and (not (eq major-mode 'java-mode))
|
||||
(not (eq major-mode 'java-ts-mode))
|
||||
(user-error "Not in java-mode or java-ts-mode")))
|
||||
((when-let (project-root (doom-project-root))
|
||||
(let* ((project-root (file-truename project-root))
|
||||
(file-path
|
||||
|
@ -73,8 +74,9 @@ root)."
|
|||
"Get the class name for the current file."
|
||||
(cond ((doom-special-buffer-p (current-buffer))
|
||||
"{ClassName}")
|
||||
((not (eq major-mode 'java-mode))
|
||||
(user-error "Not in java-mode"))
|
||||
((and (not (eq major-mode 'java-mode))
|
||||
(not (eq major-mode 'java-ts-mode))
|
||||
(user-error "Not in java-mode or java-ts-mode")))
|
||||
(buffer-file-name
|
||||
(file-name-sans-extension (file-name-base (buffer-file-name))))
|
||||
((user-error "Can't deduce the class name"))))
|
||||
|
|
|
@ -18,9 +18,7 @@ capture, the end position, and the output buffer.")
|
|||
(use-package! markdown-mode
|
||||
:mode ("/README\\(?:\\.md\\)?\\'" . gfm-mode)
|
||||
:init
|
||||
(setq markdown-enable-math t ; syntax highlighting for latex fragments
|
||||
markdown-enable-wiki-links t
|
||||
markdown-italic-underscore t
|
||||
(setq markdown-italic-underscore t
|
||||
markdown-asymmetric-header t
|
||||
markdown-gfm-additional-languages '("sh")
|
||||
markdown-make-gfm-checkboxes-buttons t
|
||||
|
|
|
@ -52,8 +52,8 @@ Alternatively, nim is usually available through your OS's package manager:
|
|||
- openSUSE: ~$ zypper install nim~
|
||||
|
||||
** Formatter
|
||||
|
||||
Formatting is handled using the [[doom-module::editor format]] module via [[https://github.com/FedericoCeratto/nimfmt#installation][nimfmt]].
|
||||
Formatting is handled using the [[doom-module::editor format]] module via nimpretty
|
||||
(included with Nim).
|
||||
|
||||
* TODO Usage
|
||||
#+begin_quote
|
||||
|
|
|
@ -12,7 +12,7 @@ nimsuggest isn't installed."
|
|||
(when (and nimsuggest-path (file-executable-p nimsuggest-path))
|
||||
(nimsuggest-mode))))
|
||||
|
||||
(set-formatter! 'nmfmt '("nimfmt" filepath) :modes '(nim-mode))
|
||||
(set-formatter! 'nmfmt '("nimpretty" filepath) :modes '(nim-mode))
|
||||
|
||||
(when (featurep :system 'windows)
|
||||
;; TODO File PR/report upstream (https://github.com/nim-lang/nim-mode)
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
;;; lang/nim/doctor.el
|
||||
|
||||
(unless (executable-find "nimsuggest")
|
||||
|
@ -8,5 +7,5 @@
|
|||
(warn! "Could not find nim executable; build commands will be disabled."))
|
||||
|
||||
(when (modulep! :editor format)
|
||||
(unless (executable-find "nimfmt")
|
||||
(warn! "Could not find nimfmt. Formatting will be disabled.")))
|
||||
(unless (executable-find "nimpretty")
|
||||
(warn! "Could not find nimpretty. Formatting will be disabled.")))
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
;;; requires nim nimsuggest nimble
|
||||
|
||||
(package! nim-mode :pin "1338e5b0d5e111ad932efb77d3cad680cc3b86c9")
|
||||
(package! nim-mode :pin "625cc023bd75a741b7d4e629e5bec3a52f45b4be")
|
||||
|
||||
(when (and (modulep! :checkers syntax)
|
||||
(not (modulep! :checkers syntax +flymake)))
|
||||
|
|
|
@ -1438,7 +1438,12 @@ between the two."
|
|||
;; HACK: Somehow, users/packages still find a way to modify tab-width in
|
||||
;; org-mode. Since org-mode treats a non-standerd tab-width as an error
|
||||
;; state, I use this hook to makes it much harder to change by accident.
|
||||
(add-hook! 'org-mode-hook :depth 110 (setq-local tab-width 8))
|
||||
(add-hook! 'org-mode-hook
|
||||
(add-hook! 'after-change-major-mode-hook :local
|
||||
;; The second check is necessary, in case of `org-edit-src-code' which
|
||||
;; clones a buffer and changes its major-mode.
|
||||
(when (derived-mode-p 'org-mode)
|
||||
(setq tab-width 8))))
|
||||
|
||||
;; Save target buffer after archiving a node.
|
||||
(setq org-archive-subtree-save-file-p t)
|
||||
|
|
|
@ -13,3 +13,9 @@ open."
|
|||
(when (processp process)
|
||||
(kill-process (get-buffer-process inf-buffer))
|
||||
(kill-buffer inf-buffer)))))))
|
||||
|
||||
;;;###autoload
|
||||
(defun +ruby-robe-repl-handler ()
|
||||
"Start Robe and open a REPL (for `set-repl-handler!')."
|
||||
(robe-start)
|
||||
(robe-inf-buffer))
|
||||
|
|
|
@ -48,7 +48,7 @@
|
|||
(bound-and-true-p lsp--buffer-deferred)
|
||||
(robe-mode +1))))
|
||||
:config
|
||||
(set-repl-handler! 'ruby-mode #'robe-start)
|
||||
(set-repl-handler! 'ruby-mode #'+ruby-robe-repl-handler)
|
||||
(set-company-backend! 'ruby-mode 'company-robe 'company-dabbrev-code)
|
||||
(set-lookup-handlers! 'ruby-mode
|
||||
:definition #'robe-jump
|
||||
|
|
|
@ -8,13 +8,7 @@ be aligned.
|
|||
|
||||
If set to `nil', disable all the above behaviors.")
|
||||
|
||||
(after! projectile
|
||||
(pushnew! projectile-other-file-alist
|
||||
'("css" "scss" "sass" "less" "styl")
|
||||
'("scss" "css")
|
||||
'("sass" "css")
|
||||
'("less" "css")
|
||||
'("styl" "css")))
|
||||
(add-to-list 'find-sibling-rules '("/\\([^/]+\\)\\.\\(\\(s[ac]\\|le\\)ss\\|styl\\)\\'" "\\1\\.css"))
|
||||
|
||||
|
||||
;;
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
* Description :unfold:
|
||||
This module adds support for various web languages, including HTML5, CSS,
|
||||
SASS/SCSS, Pug/Jade/Slim, and HAML, as well as various web frameworks, like
|
||||
ReactJS, Wordpress, Jekyll, Phaser, AngularJS, Djano, and more.
|
||||
ReactJS, Wordpress, Jekyll, Phaser, AngularJS, Django, and more.
|
||||
|
||||
** Maintainers
|
||||
- @hlissner
|
||||
|
@ -41,6 +41,9 @@ ReactJS, Wordpress, Jekyll, Phaser, AngularJS, Djano, and more.
|
|||
This module's hacks haven't been documented yet. [[doom-contrib-module:][Document them?]]
|
||||
#+end_quote
|
||||
|
||||
- Fixes ~//~ line commenting in JSX and Javascript files (if you aren't using
|
||||
:lang javascript for some reason)
|
||||
|
||||
** TODO Changelog
|
||||
# This section will be machine generated. Don't edit it by hand.
|
||||
/This module does not have a changelog yet./
|
||||
|
@ -49,13 +52,8 @@ ReactJS, Wordpress, Jekyll, Phaser, AngularJS, Djano, and more.
|
|||
[[id:01cffea4-3329-45e2-a892-95a384ab2338][Enable this module in your ~doom!~ block.]]
|
||||
|
||||
** Formatter
|
||||
|
||||
Formatting is handled using the [[doom-module::editor format]] module via [[https://prettier.io/docs/en/install.html][prettier]].
|
||||
|
||||
#+begin_quote
|
||||
/No installation steps have been documented./ [[doom-contrib-module:][Document them?]]
|
||||
#+end_quote
|
||||
|
||||
* TODO Usage
|
||||
#+begin_quote
|
||||
This module has no usage documentation yet. [[doom-contrib-module:][Write some?]]
|
||||
|
|
|
@ -29,12 +29,6 @@
|
|||
org-cite-activate-processor 'citar)
|
||||
|
||||
:config
|
||||
(after! embark
|
||||
(citar-embark-mode))
|
||||
|
||||
(after! org-roam
|
||||
(citar-org-roam-mode))
|
||||
|
||||
(when (modulep! :completion vertico +icons)
|
||||
(defvar citar-indicator-files-icons
|
||||
(citar-indicator-create
|
||||
|
@ -81,6 +75,20 @@
|
|||
;;
|
||||
;;; Third-party
|
||||
|
||||
(use-package! citar-embark
|
||||
:defer t
|
||||
:init
|
||||
(after! (citar embark)
|
||||
(citar-embark-mode)))
|
||||
|
||||
|
||||
(use-package! citar-org-roam
|
||||
:defer t
|
||||
:init
|
||||
(after! (citar org-roam)
|
||||
(citar-org-roam-mode)))
|
||||
|
||||
|
||||
(use-package! bibtex-completion
|
||||
:when (or (modulep! :completion ivy)
|
||||
(modulep! :completion helm))
|
||||
|
|
|
@ -1,21 +1,5 @@
|
|||
;;; tools/editorconfig/config.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; editorconfig cannot procure the correct settings for extension-less files.
|
||||
;; Executable scripts with a shebang line, for example. So why not use Emacs'
|
||||
;; major mode to drop editorconfig a hint? This is accomplished by temporarily
|
||||
;; appending an extension to `buffer-file-name' when we talk to editorconfig.
|
||||
(defvar +editorconfig-mode-alist
|
||||
'((emacs-lisp-mode . "el")
|
||||
(js2-mode . "js")
|
||||
(perl-mode . "pl")
|
||||
(php-mode . "php")
|
||||
(python-mode . "py")
|
||||
(ruby-mode . "rb")
|
||||
(sh-mode . "sh"))
|
||||
"An alist mapping major modes to extensions. Used by
|
||||
`doom--editorconfig-smart-detection-a' to give editorconfig filetype hints.")
|
||||
|
||||
|
||||
;; Handles whitespace (tabs/spaces) settings externally. This way projects can
|
||||
;; specify their own formatting rules.
|
||||
(use-package! editorconfig
|
||||
|
@ -30,24 +14,20 @@
|
|||
(add-to-list 'editorconfig-exclude-regexps
|
||||
"\\.\\(zip\\|\\(doc\\|xls\\|ppt\\)x\\)\\'")
|
||||
|
||||
(defadvice! +editorconfig--smart-detection-a (fn)
|
||||
"Retrieve the properties for the current file. If it doesn't have an
|
||||
extension, try to guess one."
|
||||
:around #'editorconfig-call-editorconfig-exec
|
||||
(let ((buffer-file-name
|
||||
(if (and (not (bound-and-true-p org-src-mode))
|
||||
(file-name-extension buffer-file-name))
|
||||
buffer-file-name
|
||||
(format "%s%s" (buffer-file-name (buffer-base-buffer))
|
||||
(if-let (ext (alist-get major-mode +editorconfig-mode-alist))
|
||||
(concat "." ext)
|
||||
"")))))
|
||||
(funcall fn)))
|
||||
|
||||
(add-hook! 'editorconfig-after-apply-functions
|
||||
(defun +editorconfig-disable-indent-detection-h (props)
|
||||
"Inhibit `dtrt-indent' if an explicit indent_style and indent_size is
|
||||
specified by editorconfig."
|
||||
(when (or (gethash 'indent_style props)
|
||||
(gethash 'indent_size props))
|
||||
(setq doom-inhibit-indent-detection 'editorconfig)))))
|
||||
(when (and (not doom-inhibit-indent-detection)
|
||||
(or (gethash 'indent_style props)
|
||||
(gethash 'indent_size props)))
|
||||
(setq doom-inhibit-indent-detection 'editorconfig)))
|
||||
;; I use a hook over `editorconfig-exclude-modes' because the option
|
||||
;; inhibits all settings, and I only want to inhibit indent_size. Plus modes
|
||||
;; in that option won't apply to derived modes, so we'd have to add *all*
|
||||
;; possible org-mode derivatives to it.
|
||||
(defun +editorconfig-unset-tab-width-in-org-mode-h (props)
|
||||
"A tab-width != 8 is an error state in org-mode, so prevent changing it."
|
||||
(when (and (gethash 'indent_size props)
|
||||
(derived-mode-p 'org-mode))
|
||||
(setq tab-width 8)))))
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
|
||||
(package! editorconfig
|
||||
:recipe (:nonrecursive t)
|
||||
:pin "4b81a5992858cbf03bcd7ed6ef31e4be0b55a7c1")
|
||||
:pin "c3666c093f3a2a80fb42e513bf0a10d597497c18")
|
||||
|
|
|
@ -44,7 +44,12 @@ This must be set before `treemacs' has loaded.")
|
|||
|
||||
|
||||
(use-package! treemacs-nerd-icons
|
||||
:after ( treemacs lsp-treemacs nerd-icons)
|
||||
:defer t
|
||||
;; HACK: Because `lsp-treemacs' mutates Treemacs' default theme, and
|
||||
;; `treemacs-nerd-icons' reads from it to populate its nerd-icons theme,
|
||||
;; load order is important to ensure they don't step on each other's toes.
|
||||
:init (with-eval-after-load (if (modulep! +lsp) 'lsp-treemacs 'treemacs)
|
||||
(require 'treemacs-nerd-icons))
|
||||
:config (treemacs-load-theme "nerd-icons"))
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue