emacs.d/bundle/bundle--package.el

542 lines
25 KiB
EmacsLisp
Raw Normal View History

2020-07-26 14:36:43 +02:00
;; PACKAGE
(require 'package)
2023-01-07 11:25:47 +01:00
(setq package-archives
'(("melpa" . "https://melpa.org/packages/")
("org" . "https://orgmode.org/elpa/")
("elpa" . "https://elpa.gnu.org/packages/")
("nongnu" . "https://elpa.nongnu.org/nongnu/")))
2020-07-26 14:36:43 +02:00
(package-initialize)
2021-04-29 22:18:25 +02:00
(unless package-archive-contents
(package-refresh-contents))
(unless (package-installed-p 'use-package)
(package-install 'use-package))
2020-10-07 14:32:54 +02:00
(require 'use-package)
2020-09-29 16:32:31 +02:00
(setq use-package-always-ensure t)
2022-05-06 19:31:15 +02:00
(load "bundle--gui")
2020-07-26 14:36:43 +02:00
2023-01-15 09:39:02 +01:00
(add-hook 'emacs-lisp-mode-hook (lambda () (prettify-symbols-mode)))
2023-02-19 11:43:50 +01:00
(use-package htmlize)
2023-03-16 17:08:41 +01:00
(use-package tramp
:ensure nil
:config
(when (eq system-type 'windows-nt)
(setq tramp-default-method "sshx")))
2022-05-06 22:23:17 +02:00
(use-package shrface
:defer t
:config
(shrface-basic)
(shrface-trial)
(shrface-default-keybindings) ; setup default keybindings
2022-05-07 10:37:31 +02:00
(setq shrface-href-versatile t
shrface-toggle-bullets t
shr-width nil))
2022-05-06 22:23:17 +02:00
2020-07-26 14:36:43 +02:00
(use-package nov
2023-03-11 10:44:38 +01:00
:hook ((nov-mode . visual-line-mode)
(nov-mode . (lambda () (setq-local line-spacing 4))))
2021-12-15 18:11:48 +01:00
:mode ("\\.epub\\'" . nov-mode)
2022-08-24 19:35:40 +02:00
:init
(add-hook 'nov-mode-hook #'shrface-mode)
:config
2022-07-27 07:44:35 +02:00
(setq nov-text-width 82
nov-variable-pitch t)
2022-08-24 19:35:40 +02:00
(require 'shrface)
(setq nov-shr-rendering-functions '((img . nov-render-img) (title . nov-render-title)))
2023-03-16 17:08:41 +01:00
(setq nov-shr-rendering-functions (append nov-shr-rendering-functions shr-external-rendering-functions))
(when (eq system-type 'windows-nt)
(setq nov-unzip-program "c:/msys64/usr/bin/unzip.exe")))
2022-05-06 19:31:15 +02:00
2021-12-20 09:46:26 +01:00
(use-package eglot
2022-05-06 19:31:15 +02:00
:defer t
2021-12-20 09:46:26 +01:00
:config
(add-to-list 'eglot-server-programs '((c++-mode c-mode) "ccls")))
2023-04-30 10:20:24 +02:00
(use-package sql
:ensure nil
:defer t
:config
(when (eq system-type 'windows-nt)
(setq sql-sqlite-program "c:/msys64/ucrt64/bin/sqlite3.exe")
(setq sql-mariadb-options '("-C" "-t" "-f" "-n"))))
2021-12-20 09:46:26 +01:00
(use-package lisp-mode
:ensure nil
2023-01-14 09:33:49 +01:00
:init
(add-hook 'lisp-mode-hook (lambda () (prettify-symbols-mode)))
2021-12-20 09:46:26 +01:00
:mode (("\\.lisp$" . lisp-mode)
("\\.lsp$" . lisp-mode)
2023-03-25 10:39:53 +01:00
("\\.cl$" . lisp-mode))
:config
(if (eq system-type 'windows-nt)
2023-03-25 11:01:05 +01:00
(setq inferior-lisp-program "sbcl --noinform")
(setq inferior-lisp-program "/usr/bin/sbcl --noinform"))
(defvar g-cl-function-names
'("*" "+" "-" "/" "/=" "1+" "1-" "<" "<=" "=" ">"
">=" "abort" "abs" "acons" "acos" "acosh" "add-method" "adjoin"
"adjust-array" "adjustable-array-p" "allocate-instance" "alpha-char-p"
"alphanumericp" "and" "append" "apply" "apropos" "apropos-list" "aref"
"arithmetic-error-operands" "arithmetic-error-operation" "array-dimension"
"array-dimensions" "array-displacement" "array-element-type"
"array-has-fill-pointer-p" "array-in-bounds-p" "array-rank"
"array-row-major-index" "array-total-size" "arrayp" "ash" "asin" "asinh"
"assert" "assoc" "assoc-if" "assoc-if-not" "atan" "atanh" "atom" "bit"
"bit-and" "bit-andc1" "bit-andc2" "bit-eqv" "bit-ior" "bit-nand" "bit-nor"
"bit-not" "bit-orc1" "bit-orc2" "bit-vector-p" "bit-xor" "block" "boole"
"both-case-p" "boundp" "break" "broadcast-stream-streams" "butlast" "byte"
"byte-position" "byte-size" "caaaar" "caaadr" "caaar" "caadar" "caaddr"
"caadr" "caar" "cadaar" "cadadr" "cadar" "caddar" "cadddr" "caddr" "cadr"
"call-method" "car" "case" "catch" "ccase" "cdaaar" "cdaadr" "cdaar"
"cdadar" "cdaddr" "cdadr" "cdar" "cddaar" "cddadr" "cddar" "cdddar" "cddddr"
"cdddr" "cddr" "cdr" "ceiling" "cell-error-name" "cerror" "change-class"
"char" "char-code" "char-downcase" "char-equal" "char-greaterp" "char-int"
"char-lessp" "char-name" "char-not-equal" "char-not-greaterp"
"char-not-lessp" "char-upcase" "char/=" "char<" "char<=" "char=" "char>"
"char>=" "character" "characterp" "check-type" "cis" "class-name" "class-of"
"clear-input" "clear-output" "close" "clrhash" "code-char" "coerce"
"compile" "compile-file" "compile-file-pathname" "compiled-function-p"
"compiler-macro-function" "complement" "complex" "complexp"
"compute-applicable-methods" "compute-restarts" "concatenate"
"concatenated-stream-streams" "cond" "conjugate" "cons" "consp" "constantly"
"constantp" "continue" "copy-alist" "copy-list" "copy-pprint-dispatch"
"copy-readtable" "copy-seq" "copy-structure" "copy-symbol" "copy-tree" "cos"
"cosh" "count" "count-if" "count-if-not" "ctypecase" "decf" "declaim"
"decode-float" "decode-universal-time" "defclass" "defconstant" "defgeneric"
"define-compiler-macro" "define-condition" "define-method-combination"
"define-modify-macro" "define-setf-expander" "define-symbol-macro"
"defmacro" "defmethod" "defpackage" "defparameter" "defsetf" "defstruct"
"deftype" "defun" "defvar" "delete" "delete-duplicates" "delete-file"
"delete-if" "delete-if-not" "delete-package" "denominator" "deposit-field"
"describe" "describe-object" "destructuring-bind" "digit-char"
"digit-char-p" "directory" "directory-namestring" "disassemble" "do" "do*"
"do-all-symbols" "do-external-symbols" "do-symbols" "documentation" "dolist"
"dotimes" "dpb" "dribble" "ecase" "echo-stream-input-stream"
"echo-stream-output-stream" "ed" "eighth" "elt" "encode-universal-time"
"endp" "enough-namestring" "ensure-directories-exist"
"ensure-generic-function" "eq" "eql" "equal" "equalp" "error" "etypecase"
"eval" "eval-when" "evenp" "every" "exp" "export" "expt" "fboundp"
"fceiling" "fdefinition" "ffloor" "fifth" "file-author"
"file-error-pathname" "file-length" "file-namestring" "file-position"
"file-string-length" "file-write-date" "fill" "fill-pointer" "find"
"find-all-symbols" "find-class" "find-if" "find-if-not" "find-method"
"find-package" "find-restart" "find-symbol" "finish-output" "first" "flet"
"float" "float-digits" "float-precision" "float-radix" "float-sign" "floatp"
"floor" "fmakunbound" "force-output" "format" "formatter" "fourth"
"fresh-line" "fround" "ftruncate" "funcall" "function" "function-keywords"
"function-lambda-expression" "functionp" "gcd" "gensym" "gentemp" "get"
"get-decoded-time" "get-dispatch-macro-character" "get-internal-real-time"
"get-internal-run-time" "get-macro-character" "get-output-stream-string"
"get-properties" "get-setf-expansion" "get-universal-time" "getf" "gethash"
"go" "graphic-char-p" "handler-bind" "handler-case" "hash-table-count"
"hash-table-p" "hash-table-rehash-size" "hash-table-rehash-threshold"
"hash-table-size" "hash-table-test" "host-namestring" "identity" "if"
"ignore-errors" "imagpart" "import" "in-package" "incf"
"initialize-instance" "input-stream-p" "inspect" "integer-decode-float"
"integer-length" "integerp" "interactive-stream-p" "intern" "intersection"
"invalid-method-error" "invoke-debugger" "invoke-restart"
"invoke-restart-interactively" "isqrt" "keywordp" "labels" "lambda" "last"
"lcm" "ldb" "ldb-test" "ldiff" "length" "let" "let*"
"lisp-implementation-type" "lisp-implementation-version" "list" "list*"
"list-all-packages" "list-length" "listen" "listp" "load"
"load-logical-pathname-translations" "load-time-value" "locally" "log"
"logand" "logandc1" "logandc2" "logbitp" "logcount" "logeqv"
"logical-pathname" "logical-pathname-translations" "logior" "lognand"
"lognor" "lognot" "logorc1" "logorc2" "logtest" "logxor" "long-site-name"
"loop" "loop-finish" "lower-case-p" "machine-instance" "machine-type"
"machine-version" "macro-function" "macroexpand" "macroexpand-1" "macrolet"
"make-array" "make-broadcast-stream" "make-concatenated-stream"
"make-condition" "make-dispatch-macro-character" "make-echo-stream"
"make-hash-table" "make-instance" "make-instances-obsolete" "make-list"
"make-load-form" "make-load-form-saving-slots" "make-package"
"make-pathname" "make-random-state" "make-sequence" "make-string"
"make-string-input-stream" "make-string-output-stream" "make-symbol"
"make-synonym-stream" "make-two-way-stream" "makunbound" "map" "map-into"
"mapc" "mapcan" "mapcar" "mapcon" "maphash" "mapl" "maplist" "mask-field"
"max" "member" "member-if" "member-if-not" "merge" "merge-pathnames"
"method-combination-error" "method-qualifiers" "min" "minusp" "mismatch"
"mod" "muffle-warning" "multiple-value-bind" "multiple-value-call"
"multiple-value-list" "multiple-value-prog1" "multiple-value-setq"
"name-char" "namestring" "nbutlast" "nconc" "nintersection" "ninth"
"no-applicable-method" "no-next-method" "not" "notany" "notevery" "nreconc"
"nreverse" "nset-difference" "nset-exclusive-or" "nstring-capitalize"
"nstring-downcase" "nstring-upcase" "nsublis" "nsubst" "nsubst-if"
"nsubst-if-not" "nsubstitute" "nsubstitute-if" "nsubstitute-if-not" "nth"
"nth-value" "nthcdr" "null" "numberp" "numerator" "nunion" "oddp" "open"
"open-stream-p" "or" "output-stream-p" "package-error-package"
"package-name" "package-nicknames" "package-shadowing-symbols"
"package-use-list" "package-used-by-list" "packagep" "pairlis"
"parse-integer" "parse-namestring" "pathname" "pathname-device"
"pathname-directory" "pathname-host" "pathname-match-p" "pathname-name"
"pathname-type" "pathname-version" "pathnamep" "peek-char" "phase" "plusp"
"pop" "position" "position-if" "position-if-not" "pprint" "pprint-dispatch"
"pprint-exit-if-list-exhausted" "pprint-fill" "pprint-indent"
"pprint-linear" "pprint-logical-block" "pprint-newline" "pprint-pop"
"pprint-tab" "pprint-tabular" "prin1" "prin1-to-string" "princ"
"princ-to-string" "print" "print-not-readable-object" "print-object"
"print-unreadable-object" "probe-file" "proclaim" "prog" "prog*" "prog1"
"prog2" "progn" "progv" "provide" "psetf" "psetq" "push" "pushnew" "quote"
"random" "random-state-p" "rassoc" "rassoc-if" "rassoc-if-not" "rational"
"rationalize" "rationalp" "read" "read-byte" "read-char" "read-char-no-hang"
"read-delimited-list" "read-from-string" "read-line"
"read-preserving-whitespace" "read-sequence" "readtable-case" "readtablep"
"realp" "realpart" "reduce" "reinitialize-instance" "rem" "remf" "remhash"
"remove" "remove-duplicates" "remove-if" "remove-if-not" "remove-method"
"remprop" "rename-file" "rename-package" "replace" "require" "rest"
"restart-bind" "restart-case" "restart-name" "return" "return-from"
"revappend" "reverse" "room" "rotatef" "round" "row-major-aref" "rplaca"
"rplacd" "sbit" "scale-float" "schar" "search" "second" "set"
"set-difference" "set-dispatch-macro-character" "set-exclusive-or"
"set-macro-character" "set-pprint-dispatch" "set-syntax-from-char" "setf"
"setq" "seventh" "shadow" "shadowing-import" "shared-initialize" "shiftf"
"short-site-name" "signal" "signum" "simple-bit-vector-p"
"simple-condition-format-arguments" "simple-condition-format-control"
"simple-string-p" "simple-vector-p" "sin" "sinh" "sixth" "sleep"
"slot-boundp" "slot-exists-p" "slot-makunbound" "slot-missing"
"slot-unbound" "slot-value" "software-type" "software-version" "some" "sort"
"special-operator-p" "sqrt" "stable-sort" "standard-char-p" "step"
"store-value" "stream-element-type" "stream-error-stream"
"stream-external-format" "streamp" "string" "string-capitalize"
"string-downcase" "string-equal" "string-greaterp" "string-left-trim"
"string-lessp" "string-not-equal" "string-not-greaterp" "string-not-lessp"
"string-right-trim" "string-trim" "string-upcase" "string/=" "string<"
"string<=" "string=" "string>" "string>=" "stringp" "sublis" "subseq"
"subsetp" "subst" "subst-if" "subst-if-not" "substitute" "substitute-if"
"substitute-if-not" "subtypep" "svref" "sxhash" "symbol-function"
"symbol-macrolet" "symbol-name" "symbol-package" "symbol-plist"
"symbol-value" "symbolp" "synonym-stream-symbol" "tagbody" "tailp" "tan"
"tanh" "tenth" "terpri" "the" "third" "throw" "time" "trace"
"translate-logical-pathname" "translate-pathname" "tree-equal" "truename"
"truncate" "two-way-stream-input-stream" "two-way-stream-output-stream"
"type-error-datum" "type-error-expected-type" "type-of" "typecase" "typep"
"unbound-slot-instance" "unexport" "unintern" "union" "unless" "unread-char"
"untrace" "unuse-package" "unwind-protect"
"update-instance-for-different-class" "update-instance-for-redefined-class"
"upgraded-array-element-type" "upgraded-complex-part-type" "upper-case-p"
"use-package" "use-value" "user-homedir-pathname" "values" "values-list"
"vector" "vector-pop" "vector-push" "vector-push-extend" "vectorp" "warn"
"when" "wild-pathname-p" "with-accessors" "with-compilation-unit"
"with-condition-restarts" "with-hash-table-iterator"
"with-input-from-string" "with-open-file" "with-open-stream"
"with-output-to-string" "with-package-iterator" "with-simple-restart"
"with-slots" "with-standard-io-syntax" "write" "write-byte" "write-char"
"write-line" "write-sequence" "write-string" "write-to-string" "y-or-n-p"
"yes-or-no-p" "zerop"))
(defvar g-cl-value-names
'("*" "**" "***" "*break-on-signals*"
"*compile-file-pathname*" "*compile-file-truename*" "*compile-print*"
"*compile-verbose*" "*debug-io*" "*debugger-hook*"
"*default-pathname-defaults*" "*error-output*" "*features*"
"*gensym-counter*" "*load-pathname*" "*load-print*" "*load-truename*"
"*load-verbose*" "*macroexpand-hook*" "*modules*" "*package*"
"*print-array*" "*print-base*" "*print-case*" "*print-circle*"
"*print-escape*" "*print-gensym*" "*print-length*" "*print-level*"
"*print-lines*" "*print-miser-width*" "*print-pprint-dispatch*"
"*print-pretty*" "*print-radix*" "*print-readably*" "*print-right-margin*"
"*query-io*" "*random-state*" "*read-base*" "*read-default-float-format*"
"*read-eval*" "*read-suppress*" "*readtable*" "*standard-input*"
"*standard-output*" "*terminal-io*" "*trace-output*" "+" "++" "+++" "-" "/"
"//" "///" "array-dimension-limit" "array-rank-limit"
"array-total-size-limit" "boole-1" "boole-2" "boole-and" "boole-andc1"
"boole-andc2" "boole-c1" "boole-c2" "boole-clr" "boole-eqv" "boole-ior"
"boole-nand" "boole-nor" "boole-orc1" "boole-orc2" "boole-set" "boole-xor"
"call-arguments-limit" "char-code-limit" "double-float-epsilon"
"double-float-negative-epsilon" "internal-time-units-per-second"
"lambda-list-keywords" "lambda-parameters-limit"
"least-negative-double-float" "least-negative-long-float"
"least-negative-normalized-double-float"
"least-negative-normalized-long-float"
"least-negative-normalized-short-float"
"least-negative-normalized-single-float" "least-negative-short-float"
"least-negative-single-float" "least-positive-double-float"
"least-positive-long-float" "least-positive-normalized-double-float"
"least-positive-normalized-long-float"
"least-positive-normalized-short-float"
"least-positive-normalized-single-float" "least-positive-short-float"
"least-positive-single-float" "long-float-epsilon"
"long-float-negative-epsilon" "most-negative-double-float"
"most-negative-fixnum" "most-negative-long-float"
"most-negative-short-float" "most-negative-single-float"
"most-positive-double-float" "most-positive-fixnum"
"most-positive-long-float" "most-positive-short-float"
"most-positive-single-float" "multiple-values-limit" "nil" "pi"
"short-float-epsilon" "short-float-negative-epsilon" "single-float-epsilon"
"single-float-negative-epsilon" "t"))
(defface g-cl-character-face
'((default :inherit font-lock-constant-face))
"The face used to highlight Common Lisp character literals.")
(defface g-cl-standard-function-face
'((default :inherit font-lock-keyword-face))
"The face used to highlight standard Common Lisp function symbols.")
(defface g-cl-standard-value-face
'((default :inherit font-lock-variable-name-face))
"The face used to highlight standard Common Lisp value symbols.")
(defvar g-cl-font-lock-keywords
(let* ((character-re (concat "#\\\\" lisp-mode-symbol-regexp "\\_>"))
(function-re (concat "(" (regexp-opt g-cl-function-names t) "\\_>"))
(value-re (regexp-opt g-cl-value-names 'symbols)))
`((,character-re . 'g-cl-character-face)
(,function-re
(1 'g-cl-standard-function-face))
(,value-re . 'g-cl-standard-value-face))))
(defvar g-cl-font-lock-defaults
'((g-cl-font-lock-keywords)
nil ; enable syntaxic highlighting
t ; case insensitive highlighting
nil ; use the lisp-mode syntax table
(font-lock-mark-block-function . mark-defun)
(font-lock-extra-managed-props help-echo)
(font-lock-syntactic-face-function
. lisp-font-lock-syntactic-face-function)))
(defun g-init-lisp-font-lock ()
(setq font-lock-defaults g-cl-font-lock-defaults))
(add-hook 'lisp-mode-hook 'g-init-lisp-font-lock))
2021-12-20 09:46:26 +01:00
(use-package cc-mode
2021-12-28 11:44:58 +01:00
;; https://www.gnu.org/prep/standards/html_node/Writing-C.html
2021-12-20 09:46:26 +01:00
:ensure nil
;; :hook (c-mode . eglot-ensure)
2021-12-28 11:44:58 +01:00
:hook (c-mode-common . c-toggle-auto-newline)
2021-12-20 09:46:26 +01:00
:custom
2021-12-28 11:44:58 +01:00
(fill-column 79) ; according to gnu style guide
(c-basic-offset 2) ; ""
:config
(defun me/c-mode-style-hook ()
;; if linux kernel source use linux style, else use gnu style
2021-12-28 11:44:58 +01:00
(c-set-style
(if (and (buffer-file-name)
(string-match "/usr/src/linux" (buffer-file-name)))
"linux"
"gnu")))
2022-08-24 19:35:40 +02:00
(add-hook 'c-mode-common-hook 'me/c-mode-style-hook))
;; (defun me/c-mode-compile-command-hook ()
;; ;; if no makefile use gcc for compile command
;; (unless (or (file-exists-p "makefile")
;; (file-exists-p "Makefile"))
;; (set (make-local-variable 'compile-command)
;; (concat "gcc " "-Wall " "-g " buffer-file-name " -o "
;; (file-name-sans-extension buffer-file-name)))))
;; (add-hook 'c-mode-common-hook 'me/c-mode-compile-command-hook)
;; (defun me/c-mode-compile-on-save ()
;; ;; compile on save hook
;; (make-local-variable 'after-save-hook)
;; (add-hook 'after-save-hook (lambda () (compile compile-command))))
;; (add-hook 'c-mode-common-hook 'me/c-mode-compile-on-save))
2021-12-20 09:46:26 +01:00
(use-package js-mode
:ensure nil
:hook (js-mode . eglot-ensure)
2022-05-06 22:23:17 +02:00
:mode (("\\.webmanifest\\'" . js-mode)
2023-04-17 15:17:15 +02:00
("\\.js\\'" . js-mode)
("\\.mjs\\'" . js-mode)
("\\.cjs\\'" . js-mode)))
2021-04-22 16:06:12 +02:00
2023-04-03 11:07:53 +02:00
(use-package go-mode
:mode ("\\.go\\'" . go-mode)
:hook ((before-save . gofmt-before-save)
(go-mode . eglot-ensure))
:config
(defun me/go-mode-compile-command-hook ()
;; if no makefile use go vet for compile command
(unless (or (file-exists-p "makefile")
(file-exists-p "Makefile"))
(set (make-local-variable 'compile-command)
(concat "go " "vet " buffer-file-name))))
(add-hook 'go-mode-hook 'me/go-mode-compile-command-hook)
(defun me/go-mode-compile-on-save ()
;; compile on save hook
(make-local-variable 'after-save-hook)
2023-04-03 11:15:05 +02:00
(add-hook 'after-save-hook (lambda () (compile compile-command)))))
2023-04-03 11:07:53 +02:00
;; (add-hook 'go-mode-hook 'me/go-mode-compile-on-save)))
2021-04-22 16:06:12 +02:00
2020-07-26 14:36:43 +02:00
(use-package web-mode
2021-07-14 13:28:32 +02:00
;; :hook html-mode
2021-12-15 18:11:48 +01:00
:mode (("\\.html?\\'" . web-mode)
2022-09-10 20:28:25 +02:00
("\\.xhtml?\\'" . web-mode)
2023-01-12 17:49:37 +01:00
("\\.tmpl\\'" . web-mode)
2023-01-22 20:04:45 +01:00
("\\.hbs\\'" . web-mode)
("\\.handlebars\\'" . web-mode))
2021-06-07 18:52:41 +02:00
:custom
(web-mode-markup-indent-offset 2)
(web-mode-css-indent-offset 2)
(web-mode-code-indent-offset 2)
(web-mode-enable-auto-pairing nil)
(web-mode-enable-auto-closing t)
(web-mode-enable-current-element-highlight t)
(web-mode-enable-current-column-highlight t))
2020-07-26 14:36:43 +02:00
2021-12-20 09:50:49 +01:00
(use-package python
:mode (("\\.py\\'" . python-mode)
("\\.wsgi$" . python-mode)
("\\.j2" . python-mode))
2023-02-06 09:20:35 +01:00
:hook (python-mode . abbrev-mode)
2022-05-06 19:31:15 +02:00
:init
(setq python-indent-offset 4)
(setq-default indent-tabs-mode nil)
:custom
2023-01-22 20:04:45 +01:00
(fill-column 79))
2021-12-20 09:50:49 +01:00
2020-07-26 14:36:43 +02:00
(use-package slime
2022-05-06 19:31:15 +02:00
:defer t
2021-06-07 18:52:41 +02:00
:custom
(slime-autodoc-use-multiline-p 1)
2023-01-16 17:53:30 +01:00
:bind ("C-c C-q" . slime-close-all-parens-in-sexp)
2021-05-29 09:24:31 +02:00
:config
2021-06-03 15:07:37 +02:00
(slime-setup '(slime-autodoc
2023-05-10 18:53:09 +02:00
;; slime-banner
2022-10-06 13:13:59 +02:00
slime-tramp
2021-06-03 15:07:37 +02:00
slime-fancy
slime-asdf
slime-indentation
2021-11-04 08:17:33 +01:00
slime-editing-commands
2022-05-06 19:31:15 +02:00
slime-sbcl-exts))
2023-01-18 20:43:29 +01:00
(progn
(setq common-lisp-hyperspec-symbol-table
(concat common-lisp-hyperspec-root "Data/Map_Sym.txt"))
(setq common-lisp-hyperspec-issuex-table
(concat common-lisp-hyperspec-root "Data/Map_IssX.txt")))
2023-03-05 14:08:27 +01:00
2023-03-25 11:01:05 +01:00
;; (if (eq system-type 'windows-nt)
;; (setq sbcl-exe "C:\\Program Files\\Steel Bank Common Lisp\\sbcl.exe"
;; sbcl-core "C:\\Program Files\\Steel Bank Common Lisp\\sbcl.core"
;; slime-lisp-implementations `((sbcl (,sbcl-exe " --noinform" " --core " ,sbcl-core)))
;; inferior-lisp-program "sbcl"))
2023-03-05 14:08:27 +01:00
2023-03-25 10:39:53 +01:00
;; (let ((helper (expand-file-name "~/quicklisp/slime-helper.el")))
;; (when (file-exists-p helper)
;; (load-file helper)))
2023-03-05 14:08:27 +01:00
(let ((u1 (slime-create-filename-translator
:machine-instance "u1"
:remote-host "u1.metaebene.dev"
:username "marcus")))
2023-04-28 09:29:56 +02:00
(push u1 slime-filename-translations))
;; syntax highlighting
(defvar slime-repl-font-lock-keywords lisp-font-lock-keywords-2)
(defun slime-repl-font-lock-setup ()
(setq font-lock-defaults
'(slime-repl-font-lock-keywords
;; From lisp-mode.el
nil nil (("+-*/.<>=!?$%_&~^:@" . "w")) nil
(font-lock-syntactic-face-function
. lisp-font-lock-syntactic-face-function))))
(add-hook 'slime-repl-mode-hook 'slime-repl-font-lock-setup)
(defadvice slime-repl-insert-prompt (after font-lock-face activate)
(let ((inhibit-read-only t))
(add-text-properties
slime-repl-prompt-start-mark (point)
'(font-lock-face
slime-repl-prompt-face
rear-nonsticky
(slime-repl-prompt read-only font-lock-face intangible))))))
2022-05-06 19:31:15 +02:00
(use-package simple-httpd
:defer t)
2022-05-05 09:15:55 +02:00
2023-01-07 11:25:47 +01:00
;; (use-package go-translate
;; :defer t
;; :config
;; (setq gts-translate-list '(("en" "de")))
;; (setq gts-default-translator
;; (gts-translator
;; :picker (gts-prompt-picker)
;; :engines (list (gts-google-engine) (gts-google-rpc-engine))
;; :render (gts-buffer-render))))
2022-05-06 19:31:15 +02:00
(use-package magit
:bind ("C-x g" . magit-status)
:config
(global-set-key (kbd "C-x M-g") 'magit-dispatch))
2022-05-11 08:46:21 +02:00
(use-package yaml-mode
:mode "\\.yml\\'")
2022-05-14 07:49:44 +02:00
(use-package csv-mode
:mode "\\.csv\\'")
2022-06-09 10:13:00 +02:00
(use-package markdown-mode
:mode "\\.md\\'")
2022-11-15 09:14:31 +01:00
(use-package typescript-mode
:mode "\\.ts\\'"
:hook (typescript-mode . eglot-ensure)
:config (setq typescript-indent-level 2))
2022-08-15 15:04:52 +02:00
(when (eq system-type 'gnu/linux)
2023-01-22 20:04:45 +01:00
(use-package spotify :bind ("S-<pause>" . spotify-playpause))
2023-02-13 23:37:46 +01:00
;; (use-package clojure-mode)
;; (use-package cider)
2023-01-22 20:04:45 +01:00
(use-package racket-mode :mode "\\.rkt\\'")
(use-package geiser
:defer t
:config
(setq geiser-active-implementations '(racket guile)))
(use-package geiser-racket
:defer t
:after geiser
:config
(when (eq system-type 'windows-nt)
(setq geiser-racket-binary "c:/Program Files/Racket/Racket.exe")))
(use-package geiser-guile
:defer t
:after geiser
2023-01-23 18:16:50 +01:00
:custom (geiser-guile-binary "guile")))
2022-08-15 15:04:52 +02:00
2022-11-29 13:44:30 +01:00
(use-package mastodon
:custom
(mastodon-instance-url "https://emacs.ch")
(mastodon-active-user "qhBidG3d"))
2023-02-13 18:02:09 +01:00
(use-package jabber
:custom
2023-02-13 21:14:51 +01:00
(jabber-account-list
'(("marcus.kammer@mailbox.org")))
2023-02-13 18:02:09 +01:00
(jabber-muc-autojoin
2023-02-13 21:14:51 +01:00
'("lisp@conference.a3.pm"
"emacs@salas.suchat.org"))
2023-02-13 18:02:09 +01:00
(jabber-muc-default-nicknames
'(("lisp@conference.a3.pm" . "marcus")
("emacs@salas.suchat.org" . "marcus"))))
2023-01-22 17:43:44 +01:00
2023-02-05 11:28:19 +01:00
(use-package hyperbole
:config
2023-02-06 15:59:20 +01:00
(setq hyrolo-date-format "%Y-%m-%d %H:%M:%S")
(add-hook 'hyperbole-init-hook
(lambda ()
(setq hyrolo-file-list
(append (hyrolo-initialize-file-list)
2023-02-06 22:19:03 +01:00
(cons "~/.rolo.otl"
(directory-files-recursively org-directory (rx "." (or "org" "otl") eos))))))))
2023-02-11 18:40:28 +01:00
(use-package ispell
:ensure nil
2023-02-12 13:45:38 +01:00
:config
2023-03-27 21:11:01 +02:00
;; On windows: Copy files to c:/msys64/mingw64/share/hunspell/
;; hunspell -D Show detected path of the loaded dictionary,
;; and list of the search path and the available dictionaries.
2023-04-30 10:20:24 +02:00
(when (eq system-type 'windows-nt)
(setq ispell-program-name "c:/msys64/ucrt64/bin/hunspell.exe"))
2023-02-12 13:45:38 +01:00
(setq ispell-dictionary "german,english")
(setq ispell-local-dictionary-alist
2023-02-12 12:45:17 +01:00
'(("german" "[[:alpha:]]" "[^[:alpha:]]" "[']" t ("-d" "de_DE_frami,de_AT_frami,de_CH_frami") nil utf-8)
("english" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "en_US,en_GB") nil utf-8)
("german,english" "[[:alpha:]]" "[^[:alpha:]]" "[']" nil ("-d" "de_DE_frami,en_US") nil utf-8)))
2023-02-13 12:10:58 +01:00
(setq ispell-hunspell-dictionary-alist ispell-local-dictionary-alist))
2023-02-11 18:40:28 +01:00
2023-03-16 17:08:41 +01:00
(use-package plantuml-mode
:defer t
:config
(when (eq system-type 'windows-nt)
(setq plantuml-default-exec-mode 'jar
plantuml-jar-path "~/AppData/Local/Programs/plantuml/plantuml.jar")))
2023-02-11 16:57:27 +01:00
(require 'ido)
(ido-mode t)
2022-05-06 19:31:15 +02:00
(load "bundle--irc")
(load "bundle--news")
2023-02-13 21:14:51 +01:00
(load "bundle--email")