From 3db86a7181a0c9266650f2c38578b1ba0643a95f Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Sun, 3 Sep 2023 19:06:10 +0300 Subject: emacs: reorganize dev module --- .emacs.d/modules/thanos-dev.el | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to '.emacs.d') diff --git a/.emacs.d/modules/thanos-dev.el b/.emacs.d/modules/thanos-dev.el index f80b64b..576a524 100644 --- a/.emacs.d/modules/thanos-dev.el +++ b/.emacs.d/modules/thanos-dev.el @@ -43,6 +43,7 @@ (global-set-key (kbd "C-x M-[") 'insert-brackets) +;; Magit (require 'magit) (setf magit-display-buffer-function #'magit-display-buffer-same-window-except-diff-v1) @@ -50,12 +51,15 @@ (global-set-key (kbd "C-c g") 'thanos/magit) (define-key thanos/magit (kbd "c") 'magit-clone) -(define-auto-insert '("\\.sh\\'" . "Bash skeleton") +;; shell scripting +(define-auto-insert + '("\\.sh\\'" . "Bash skeleton") '("Description:" \n "#!/bin/bash")) (add-hook 'shell-script-mode #'auto-insert) +;; Emacs lisp (setf tab-always-indent 'complete) (add-to-list 'completion-styles 'initials t) @@ -67,14 +71,14 @@ (add-hook 'org-src-mode-hook #'(lambda () (flycheck-disable-checker 'emacs-lisp-checkdoc))) +;; Common lisp (setf inferior-lisp-program "sbcl") (add-hook 'lisp-mode-hook #'rainbow-delimiters-mode) (add-hook 'lisp-mode-hook #'company-mode) -(add-hook 'lisp-mode-hook #'display-line-numbers-mode) - (add-hook 'scheme-mode-hook #'rainbow-delimiters-mode) (add-hook 'scheme-mode-hook #'company-mode) +;; LSP config (defun thanos/lsp-mode-setup () (setf lsp-headerline-breadcrumb-segments '(path-up-to-project file symbols)) (lsp-headerline-breadcrumb-mode)) @@ -88,13 +92,15 @@ (add-hook 'lsp-mode 'lsp-ui-mode) (setf lsp-ui-doc-position 'bottom) +;;; Python ;; set pylsp with lsp-mode (setf lsp-pyls-server-command "~/usr/bin/pylsp") (require 'python-mode) (add-to-list 'auto-mode-alist '("\\.py\\'" . python-mode)) -(add-hook 'python-mode 'lsp-deferred) +(add-hook 'python-mode 'lsp-mode) +;; json (require 'json-mode) (add-to-list 'auto-mode-alist '("\\.json'" . json-mode)) -- cgit v1.2.3