changed the config-* prefix to init-* for all of the init files

master
John Turner 2 years ago
parent ceaa741cfb
commit 6fac8a28da
No known key found for this signature in database
GPG Key ID: 422FE10CC41A94A2

2
.gitignore vendored

@ -5,5 +5,5 @@
!/load-lisp.el
!/custom.el
!/themes
!/config
!/init
!/lisp

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

@ -35,3 +35,65 @@
(scroll-bar-mode 0)
(tool-bar-mode 0)
(tooltip-mode 0)
(let ((config-directory (file-name-concat user-emacs-directory "init")))
(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 'init-text-mode)
(require 'init-conf-mode)
(require 'init-prog-mode)
(require 'init-dired)
(require 'init-display-buffer)
(require 'init-eldoc)
(require 'init-electric)
(require 'init-flymake)
(require 'init-garbage-collection)
(require 'init-ibuffer)
(require 'init-keys)
(require 'init-man)
(require 'init-package)
(require 'init-project)
(require 'init-recentf)
(require 'init-savehist)
(require 'init-tramp)
(when (locate-library "company")
(require 'init-company))
(when (locate-library "eglot")
(require 'init-eglot))
(when (locate-library "flycheck")
(require 'init-flycheck))
(when (locate-library "lsp-mode")
(require 'init-lsp-mode))
(when (and (> emacs-major-version 28) (native-comp-available-p))
(require 'init-native-comp))
(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)

@ -5,4 +5,4 @@
company-clang-insert-arguments nil
company-minimum-prefix-length 1)
(provide 'config-company)
(provide 'init-company)

@ -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"
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)))
(defun config-display-buffer-best-side (buffer alist)
(defun init-display-buffer-best-side (buffer alist)
(let* ((side (funcall (alist-get 'which-side alist)))
(alist (append (cdr alist) (list (cons 'side side)))))
(display-buffer-in-side-window buffer alist)))

@ -1,5 +1,5 @@
(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
eldoc-echo-area-use-multiline-p 5)
(provide 'config-eldoc)
(provide 'init-eldoc)

@ -4,4 +4,4 @@
(add-to-list 'electric-pair-pairs '("?(" . "?)"))
(add-to-list 'electric-pair-pairs '("?{" . "?}"))
(provide 'config-electric)
(provide 'init-electric)

@ -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"))
(trimmed (-map (lambda (row) (-slice row 4 (string-search " " 4))) commands)))
(seq-contains-p (-rest trimmed) command)))
(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)
(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-to-list 'display-buffer-alist '("\\*Flycheck errors.*"
(config-display-buffer-best-side)
(init-display-buffer-best-side)
(which-side . (lambda ()
(if (config-display-buffer-frame-wide-p)
(if (init-display-buffer-frame-wide-p)
'right
'bottom)))))
(provide 'config-flycheck)
(provide 'init-flycheck)

@ -1,12 +1,12 @@
(require 'flymake)
(load "config-flymake-hooks")
(load "init-flymake-hooks")
(add-to-list 'display-buffer-alist '("\\*Flymake diagnostics.*"
(config-display-buffer-best-side)
(init-display-buffer-best-side)
(which-side . (lambda ()
(if (config-display-buffer-frame-wide-p)
(if (init-display-buffer-frame-wide-p)
'right
'bottom)))))
(provide 'config-flymake)
(provide 'init-flymake)

@ -1,3 +1,3 @@
(setq gc-cons-threshold (* (expt 1024 2) 25))
(provide 'config-garbage-collection)
(provide 'init-garbage-collection)

@ -7,4 +7,4 @@
(add-hook 'ibuffer-mode-hook (lambda () (ibuffer-switch-to-saved-filter-groups "default")))
(provide 'config-ibuffer-filter-groups)
(provide 'init-ibuffer-filter-groups)

@ -13,4 +13,4 @@
(t
(format "%sB" size)))))
(provide 'config-ibuffer-human-readable-size)
(provide 'init-ibuffer-human-readable-size)

@ -1,4 +1,4 @@
(defvar config-ibuffer-never-show '("^\\*Messages\\*$"
(defvar init-ibuffer-never-show '("^\\*Messages\\*$"
"^\\*Help\\*$"
"^\\*Completions\\*$"
"^\\*Backtrace\\*$"
@ -8,6 +8,6 @@
(mapc (lambda (p)
(add-to-list 'ibuffer-never-show-predicates p))
config-ibuffer-never-show)
init-ibuffer-never-show)
(provide 'config-ibuffer-never-show)
(provide 'init-ibuffer-never-show)

@ -1,8 +1,8 @@
(require 'ibuffer)
(require 'ibuf-ext)
(require 'config-ibuffer-human-readable-size)
(require 'config-ibuffer-never-show)
(require 'config-ibuffer-filter-groups)
(require 'init-ibuffer-human-readable-size)
(require 'init-ibuffer-never-show)
(require 'init-ibuffer-filter-groups)
(setq ibuffer-display-summary nil
ibuffer-expert t)
@ -19,4 +19,4 @@
(name 16 -1)
" " filename)))
(provide 'config-ibuffer)
(provide 'init-ibuffer)

@ -9,4 +9,4 @@
(global-set-key (kbd "C-x k") 'kill-buffer)
(global-set-key (kbd "C-x C-b") 'ibuffer)
(provide 'config-keys)
(provide 'init-keys)

@ -1,40 +1,40 @@
(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"))
(advice-add 'lsp-install-server
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp-update-server
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp-update-servers
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp-download-install
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp-download-path
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp-async-start-process
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp--download-status
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp--install-server-internal
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)
(advice-add 'lsp--npm-dependency-install
:around
'config-lsp-mode-disable-install-server-error)
'init-lsp-mode-disable-install-server-error)

@ -14,6 +14,6 @@
lsp-rls-server-command nil
lsp-enable-suggest-server-download nil)
(load "config-lsp-mode-disable-install-server")
(load "init-lsp-mode-disable-install-server")
(provide 'config-lsp-mode)
(provide 'init-lsp-mode)

@ -1,3 +1,3 @@
(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")))
(provide 'config-native-comp)
(provide 'init-native-comp)

@ -1,4 +1,4 @@
(setq package-archives nil
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
recentf-max-saved-items 25)
(provide 'config-recentf)
(provide 'init-recentf)

@ -8,4 +8,4 @@
(unless (file-exists-p savehist-file)
(make-empty-file savehist-file))
(provide 'config-savehist)
(provide 'init-savehist)

@ -0,0 +1,3 @@
(load "init-text-mode-hooks")
(provide 'init-text-mode)

@ -4,7 +4,7 @@
password-cache-expiry 0
tramp-persistency-file-name nil)
(load "config-tramp-connection-properties")
(load "config-tramp-sudo-hang-fix")
(load "init-tramp-connection-properties")
(load "init-tramp-sudo-hang-fix")
(provide 'config-tramp)
(provide 'init-tramp)

@ -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…
Cancel
Save