Skip to content

Instantly share code, notes, and snippets.

@ntBre
Created September 25, 2023 15:02
Show Gist options
  • Save ntBre/a6e1f7933314c77eceef49cd844b5413 to your computer and use it in GitHub Desktop.
Save ntBre/a6e1f7933314c77eceef49cd844b5413 to your computer and use it in GitHub Desktop.
Emacs 29 config
(setq custom-file "~/.emacs.d/custom.el")
(load custom-file t)
(load-theme 'tango-dark)
(set-face-attribute 'default nil :height 140)
(use-package rust-ts-mode
:hook ((rust-ts-mode . eglot-ensure)
(rust-ts-mode . company-mode))
:mode (("\\.rs\\'" . rust-ts-mode))
:config
(add-to-list 'exec-path "/home/brent/.cargo/bin")
(setenv "PATH" (concat (getenv "PATH") ":/home/brent/.cargo/bin")))
(use-package python
:bind (:map python-ts-mode-map
("<f5>" . recompile)
("<f6>" . eglot-format))
:hook ((python-ts-mode . eglot-ensure)
(python-ts-mode . company-mode))
:mode (("\\.py\\'" . python-ts-mode)))
(use-package company
:ensure t
:config
(setq company-idle-delay 0.1
company-minimum-prefix-length 1))
(use-package eglot
:bind (:map eglot-mode-map
("C-c d" . eldoc)
("C-c a" . eglot-code-actions)
("C-c f" . flymake-show-buffer-diagnostics)
("C-c r" . eglot-rename)))
(desktop-save-mode 1)
;; require melpa
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(use-package conda
:ensure t
:config
(setq conda-env-home-directory
(expand-file-name "~/mambaforge")))
(use-package highlight-indent-guides
:ensure t
:hook (python-ts-mode . highlight-indent-guides-mode)
:config
(set-face-foreground 'highlight-indent-guides-character-face "white")
(setq highlight-indent-guides-method 'character))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment