diff --git a/core/core-editor.el b/core/core-editor.el index c7ef92c04..3a5da8ef7 100644 --- a/core/core-editor.el +++ b/core/core-editor.el @@ -53,7 +53,6 @@ detected.") (setq-hook! '(eshell-mode-hook term-mode-hook) hscroll-margin 0) (defun doom*optimize-literal-mode-for-large-files (buffer) - "TODO" (with-current-buffer buffer (when find-file-literally (setq buffer-read-only t) @@ -233,7 +232,7 @@ savehist file." `(("." . ,(concat doom-cache-dir "undo-tree-hist/")))) (global-undo-tree-mode +1) - ;; compress undo history with xz + ;; compress undo history with xz/gzip (and (fset 'doom*undo-tree-make-history-save-file-name (cond ((executable-find "zstd") (lambda (file) (concat file ".zst"))) ((executable-find "gzip") (lambda (file) (concat file ".gz"))))) diff --git a/core/core-modules.el b/core/core-modules.el index 5cd92540c..140be24f7 100644 --- a/core/core-modules.el +++ b/core/core-modules.el @@ -59,11 +59,9 @@ session of Dooming. Will noop if used more than once, unless FORCE-P is non-nil." (when (or force-p (not doom-init-modules-p)) (setq doom-init-modules-p t) - (load! "init" doom-private-dir t) (unless doom-modules (setq doom-modules (make-hash-table :test 'equal))) - (maphash (lambda (key plist) (let ((doom--current-module key) (doom--current-flags (plist-get plist :flags))) diff --git a/core/core-projects.el b/core/core-projects.el index 7734ee700..e8a71725b 100644 --- a/core/core-projects.el +++ b/core/core-projects.el @@ -49,21 +49,22 @@ Emacs.") "Purge projectile cache entries that: a) have too many files (see `doom-projectile-cache-limit'), -b) represent blacklised directories that are too big, change too often or are +b) represent blacklisted directories that are too big, change too often or are private. (see `doom-projectile-cache-blacklist'), c) are not valid projectile projects." - (cl-loop with blacklist = (mapcar #'file-truename doom-projectile-cache-blacklist) - for proot in (hash-table-keys projectile-projects-cache) - for len = (length (gethash proot projectile-projects-cache)) - if (or (>= len doom-projectile-cache-limit) - (member (substring proot 0 -1) blacklist) - (and doom-projectile-cache-purge-non-projects - (not (doom-project-p proot)))) - do (doom-log "Removed %S from projectile cache" proot) - and do (remhash proot projectile-projects-cache) - and do (remhash proot projectile-projects-cache-time) - and do (remhash proot projectile-project-type-cache)) - (projectile-serialize-cache)) + (when (bound-and-true-p projectile-projects-cache) + (cl-loop with blacklist = (mapcar #'file-truename doom-projectile-cache-blacklist) + for proot in (hash-table-keys projectile-projects-cache) + for len = (length (gethash proot projectile-projects-cache)) + if (or (>= len doom-projectile-cache-limit) + (member (substring proot 0 -1) blacklist) + (and doom-projectile-cache-purge-non-projects + (not (doom-project-p proot)))) + do (doom-log "Removed %S from projectile cache" proot) + and do (remhash proot projectile-projects-cache) + and do (remhash proot projectile-projects-cache-time) + and do (remhash proot projectile-project-type-cache)) + (projectile-serialize-cache))) (add-hook 'kill-emacs-hook #'doom|cleanup-project-cache) ;; It breaks projectile's project root resolution if HOME is a project (e.g. diff --git a/modules/completion/ivy/config.el b/modules/completion/ivy/config.el index ded6ab898..fafaf372e 100644 --- a/modules/completion/ivy/config.el +++ b/modules/completion/ivy/config.el @@ -68,11 +68,11 @@ immediately runs it on the current candidate (ending the ivy session)." (after! yasnippet (add-to-list 'yas-prompt-functions #'+ivy-yas-prompt nil #'eq)) - (map! :map ivy-mode-map - [remap switch-to-buffer] #'+ivy/switch-buffer - [remap switch-to-buffer-other-window] #'+ivy/switch-buffer-other-window - [remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer - [remap imenu-anywhere] #'ivy-imenu-anywhere) + (define-key! ivy-mode-map + [remap switch-to-buffer] #'+ivy/switch-buffer + [remap switch-to-buffer-other-window] #'+ivy/switch-buffer-other-window + [remap persp-switch-to-buffer] #'+ivy/switch-workspace-buffer + [remap imenu-anywhere] #'ivy-imenu-anywhere) (ivy-mode +1) diff --git a/modules/lang/ruby/config.el b/modules/lang/ruby/config.el index 0bc4b7d20..b2cba8e06 100644 --- a/modules/lang/ruby/config.el +++ b/modules/lang/ruby/config.el @@ -8,7 +8,8 @@ :mode ("\\.\\(?:rb\\|rake\\|rabl\\|ru\\|builder\\|gemspec\\|jbuilder\\|thor\\)\\'" . +ruby|init) :mode ("/\\(?:Berks\\|Cap\\|Gem\\|Guard\\|Pod\\|Puppet\\|Rake\\|Thor\\|Vagrant\\)file\\'" . +ruby|init) :preface - (after! ruby-mode (require 'enh-ruby-mode)) + (after! ruby-mode + (require 'enh-ruby-mode)) (defun +ruby|init () "Enable `enh-ruby-mode' if ruby is available, otherwise `ruby-mode'." (if (executable-find "ruby") diff --git a/modules/tools/lsp/README.org b/modules/tools/lsp/README.org index a94b4af7a..b7a30aac3 100644 --- a/modules/tools/lsp/README.org +++ b/modules/tools/lsp/README.org @@ -27,7 +27,7 @@ To get LSP working, you'll need two things: support, you'll have to configure your own (described in the Configuration section). -As of this writing, these Doom modules possess LSP support: +As of this writing, this is the state of LSP support in Doom Emacs: | Module | Major modes | Default language server | |------------------+---------------------------------------------------------+---------------------------------------------------------------| @@ -53,8 +53,8 @@ This module provides no flags. + [[https://github.com/tigersoldier/company-lsp][company-lsp]]* * Prerequisites -This module has no direct prerequisites, but to get LSP working, you'll need to -install language servers. +This module has no direct prerequisites, but major-modes require you to install +language servers. You'll find a table that lists available language servers and how to install them [[https://github.com/emacs-lsp/lsp-mode#supported-languages][in the lsp-mode project README]]. The documentation of the module for your