~hristoast/dot-emacs

cdffcaafc20804ce51582ad5a2a53d7b4cd2227a — Hristos N. Triantafillou 3 months ago 99109e3
Cleanup
M lib/c-cpp.el => lib/c-cpp.el +4 -4
@@ 3,10 3,10 @@
;; Packages related to c/c++.
;;; Code:

;;TODO: document system packages that are required
;;TODO: bear, clangd

(use-package c++-mode :straight nil :init (setq c-basic-offset 4))
(use-package cc-mode
  ;; :ensure-system-package (clang (bear . Bear))
  :straight nil
  :init (setq c-basic-offset 4))

;; major-mode for editing CMake sources
;; https://github.com/Kitware/CMake/blob/master/Auxiliary/cmake-mode.el

M lib/editing.el => lib/editing.el +2 -47
@@ 25,24 25,6 @@
     dimmer-watch-frame-focus-events nil)
    (dimmer-mode t)))

;; A minor mode that guesses the indentation offset originally used for
;; creating source code files and transparently adjusts the corresponding
;; settings in Emacs, making it more convenient to edit foreign files
;; https://github.com/jscheid/dtrt-indent
;; TODO: remove this, perhaps?
(use-package dtrt-indent
  :straight t
  :config
  (setq global-mode-string (remove 'dtrt-indent-mode-line-info global-mode-string))
  (dtrt-indent-mode 1))

;; Ignore "vendor" directories when rgrepping. Useful for some go projects I've worked on.
(use-package grep
  :straight nil
  :config
  (add-to-list 'grep-find-ignored-directories ".cache")
  (add-to-list 'grep-find-ignored-directories "vendor"))

(unless (getenv "EMACS_NO_HL_TODO")
  ;; Highlight TODO keywords
  ;; https://github.com/tarsius/hl-todo


@@ 55,24 37,14 @@
        ("XXX"   . "#ffff00")))
    (global-hl-todo-mode t)))

;; Interactively Do Things
;; http://emacswiki.org/emacs/InteractivelyDoThings
(use-package ido
  :straight t
  :config
  (ido-mode t)
  ;; https://git.sr.ht/~technomancy/better-defaults/tree/4c5409406ee35c5ba46880c6cfe98df4b14dc631/item/better-defaults.el#L48
  (setq ido-enable-flex-matching t))

;; marginalia.el - Marginalia in the minibuffer
;; https://github.com/minad/marginalia
(use-package marginalia :straight t :init (marginalia-mode))

(use-package hideshow :straight nil :diminish hs-minor-mode)

;; Enable code-folding for prog-mode modes
(use-package prog-mode
(use-package hideshow
  :straight nil
  :diminish hs-minor-mode
  :hook (prog-mode . hs-minor-mode))

;; Emacs rainbow delimiters mode


@@ 83,13 55,6 @@

;; TODO: https://github.com/karthink/popper

;; "Semantic Highlighting" for Emacs
;; https://github.com/Fanael/rainbow-identifiers
;; (when (getenv "EMACS_SEMANTIC_HIGHLIGHTING")
;;   (use-package rainbow-identifiers
;;     :straight t
;;     :hook (prog-mode . rainbow-identifiers-mode)))

;; Rainbow mode - #000 #fff #f00 #ff0 #00f #0f0 #800080 #00ffff #ff00ff
;; https://julien.danjou.info/projects/emacs-packages
(use-package rainbow-mode


@@ 99,16 64,6 @@
         (html-mode . rainbow-mode)
         (prog-mode . rainbow-mode)))

;; Provides language-aware editing commands based on source code parsers.
;; http://www.gnu.org/software/emacs/manual/html_node/emacs/Semantic.html
(use-package semantic
  :straight t
  :commands semantic-mode
  :config
  (global-semanticdb-minor-mode 1)
  (global-semantic-idle-scheduler-mode 1)
  (semantic-mode 1))

;; Minor mode for Emacs that deals with parens
;; pairs and tries to be smart about it
;; https://github.com/Fuco1/smartparens

M lib/git.el => lib/git.el +1 -0
@@ 10,6 10,7 @@
;; A Git Porcelain inside Emacs
;; https://magit.vc/
(use-package magit
  ;; :ensure-system-package git
  :straight t
  :bind
  ("C-c g d" . magit-diff-range)

M lib/golang.el => lib/golang.el +1 -0
@@ 12,6 12,7 @@
  (add-to-list 'exec-path (concat (getenv "GOPATH") "/bin")))

(use-package go-mode
  ;; :ensure-system-package (go gopls)
  :straight t
  :hook
  (before-save . (lambda ()

M lib/h-extras.el => lib/h-extras.el +1 -0
@@ 51,6 51,7 @@
;; https://github.com/jorenvo/simple-mpc
(unless (getenv "EMACS_NO_MPD")
  (use-package simple-mpc
    ;; :ensure-system-package (mpc mpd)
    :straight t
    :bind ("C-c s m" . simple-mpc)))


M lib/h-python.el => lib/h-python.el +6 -1
@@ 6,6 6,7 @@
;; Python Black for Emacs
;; https://github.com/proofit404/blacken
(use-package blacken
  ;; :ensure-system-package black
  :straight t
  :hook
  (python-mode . blacken-mode))


@@ 13,7 14,11 @@
;; lsp-mode client leveraging Pyright language server
;; https://github.com/emacs-lsp/lsp-pyright
;; https://github.com/microsoft/pyright
(use-package lsp-pyright :straight t :defer t)
;;TODO: disable "cyclomatic complexity" checks, they aren't useful
(use-package lsp-pyright
  ;; :ensure-system-package (pylsp . "python3 -m pip install python-lsp-server")
  :straight t
  :defer t)

;; TODO: required system-level package:
;; pip install python-lsp-server

M lib/h-slime.el => lib/h-slime.el +1 -0
@@ 15,6 15,7 @@
;; C-c C-k Compile and load current buffer
;; C-c C-q Invoke slime-close-parens-at-point
(use-package slime
  ;; :ensure-system-package sbcl
  :straight t
  :hook
  ;; This breaks the default coloring of SLIME.  Net gain in my opinion.

M lib/javascript.el => lib/javascript.el +4 -1
@@ 3,6 3,9 @@
;; Packages related to javascript.
;;; Code:

(use-package javascript-mode :no-require t :defer t)
(use-package javascript-mode
  ;; :ensure-system-package (tern . "npm i -g tern")
  :straight nil
  :defer t)

;;; javascript.el ends here

M lib/markdown.el => lib/markdown.el +0 -4
@@ 7,8 7,4 @@
;; https://github.com/jrblevin/markdown-mode
(use-package markdown-mode :straight t :defer t)

;; Additional functions for Emacs [markdown-mode].
;; https://github.com/milkypostman/markdown-mode-plus
;; (use-package markdown-mode+ :straight t :defer t)

;;; markdown.el ends here