2022-06-28 21:03:10 +02:00
|
|
|
;;; package --- Rawley OpenBSD init.el
|
2022-06-24 19:16:54 +02:00
|
|
|
;;; Commentary:
|
|
|
|
;;; This is my Emacs init.el for OpenBSD. OpenBSD has always been
|
|
|
|
;;; one of my favorite opeating systems, but I have never had hardware
|
|
|
|
;;; that can take advantage of it. Thankfully, I found a compatible
|
|
|
|
;;; WiFi card for my Librebooted x200, now I can use OpenBSD \o/
|
|
|
|
;;; Code:
|
2022-07-14 23:51:17 +02:00
|
|
|
(add-to-list 'default-frame-alist '(font . "UbuntuMono Nerd Font Mono-16"))
|
2022-06-26 05:02:52 +02:00
|
|
|
|
2022-07-07 19:49:58 +02:00
|
|
|
(setq inhibit-startup-screen t)
|
2022-07-03 22:41:52 +02:00
|
|
|
(setq visible-bell nil)
|
|
|
|
(setq ring-bell-function 'ignore)
|
2022-07-14 23:51:17 +02:00
|
|
|
(setq-default tab-width 4)
|
2022-06-24 19:16:54 +02:00
|
|
|
|
|
|
|
(tool-bar-mode -1)
|
|
|
|
(scroll-bar-mode -1)
|
|
|
|
(menu-bar-mode -1)
|
|
|
|
|
2022-06-25 19:33:56 +02:00
|
|
|
(show-paren-mode 1)
|
|
|
|
|
2022-06-24 19:16:54 +02:00
|
|
|
(recentf-mode 1)
|
|
|
|
|
|
|
|
(require 'package)
|
|
|
|
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
|
|
|
|
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
|
|
|
|
(package-initialize)
|
|
|
|
|
|
|
|
(unless (package-installed-p 'use-package)
|
2022-07-07 19:49:58 +02:00
|
|
|
(package-refresh-contents)
|
2022-06-24 19:16:54 +02:00
|
|
|
(package-install 'use-package))
|
|
|
|
|
|
|
|
(eval-and-compile
|
|
|
|
(setq use-package-always-ensure t
|
|
|
|
use-package-expand-minimally t))
|
|
|
|
|
|
|
|
(require 'use-package)
|
2022-07-03 22:41:52 +02:00
|
|
|
(use-package zenburn-theme)
|
|
|
|
(load-theme 'zenburn t)
|
2022-06-24 19:16:54 +02:00
|
|
|
|
2022-07-07 19:49:58 +02:00
|
|
|
(require 'ido)
|
|
|
|
(ido-mode t)
|
|
|
|
|
2022-06-28 21:03:10 +02:00
|
|
|
;; Language modes
|
2022-06-24 19:16:54 +02:00
|
|
|
(use-package d-mode)
|
2022-07-14 23:51:17 +02:00
|
|
|
(use-package yaml-mode)
|
2022-06-24 19:16:54 +02:00
|
|
|
(use-package go-mode)
|
2022-07-03 22:41:52 +02:00
|
|
|
(use-package markdown-mode
|
|
|
|
:ensure t)
|
2022-06-24 19:16:54 +02:00
|
|
|
|
2022-06-28 21:03:10 +02:00
|
|
|
;; Other packages
|
2022-07-14 23:51:17 +02:00
|
|
|
(use-package web-mode)
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.tpl\\.php\\'" . web-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.[agj]sp\\'" . web-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.as[cp]x\\'" . web-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.erb\\'" . web-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.mustache\\'" . web-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.djhtml\\'" . web-mode))
|
|
|
|
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
|
2022-07-07 19:49:58 +02:00
|
|
|
(use-package smex)
|
|
|
|
(require 'smex)
|
|
|
|
(global-set-key (kbd "M-x") 'smex)
|
2022-06-28 21:03:10 +02:00
|
|
|
|
2022-07-03 22:41:52 +02:00
|
|
|
;; Custom functions
|
2022-06-28 21:03:10 +02:00
|
|
|
(defun save-and-kill-current-buffer ()
|
2022-06-24 19:16:54 +02:00
|
|
|
(interactive)
|
|
|
|
(save-buffer)
|
2022-06-28 21:03:10 +02:00
|
|
|
(kill-current-buffer))
|
2022-07-14 23:51:17 +02:00
|
|
|
(global-set-key (kbd "C-= C-g") 'indent-code-rigidly)
|
2022-06-24 19:16:54 +02:00
|
|
|
|
|
|
|
(custom-set-variables
|
|
|
|
;; custom-set-variables was added by Custom.
|
|
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
|
|
;; Your init file should contain only one such instance.
|
|
|
|
;; If there is more than one, they won't work right.
|
2022-07-03 17:02:33 +02:00
|
|
|
'(package-selected-packages
|
2022-07-14 23:51:17 +02:00
|
|
|
'(yaml-mode helm zenburn-theme md-mode markdown-mode ivy modus-themes use-package)))
|
2022-06-24 19:16:54 +02:00
|
|
|
(custom-set-faces
|
|
|
|
;; custom-set-faces was added by Custom.
|
|
|
|
;; If you edit it by hand, you could mess it up, so be careful.
|
|
|
|
;; Your init file should contain only one such instance.
|
|
|
|
;; If there is more than one, they won't work right.
|
|
|
|
)
|
|
|
|
|
|
|
|
;;; init.el ends here
|