From 7054eaef2b3971525367be844227c2aa0e14ac86 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Thu, 20 Oct 2022 01:22:56 -0400 Subject: [PATCH] add conda, debugging for c, use flake8 for python linting --- emacs.d/init.el | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/emacs.d/init.el b/emacs.d/init.el index 6ec4e5b..04e6e86 100644 --- a/emacs.d/init.el +++ b/emacs.d/init.el @@ -9,6 +9,7 @@ (set-fringe-mode 10) ; Give some breathing room (menu-bar-mode -1) ; Disable the menu bar (setq-default custom-file null-device) ; Write customizations not in this file to the null device (AKA stop littering in my init.el) +(setq confirm-kill-processes nil) ; Stop asking about running processes on exit ;; Visible bell (setq visible-bell t) @@ -121,15 +122,13 @@ (setq custom-safe-themes t) ;; (use-package everforest -;; :straight (:type git :repo "https://git.sr.ht/~theorytoe/everforest-theme") -;; :config -;; (load-theme 'everforest-hard-dark t)) +;; :straight (:type git :repo "https://git.sr.ht/~theorytoe/everforest-theme")) ;; (use-package gruvbox-theme ;; :config ;; (load-theme 'gruvbox-dark-soft t)) -(add-to-list 'custom-theme-load-path "~/.cache/emacs/custom/everforest-theme") +(add-to-list 'custom-theme-load-path "~/.cache/emacs/straight/build/everforest") (load-theme 'everforest-hard-dark t) ;; Help distinguish work buffers from others like sidebars and terminal @@ -293,6 +292,7 @@ (require 'cl-lib)) (require 'dap-python) (require 'dap-node) + (require 'dap-lldb) :bind (:map dap-mode-map ("" . dap-debug) @@ -335,8 +335,9 @@ ;; C/C++ -;(setq-default c-default-style "k&r") -;(setq-default c-basic-offset 2) +(setq dap-lldb-debug-program '("/usr/bin/lldb-vscode")) +(setq-default c-default-style "k&r") +(setq-default c-basic-offset 2) ;(use-package ccls ; :hook ((c-mode c++-mode objc-mode cuda-mode) . @@ -450,6 +451,17 @@ :config (setq numpydoc-insert-examples-block nil)) +(use-package conda + :init + (setq conda-anaconda-home (expand-file-name "/opt/miniconda3")) + (setq conda-env-home-directory (expand-file-name "~/.conda/envs")) + (conda-env-initialize-interactive-shells) + ;(conda-env-autoactivate-mode) + :hook + ('find-file-hook . (lambda () + (when (bound-and-true-p conda-project-env-path) + (conda-env-activate-for-buffer))))) + ;; Rust ;(use-package rust-mode) @@ -467,7 +479,10 @@ ;; Syntax checking (use-package flycheck - :hook (lsp-mode . flycheck-mode)) + :hook (lsp-mode . flycheck-mode) + :config + (setq flycheck-python-flake8-executable "flake8") + (flycheck-select-checker 'python-flake8)) ;; Templating (use-package yasnippet