Skip to content

Instantly share code, notes, and snippets.

@haesbaert
Created July 18, 2023 08:10
Show Gist options
  • Save haesbaert/5d38f6cb40e70b401ae6bd338110b9b5 to your computer and use it in GitHub Desktop.
Save haesbaert/5d38f6cb40e70b401ae6bd338110b9b5 to your computer and use it in GitHub Desktop.
;;;; Load paths ;;;;
(require 'package)
;(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/") t)
;; Comment/uncomment this line to enable MELPA Stable if desired. See `package-archive-priorities`
;; and `package-pinned-packages`. Most users will not need or want to do this.
(add-to-list 'package-archives '("melpa-stable" . "https://stable.melpa.org/packages/") t)
;(package-initialize)
;(set-face-bold 'bold nil)
(add-to-list 'load-path "~/.emacs.d/old-color-theme")
;(add-to-list 'load-path "~/.elisp/")
;(add-to-list 'load-path "~/.elisp/popup-el")
;; (add-to-list 'custom-theme-load-path "~/.emacs.d/almost-mono-themes")
;; (add-to-list 'load-path "~/.emacs.d/almost-mono-themes")
(add-to-list 'custom-theme-load-path "~/.emacs.d/minimal-theme")
;; -- opam and utop setup --------------------------------
;; Setup environment variables using opam
(dolist
(var (car (read-from-string
(shell-command-to-string "opam config env --sexp"))))
(setenv (car var) (cadr var)))
;; Update the emacs path
(setq exec-path (append (parse-colon-path (getenv "PATH"))
(list exec-directory)))
;; Update the emacs load path
(add-to-list 'load-path (expand-file-name "../../share/emacs/site-lisp"
(getenv "OCAML_TOPLEVEL_PATH")))
;; Load server
(server-start)
; 0 for lsp; 1 for merlin
(setq use-merlin-or-lsp 0)
(defun use-merlin () (eq use-merlin-or-lsp 1))
(defun use-lsp () (not (use-merlin)))
;; For the love of god
(setq ring-bell-function 'ignore)
(defun at-isildur ()
"Is this machine isildur ?"
(interactive)
(equal (call-process "isildur") 0))
(defun at-sam ()
"Is this machine sam ?"
(interactive)
(equal (call-process "sam") 0))
(defun at-balin ()
"Is this machine balin ?"
(interactive)
(equal (call-process "balin") 0))
(defun screen-is-4k ()
"Is this machine using a 4k"
(interactive)
(equal (call-process "hidpi") 0))
;; LSP stuff
(defun my-lsp-mode-hook ()
(when (use-lsp)
(local-set-key (kbd "C-c C-e") 'utop-eval-phrase)
(local-set-key (kbd "C-c s d") 'lsp-find-definition)
(local-set-key (kbd "C-c s s") 'lsp-find-references)
(local-set-key (kbd "C-c s u") 'xref-pop-marker-stack)
(local-set-key (kbd "C-c C-t") 'lsp-describe-thing-at-point)
(local-set-key (kbd "C-,") 'flycheck-previous-error)
(local-set-key (kbd "C-.") 'flycheck-next-error)
(local-set-key (kbd "C-t") 'flycheck-list-errors)
(local-set-key (kbd "M-e") 'flycheck-explain-error-at-point)
(setq lsp-ui-sideline-diagnostic-max-lines 5)
(setq lsp-lens-enable t)
(lsp-enable-which-key-integration)
))
(when (use-lsp)
(setq lsp-keymap-prefix "C-l")
(require 'lsp-mode)
(with-eval-after-load 'lsp-mode
(add-hook 'lsp-mode-hook 'my-lsp-mode-hook)))
;; Require modules
;;(require 'autopair)
(require 'ocp-indent)
(require 'flyspell)
(require 'flycheck)
(require 'color-theme)
;(require 'yasnippet) ; not yasnippet-bundle
; check emacs29 and pixel-scroll (https://www.emacswiki.org/emacs/SmoothScrolling)
;(require 'smooth-scroll)
(require 'grep)
;(require 'shell-command)
(require 'paren)
(require 'whole-line-or-region)
(require 'whitespace)
(require 'glasses)
;(require 'paredit)
(require 'wdired)
(require 'recentf)
;(require 'shell-pop)
;;(require 'scheme48)
;(require 'ac-dabbrev)
(require 'tramp)
(require 'hilit-chg)
;(require 'magit)
(require 'xcscope)
(require 'color-theme-sanityinc-tomorrow)
(global-company-mode)
;; Fix for QMK Grave Escape (KC_GESC)
(global-set-key (kbd "s-`") (kbd "`"))
;; Overwrite, since the default is stupid
(defun cscope-bury-buffer ()
"Clean up cscope, if necessary, and bury the buffer."
(interactive)
(let ()
(if overlay-arrow-position
(set-marker overlay-arrow-position nil))
(setq overlay-arrow-position nil
overlay-arrow-string nil)
(bury-buffer (get-buffer cscope-output-buffer-name))
(delete-window)))
(cscope-setup)
;; Default indentantion
(setq-default indent-tabs-mode nil)
;; Default tab size
(setq-default default-tab-width 8)
;;(require 'dired+) ; not using
;;;; Hooks and Language modes;;;;
;; use text mode instead of fundamental-mode
;;(setq default-major-mode 'text-mode) moved to customized
;;(setq major-mode 'text-mode)
;; Fuck you with lisp interaction mode
;(setq initial-major-mode 'emacs-lisp-mode)
(setq initial-major-mode 'text-mode)
;; Ispell
;(setq ispell-dictionary "brazilian")
;; Text mode
(defun my-text-mode-hook ()
(auto-fill-mode 1)
(flyspell-mode -1)
(setq indent-tabs-mode t))
(add-hook 'text-mode-hook 'my-text-mode-hook)
(add-to-list 'auto-mode-alist '("\\.txt\\'" . text-mode))
(add-to-list 'auto-mode-alist '("README" . text-mode))
;; Mail mode ?
;; Fix mail-mode bug
(defvar message-signature-separator "^-- *$" "\
Regexp matching the signature separator.")
(defun my-mail-mode-hook ()
(auto-fill-mode 1)
(flyspell-mode 1))
(add-hook 'mail-mode-hook 'my-mail-mode-hook)
(add-to-list 'auto-mode-alist '("/tmp/mutt.*" . mail-mode))
;; Fundamental
(defun my-fundamental-mode-hook ()
(auto-fill-mode 1)
(setq fill-column 80)
;; (flyspell-mode t)
)
(add-hook 'fundamental-mode-hook 'my-fundamental-mode-hook)
;; CVS
(defun my-cvs-mode-commit-hook ()
(setq ispell-local-dictionary "english")
(flyspell-mode 1)
(auto-fill-mode 1))
(add-hook 'cvs-mode-commit-hook 'my-cvs-mode-commit-hook)
;; lua-mode
(add-to-list 'auto-mode-alist '("\\.lua\\'" . lua-mode))
(add-to-list 'auto-mode-alist '("awesomerc" . lua-mode))
(add-to-list 'auto-mode-alist '(".tkdb" . lua-mode))
(defun my-lua-mode-hook ()
(auto-fill-mode 1)
(setq indent-tabs-mode nil)
(setq lua-indent-level 4))
(add-hook 'lua-mode-hook 'my-lua-mode-hook)
;; Sh-mode
(defun my-sh-mode-hook ()
(auto-fill-mode 1)
(setq indent-tabs-mode t)
(setq tab-width 8)
(setq fill-column 80)
(setq sh-basic-offset 8
sh-indentation 8
;; Tweak the indentation level of case-related syntax elements, to avoid
;; excessive indentation because of the larger than default value of
;; `sh-basic-offset' and other indentation options.
sh-indent-for-case-label 0
sh-indent-for-case-alt '+))
(add-hook 'sh-mode-hook 'my-sh-mode-hook)
;; Org-mode
(add-to-list 'auto-mode-alist '("\\.org\\'" . org-mode))
(setq org-agenda-files '("~/org"))
;; (global-set-key "\C-cl" 'org-store-link)
;; (global-set-key "\C-ca" 'org-agenda)
;; (global-set-key "\C-cb" 'org-iswitchb)
(setq org-special-ctrl-a/e t)
(setq org-log-done t)
(setq org-time-stamp-custom-formats (quote ("<%d/%m/%y %a>" . "<%d/%m/%y %a %H:%M>")))
(setq org-display-custom-times t)
(defun my-org-mode-hook ()
(auto-fill-mode t)
(flyspell-mode nil))
(add-hook 'org-mode-hook 'my-org-mode-hook)
;; Dired
(defun my-dired-mode-hook ()
(define-key dired-mode-map "f" 'find-dired-current-dir)
(define-key dired-mode-map "r" 'wdired-change-to-wdired-mode)
(define-key dired-mode-map "b" 'dired-up-directory)
(define-key dired-mode-map (kbd "M-e") '(lambda ()
(cvs-examine default-directory nil))))
(add-hook 'dired-mode-hook 'my-dired-mode-hook)
;; Perl
(setq perl-prettify-symbols nil)
;(setq perl--prettify-symbols-alist nil)
;; ASM-moden
(defun my-asm-mode-hook ()
(setq indent-tabs-mode t))
(add-hook 'asm-mode-hook 'my-asm-mode-hook)
;; C-mode
(defun new-c-lineup-arglist (langelem)
(save-excursion
(goto-char (cdr langelem))
(setq syntax (car (car (c-guess-basic-syntax))))
(while (or (eq syntax 'arglist-intro)
(or (eq syntax 'arglist-cont)
(eq syntax 'arglist-cont-nonempty)))
(forward-line -1)
(setq syntax (car (car (c-guess-basic-syntax)))))
(beginning-of-line)
(re-search-forward "[^ \t]" (c-point 'eol))
(goto-char (+ (match-beginning 0) 4))
(vector (current-column))))
(c-add-style "datacom"
'("bsd"
'(c-ignore-auto-fill . '(string))
'(c-auto-newline . nil)
'(c-basic-offset . 4)
;; FIX '(c-offsets-alist '(case-label . 0))
'(tab-width . 4)
'(fill-column . 110)
'(indent-tabs-mode . t)))
;; (c-add-style "openbsd"
;; '("bsd"
;; '(c-ignore-auto-fill . '(string))
;; '(c-subword-mode . 0)
;; '(c-auto-newline . nil)
;; '(c-basic-offset . 8)
;; '(c-label-minimum-indentation . 0)
;; '(c-offsets-alist '(arglist-intro . new-c-lineup-arglist))
;; '(c-offsets-alist '(arglist-cont . new-c-lineup-arglist))
;; '(c-offsets-alist '(arglist-cont-nonempty . new-c-lineup-arglist))
;; '(c-offsets-alist '(arglist-close . 0))
;; '(c-offsets-alist '(substatement-open . 0))
;; '(c-offsets-alist '(statement-cont . *))
;; '(c-offsets-alist '(case-label . 0))
;; '(c-offsets-alist '(knr-argdecl . *))
;; '(indent-tabs-mode . nil)
;; '(tab-width . 8)
;; '(fill-column . 80)))
(defun my-c-mode-hook ()
(c-set-style "bsd")
(cscope-minor-mode 1)
(setq cwarn-mode t)
(setq c-ignore-auto-fill '(string))
(subword-mode 0)
(setq c-auto-newline nil)
(auto-fill-mode)
(setq fill-column 80)
(setq c-basic-offset 8)
(setq tab-width 8)
(setq c-label-minimum-indentation 0)
(c-set-offset 'arglist-intro 'new-c-lineup-arglist)
(c-set-offset 'arglist-cont 'new-c-lineup-arglist)
(c-set-offset 'arglist-cont-nonempty 'new-c-lineup-arglist)
(c-set-offset 'arglist-close 0)
(c-set-offset 'substatement-open 0)
(c-set-offset 'statement-cont '*)
(c-set-offset 'case-label 0)
(c-set-offset 'knr-argdecl '*)
(setq indent-tabs-mode t)
;;(autopair-mode 1)
;; (yas/minor-mode-on)
;; (define-key c-mode-map (kbd "C-c C-r") 'recompile)
(define-key c-mode-map (kbd "M-<f6>") 'c-replace-in-func)
(define-key c-mode-map (kbd "C-c C-t")
'(lambda ()
(interactive)
(message "%s" (c-defun-name))))
; (define-key c-mode-map (kbd "M-r") 'cscope-find-global-definition)
(define-key c-mode-map (kbd "M-c")
'cscope-find-functions-calling-this-function)
(define-key c-mode-map (kbd "M-s") 'cscope-find-this-symbol)
(define-key c-mode-map (kbd "M-n") 'cscope-next-symbol)
(define-key c-mode-map (kbd "M-m") 'cscope-prev-symbol)
(define-key c-mode-map (kbd "M-u") 'cscope-pop-mark)
;; (c-toggle-auto-newline 1)
(c-toggle-auto-newline -1)
(c-toggle-electric-state 1)
(c-toggle-auto-hungry-state -1)
;; (add-hook 'write-contents-hooks
;; (lambda ()
;; (whitespace-cleanup)
;; nil))
;(setq ac-auto-start nil) ;it's hanging somewhere
;; From merlin, I like it.
)
(add-hook 'c-mode-hook 'my-c-mode-hook)
(defun ocaml-c-mode ()
"The weird indentation people use on ocaml C stubs"
(interactive)
(setq c-basic-offset 2)
(setq indent-tabs-mode nil))
;; Emacs lisp mode
(defun my-emacs-lisp-mode-hook ()
(setq indent-tabs-mode nil)
;; (define-key emacs-lisp-mode-map (kbd "C-j") 'paredit-newline)
)
(add-hook 'emacs-lisp-mode-hook 'my-emacs-lisp-mode-hook)
;; Diff mode
(defun my-diff-mode-hook ()
(local-set-key (kbd "C-,") 'diff-hunk-prev)
(local-set-key (kbd "C-.") 'diff-hunk-next))
(add-hook 'diff-mode-hook 'my-diff-mode-hook)
;; Always indent after yanking/poping
(defadvice yank (after indent-region activate)
(if (member major-mode
'(emacs-lisp-mode scheme-mode lisp-mode
c-mode c++-mode objc-mode, shell-script-mode
latex-mode lua-mode tuareg-mode))
(let ((mark-even-if-inactive t))
(indent-region (region-beginning) (region-end) nil))))
(defadvice yank-pop (after indent-region activate)
(if (member major-mode
'(emacs-lisp-mode scheme-mode lisp-mode
c-mode c++-mode objc-mode, shell-script-mode
latex-mode lua-mode tuareg-mode))
(let ((mark-even-if-inactive t))
(indent-region (region-beginning) (region-end) nil))))
;; T2T mode
(autoload 't2t-mode "txt2tags-mode" "Txt2tags Mode" t)
(defun my-t2t-mode-hook ()
(flyspell-mode 1))
(add-hook 't2t-mode-hook 'my-t2t-mode-hook)
(add-to-list 'auto-mode-alist '("\\.t2t$" . t2t-mode))
;; LaTex mode
(defun my-latex-mode-hook ()
(flyspell-mode 1)
(yas/minor-mode-on))
(add-hook 'latex-mode-hook 'my-latex-mode-hook)
;;;; Global variables, Options and Module Options ;;;;
;; Set up our nasty mail system
(setq user-mail-address "haesbaert@haesbaert.org")
(setq sendmail-program "/usr/local/bin/msmtp")
(setq mail-signature t)
(setq mail-signature-file "/home/haesbaert/.sig")
;; We want another default dir
(setq default-directory "/home/haesbaert/")
;; save position in files
(setq-default save-place t)
;; Disable the toolbar, it sucks big time !
(tool-bar-mode -1)
;; Enable the menu-bar
(menu-bar-mode -1)
;; Scroll bar sucks
(scroll-bar-mode -1)
;; OMG !! this is awesome !
(set-frame-parameter nil 'undecorated t)
;; HiLock is the shit
(global-hi-lock-mode 1)
;; Highlight matching parentheses next to cursor
(show-paren-mode t)
;; Recent mode
;;(recentf-mode 1)
;; Highlight mode
;(global-highlight-changes-mode "passive")
;(setq highlight-changes-initial-state "passive")
;; (defun my-highlight-changes-enable-hook ()
;; (setq old-C-.-binding ')
;; (local-set-key (kbd "C-.") 'highlight-changes-next-change)
;; (local-set-key (kbd "C-,") 'highlight-changes-previous-change))
;; (defun my-highlight-changes-enable-hook ()
;; (local-set-key (kbd "C-.") 'highlight-changes-next-change)
;; (local-set-key (kbd "C-,") 'highlight-changes-previous-change))
;; Highlight region between point and mark
(transient-mark-mode t)
;; This mode sounds cool
;; This must be done prior to loading whole-line-or-region
(global-set-key (kbd "M-c") 'kill-ring-save)
(with-eval-after-load 'whole-line-or-region
(define-key whole-line-or-region-local-mode-map [remap comment-dwim] 'nil))
(whole-line-or-region-global-mode 1)
;; Finally !
(delete-selection-mode t)
;; Save my desktop !! This is a pain in the arse
;;(desktop-save-mode 1)
;; Enable toggling of uninteresting files.
(setq dired-omit-files-p t)
;; Scroll down when compiling
(setq compilation-scroll-output' t)
;; Show line-number in the mode line
(line-number-mode 1)
;; Show column-number in the mode line
(column-number-mode 1)
;; Whitespace
(setq whitespace-chars '(tabs spaces trailing lines space-before-tab
indentation empty space-after-tab))
;;(global-whitespace-mode)
;;(setq whitespace-chars (quote (lines)))
;; Autofill for the will
;;(auto-fill-mode t)
;; Shell
(setq explicit-shell-file-name "/bin/ksh")
(setq shell-file-name "ksh")
(setq explicit-ksh-args '("-l"))
;; Shell pop
;;(shell-pop-set-internal-mode "ansi-term")
;;(shell-pop-set-internal-mode "eshell")
;(shell-pop-set-internal-mode-shell "/usr/bin/ksh -l")
;(shell-pop-set-window-height 35) ; the number for the percentage of the selected window .
;; Our diff options
(setq diff-switches "-dpu")
;; We like marking our diff and tag files
(setq cvs-invert-ignore-marks t)
;; Newlines at the end so gcc will shutup
(setq require-final-newline t)
;; C-k kills whole line and newline if at beginning of line
;;(setq kill-whole-line t)
;; I hate auto-save
(setq auto-save-default nil)
;; We hate backup
(setq make-backup-files nil)
;; Highlight search object
(setq search-highlight t)
;; Highlight query object
(setq query-replace-highlight t)
;; yes = y , no = n :)
;; thanks to farina
(fset 'yes-or-no-p 'y-or-n-p)
;; Don't write more than 80 columns
(setq default-fill-column 80)
;; Hide startup message
(setq inhibit-startup-message t)
;; yasifnippet
;(yas/load-directory "~/.elisp/snippets")
;; shell-completion minor mode
;(shell-command-completion-mode)
;; Muttrc
(autoload 'muttrc-mode "muttrc-mode.el"
"Major mode to edit muttrc files" t)
(setq auto-mode-alist
(append '(("muttrc\\'" . muttrc-mode))
auto-mode-alist))
;; Paredit
;; (mapc (lambda (mode)
;; (let ((hook (intern (concat (symbol-name mode)
;; "-mode-hook"))))
;; (add-hook hook (lambda () (paredit-mode +1)))))
;; '(emacs-lisp lisp inferior-lisp))
;; ibuffer is the shit !
(autoload 'ibuffer "ibuffer" "List buffers." t)
;;(add-to-list 'ibuffer-never-show-regexps "^\\*")
;; Iswitchb is much better than the normal implementation
;; XXX This has been marked obsolete by icomplete-mode, which sucks btw.
;(iswitchb-mode 1)
;(setq iswitchb-buffer-ignore '("^ " "*M.*"))
;; (ido-mode 1)
(ido-mode 'buffer)
;; (icomplete-mode 1)
(which-key-mode)
;; Goto line with M-g
(global-set-key (kbd "M-g") 'goto-line)
;; Extensions we don't want to complete
(add-to-list 'completion-ignored-extensions ".d")
(add-to-list 'completion-ignored-extensions ".a")
(add-to-list 'completion-ignored-extensions ".o")
;; Tramp mode
(setq tramp-default-method "sshx")
(setq shell-prompt-pattern "^[^#$%e>\n]*[#$%>:] *")
;; Argh, why isn't this default ?
(global-font-lock-mode t)
(setq font-lock-maximum-decoration t) ; legacy, just leave it here
;(setq font-lock-global-modes '(not c-mode))
;; Don't blink
(blink-cursor-mode -1)
;; Color themes
(defun color-theme-haesbaert ()
"A less colorfull theme based on clarity by Christiano Farina Haesbaert.
Created on 2010-07-10."
(interactive)
(let ((color-theme-is-cumulative t))
(color-theme-clarity)
(color-theme-install
'(color-theme-haesbaert
nil
(default ((t (nil))))
(font-lock-variable-name-face ((t (:foreground "white"))))
(font-lock-type-face ((t (:bold t :foreground "white"))))
(font-lock-keyword-face ((t (:bold t :foreground "white"))))))))
(defun color-theme-lesser ()
"A lesser color-theme-less by Christiano Farina
Haesbaert. Created on 2011-09-14."
(interactive)
(let ((color-theme-is-cumulative t))
(color-theme-less)
(color-theme-install
'(color-theme-lesser
((foreground-color . "white"))
(default ((t (nil))))
(font-lock-variable-name-face ((t (:foreground "white"))))
(font-lock-type-face ((t (:bold t :foreground "white"))))
(font-lock-preprocessor-face ((t (:bold t :foreground "white"))))
(font-lock-string-face ((t (:bold t :foreground "white"))))
(font-lock-function-name-face ((t (:bold t :foreground "white"))))
(font-lock-keyword-face ((t (:bold t :foreground "white"))))))))
(defun color-theme-lesser-nobold ()
"A lesser color-theme-less by Christiano Farina
Haesbaert. Created on 2011-09-14."
(interactive)
(let ((color-theme-is-cumulative t))
(color-theme-less-nobold)
(color-theme-install
'(color-theme-lesser-nobold
((foreground-color . "white"))
(default ((t (nil))))
(font-lock-variable-name-face ((t (:foreground "white"))))
(font-lock-type-face ((t (:foreground "white"))))
(font-lock-preprocessor-face ((t (:foreground "white"))))
(font-lock-string-face ((t (:foreground "white"))))
(font-lock-function-name-face ((t (:foreground "white"))))
(font-lock-keyword-face ((t (:foreground "white"))))))))
;;;
(defun color-theme-ryerson-sane ()
"A not so colofull ryerson theme Christiano Farina
Haesbaert. Created on 2011-10-05."
(interactive)
(let ((color-theme-is-cumulative t))
(color-theme-ryerson)
(color-theme-install
'(color-theme-ryerson
((foreground-color . "white"))
(default ((t (nil))))
;; (font-lock-comment-face ((t (:foreground "dim gray"))))
(font-lock-constant-face ((t (:foreground "white"))))
(font-lock-comment-face ((t (:foreground "Salmon"))))
(font-lock-variable-name-face ((t (:foreground "white"))))
(font-lock-type-face ((t (:bold t :foreground "white"))))
(font-lock-preprocessor-face ((t (:bold t :foreground "white"))))
(font-lock-string-face ((t (:bold t :foreground "white"))))
(font-lock-function-name-face ((t (:bold t :foreground "white"))))
(font-lock-keyword-face ((t (:bold t :foreground "white"))))))))
(defun haesbaert-solarized ()
"My solarized. Created on 2022-07-25."
(interactive)
(load-theme 'solarized-dark-high-contrast)
(set-face-attribute 'font-lock-builtin-face nil
:foreground "#8d9fa1" :slant 'normal :weight 'normal)
(set-face-attribute 'font-lock-constant-face nil
:foreground "#3c98e0" :weight 'normal)
(set-face-attribute 'font-lock-keyword-face nil
:foreground "#93a61a" :weight 'normal)
(set-face-attribute 'match nil
:background "#01323d" :foreground "#9eacac" :inverse-video 't :weight 'normal)
(defun haesbaert-solarized-tuareg-hook ()
(set-face-attribute 'tuareg-font-lock-governing-face nil
:weight 'normal)
)
(add-hook 'tuareg-mode-hook 'haesbaert-solarized-tuareg-hook)
)
;; (defun tuareg-face-hook ()
;; (set-face-attribute 'tuareg-font-lock-governing-face nil
;; :inherit font-lock-keyword-face :weight 'normal))
;; (add-hook 'tuareg-mode-hook 'tuareg-face-hook)
(defun no-face-bold ()
(interactive)
;; (set-face-attribute 'tuareg-font-lock-governing-face nil
;; :inherit 'default :foreground 'unspecified :weight 'normal)
;; (set-face-attribute 'tuareg-font-lock-module-face nil
;; :inherit 'default :foreground 'unspecified :weight 'normal)
;; (set-face-attribute 'tuareg-font-lock-label-face nil
;; :inherit 'default :foreground 'unspecified :weight 'normal)
;; (set-face-attribute 'tuareg-font-lock-attribute-face nil
;; :inherit 'default :foreground 'unspecified :weight 'normal)
(set-face-attribute 'font-lock-variable-name-face nil :inherit 'default :weight 'normal)
(set-face-attribute 'font-lock-function-name-face nil :inherit 'default :weight 'normal)
(set-face-attribute 'font-lock-keyword-face nil :inherit 'default :weight 'normal)
(set-face-attribute 'font-lock-type-face nil :inherit 'default :weight 'normal :slant 'normal)
(set-face-attribute 'font-lock-string-face nil :inherit 'default :weight 'normal)
(set-face-attribute 'flycheck-error nil :inherit nil :underline "#ec423a")
(set-face-attribute 'flycheck-warning nil :inherit nil :underline "#c49619")
(set-face-attribute 'flyspell-incorrect nil :inherit nil :underline "#ec423a")
)
(defun flycheck-face-hook ()
(set-face-attribute 'flycheck-error nil
:inherit nil :underline "#ec423a")
(set-face-attribute 'flycheck-warning nil
:inherit nil :underline "#c49619")
(set-face-attribute 'flyspell-incorrect nil
:inherit nil :underline "#ec423a"))
(add-hook 'flycheck-mode-hook 'flycheck-face-hook)
;(color-theme-initialize)
(require 'color-theme-less "~/.emacs.d/color-theme-less.el")
;(load-theme 'nothappy t)
;(color-theme-less-osx)
;;;;;;;;;;;;;;(color-theme-lesser-nobold)
;(color-theme-lesser2)
;;(color-theme-arjen)
;;(color-theme-clarity)
;;(color-theme-sitaramv-solaris)
;;(color-theme-dark-green)
;;(color-theme-simple-1)
;;(color-theme-pok-wob)
;;(color-theme-jedit-grey)
;;(color-theme-andreas)
;;(color-theme-classic)
;;(color-theme-late-night)
;;(color-theme-ryerson-sane)
;;in column Set our font to terminus
;;(set-frame-font "-xos4-terminus-bold-r-normal--24-*-*-*-*-*-*")
;; (22) This is equivalent to Powerline=15 in Xdefaults.
;;(set-frame-font "-xos4-terminus-bold-r-normal--22-*-*-*-*-*-*")
;; (22) This is equivalent to Powerline=15 in Xdefaults.
;; (set-frame-font "Terminess Powerline:size=22:weight=Bold")
;;; EXTRA EXTRA below is the exact correct rendering of xft Terminus
;;; Bold 16, which is broken on emacs, emacs seems to add extra spacing to all xft fonts
;;(set-frame-font "-xos4-terminus-bold-r-normal--22-*-*-*-*-*-*") <------------ LAPTOP
;;(set-frame-font "-xos4-terminus-bold-r-normal--20-*-*-*-*-*-*") ;; <--------- LAPTOP OR THIS ONE
;;(set-frame-font "-xos4-terminus-bold-r-normal--24-*-*-*-*-*-*") ;; <--------- HOME-OFFICE 2k
;;(set-frame-font "-xos4-terminus-bold-r-normal--28-*-*-*-*-*-*") ;; <--------------- HOME-OFFICE 4k
;;(set-frame-font "Terminus Bold 16")
;;(set-frame-font "Terminus Bold 16:width=ultra-condensed")
;; (set-frame-font "-xos4-terminus-bold-r-normal--20-200-72-72-c-100-*")
;; (set-frame-font "-xos4-terminus-bold-r-normal--24-240-72-72-c-120-*")
;; (set-frame-font "-xos4-terminus-bold-r-normal--24-*-*-*-*-*-*")
;;(set-frame-font "-xos4-terminus-medium-r-normal--14-140-*-*-*-*-*-*")
;;(set-frame-font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-2")
;;(set-frame-font "neep-alt-14")
;;(set-frame-font "-*-lucidatypewriter-medium-*-*-*-12-*-*-*-*-*-*-*")
;;(set-frame-font "-dec-terminal-medium-r-normal-*-*-140-*-*-c-*-iso8859-1")
;;(set-frame-font "-misc-fixed-medium-r-semicondensed--13-120-75-75-c-60-iso8859-2")
;;(set-frame-font "-*-fixed-bold-r-normal-*-15-*-100-100-c-*-*-*")
;;(set-frame-font "-*-terminus-*-*-*-*-*-*-*-*-*-*-*-*")
;;(set-frame-font "-*-Fixed-Bold-R-Normal-*-13-*-*-*-*-*-*-*")
;;(set-frame-font "-xos4-terminus-bold-r-normal-*-16-160-72-72-*-*-iso8859-1")
;;(set-frame-font "-misc-fixed-medium-r-semicondensed--14-120-75-75-c-60-iso8859-2")
;;(set-frame-font "-xos4-terminus-medium-r-normal--14-140-*-*-*-*-*-*")
;;(set-frame-font "-xos4-terminus-bold-r-normal--20-200-72-72-c-100-iso8859-15")
;;(set-frame-font "Inconsolata-16")
;;(set-frame-font "Inconsolata-18")
;;(set-frame-font "Inconsolata-22")
;;(set-frame-font "SourceCodePro 18")
;;(set-frame-font "SourceCodePro:Light 18")
;;(set-frame-font "Source Code Pro-22:weight=light")
;;(set-frame-font "source Code Pro Light 14")
;;(set-frame-font "source Code Pro Light 16")
;;(set-frame-font "source Code Pro Light 18")
;;(set-frame-font "source Code Pro Light 20")
;;(set-frame-font "source Code Pro Light 22")
(defun terminus-small-bold ()
(interactive)
(set-frame-font "-xos4-terminus-bold-r-normal--22-*-*-*-*-*-*"))
(defun terminus-big-bold ()
(interactive)
(set-frame-font "-xos4-terminus-bold-r-normal--32-*-*-*-*-*-*")
(set-face-attribute 'font-lock-builtin-face nil :slant 'normal :weight 'bold)
(set-face-attribute 'font-lock-constant-face nil :weight 'bold)
(set-face-attribute 'font-lock-keyword-face nil :weight 'bold)
(set-face-attribute 'match nil :inverse-video 't :weight 'bold))
(defun terminus-small ()
(interactive)
(set-frame-font "-xos4-terminus-medium-r-normal--22-*-*-*-*-*-*"))
(defun terminus-big ()
(interactive)
(set-frame-font "-xos4-terminus-medium-r-normal--32-*-*-*-*-*-*"))
;; terminus TERMINUS FONT IS SET HERE terminus TERMINUS !!!!
;;(terminus-big)
(when (at-sam)
;; (set-frame-font "Monoid-9")
;(set-frame-font "BerkeleyMono-10")
(set-frame-font "BerkeleyMono-11")
;(set-frame-font "BerkeleyMono-12")
)
(when (at-balin)
; (set-frame-font "Monoisome-13")
(set-frame-font "BerkeleyMono-14")
)
;; Ignore this when using grep
(add-to-list 'grep-find-ignored-directories "_build")
;;;; Function Definitions And My stuff ;;;;
(defun my-iswitch-to-bookmark (bname)
"Interactively switch to bookmark as `iswitchb' does."
(interactive (list (flet ((iswitchb-make-buflist
(default)
(setq iswitchb-buflist (bookmark-all-names))))
(iswitchb-read-buffer "Jump to bookmark: "))))
(bookmark-jump bname))
(defun c-replace-in-func (arg)
"Call replace-string with current function as region"
(interactive "P")
(c-mark-function)
(if arg
(call-interactively 'query-replace)
(call-interactively 'replace-string)))
(defun occur-at-point ()
(interactive)
"call occur at sexp"
(occur (read-string "List lines matching regexp: "
(thing-at-point 'sexp))))
(defun highlight-regexp-at-pointer ()
"Highlight a regexp with a prompt started to pointer"
(interactive)
(highlight-regexp (read-string "Highlight regexp: " (thing-at-point 'sexp))
"hi-green" ))
(defun find-dired-current-dir ()
(interactive)
"find files in current dir"
(find-dired (dired-current-directory) (concat "-iname " (read-string "Filename regexp: " ))))
;; Better open line
(defun open-line-above ()
"Open a line above the line the point is at.
Then move to that line and indent accordning to mode"
(interactive)
(move-beginning-of-line 1)
(newline)
(previous-line)
(indent-according-to-mode))
(defun open-line-below ()
"Open a line below the line the point is at.
Then move to that line and indent accordning to mode"
(interactive)
(move-end-of-line 1)
(newline)
(indent-according-to-mode))
(defun quick-c-compile ()
"Quick compile current source file as in (buffer-filename)"
(interactive)
(compile (concat "gcc -o "
(chomp-extension (buffer-file-name))
" "
(buffer-file-name)
" -Wall -ansi")))
;; by Nikolaj Schumacher, 2008-10-20. Released under GPL.
(defun semnav-up (arg)
(interactive "p")
(when (nth 3 (syntax-ppss))
(if (> arg 0)
(progn (skip-syntax-forward "^\"")
(goto-char (1+ (point))) (decf arg))
(skip-syntax-backward "^\"")
(goto-char (1- (point)))
(incf arg)))
(up-list arg))
;; by Nikolaj Schumacher, 2008-10-20. Released under GPL.
(defun extend-selection (arg &optional incremental)
"Select the current word. Subsequent calls expands the selection
to larger semantic unit."
(interactive
(list (prefix-numeric-value current-prefix-arg)
(or (and transient-mark-mode mark-active)
(eq last-command this-command))))
(if incremental
(progn (semnav-up (- arg))
(forward-sexp) (mark-sexp -1))
(if (> arg 1) (extend-selection (1- arg) t)
(if (looking-at "\\=\\(\\s_\\|\\sw\\)*\\_>")
(goto-char (match-end 0))
(unless (memq (char-before) '(?\) ?\"))
(forward-sexp)))
(mark-sexp -1))))
(defun select-text-in-quote ()
"Select text between the nearest left and right delimiters.
Delimiters are paired characters: ()[]<>, including \"\"."
(interactive)
(let (b1 b2)
(skip-chars-backward "^({[�\"")
(setq b1 (point))
(skip-chars-forward "^)}]�\"")
(setq b2 (point))
(set-mark b1)))
;;(global-set-key (kbd "M-I") 'tab-to-tab-stop)
(global-set-key (kbd "M-i") 'extend-selection)
;(global-set-key (kbd "M-o") 'select-text-in-quote)
;(global-set-key (kbd "M-[") 'align)
;; Fuck finally !
(global-set-key (kbd "M-+") 'count-lines-region)
;; TODO make a function that tries vertically and then horizontally
(global-set-key (kbd "M-=") '(lambda () (interactive) (enlarge-window 2)))
(global-set-key (kbd "M--") '(lambda () (interactive) (shrink-window 2)))
;; God why isn't this default ?
(global-set-key (kbd "C-o") 'open-line-below)
;; Why not default ?
(global-set-key (kbd "C-m") 'newline-and-indent)
;; Normal switch buffer sucks big time
(global-set-key (kbd "C-x C-b") 'ibuffer)
;; Again, why not default ?
(global-set-key (kbd "M-g") 'goto-line)
;; I took a long time before noticing this...
(global-set-key (kbd "C-.") 'next-error)
(global-set-key (kbd "C-,") 'previous-error)
(global-set-key (kbd "C-M-.") 'next-error)
(global-set-key (kbd "C-M-,") 'previous-error)
;; (global-set-key (kbd "C->") 'next-error)
;; (global-set-key (kbd "C-<") 'previous-error)
;; Globals that act of buffer
(global-set-key (kbd "C-c b m") 'mark-whole-buffer)
(global-set-key (kbd "C-c b r") 'revert-buffer)
(global-set-key (kbd "C-c b w") 'whitespace-cleanup)
;; Misc and Mode globals
(global-set-key (kbd "C-c m w") 'whitespace-mode)
;; Yasnippet
(global-set-key (kbd "M-`") 'yas/expand)
;; Align is nice
(global-set-key (kbd "M-p") 'align)
;; I really enjoy this, thanks emacs
;; (global-set-key (kbd "(") 'skeleton-pair-insert-maybe)
;; (global-set-key (kbd "[") 'skeleton-pair-insert-maybe)
;; (global-set-key (kbd "{") 'skeleton-pair-insert-maybe)
(global-set-key [M-backspace] 'backward-kill-word)
(global-set-key [home] 'beginning-of-line)
(global-set-key [end] 'end-of-line)
(global-set-key [C-home] 'beginning-of-buffer)
(global-set-key [C-end] 'end-of-buffer)
;(global-set-key [f1] 'ac-start)
(global-set-key [M-f1] 'my-iswitch-to-bookmark)
(global-set-key (kbd "M-r") 'rgrep)
;(global-set-key [f2] 'rgrep)
;(global-set-key [M-f2] 'rgrep)
;; (global-set-key [M-f2] 'bookmark-bmenu-list)
(global-set-key [f3] 'cvs-examine)
(global-set-key [M-f3] 'bookmark-set)
;(global-set-key [f4] 'shell-pop)
;(global-set-key [f5] '(lambda () (interactive)
; (kill-buffer (current-buffer))))
(global-set-key (kbd "C-x k") '(lambda () (interactive)
(kill-buffer (current-buffer))))
;(global-set-key [f6] 'replace-string)
;(global-set-key [C-f6] 'query-replace)
;(global-set-key [f7] 'recompile)
(global-set-key [C-tab] 'company-complete)
(global-set-key (kbd "M-SPC") 'project-compile)
(global-set-key (kbd "M-o") 'ff-find-other-file)
(global-set-key [f9] 'manual-entry)
;;(global-set-key [f10] (quick-task-make-quick-task-function
;;my-quick-task-menu-func
;;my-quick-task-menu))
(global-set-key [f10] 'whitespace-mode)
(global-set-key [f11] 'highlight-regexp-at-pointer)
(global-set-key [M-f11] 'unhighlight-regexp)
(global-set-key [f12] '(lambda () (interactive)
(find-file "/home/haesbaert/.emacs")))
;;; Dictionary stuff
(global-set-key (kbd "C-c d f") 'flyspell-mode)
(global-set-key (kbd "C-c d b") '(lambda () (interactive)
(ispell-change-dictionary "brasileiro")
;; (set-buffer-file-coding-system "iso8859-15")
;; (set-input-method "portuguese-prefix")
(flyspell-buffer)))
(global-set-key (kbd "C-c d e") '(lambda () (interactive)
(ispell-change-dictionary "english")
(flyspell-buffer)))
(global-set-key (kbd "C-c n") 'code-note-do)
;; Smooth scroll
(global-set-key [(control down)] 'scroll-up-1)
(global-set-key [(control up)] 'scroll-down-1)
(global-set-key [(control left)] 'scroll-right-1)
(global-set-key [(control right)] 'scroll-left-1)
;;; Code note
(setq code-note-file "/tmp/notes")
(defun code-note-do (msg)
"Make a code note to 'code-note-file"
(interactive "sNote: ")
(code-note-log code-note-file msg))
(defun code-note-log (f msg)
"make code node to buffer with file:line "
(let ((note (concat (file-name-nondirectory (buffer-file-name))
":"
(number-to-string (line-number-at-pos))
" "
msg)))
(with-current-buffer (find-file-noselect f)
(widen)
(goto-char (point-max))
(if (not (bolp))
(insert "\n"))
(insert note))))
(defun build-world ()
"Build world"
(interactive)
(compile "cd /usr/src && sudo make build"))
(defun build-production ()
"Build production kernel"
(interactive)
(compile "cd /d/production/sys/arch/amd64/compile/GENERIC.MP && make -j4 && cp /d/production/sys/arch/amd64/compile/GENERIC.MP/bsd /bsd.production && scp /bsd.production sauron:/bsd.production"))
;; (defun build-kernel ()
;; "Build world"
;; (interactive)
;; (compile "cd /usr/src/sys/arch/amd64/compile/GENERIC.MP && make -j6 && cp /usr/src/sys/arch/amd64/compile/GENERIC.MP/bsd /bsd.dev"))
(defun kbuild ()
"Build kernel"
(interactive)
(compile "cd /usr/src/sys/arch/amd64/compile/GENERIC.MP && make -j$(sysctl -n hw.ncpu)"))
(defun install-kernel ()
"Build world"
(interactive)
(compile "cd /usr/src/sys/arch/amd64/compile/GENERIC.MP && sudo make install"))
(defun build-xenocara ()
"Build world"
(interactive)
(compile "cd /usr/xenocara && sudo make build"))
;; Recent mode, keep this last, so we only record find-files from now on.
(recentf-mode 1)
(global-set-key (kbd "C-x C-r") 'recentf-open-files)
(add-hook 'find-file 'recentf-save-list)
(when (use-lsp)
(add-hook 'tuareg-mode-hook #'lsp)
(add-hook 'zig-mode-hook #'lsp))
;; Automatically load utop.el
;; comment utop for 5.0.0
(autoload 'utop "utop" "Toplevel for OCaml" t)
(autoload 'utop-minor-mode "utop" "Minor mode for utop" t)
(add-hook 'utop-mode-hook 'company-mode)
(add-hook 'tuareg-mode-hook 'utop-minor-mode)
(with-eval-after-load 'utop-minor-mode
(define-key utop-minor-mode-map (kbd "C-x C-r") nil)
(define-key utop-minor-mode-map (kbd "C-c C-r") 'utop-eval-region)
(define-key utop-minor-mode-map (kbd "C-c C-e") 'utop-eval-phrase)
(setq utop-command "opam exec -- utop -emacs")
(setq utop-command "opam exec -- dune utop . -- -emacs"))
;; (defun my-company-mode-hook ()
;; ;; doesn't work :(
;; (add-to-list 'company-keywords-alist '(tuareg-mode "if" "then" "in" "module")))
;; (add-hook 'company-mode-hook 'my-company-mode-hook)
(with-eval-after-load 'company
(define-key company-active-map (kbd "C-n") 'company-select-next)
(define-key company-active-map (kbd "C-p") 'company-select-previous))
(defun my-tuareg-mode-hook ()
(setq merlin-locate-preference 'mli)
(auto-fill-mode 0)
;; Company mode
(local-set-key [C-tab] 'company-complete)
(setq company-minimum-prefix-length 3)
(setq company-idle-delay 0.3)
(when (use-merlin)
(local-set-key (kbd "C-c s d") 'merlin-locate)
(local-set-key (kbd "C-c s s") 'merlin-ocurrences)
(local-set-key (kbd "C-c s u") 'merlin-pop-stack)
(local-set-key (kbd "C-,") 'merlin-error-prev)
(local-set-key (kbd "C-.") 'merlin-error-next)
)
;; (local-set-key (kbd "C-x C-r") 'recentf-open-files)
(local-set-key (kbd "M-o") 'tuareg-find-alternate-file)
;; (local-set-key (kbd "M-e") 'merlin-type-enclosing)
;; (local-set-key (kbd "M-r") 'merlin-locate)
;; (local-set-key (kbd "M-t") 'merlin-destruct)
;; (local-set-key (kbd "M-n") 'merlin-document)
;; (local-set-key (kbd "M-z") 'merlin-pop-stack)
(local-set-key (kbd "C-M-z") 'ocamlformat)
)
(setq opam-share (substring
(shell-command-to-string "opam var share") 0 -1))
(put 'downcase-region 'disabled nil)
;; ## added by OPAM user-setup for emacs / base ## 56ab50dc8996d2bb95e7856a6eddb17b ## you can edit, but keep this line
(require 'opam-user-setup "~/.emacs.d/opam-user-setup.el")
;; ## end of OPAM user-setup addition for emacs / base ## keep this line
(add-hook 'tuareg-mode-hook 'my-tuareg-mode-hook)
; (require 'ocamlformat) disabled for 5.0.0 alpha
(require 'dune)
(require 'package)
(package-initialize)
(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.
'(custom-safe-themes
'("5a19234e29d054e26a454419dbf936686f7f2c4c95fba03eda61193152a0c0c1" "1cd8f9ea51e47352088930d8228fd7930834aae41351762c189ab2ddc2ae6ddf" "f6712bc896a78ba3a6c5106eb8a45dae4069d4353e5bc5586a48918fc3fd35e8" "3c46d587d989d6a96f10c19589801f923843326ce5c68859a43f2c9b158950fc" "25b1a24a87ba73dcd7fd4890a300fa4495d049caff929e6fcd769f9b8024e6bc" "a0e27db7c9b997e7c91349feef8b82c3f5b75260c4ce5fba4449a0f10394c647" "9d21338a08663f201f5aec225aafcc2223712bfe162348a629b739e92df48233" "45657677fec6efd1608b26e313faec553098d2677bec1279963f29d49442791a" "6c836946328ed84d8aae06ed994769fe7a0bf7f33072c858341022d75842f263" "927485d6fe74084ef0348bced1aa728980e8d1320d56798e84a87eaff3711bcc" "923a0e71a221d5400e5062aa0eb579953206d21682de0f9972f6b3292805b68d" "9942800dcbacec4a75989aa3e24a4dfa6a8e77ccca0850b196f9f5d113744eaa" "1904c2ad2172abafcfa36b21507aec7f3601501118679db5086b8fee89f83066" "12830149880f167734bbeb42ee27fc2da8a6eee025dc38a14341b5a20761f8b3" "0319c8736cef3f172848f2c87d3fda547bca0c89a6ac7328f1de14e3ce1788a0" "d308d86888586399233627740fbfb0207a0b3afb1af67c86abc3108ce1df7d32" "699a56bbba35fabb546e42ea7caee1053f59b673a89e8613116f7d1baad18038" "11c15cc7bb8f41a662a271c105161aec87b929d664b3da89cc2e7ee63f4f62ff" "440eb6ff58597fac22cbe9a2ee810cc7cd8d347e9d1a72c90d1040d5916081ee" "7cd2e324b38d46471d2323aaf594a53897a5c7b07ef33039b76a3a3a0fdc8889" "888ae14be8582e2349d88beed171a4aea97be624d9c5ade2282595f80c1ddf67" "2cb71b2a203f5f45f7f99d6401f98fda14d382cbc0a81a4c639a2d1ad79001f8" "8c0442b0557432be843600a136d80083fc8478a1ccc8203909e9e12701da9e63" "5953fcee3e4de096fb1b1989ddd2418619018949a5c38689f56787149329c5c2" "212f5c1f647935fe4373da9ce3549351bd1a811f202588ab4098c3bc78d2e05f" "1ab89c9acac554bd9fbc5788f6070533539182ed281d75eacc380fcfddc6a997" "30ccf1c170bb20115138c3fe8c7d28109a11325edcb6a9742f47ee76babc620a" "cc0dbb53a10215b696d391a90de635ba1699072745bf653b53774706999208e3" "9ce1d48c9ce7b8f7795eee7d401af39a5e801509ea8e4c1bf6be863f6ebe8a0d" "69f5f50dd51a70e10bd2c501f3abdb1f27f58203af77a5162f24faafeabe42a5" "9a605ca7ce9d2e4f32c30c622e2a678e1b09f96ee4052aaaa2d4028e0db3d14e" "0b9272a37374498b74f26b78d28c2081c3028b98145ec33827cbd32f3762dc17" "1762d0d49e9a6e9d926fa68fd2c020ab4c744b24c7c7dbf2211c3e1f37c8ff73" "113392d0bb8e5c08dd265bfa310eef16d85db5f7a5a2eea0160ba43e87cd6bfb" "f8e4d2c80c918f45906cfb422f9aaa88c7e25ab6ac52bf87f40a28efdb6d2916" "32889dbef988356bc8f86fb6c72e45e450f9873fe446e11e25ad9b9381ffe8f1" "c0407091aab7444f3200567e3006b4e668f66d75d37d7ed57085a5b1b8ab5205" "c5478a64fe38133beb9f8f0a94d0e7ee9cb2c6a67f002dc638560320afb00f61" "39290654d5c2770f3eef46523d959064f30f53104675699635c633ddeb553814" "8e78cab196d371b07c8b03ea95a0a8ab29ea3dc4ab8c7e5b949dc12af53046e7" "269e7ed53b336f32f649dd578780e2a37c4461b841faf736bde63129acccecf2" "1bfc6c3c42147061999fe707f8a9bfb20a36d8f271b08ad4b097b1612bffc368" "ab27fc3b0444ab49cd9b6639ca71308b837c20232e71a32062568ffa346c1268" "badbcd3a45422c5018c4eaea17283cb875b29321b6044ae15130ac76808b44d3" "a14bd5385a7f66ce43643110bfc1b9d14429d3172ae4ed06234cc16e4ec2f3d7" "4985c2229282d032a77595a513d84e5f1d3cfa4d1e5e57833e35dee88b74e56b" "27867c91ff82b0e4854dfc74e11c50e52ad77000d84af9be401b1b1319b614cd" "eb698f3261444b8116c73d5342a9f2efc702f6d855991008605a068433175bba" "abbe0509e2a2c764330e98b17f150a8e401f0c07934bf2b7820a204f13f764f8" "7f3701a24eaee1f599c0167256c5f8b29a31fe0dc2f34a7fc4456e85722c609d" "efc229aba9eb0f73e6052feda72f922dbd83753bf372180b072c04f0ffd71526" "ad7e69f17ebdec29eee1f231f21b29588585d32b27eaeeb1d7f47d0c7ea7b8c2" "c0690887e3910fdb09960694cee352a45a132fa281bb674f11afdc37c36fce96" "851548c4bb4b38acfd2475fde4cfdf4bf64e7d65664ce187a7a2ae21a554fef4" "9a0611563bd4933b64f06cd52ac1c53ef6ef0909d4a865e8b4211eff49682128" "9933fd68aafeff20000648422d94ee942fbb78aa3f09200b4a40d9787e02ee14" "a0e98386900e4365cd3fc26f8ba6d9a1807386c31ed0e7f2fcf64eb33fd6d4e7" "88b7353ad774b24d75ce51f02b11e2435e3eee0cad900c7b11315327034185ac" "62b26f74f485e7fc1747c75be7819865451e4117fa789ff6177e6b8a385984ac" "8c3c9f673b788d23feb4cd61d1b20cc70f57307241274a3775f71ecde44d79fb" "e554ef4618602cf4755c9276a0f8ee9731f98f6bd13b3a49b2169dc70dedeff6" "630b03cff02f398516e2e2349b9284423e6b1735e84d15626e2a51b05b033be5" "5eb4b22e97ddb2db9ecce7d983fa45eb8367447f151c7e1b033af27820f43760" "05d009b7979e3887c917ef6796978d1c3bbe617e6aa791db38f05be713da0ba0" "dfe9e8bb25ee9d21de04d859066e453d5ea21900425eb77ce4a399842cbbb24b" "7291a19601fe0d286b7d541e535ed27f36c6399628644551f7d8770bcc8e7709" "8aff3f396d4103382a1e40bcf01882fc15cee1bffee7a6f58fe455db290c4c50" "c174371ed220c87ca602ea22240c78e269f0a6acee409efc3d42ba543eed4b78" "db510eb70cf96e3dbd48f5d24de12b03db30674ea0853f06074d4ccf7403d7d3" "ff6a8955945028387ed1a2b0338580274609fbb0d40cd011b98ca06bd00d9233" "1a2cde373eff9ffd5679957c7ecfc6249d353e1ee446d104459e73e924fe0d8a" "fe1c13d75398b1c8fd7fdd1241a55c286b86c3e4ce513c4292d01383de152cb7" "5e402ccb94e32d7d09e300fb07a62dc0094bb2f16cd2ab8847b94b01b9d5e866" "efd849c804148b88536914ccdee08285fd7376e2e3334522c9afc00fd7e594da" "e214cf551a6d5a68e7a0a969ca0f086c0beea95794a199c7325602133a99b7c8" "1a094b79734450a146b0c43afb6c669045d7a8a5c28bc0210aba28d36f85d86f" "4780d7ce6e5491e2c1190082f7fe0f812707fc77455616ab6f8b38e796cbffa9" "47673bbc1ce9c3f2f0b6f339e66b01f040211d6d2ee141c30c03f2e6ab104f0d" "2c4248ab642776e7bb683a3a7c43e88064685201c38e14414968f1065b2de1b0" "7032f6050b6abb8c9181519e944ddb10e70989e3a507a14bbebaed317b49c41e" "0a42aaab34985c511c102ae5796873db0eb5061665a449fea54f9b2af386e760" "d5d87452e2db156d10019017b744dfcc0cd40deae50817e95b8d1b797221468d" "8f5b54bf6a36fe1c138219960dd324aad8ab1f62f543bed73ef5ad60956e36ae" "fb09acc5f09e521581487697c75b71414830b1b0a2405c16a9ece41b2ae64222" "2d5c40e709543f156d3dee750cd9ac580a20a371f1b1e1e3ecbef2b895cf0cd2" "80a23d559a5c5343a0882664733fd2c9e039b4dbf398c70c424c8d6858b39fc5" "1342a81078bdac27f80b86807b19cb27addc1f9e4c6a637a505ae3ba4699f777" "cab317d0125d7aab145bc7ee03a1e16804d5abdfa2aa8738198ac30dc5f7b569" "39dd7106e6387e0c45dfce8ed44351078f6acd29a345d8b22e7b8e54ac25bac4" "9987adb99037db4fca049c26ab751370b37b7a84c458d8f11f6590d5a02e97d5" "047ec205dcb5edbb94b35800110150a6e41e6cc92c0ccfb2ed25ac3df94331a6" "628278136f88aa1a151bb2d6c8a86bf2b7631fbea5f0f76cba2a0079cd910f7d" "41a5a10e5221572b54c478eba62b51c510277100c9553d198fb1f4d56c45c6da" "69ad4071c7b2d91543fddd9030816404ff22e46f7207549319ce484e23082dee" "74c7fb40d06ce63839f61695301363533eca789c2f057c50e21e295c4e96ce74" "aad7fd3672aad03901bf91e338cd530b87efc2162697a6bef79d7f8281fd97e3" "ded82bed6a96cb8fdc7a547ef148679e78287664a5236e9c694e917383b052d7" "b71da830ae97a9b70d14348781494b6c1099dbbb9b1f51494c3dfa5097729736" "46f6f73fb47a2a19b6ee1a49781f835fd73a185674268d4e048acf6feac9c55d" "e006d90eaf64a2d78154ecb277ccc82327e1b975d7d0e2f933acca3131cd0177" "8310462f5008fe10661e27ceab164e05c509343641cc262134fc623422b5999d" "bb08c73af94ee74453c90422485b29e5643b73b05e8de029a6909af6a3fb3f58" "4cf3221feff536e2b3385209e9b9dc4c2e0818a69a1cdb4b522756bcdf4e00a4" "1b8d67b43ff1723960eb5e0cba512a2c7a2ad544ddb2533a90101fd1852b426e" "4c56af497ddf0e30f65a7232a8ee21b3d62a8c332c6b268c81e9ea99b11da0d3" "efcecf09905ff85a7c80025551c657299a4d18c5fcfedd3b2f2b6287e4edd659" "57a29645c35ae5ce1660d5987d3da5869b048477a7801ce7ab57bfb25ce12d3e" "285d1bf306091644fb49993341e0ad8bafe57130d9981b680c1dbd974475c5c7" "00445e6f15d31e9afaa23ed0d765850e9cd5e929be5e8e63b114a3346236c44c" "7f1d414afda803f3244c6fb4c2c64bea44dac040ed3731ec9d75275b9e831fe5" default))
'(merlin-ac-setup nil)
'(package-selected-packages
'(dracula-theme zig-mode base16-theme whole-line-or-region monochrome-theme which-key flycheck lsp-ui lsp-mode company solarized-theme grandshell-theme distinguished-theme cyberpunk-theme color-theme-sanityinc-tomorrow color-theme-sanityinc-solarized color-theme-modern cherry-blossom-theme badger-theme auto-complete alect-themes)))
(defun my-lsp-headerline-breadcrumb-mode-hook ()
(set-face-attribute 'lsp-headerline-breadcrumb-symbols-error-face nil
:inherit 'lsp-headerline-breadcrumb-symbols-face :underline "Red1")
(set-face-attribute 'lsp-headerline-breadcrumb-path-error-face nil
:inherit 'lsp-headerline-breadcrumb-symbols-face :underline "Red1")
(set-face-attribute 'lsp-headerline-breadcrumb-path-error-face nil
:inherit 'lsp-headerline-breadcrumb-symbols-face :underline "Red1")
(set-face-attribute 'lsp-headerline-breadcrumb-symbols-hint-face nil
:inherit 'lsp-headerline-breadcrumb-symbols-face :underline "Green")
(set-face-attribute 'lsp-headerline-breadcrumb-symbols-info-face nil
:inherit 'lsp-headerline-breadcrumb-symbols-face :underline "Green")
(set-face-attribute 'lsp-headerline-breadcrumb-symbols-warning-face nil
:inherit 'lsp-headerline-breadcrumb-symbols-face :underline "Yellow"))
(add-hook 'lsp-headerline-breadcrumb-mode-hook 'my-lsp-headerline-breadcrumb-mode-hook)
(defun my-lsp-diagnostics-mode-hook ()
(setq lsp-diagnostics-attributes '((deprecated :strike-through t))))
(add-hook 'lsp-diagnostics-mode-hook 'my-lsp-diagnostics-mode-hook)
;; must be after custom-safe-themes
;(load-theme 'sanityinc-solarized-dark) ; input mono 13 better
;(load-theme 'solarized-dark-high-contrast)
;(load-theme 'sanityinc-tomorrow-bright)
;; Must be after custom-safe-themes
;(haesbaert-solarized-clean)
;; (when (at-sam)
;; (haesbaert-solarized))
(when (at-sam)
;; (load-theme 'django))
;; (load-theme 'haesbaert-clean-solarized))
;; (load-theme 'minimal-black))
(load-theme 'haesbaert-minimal-black))
(when (at-balin)
(if (getenv "DAYTHEME") () (load-theme 'haesbaert-dracula)))
;;(if (getenv "DAYTHEME")
;; ()
;; THIS ONE (haesbaert-solarized-light-high-contrast) THIS ONE
;; (haesbaert-solarized-selenized-white)
;; (haesbaert-solarized-clean) ; night
; (haesbaert-solarized) ; night
; (load-theme 'retro-orange)
; (load-theme 'cobalt)
;(load-theme 'arjen)
; (load-theme 'blue-mood)
; (load-theme 'sitaramv-solaris)
; (load-theme 'minimal-light-haesbaert)
; (load-theme 'minimal-black-haesbaert)
;(load-theme 'word-perfect)
;(load-theme 'haesbaert-word-perfect)
;; (load-theme 'haesbaert-dracula)
;(load-theme 'dracula)
;(load-theme 'parus)
;(load-theme 'base16-phd)
;(load-theme 'base16-atelier-sulphurpool)
; (load-theme 'base16-harmonic-dark)
;(load-theme 'base16-apathy)
;(load-theme 'almost-mono-black)
;; ()
;; )
(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.
)
;; disable all bold and underlined
;; (mapc
;; (lambda (face)
;; (set-face-attribute face nil :weight 'normal :underline nil))
;; (face-list))
;; disable all bold
(defun disable-all-bold ()
(interactive)
(mapc
(lambda (face)
(set-face-attribute face nil :weight 'normal))
(face-list)))
;;(disable-all-bold)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment