2013-10-14 08:50:56 +02:00
|
|
|
(require 'uniquify)
|
2017-10-15 13:30:10 +02:00
|
|
|
|
2017-11-12 20:24:21 +01:00
|
|
|
;; We don't live in the 80s, but we're also not a shitty web app.
|
2013-08-03 15:36:05 +02:00
|
|
|
(setq gc-cons-threshold 20000000)
|
|
|
|
|
2013-10-14 08:50:56 +02:00
|
|
|
(setq uniquify-buffer-name-style 'forward)
|
|
|
|
|
2013-10-17 14:17:38 +02:00
|
|
|
; Fix some defaults
|
2014-02-01 21:20:10 +01:00
|
|
|
(setq visible-bell nil
|
2013-07-08 01:15:05 +02:00
|
|
|
inhibit-startup-message t
|
|
|
|
color-theme-is-global t
|
|
|
|
sentence-end-double-space nil
|
|
|
|
shift-select-mode nil
|
|
|
|
uniquify-buffer-name-style 'forward
|
|
|
|
whitespace-style '(face trailing lines-tail tabs)
|
|
|
|
whitespace-line-column 80
|
2013-10-20 20:05:13 +02:00
|
|
|
default-directory "~"
|
2013-08-05 16:18:56 +02:00
|
|
|
fill-column 80
|
2020-03-09 01:16:18 +01:00
|
|
|
ediff-split-window-function 'split-window-horizontally
|
|
|
|
initial-major-mode 'emacs-lisp-mode)
|
2014-01-30 14:26:52 +01:00
|
|
|
|
2024-06-03 22:56:22 +02:00
|
|
|
(setq-default tab-width 4)
|
|
|
|
(setq-default fill-column 80)
|
|
|
|
|
2013-07-08 01:15:05 +02:00
|
|
|
(add-to-list 'safe-local-variable-values '(lexical-binding . t))
|
|
|
|
(add-to-list 'safe-local-variable-values '(whitespace-line-column . 80))
|
|
|
|
|
2013-08-07 00:49:20 +02:00
|
|
|
(set-default 'indent-tabs-mode nil)
|
|
|
|
|
2013-08-05 16:18:56 +02:00
|
|
|
;; UTF-8 please
|
|
|
|
(setq locale-coding-system 'utf-8) ; pretty
|
|
|
|
(set-terminal-coding-system 'utf-8) ; pretty
|
|
|
|
(set-keyboard-coding-system 'utf-8) ; pretty
|
|
|
|
(set-selection-coding-system 'utf-8) ; please
|
|
|
|
(prefer-coding-system 'utf-8) ; with sugar on top
|
|
|
|
|
|
|
|
;; Make emacs behave sanely (overwrite selected text)
|
|
|
|
(delete-selection-mode 1)
|
|
|
|
|
2017-11-12 20:24:21 +01:00
|
|
|
;; Keep your temporary files in tmp, emacs!
|
2013-07-29 00:53:08 +02:00
|
|
|
(setq auto-save-file-name-transforms
|
|
|
|
`((".*" ,temporary-file-directory t)))
|
2017-11-13 10:23:52 +01:00
|
|
|
(setq backup-directory-alist
|
|
|
|
`((".*" . ,temporary-file-directory)))
|
2013-07-29 00:53:08 +02:00
|
|
|
|
2013-07-08 01:15:05 +02:00
|
|
|
(remove-hook 'kill-buffer-query-functions 'server-kill-buffer-query-function)
|
2013-08-07 00:49:20 +02:00
|
|
|
|
2017-11-15 21:00:38 +01:00
|
|
|
;; Show time in 24h format
|
|
|
|
(setq display-time-24hr-format t)
|
|
|
|
|
2023-08-08 11:40:24 +02:00
|
|
|
;; Use python-mode for Starlark files.
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.star\\'" . python-mode))
|
|
|
|
|
2023-09-12 16:32:38 +02:00
|
|
|
;; Use cmake-mode for relevant files.
|
2023-09-12 17:56:57 +02:00
|
|
|
(add-to-list 'auto-mode-alist '("ya\\.make\\'" . cmake-ts-mode))
|
2023-09-12 16:32:38 +02:00
|
|
|
|
|
|
|
;; Use tree-sitter modes for various languages.
|
|
|
|
(setq major-mode-remap-alist
|
|
|
|
'((bash-mode . bash-ts-mode)
|
|
|
|
(c++-mode . c++-ts-mode)
|
|
|
|
(c-mode . c-ts-mode)
|
|
|
|
(c-or-c++-mode . c-or-c++-ts-mode)
|
|
|
|
(json-mode . json-ts-mode)
|
|
|
|
(python-mode . python-ts-mode)
|
|
|
|
(rust-mode . rust-ts-mode)
|
|
|
|
(toml-mode . toml-ts-mode)
|
|
|
|
(yaml-mode . yaml-ts-mode)
|
|
|
|
(go-mode . go-ts-mode)
|
|
|
|
(cmake-mode . cmake-ts-mode)))
|
|
|
|
|
2023-12-02 20:42:47 +01:00
|
|
|
;; Visually highlight current line in programming buffers
|
|
|
|
(add-hook 'prog-mode-hook 'hl-line-mode)
|
|
|
|
|
|
|
|
;; Enable rainbow-delimiters for all things programming
|
|
|
|
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
|
|
|
|
|
|
|
|
;; Always highlight matching brackets
|
|
|
|
(show-paren-mode 1)
|
|
|
|
|
|
|
|
;; Always auto-close parantheses and other pairs
|
|
|
|
(electric-pair-mode)
|
|
|
|
|
|
|
|
;; Keep track of recent files
|
|
|
|
(recentf-mode)
|
|
|
|
|
|
|
|
;; Easily navigate sillycased words
|
|
|
|
(global-subword-mode 1)
|
|
|
|
|
|
|
|
;; Transparently open compressed files
|
|
|
|
(auto-compression-mode t)
|
|
|
|
|
2014-10-21 19:37:19 +02:00
|
|
|
(provide 'settings)
|