Compare commits
6 commits
2ae2500575
...
3b721d8346
Author | SHA1 | Date | |
---|---|---|---|
3b721d8346 | |||
d80f02e008 | |||
9a0627bad0 | |||
93ed2ac975 | |||
1c0930fa65 | |||
941b156a55 |
7 changed files with 50 additions and 37 deletions
6
.emacs.d/config/c.el
Normal file
6
.emacs.d/config/c.el
Normal file
|
@ -0,0 +1,6 @@
|
|||
(setq c-default-style "linux"
|
||||
c-basic-offset 2)
|
||||
|
||||
(add-hook 'c-mode-hook
|
||||
(lambda ()
|
||||
(set-fill-column 100)))
|
|
@ -19,34 +19,20 @@
|
|||
|
||||
;; use ripgrep in emacs
|
||||
(use-package deadgrep
|
||||
:ensure t
|
||||
:bind ("M-s d" . deadgrep))
|
||||
|
||||
;; rust
|
||||
(use-package cargo :ensure t)
|
||||
(use-package cargo-mode :ensure t)
|
||||
(use-package rust-mode :ensure t)
|
||||
(use-package flycheck-rust :ensure t)
|
||||
|
||||
;; start cargo
|
||||
(add-hook 'rust-mode-hook 'cargo-minor-mode)
|
||||
|
||||
;; format code when saving
|
||||
(setq rust-format-on-save t)
|
||||
|
||||
;; yaml
|
||||
(use-package yaml-mode :ensure t)
|
||||
(use-package flycheck-yamllint :ensure t)
|
||||
:ensure t
|
||||
:bind ("M-s d" . deadgrep))
|
||||
|
||||
;; paredit
|
||||
(use-package paredit :ensure t)
|
||||
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
|
||||
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
|
||||
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'scheme-mode-hook #'enable-paredit-mode)
|
||||
(use-package paredit
|
||||
:ensure t
|
||||
:config
|
||||
(autoload 'enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)
|
||||
(add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'eval-expression-minibuffer-setup-hook #'enable-paredit-mode)
|
||||
(add-hook 'ielm-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'lisp-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'lisp-interaction-mode-hook #'enable-paredit-mode)
|
||||
(add-hook 'scheme-mode-hook #'enable-paredit-mode))
|
||||
|
||||
;; Hack to show only files known to git inside dired; needs the
|
||||
;; `git-find' shell script shim (taken from :open https://r0tty.org/git/dotfiles/emacs/tree/.emacs.d/config/development.el)
|
||||
|
@ -55,13 +41,18 @@
|
|||
(let ((find-program "git-find"))
|
||||
(find-dired dir "")))
|
||||
|
||||
;; c
|
||||
(setq c-default-style "linux"
|
||||
c-basic-offset 2)
|
||||
|
||||
(add-hook 'c-mode-hook
|
||||
(lambda ()
|
||||
(set-fill-column 100)))
|
||||
;; python
|
||||
;; (defun my-shell-mode-hook ()
|
||||
;; (add-hook
|
||||
;; 'comint-output-filter-functions
|
||||
;; 'python-pdbtrack-comint-output-filter-function t))
|
||||
;; (add-hook 'shell-mode-hook 'my-shell-mode-hook)
|
||||
|
||||
;; enable flyspell checks for comments in code
|
||||
(add-hook 'prog-mode-hook #'flyspell-prog-mode)
|
||||
|
||||
;; language server
|
||||
(use-package lsp-mode
|
||||
:ensure t
|
||||
:config
|
||||
(add-hook 'rust-mode-hook 'lsp-deferred))
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
(use-package org
|
||||
:ensure t
|
||||
:init (setq org-export-backends '(ascii html icalendar latex odt beamer))
|
||||
:mode ("\\.org\\'" . org-mode)
|
||||
:bind (("C-c a" . org-agenda)))
|
||||
:init (setq org-export-backends '(ascii html icalendar latex odt beamer)))
|
||||
|
||||
(setq org-directory "~/org")
|
||||
|
|
13
.emacs.d/config/rust.el
Normal file
13
.emacs.d/config/rust.el
Normal file
|
@ -0,0 +1,13 @@
|
|||
(use-package cargo
|
||||
:ensure t
|
||||
:config
|
||||
;; enable cargo keybindings
|
||||
(add-hook 'rust-mode-hook 'cargo-minor-mode))
|
||||
|
||||
(use-package rust-mode
|
||||
:ensure t
|
||||
:config
|
||||
;; format code when saving
|
||||
(setq rust-format-on-save t))
|
||||
|
||||
(use-package flycheck-rust :ensure t)
|
2
.emacs.d/config/yaml.el
Normal file
2
.emacs.d/config/yaml.el
Normal file
|
@ -0,0 +1,2 @@
|
|||
(use-package yaml-mode :ensure t)
|
||||
(use-package flycheck-yamllint :ensure t)
|
|
@ -57,7 +57,7 @@ symbols, which are converted to strings, and suffixed with \".el\"."
|
|||
:group 'config-snippets
|
||||
:type '(repeat directory))
|
||||
|
||||
(setq config-snippets '(base backups calendar dev functions gpg matrix org pass wl))
|
||||
(setq config-snippets '(base backups c calendar dev functions gpg matrix org pass rust wl yaml))
|
||||
|
||||
(message "Loading\nconfig-snippets: %s\nconfig-snippets-path: %s" config-snippets config-snippet-path)
|
||||
(dolist (snippet config-snippets)
|
||||
|
|
|
@ -2,13 +2,16 @@
|
|||
!/.emacs.d/config/backups.el
|
||||
!/.emacs.d/config/base.el
|
||||
!/.emacs.d/config/calendar.el
|
||||
!/.emacs.d/config/c.el
|
||||
!/.emacs.d/config/dev.el
|
||||
!/.emacs.d/config/functions.el
|
||||
!/.emacs.d/config/gpg.el
|
||||
!/.emacs.d/config/matrix.el
|
||||
!/.emacs.d/config/org.el
|
||||
!/.emacs.d/config/pass.el
|
||||
!/.emacs.d/config/rust.el
|
||||
!/.emacs.d/config/tramp.el
|
||||
!/.emacs.d/config/yaml.el
|
||||
!/.emacs.d/init.el
|
||||
!/.gitignore.d/emacs
|
||||
!/.local/bin/em
|
||||
|
|
Loading…
Reference in a new issue