Compare commits
6 Commits
d369af08e2
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
1d19702925
|
|||
|
af49ba89c6
|
|||
|
c94e526057
|
|||
|
0e9ca65e67
|
|||
|
ec1c88d182
|
|||
|
3f24ab9883
|
18
disabled.el
18
disabled.el
@ -354,3 +354,21 @@
|
|||||||
;; (add-to-list 'page-break-lines-modes 'prog-mode)
|
;; (add-to-list 'page-break-lines-modes 'prog-mode)
|
||||||
;; (add-to-list 'page-break-lines-modes 'text-mode)
|
;; (add-to-list 'page-break-lines-modes 'text-mode)
|
||||||
;; (add-to-list 'page-break-lines-modes 'helpful-mode))
|
;; (add-to-list 'page-break-lines-modes 'helpful-mode))
|
||||||
|
|
||||||
|
;; (use-package js-comint
|
||||||
|
;; :bind (:map js-ts-mode-map
|
||||||
|
;; ("C-x C-e" . js-send-last-sexp)
|
||||||
|
;; ("C-c C-b" . js-send-buffer)
|
||||||
|
;; ("C-c C-r" . js-send-region)
|
||||||
|
;; ("C-M-x" . my/js-send-defun))
|
||||||
|
;; :hook (js-comint-mode . my/-setup-js-comint-mode)
|
||||||
|
;; :config
|
||||||
|
;; (my/setup-c-style-newline-keys js-ts-mode-map)
|
||||||
|
;; (defun my/-setup-js-comint-mode ()
|
||||||
|
;; (setq-local comint-highlight-input nil))
|
||||||
|
;; (defun my/js-send-defun ()
|
||||||
|
;; "Send the defun under point to the inferior JavaScript process."
|
||||||
|
;; (interactive)
|
||||||
|
;; (if-let ((code (thing-at-point 'defun)))
|
||||||
|
;; (js-comint-send-string code)
|
||||||
|
;; (user-error "No defun under point"))))
|
||||||
|
|||||||
75
init.el
75
init.el
@ -81,10 +81,15 @@
|
|||||||
(describe-symbol form))))
|
(describe-symbol form))))
|
||||||
|
|
||||||
;; Trusted buffer stuff
|
;; Trusted buffer stuff
|
||||||
|
(defvar-local my/-trusted-content-segment-cache nil
|
||||||
|
"Cache variable used in my/-trusted-content-segment.
|
||||||
|
This is a single element list with that element being the file's trusted status.")
|
||||||
(defun my/temp-trust-buffer ()
|
(defun my/temp-trust-buffer ()
|
||||||
"Set the current buffers local value of `trusted-content' to \\=:all."
|
"Set the current buffers local value of `trusted-content' to \\=:all."
|
||||||
(interactive)
|
(interactive)
|
||||||
(setq-local trusted-content :all)
|
(setq-local trusted-content :all
|
||||||
|
;; reset the cache
|
||||||
|
my/-trusted-content-segment-cache nil)
|
||||||
(cond
|
(cond
|
||||||
((and (buffer-modified-p) (y-or-n-p "Save and reload buffer?"))
|
((and (buffer-modified-p) (y-or-n-p "Save and reload buffer?"))
|
||||||
(save-buffer)
|
(save-buffer)
|
||||||
@ -100,7 +105,11 @@
|
|||||||
(equal trusted-content :all)
|
(equal trusted-content :all)
|
||||||
buffer-file-name)
|
buffer-file-name)
|
||||||
(propertize "[Temp. Trusted]" 'face 'warning))
|
(propertize "[Temp. Trusted]" 'face 'warning))
|
||||||
((not (trusted-content-p))
|
((progn
|
||||||
|
(unless my/-trusted-content-segment-cache
|
||||||
|
(setq-local my/-trusted-content-segment-cache
|
||||||
|
(list (trusted-content-p))))
|
||||||
|
(not (car my/-trusted-content-segment-cache)))
|
||||||
(propertize "[Untrusted]" 'face 'error)))))
|
(propertize "[Untrusted]" 'face 'error)))))
|
||||||
(add-to-list 'mode-line-misc-info
|
(add-to-list 'mode-line-misc-info
|
||||||
'(:eval (my/-trusted-content-segment)))
|
'(:eval (my/-trusted-content-segment)))
|
||||||
@ -214,6 +223,7 @@
|
|||||||
"socket" "slice" "mount")
|
"socket" "slice" "mount")
|
||||||
eos)
|
eos)
|
||||||
. conf-mode))
|
. conf-mode))
|
||||||
|
(add-to-list 'auto-mode-alist `(,(rx (or bos "/") "README" eos) . markdown-mode))
|
||||||
(keymap-set emacs-lisp-mode-map "C-c C-r" #'eval-region)
|
(keymap-set emacs-lisp-mode-map "C-c C-r" #'eval-region)
|
||||||
(defun my/-fix-emacs-lisp-mode-system-files ()
|
(defun my/-fix-emacs-lisp-mode-system-files ()
|
||||||
(when (string-prefix-p lisp-directory buffer-file-name)
|
(when (string-prefix-p lisp-directory buffer-file-name)
|
||||||
@ -967,12 +977,6 @@ visual states."
|
|||||||
(cl-pushnew "Replace" val :test 'equal)
|
(cl-pushnew "Replace" val :test 'equal)
|
||||||
(setopt minibuffer-regexp-prompts val)))
|
(setopt minibuffer-regexp-prompts val)))
|
||||||
|
|
||||||
;; better `align-regexp'
|
|
||||||
(use-package ialign
|
|
||||||
:defer t
|
|
||||||
:custom
|
|
||||||
(ialign-initial-repeat t))
|
|
||||||
|
|
||||||
;; ace-window
|
;; ace-window
|
||||||
(use-package ace-window
|
(use-package ace-window
|
||||||
:diminish ace-window-mode
|
:diminish ace-window-mode
|
||||||
@ -2008,23 +2012,6 @@ This is :around advice, so OLDFUN is the real function
|
|||||||
(use-package js
|
(use-package js
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:hook (js-ts-mode . my/eglot-if-trusted))
|
:hook (js-ts-mode . my/eglot-if-trusted))
|
||||||
(use-package js-comint
|
|
||||||
:bind (:map js-ts-mode-map
|
|
||||||
("C-x C-e" . js-send-last-sexp)
|
|
||||||
("C-c C-b" . js-send-buffer)
|
|
||||||
("C-c C-r" . js-send-region)
|
|
||||||
("C-M-x" . my/js-send-defun))
|
|
||||||
:hook (js-comint-mode . my/-setup-js-comint-mode)
|
|
||||||
:config
|
|
||||||
(my/setup-c-style-newline-keys js-ts-mode-map)
|
|
||||||
(defun my/-setup-js-comint-mode ()
|
|
||||||
(setq-local comint-highlight-input nil))
|
|
||||||
(defun my/js-send-defun ()
|
|
||||||
"Send the defun under point to the inferior JavaScript process."
|
|
||||||
(interactive)
|
|
||||||
(if-let ((code (thing-at-point 'defun)))
|
|
||||||
(js-comint-send-string code)
|
|
||||||
(user-error "No defun under point"))))
|
|
||||||
|
|
||||||
;; TypeScript
|
;; TypeScript
|
||||||
(use-package typescript-ts-mode
|
(use-package typescript-ts-mode
|
||||||
@ -2035,22 +2022,6 @@ This is :around advice, so OLDFUN is the real function
|
|||||||
:config
|
:config
|
||||||
(my/setup-c-style-newline-keys typescript-ts-mode-map))
|
(my/setup-c-style-newline-keys typescript-ts-mode-map))
|
||||||
|
|
||||||
;; Polymode
|
|
||||||
(use-package polymode
|
|
||||||
:config
|
|
||||||
(define-hostmode my/poly-web-hostmode
|
|
||||||
:mode 'web-mode)
|
|
||||||
(define-innermode my/poly-php-innermode
|
|
||||||
:mode 'php-ts-mode
|
|
||||||
:head-matcher (regexp-quote "<?php")
|
|
||||||
:tail-matcher (regexp-quote "?>")
|
|
||||||
:head-mode 'body
|
|
||||||
:tail-mode 'body)
|
|
||||||
(define-polymode my/poly-web-mode
|
|
||||||
:hostmode 'my/poly-web-hostmode
|
|
||||||
:innermodes '(my/poly-php-innermode))
|
|
||||||
(add-to-list 'auto-mode-alist '("\\.php\\|\\.phtml\\'" . my/poly-web-mode)))
|
|
||||||
|
|
||||||
;; shell-mode
|
;; shell-mode
|
||||||
(use-package sh-script
|
(use-package sh-script
|
||||||
:ensure nil
|
:ensure nil
|
||||||
@ -2129,9 +2100,6 @@ This is :around advice, so OLDFUN is the real function
|
|||||||
(setq indent-line-function #'yaml-indent-line)))
|
(setq indent-line-function #'yaml-indent-line)))
|
||||||
(use-package yaml-mode)
|
(use-package yaml-mode)
|
||||||
|
|
||||||
;; yuck (config language for eww)
|
|
||||||
(use-package yuck-mode)
|
|
||||||
|
|
||||||
;; Some Elisp indentation stuff
|
;; Some Elisp indentation stuff
|
||||||
;; Source: https://github.com/magit/emacsql
|
;; Source: https://github.com/magit/emacsql
|
||||||
;; emacsql.el line 394
|
;; emacsql.el line 394
|
||||||
@ -2212,7 +2180,8 @@ line in the block and manually deal with indentation."
|
|||||||
(not (sly-connected-p))))
|
(not (sly-connected-p))))
|
||||||
(defun my/-format-only-when-sly-running ()
|
(defun my/-format-only-when-sly-running ()
|
||||||
"Make apheleia-mode format lisp buffers only when sly is running."
|
"Make apheleia-mode format lisp buffers only when sly is running."
|
||||||
(add-to-list 'apheleia-skip-functions #'my/-apheleia-sly-skip-function)))
|
(add-to-list (make-local-variable 'apheleia-skip-functions)
|
||||||
|
#'my/-apheleia-sly-skip-function)))
|
||||||
;; sly
|
;; sly
|
||||||
(use-package sly
|
(use-package sly
|
||||||
;; :hook (lisp-mode . my/-lisp-mode-autoconnect-sly)
|
;; :hook (lisp-mode . my/-lisp-mode-autoconnect-sly)
|
||||||
@ -2496,6 +2465,7 @@ current buffer is a Jupyter buffer, just use that."
|
|||||||
(use-package doc-view
|
(use-package doc-view
|
||||||
:ensure nil
|
:ensure nil
|
||||||
:hook (doc-view-mode . my/-setup-doc-view-mode)
|
:hook (doc-view-mode . my/-setup-doc-view-mode)
|
||||||
|
:custom (doc-view-odf->pdf-converter-program "/usr/bin/soffice")
|
||||||
:init
|
:init
|
||||||
(defun my/-setup-doc-view-mode ()
|
(defun my/-setup-doc-view-mode ()
|
||||||
(display-line-numbers-mode -1)
|
(display-line-numbers-mode -1)
|
||||||
@ -2877,13 +2847,6 @@ If no name is given, list all bookmarks instead."
|
|||||||
(list (car entry)))))
|
(list (car entry)))))
|
||||||
(directory-files-and-attributes dir-path))
|
(directory-files-and-attributes dir-path))
|
||||||
path-end))))))))
|
path-end))))))))
|
||||||
(use-package esh-help
|
|
||||||
:hook (eshell-mode . my/-setup-eshell-help-func)
|
|
||||||
:init
|
|
||||||
(defun my/-setup-eshell-help-func ()
|
|
||||||
(eldoc-mode 1)
|
|
||||||
(setq-local evil-lookup-func #'esh-help-run-help))
|
|
||||||
(setup-esh-help-eldoc))
|
|
||||||
(use-package eshell-syntax-highlighting
|
(use-package eshell-syntax-highlighting
|
||||||
:init
|
:init
|
||||||
(eshell-syntax-highlighting-global-mode 1))
|
(eshell-syntax-highlighting-global-mode 1))
|
||||||
@ -3162,8 +3125,6 @@ R is rest of the arguments to OLDFUN."
|
|||||||
|
|
||||||
;; ledger
|
;; ledger
|
||||||
(use-package ledger-mode)
|
(use-package ledger-mode)
|
||||||
(use-package flycheck-ledger
|
|
||||||
:hook (ledger-mode . my/flycheck-if-trusted))
|
|
||||||
|
|
||||||
;; khard contacts
|
;; khard contacts
|
||||||
(require 'khard)
|
(require 'khard)
|
||||||
@ -3507,7 +3468,7 @@ Color can be any color which can be passed to `color-values'."
|
|||||||
|
|
||||||
;; rainbow-delimiters
|
;; rainbow-delimiters
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:hook (prog-mode . rainbow-delimiters-mode)
|
:hook (lisp-data-mode . rainbow-delimiters-mode)
|
||||||
:config
|
:config
|
||||||
;; generate dark version of the rainbow delimiters faces
|
;; generate dark version of the rainbow delimiters faces
|
||||||
(defun my/-rainbow-delimiters-recalc-dark-faces (&optional frame)
|
(defun my/-rainbow-delimiters-recalc-dark-faces (&optional frame)
|
||||||
@ -3585,10 +3546,6 @@ one of the normal rainbow-delimiters-depth-N-face faces."
|
|||||||
;; Highlight todos
|
;; Highlight todos
|
||||||
(use-package hl-todo
|
(use-package hl-todo
|
||||||
:hook (prog-mode . hl-todo-mode))
|
:hook (prog-mode . hl-todo-mode))
|
||||||
(use-package magit-todos
|
|
||||||
:after (hl-todo magit)
|
|
||||||
:config
|
|
||||||
(magit-todos-mode 1))
|
|
||||||
|
|
||||||
;; icons
|
;; icons
|
||||||
(use-package nerd-icons)
|
(use-package nerd-icons)
|
||||||
|
|||||||
Reference in New Issue
Block a user