changed the config-* prefix to init-* for all of the init files
parent
ceaa741cfb
commit
6fac8a28da
@ -1,5 +0,0 @@
|
|||||||
(require 'config-text-mode)
|
|
||||||
|
|
||||||
(load "config-conf-mode-hooks")
|
|
||||||
|
|
||||||
(provide 'config-conf-mode)
|
|
@ -1,9 +0,0 @@
|
|||||||
(defvar config-eglot-server-clangd '((c-mode c++-mode) .
|
|
||||||
("clangd"
|
|
||||||
"--header-insersion=never")))
|
|
||||||
|
|
||||||
(defvar config-eglot-server-rust-analyzer '((rust-mode) .
|
|
||||||
("rust-analyzer")))
|
|
||||||
|
|
||||||
(add-to-list 'eglot-server-programs config-eglot-server-clangd)
|
|
||||||
(add-to-list 'eglot-server-programs config-eglot-server-rust-analyzer)
|
|
@ -1,7 +0,0 @@
|
|||||||
(require 'eglot)
|
|
||||||
|
|
||||||
(setq eglot-autoshutdown t)
|
|
||||||
|
|
||||||
(load "config-eglot-servers")
|
|
||||||
|
|
||||||
(provide 'config-eglot)
|
|
@ -1,5 +0,0 @@
|
|||||||
(require 'config-text-mode)
|
|
||||||
|
|
||||||
(load "config-prog-mode-hooks")
|
|
||||||
|
|
||||||
(provide 'config-prog-mode)
|
|
@ -1,3 +0,0 @@
|
|||||||
(load "config-project-find-rust-projects")
|
|
||||||
|
|
||||||
(provide 'config-project)
|
|
@ -1,3 +0,0 @@
|
|||||||
(load "config-text-mode-hooks")
|
|
||||||
|
|
||||||
(provide 'config-text-mode)
|
|
@ -0,0 +1,5 @@
|
|||||||
|
(require 'init-text-mode)
|
||||||
|
|
||||||
|
(load "init-conf-mode-hooks")
|
||||||
|
|
||||||
|
(provide 'init-conf-mode)
|
@ -1,4 +1,4 @@
|
|||||||
(setq dired-listing-switches "-alh"
|
(setq dired-listing-switches "-alh"
|
||||||
dired-kill-when-opening-new-dired-buffer t)
|
dired-kill-when-opening-new-dired-buffer t)
|
||||||
|
|
||||||
(provide 'config-dired)
|
(provide 'init-dired)
|
@ -1,7 +1,7 @@
|
|||||||
(defun config-display-buffer-frame-wide-p ()
|
(defun init-display-buffer-frame-wide-p ()
|
||||||
(> (frame-pixel-width) (/ (x-display-pixel-width) 2)))
|
(> (frame-pixel-width) (/ (x-display-pixel-width) 2)))
|
||||||
|
|
||||||
(defun config-display-buffer-best-side (buffer alist)
|
(defun init-display-buffer-best-side (buffer alist)
|
||||||
(let* ((side (funcall (alist-get 'which-side alist)))
|
(let* ((side (funcall (alist-get 'which-side alist)))
|
||||||
(alist (append (cdr alist) (list (cons 'side side)))))
|
(alist (append (cdr alist) (list (cons 'side side)))))
|
||||||
(display-buffer-in-side-window buffer alist)))
|
(display-buffer-in-side-window buffer alist)))
|
@ -1,5 +1,5 @@
|
|||||||
(setq display-buffer-base-action '(display-buffer-same-window display-buffer-reuse-window))
|
(setq display-buffer-base-action '(display-buffer-same-window display-buffer-reuse-window))
|
||||||
|
|
||||||
(load "config-display-buffer-best-side")
|
(load "init-display-buffer-best-side")
|
||||||
|
|
||||||
(provide 'config-display-buffer)
|
(provide 'init-display-buffer)
|
@ -0,0 +1,9 @@
|
|||||||
|
(defvar init-eglot-server-clangd '((c-mode c++-mode) .
|
||||||
|
("clangd"
|
||||||
|
"--header-insersion=never")))
|
||||||
|
|
||||||
|
(defvar init-eglot-server-rust-analyzer '((rust-mode) .
|
||||||
|
("rust-analyzer")))
|
||||||
|
|
||||||
|
(add-to-list 'eglot-server-programs init-eglot-server-clangd)
|
||||||
|
(add-to-list 'eglot-server-programs init-eglot-server-rust-analyzer)
|
@ -0,0 +1,7 @@
|
|||||||
|
(require 'eglot)
|
||||||
|
|
||||||
|
(setq eglot-autoshutdown t)
|
||||||
|
|
||||||
|
(load "init-eglot-servers")
|
||||||
|
|
||||||
|
(provide 'init-eglot)
|
@ -1,4 +1,4 @@
|
|||||||
(setq eldoc-idle-delay 0
|
(setq eldoc-idle-delay 0
|
||||||
eldoc-echo-area-use-multiline-p 5)
|
eldoc-echo-area-use-multiline-p 5)
|
||||||
|
|
||||||
(provide 'config-eldoc)
|
(provide 'init-eldoc)
|
@ -1,7 +1,7 @@
|
|||||||
(defun config-flycheck-rust-cargo-has-command-p (command)
|
(defun init-flycheck-rust-cargo-has-command-p (command)
|
||||||
(let* ((commands (process-lines "cargo" "--list"))
|
(let* ((commands (process-lines "cargo" "--list"))
|
||||||
(trimmed (-map (lambda (row) (-slice row 4 (string-search " " 4))) commands)))
|
(trimmed (-map (lambda (row) (-slice row 4 (string-search " " 4))) commands)))
|
||||||
(seq-contains-p (-rest trimmed) command)))
|
(seq-contains-p (-rest trimmed) command)))
|
||||||
|
|
||||||
(advice-add 'flycheck-rust-cargo-has-command-p
|
(advice-add 'flycheck-rust-cargo-has-command-p
|
||||||
:override 'config-flycheck-rust-cargo-has-command-p)
|
:override 'init-flycheck-rust-cargo-has-command-p)
|
@ -1,15 +1,15 @@
|
|||||||
(require 'flycheck)
|
(require 'flycheck)
|
||||||
|
|
||||||
(load "config-flycheck-cargo-has-command-p-fix")
|
(load "init-flycheck-cargo-has-command-p-fix")
|
||||||
|
|
||||||
(add-hook 'flycheck-error-list-mode-hook (lambda () (visual-line-mode 1)))
|
(add-hook 'flycheck-error-list-mode-hook (lambda () (visual-line-mode 1)))
|
||||||
|
|
||||||
(add-to-list 'display-buffer-alist '("\\*Flycheck errors.*"
|
(add-to-list 'display-buffer-alist '("\\*Flycheck errors.*"
|
||||||
(config-display-buffer-best-side)
|
(init-display-buffer-best-side)
|
||||||
(which-side . (lambda ()
|
(which-side . (lambda ()
|
||||||
(if (config-display-buffer-frame-wide-p)
|
(if (init-display-buffer-frame-wide-p)
|
||||||
'right
|
'right
|
||||||
'bottom)))))
|
'bottom)))))
|
||||||
|
|
||||||
|
|
||||||
(provide 'config-flycheck)
|
(provide 'init-flycheck)
|
@ -1,12 +1,12 @@
|
|||||||
(require 'flymake)
|
(require 'flymake)
|
||||||
|
|
||||||
(load "config-flymake-hooks")
|
(load "init-flymake-hooks")
|
||||||
|
|
||||||
(add-to-list 'display-buffer-alist '("\\*Flymake diagnostics.*"
|
(add-to-list 'display-buffer-alist '("\\*Flymake diagnostics.*"
|
||||||
(config-display-buffer-best-side)
|
(init-display-buffer-best-side)
|
||||||
(which-side . (lambda ()
|
(which-side . (lambda ()
|
||||||
(if (config-display-buffer-frame-wide-p)
|
(if (init-display-buffer-frame-wide-p)
|
||||||
'right
|
'right
|
||||||
'bottom)))))
|
'bottom)))))
|
||||||
|
|
||||||
(provide 'config-flymake)
|
(provide 'init-flymake)
|
@ -1,3 +1,3 @@
|
|||||||
(setq gc-cons-threshold (* (expt 1024 2) 25))
|
(setq gc-cons-threshold (* (expt 1024 2) 25))
|
||||||
|
|
||||||
(provide 'config-garbage-collection)
|
(provide 'init-garbage-collection)
|
@ -1,40 +1,40 @@
|
|||||||
(setq lsp-server-install-dir "/somewhere/that/doesnt/exist")
|
(setq lsp-server-install-dir "/somewhere/that/doesnt/exist")
|
||||||
|
|
||||||
(defun config-lsp-mode-disable-install-server-error ()
|
(defun init-lsp-mode-disable-install-server-error ()
|
||||||
(error "lsp-mode server install features have been disabled"))
|
(error "lsp-mode server install features have been disabled"))
|
||||||
|
|
||||||
(advice-add 'lsp-install-server
|
(advice-add 'lsp-install-server
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp-update-server
|
(advice-add 'lsp-update-server
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp-update-servers
|
(advice-add 'lsp-update-servers
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp-download-install
|
(advice-add 'lsp-download-install
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp-download-path
|
(advice-add 'lsp-download-path
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp-async-start-process
|
(advice-add 'lsp-async-start-process
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp--download-status
|
(advice-add 'lsp--download-status
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp--install-server-internal
|
(advice-add 'lsp--install-server-internal
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
||||||
|
|
||||||
(advice-add 'lsp--npm-dependency-install
|
(advice-add 'lsp--npm-dependency-install
|
||||||
:around
|
:around
|
||||||
'config-lsp-mode-disable-install-server-error)
|
'init-lsp-mode-disable-install-server-error)
|
@ -1,3 +1,3 @@
|
|||||||
(setq Man-notify-method 'pushy)
|
(setq Man-notify-method 'pushy)
|
||||||
|
|
||||||
(provide 'config-man)
|
(provide 'init-man)
|
@ -1,3 +1,3 @@
|
|||||||
(setq native-comp-async-jobs-number (string-to-number (shell-command-to-string "nproc")))
|
(setq native-comp-async-jobs-number (string-to-number (shell-command-to-string "nproc")))
|
||||||
|
|
||||||
(provide 'config-native-comp)
|
(provide 'init-native-comp)
|
@ -1,4 +1,4 @@
|
|||||||
(setq package-archives nil
|
(setq package-archives nil
|
||||||
package-check-signature 'all)
|
package-check-signature 'all)
|
||||||
|
|
||||||
(provide 'config-package)
|
(provide 'init-package)
|
@ -0,0 +1,5 @@
|
|||||||
|
(require 'init-text-mode)
|
||||||
|
|
||||||
|
(load "init-prog-mode-hooks")
|
||||||
|
|
||||||
|
(provide 'init-prog-mode)
|
@ -0,0 +1,3 @@
|
|||||||
|
(load "init-project-find-rust-projects")
|
||||||
|
|
||||||
|
(provide 'init-project)
|
@ -1,4 +1,4 @@
|
|||||||
(setq recentf-max-menu-items 25
|
(setq recentf-max-menu-items 25
|
||||||
recentf-max-saved-items 25)
|
recentf-max-saved-items 25)
|
||||||
|
|
||||||
(provide 'config-recentf)
|
(provide 'init-recentf)
|
@ -0,0 +1,3 @@
|
|||||||
|
(load "init-text-mode-hooks")
|
||||||
|
|
||||||
|
(provide 'init-text-mode)
|
@ -1,56 +0,0 @@
|
|||||||
(let ((config-directory (file-name-concat user-emacs-directory "config")))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "company"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "conf-mode"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "dired"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "display-buffer"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "eglot"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "eldoc"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "electric"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "flycheck"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "flymake"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "garbage-collection"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "ibuffer"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "keys"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "man"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "lsp-mode"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "native-comp"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "package"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "prog-mode"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "project"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "recentf"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "savehist"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "text-mode"))
|
|
||||||
(add-to-list 'load-path (file-name-concat config-directory "tramp")))
|
|
||||||
|
|
||||||
(require 'config-text-mode)
|
|
||||||
(require 'config-conf-mode)
|
|
||||||
(require 'config-prog-mode)
|
|
||||||
(require 'config-dired)
|
|
||||||
(require 'config-display-buffer)
|
|
||||||
(require 'config-eldoc)
|
|
||||||
(require 'config-electric)
|
|
||||||
(require 'config-flymake)
|
|
||||||
(require 'config-garbage-collection)
|
|
||||||
(require 'config-ibuffer)
|
|
||||||
(require 'config-keys)
|
|
||||||
(require 'config-man)
|
|
||||||
(require 'config-package)
|
|
||||||
(require 'config-project)
|
|
||||||
(require 'config-recentf)
|
|
||||||
(require 'config-savehist)
|
|
||||||
(require 'config-tramp)
|
|
||||||
|
|
||||||
(when (locate-library "company")
|
|
||||||
(require 'config-company))
|
|
||||||
|
|
||||||
(when (locate-library "eglot")
|
|
||||||
(require 'config-eglot))
|
|
||||||
|
|
||||||
(when (locate-library "flycheck")
|
|
||||||
(require 'config-flycheck))
|
|
||||||
|
|
||||||
(when (locate-library "lsp-mode")
|
|
||||||
(require 'config-lsp-mode))
|
|
||||||
|
|
||||||
(when (and (> emacs-major-version 28) (native-comp-available-p))
|
|
||||||
(require 'config-native-comp))
|
|
@ -1,4 +0,0 @@
|
|||||||
(let ((local-lisp-directory (file-name-concat user-emacs-directory "lisp")))
|
|
||||||
(add-to-list 'load-path (file-name-concat local-lisp-directory "man-wrapper")))
|
|
||||||
|
|
||||||
(require 'man-wrapper)
|
|
Loading…
Reference in New Issue