some tweakage
This commit is contained in:
parent
4aa1455039
commit
a7c5be6b80
|
@ -0,0 +1,12 @@
|
||||||
|
# Backup files
|
||||||
|
**~
|
||||||
|
|
||||||
|
# Auto-generated files
|
||||||
|
auto-save-list
|
||||||
|
|
||||||
|
# Cache files
|
||||||
|
/cache/
|
||||||
|
/elpy/
|
||||||
|
/ac-comphist.dat
|
||||||
|
/ido.last
|
||||||
|
/transient/
|
50
init.el
50
init.el
|
@ -1,19 +1,7 @@
|
||||||
;;; startup without syntax highlighting
|
;;; startup without syntax highlighting
|
||||||
;;; (global-font-lock-mode 0)
|
;;; (global-font-lock-mode 0)
|
||||||
|
|
||||||
;; set up package handling
|
|
||||||
(require 'package)
|
|
||||||
|
|
||||||
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
|
||||||
(add-to-list 'package-archives
|
|
||||||
'("melpa" . "https://melpa.org/packages/"))
|
|
||||||
|
|
||||||
(package-initialize)
|
|
||||||
(require 'cl-lib)
|
(require 'cl-lib)
|
||||||
(let* ((home-dir (getenv "HOME"))
|
|
||||||
(ensure-lisp (cl-concatenate
|
|
||||||
'string home-dir "/.emacs.d/ensure.el")))
|
|
||||||
(load ensure-lisp))
|
|
||||||
|
|
||||||
(defun localize-path (path)
|
(defun localize-path (path)
|
||||||
"If the path is relative, place it in the user's home directory."
|
"If the path is relative, place it in the user's home directory."
|
||||||
|
@ -28,9 +16,30 @@ Returns a list with all items for which tst is false removed from lst."
|
||||||
(mapcan #'(lambda (x) (when (funcall tst x) (list x))) lst))
|
(mapcan #'(lambda (x) (when (funcall tst x) (list x))) lst))
|
||||||
|
|
||||||
(defun localize-and-filter (paths)
|
(defun localize-and-filter (paths)
|
||||||
|
"Given a list of paths, localize them and remove any that aren't
|
||||||
|
present on disk."
|
||||||
(remove-if-not #'file-exists-p
|
(remove-if-not #'file-exists-p
|
||||||
(mapcar #'localize-path paths)))
|
(mapcar #'localize-path paths)))
|
||||||
|
|
||||||
|
(defun cache-path (path)
|
||||||
|
"Return a localized, expanded path within the emacs cache directory."
|
||||||
|
(expand-file-name path
|
||||||
|
(expand-file-name "cache" user-emacs-directory)))
|
||||||
|
|
||||||
|
;; set up package handling
|
||||||
|
(require 'package)
|
||||||
|
(setq package-user-dir (cache-path "packages"))
|
||||||
|
|
||||||
|
(setq gnutls-algorithm-priority "NORMAL:-VERS-TLS1.3")
|
||||||
|
(add-to-list 'package-archives
|
||||||
|
'("melpa" . "https://melpa.org/packages/"))
|
||||||
|
|
||||||
|
(package-initialize)
|
||||||
|
(let* ((home-dir (getenv "HOME"))
|
||||||
|
(ensure-lisp (cl-concatenate
|
||||||
|
'string home-dir "/.emacs.d/ensure.el")))
|
||||||
|
(load ensure-lisp))
|
||||||
|
|
||||||
;; reduce brain damage
|
;; reduce brain damage
|
||||||
(tool-bar-mode 0)
|
(tool-bar-mode 0)
|
||||||
(menu-bar-mode 0)
|
(menu-bar-mode 0)
|
||||||
|
@ -42,9 +51,7 @@ Returns a list with all items for which tst is false removed from lst."
|
||||||
(setq dired-use-ls-dired nil))
|
(setq dired-use-ls-dired nil))
|
||||||
|
|
||||||
(setq backup-directory-alist
|
(setq backup-directory-alist
|
||||||
`(("." . ,(expand-file-name
|
`(("." . ,(cache-path "backups"))))
|
||||||
"tmp/backups/"
|
|
||||||
user-emacs-directory))))
|
|
||||||
|
|
||||||
;; useful when writing
|
;; useful when writing
|
||||||
(global-set-key (kbd "C-c w") 'count-words)
|
(global-set-key (kbd "C-c w") 'count-words)
|
||||||
|
@ -60,6 +67,7 @@ Returns a list with all items for which tst is false removed from lst."
|
||||||
(global-set-key (kbd "<C-tab>") 'ac-expand)
|
(global-set-key (kbd "<C-tab>") 'ac-expand)
|
||||||
|
|
||||||
;; eshell is pretty okay
|
;; eshell is pretty okay
|
||||||
|
(setq eshell-directory-name (cache-path "eshell"))
|
||||||
(global-set-key (kbd "C-x m") 'eshell)
|
(global-set-key (kbd "C-x m") 'eshell)
|
||||||
|
|
||||||
;; ido-mode makes finding files way more awesome
|
;; ido-mode makes finding files way more awesome
|
||||||
|
@ -162,8 +170,15 @@ Returns a list with all items for which tst is false removed from lst."
|
||||||
|
|
||||||
;;; Project Interaction Library for Emacs
|
;;; Project Interaction Library for Emacs
|
||||||
(require 'projectile)
|
(require 'projectile)
|
||||||
(define-key projectile-mode-map (kbd "C-c p") 'projectile-command-map)
|
(setq projectile-known-projects-file
|
||||||
(setq projectile-project-search-path '("~/src/" "~/sites/"))
|
(cache-path "projectile-bookmarks.eld"))
|
||||||
|
(setq lsp-session-file
|
||||||
|
(cache-path ".lsp-session-v1"))
|
||||||
|
(setq projectile-project-search-path
|
||||||
|
(localize-and-filter
|
||||||
|
'("src" "sites" "data/sites" ".emacs.d")))
|
||||||
|
(define-key projectile-mode-map
|
||||||
|
(kbd "C-c p") 'projectile-command-map)
|
||||||
(projectile-mode +1)
|
(projectile-mode +1)
|
||||||
|
|
||||||
;;; LLM copilot stuff.
|
;;; LLM copilot stuff.
|
||||||
|
@ -223,6 +238,7 @@ Returns a list with all items for which tst is false removed from lst."
|
||||||
"5f95ce79b4a8870b3486b04de22ca2e0785b287da8779f512cdd847f42266989"
|
"5f95ce79b4a8870b3486b04de22ca2e0785b287da8779f512cdd847f42266989"
|
||||||
default))
|
default))
|
||||||
'(custom-theme-directory "~/.emacs.d/themes")
|
'(custom-theme-directory "~/.emacs.d/themes")
|
||||||
|
'(ellama-sessions-directory (cache-path "ellama-sessions"))
|
||||||
'(global-font-lock-mode t)
|
'(global-font-lock-mode t)
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
'(arduino-mode cargo chatgpt-shell cider dockerfile-mode ellama elpy
|
'(arduino-mode cargo chatgpt-shell cider dockerfile-mode ellama elpy
|
||||||
|
|
|
@ -0,0 +1 @@
|
||||||
|
()
|
Loading…
Reference in New Issue