Remove dashboard, add yasnippets

Change nix lsp from nixd to nil

Add some common python packages (numpy scipy matplotlib xarray) that I
use all the time
This commit is contained in:
Evie Litherland-Smith 2023-11-14 07:29:36 +00:00
parent fb6007aefe
commit 0fd91f55fd
3 changed files with 51 additions and 83 deletions

View file

@ -10,12 +10,8 @@
package = pkgs.emacs29-pgtk; package = pkgs.emacs29-pgtk;
extraPackages = epkgs: extraPackages = epkgs:
with epkgs; [ with epkgs; [
# themes # theme
modus-themes modus-themes
theme-magic
# defaults-packages
god-mode
# completion-packages # completion-packages
cape cape
@ -28,6 +24,11 @@
orderless orderless
vertico vertico
# snippets-packages
yasnippet
yasnippet-snippets
consult-yasnippet
# ide-packages # ide-packages
vterm vterm
ibuffer-project ibuffer-project
@ -60,7 +61,6 @@
# project-packages # project-packages
magit magit
forge forge
git-timemachine
# social-packages # social-packages
mastodon mastodon
@ -74,9 +74,7 @@
nerd-icons-ibuffer nerd-icons-ibuffer
ligature ligature
page-break-lines page-break-lines
dashboard
doom-modeline doom-modeline
centaur-tabs
helpful helpful
which-key which-key
link-hint link-hint
@ -97,7 +95,6 @@
# feed-packages # feed-packages
elfeed elfeed
elfeed-org elfeed-org
elfeed-webkit
elfeed-tube elfeed-tube
elfeed-tube-mpv elfeed-tube-mpv
]; ];
@ -132,13 +129,21 @@
# Language-specific requirements # Language-specific requirements
sqlite sqlite
pandoc pandoc
gfortran
rustup
texlive.combined.scheme-full texlive.combined.scheme-full
ghostscript ghostscript
mupdf mupdf
(python3.withPackages gfortran
(ps: with ps; [ python-lsp-server python-lsp-ruff pylsp-mypy ])) rustup
(python3.withPackages (ps:
with ps; [
python-lsp-server
python-lsp-ruff
pylsp-mypy
numpy
scipy
matplotlib
xarray
]))
# Linters # Linters
nodePackages.stylelint nodePackages.stylelint
@ -155,15 +160,13 @@
stylua stylua
python3Packages.mdformat python3Packages.mdformat
html-tidy html-tidy
nodePackages.js-beautify
# LSP Servers # LSP Servers
nixd nil
fortls fortls
shellcheck shellcheck
marksman marksman
luajitPackages.lua-lsp luajitPackages.lua-lsp
# nodePackages.pyright
nodePackages.yaml-language-server nodePackages.yaml-language-server
nodePackages.bash-language-server nodePackages.bash-language-server
nodePackages.javascript-typescript-langserver nodePackages.javascript-typescript-langserver

View file

@ -27,10 +27,10 @@
(global-auto-revert-mode +1) (global-auto-revert-mode +1)
(delete-selection-mode) (delete-selection-mode)
(recentf-mode -1)
;; Misc useful keymaps ;; Misc useful keymaps
(keymap-global-set "M-#" #'dictionary-lookup-definition) (keymap-global-set "M-#" #'dictionary-lookup-definition)
(keymap-global-set "C-c r" #'recentf)
(keymap-global-set "C-c b" #'ibuffer) (keymap-global-set "C-c b" #'ibuffer)
(keymap-global-set "C-c p l" #'list-packages) (keymap-global-set "C-c p l" #'list-packages)
(keymap-global-set "C-c p r" #'package-refresh-contents) (keymap-global-set "C-c p r" #'package-refresh-contents)
@ -229,36 +229,6 @@
:ensure t :ensure t
:config (doom-modeline-mode +1)) :config (doom-modeline-mode +1))
;; Dashboard
(setq dashboard-icon-type 'nerd-icons
dashboard-set-heading-icons t
dashboard-set-file-icons t
dashboard-set-navigator t
dashboard-set-init-info t
dashboard-startup-banner 'ascii
dashboard-projects-backend 'project-el
dashboard-projects-switch-function 'project-switch-project
dashboard-projects-show-base t
dashboard-recentf-show-base 'align
dashboard-items '()
dashboard-banner-ascii (concat " .000000. \n"
" .0. .0. \n"
" .00. .00. \n"
" .000cl. .lc000. \n"
".0 0.\n"
"0. .o0000o. .0\n"
" 00 .0' '0. 00 \n"
" 00 .0 0. 00 \n"
" HHHHH HHHHHHHHHHHH HHHHH \n"
"HHHH HHH HHHHHHHHHHHHHH HHHH\n"
" HHHHHH HHHHHHHHH HHHHHHHH \n"
" HHH HHHH HHHHHHHHH HHHH \n"
" HHH HHHHHH \n"
" HHHHH HH \n"))
(use-package dashboard
:ensure t
:config (setq initial-buffer-choice 'dashboard-open))
(use-package darkroom (use-package darkroom
:ensure t :ensure t
:bind (("C-c d" . darkroom-mode))) :bind (("C-c d" . darkroom-mode)))
@ -550,7 +520,6 @@ manually with something like this:
("<remap> <switch-to-buffer>" . consult-buffer) ("<remap> <switch-to-buffer>" . consult-buffer)
("<remap> <project-switch-to-buffer>" . consult-project-buffer) ("<remap> <project-switch-to-buffer>" . consult-project-buffer)
("<remap> <org-goto>" . consult-org-heading) ("<remap> <org-goto>" . consult-org-heading)
("C-c s s" . consult-line)
("C-c s f" . consult-fd) ("C-c s f" . consult-fd)
("C-c s g" . consult-ripgrep) ("C-c s g" . consult-ripgrep)
("C-c s e" . consult-flymake) ("C-c s e" . consult-flymake)
@ -570,6 +539,20 @@ manually with something like this:
:after (embark consult) :after (embark consult)
:hook (embark-collect-mode . consult-preview-at-point-mode)) :hook (embark-collect-mode . consult-preview-at-point-mode))
(use-package yasnippet
:ensure t
:hook ((prog-mode org-mode) . yas-minor-mode))
(use-package yasnippet-snippets
:ensure t
:after yasnippet
:config (yas-reload-all))
(use-package consult-yasnippet
:ensure t
:after (yasnippet consult)
:bind (("C-c s s" . consult-yasnippet)))
(unless (package-installed-p 'kbd-mode) (unless (package-installed-p 'kbd-mode)
(package-vc-install (package-vc-install
'(kbd-mode . (:url "https://github.com/kmonad/kbd-mode")))) '(kbd-mode . (:url "https://github.com/kmonad/kbd-mode"))))

View file

@ -35,10 +35,10 @@
(global-auto-revert-mode +1) (global-auto-revert-mode +1)
(delete-selection-mode) (delete-selection-mode)
(recentf-mode -1)
;; Misc useful keymaps ;; Misc useful keymaps
(keymap-global-set "M-#" #'dictionary-lookup-definition) (keymap-global-set "M-#" #'dictionary-lookup-definition)
(keymap-global-set "C-c r" #'recentf)
(keymap-global-set "C-c b" #'ibuffer) (keymap-global-set "C-c b" #'ibuffer)
(keymap-global-set "C-c p l" #'list-packages) (keymap-global-set "C-c p l" #'list-packages)
(keymap-global-set "C-c p r" #'package-refresh-contents) (keymap-global-set "C-c p r" #'package-refresh-contents)
@ -264,39 +264,6 @@
:config (doom-modeline-mode +1)) :config (doom-modeline-mode +1))
#+end_src #+end_src
** Dashboard
#+begin_src emacs-lisp
;; Dashboard
(setq dashboard-icon-type 'nerd-icons
dashboard-set-heading-icons t
dashboard-set-file-icons t
dashboard-set-navigator t
dashboard-set-init-info t
dashboard-startup-banner 'ascii
dashboard-projects-backend 'project-el
dashboard-projects-switch-function 'project-switch-project
dashboard-projects-show-base t
dashboard-recentf-show-base 'align
dashboard-items '()
dashboard-banner-ascii (concat " .000000. \n"
" .0. .0. \n"
" .00. .00. \n"
" .000cl. .lc000. \n"
".0 0.\n"
"0. .o0000o. .0\n"
" 00 .0' '0. 00 \n"
" 00 .0 0. 00 \n"
" HHHHH HHHHHHHHHHHH HHHHH \n"
"HHHH HHH HHHHHHHHHHHHHH HHHH\n"
" HHHHHH HHHHHHHHH HHHHHHHH \n"
" HHH HHHH HHHHHHHHH HHHH \n"
" HHH HHHHHH \n"
" HHHHH HH \n"))
(use-package dashboard
:ensure t
:config (setq initial-buffer-choice 'dashboard-open))
#+end_src
** Darkroom ** Darkroom
#+begin_src emacs-lisp #+begin_src emacs-lisp
(use-package darkroom (use-package darkroom
@ -643,7 +610,6 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
("<remap> <switch-to-buffer>" . consult-buffer) ("<remap> <switch-to-buffer>" . consult-buffer)
("<remap> <project-switch-to-buffer>" . consult-project-buffer) ("<remap> <project-switch-to-buffer>" . consult-project-buffer)
("<remap> <org-goto>" . consult-org-heading) ("<remap> <org-goto>" . consult-org-heading)
("C-c s s" . consult-line)
("C-c s f" . consult-fd) ("C-c s f" . consult-fd)
("C-c s g" . consult-ripgrep) ("C-c s g" . consult-ripgrep)
("C-c s e" . consult-flymake) ("C-c s e" . consult-flymake)
@ -666,6 +632,22 @@ For reference information, see [[https://orgmode.com][Org-mode website]]
:after (embark consult) :after (embark consult)
:hook (embark-collect-mode . consult-preview-at-point-mode)) :hook (embark-collect-mode . consult-preview-at-point-mode))
#+end_src #+end_src
** Snippets
#+begin_src emacs-lisp
(use-package yasnippet
:ensure t
:hook ((prog-mode org-mode) . yas-minor-mode))
(use-package yasnippet-snippets
:ensure t
:after yasnippet
:config (yas-reload-all))
(use-package consult-yasnippet
:ensure t
:after (yasnippet consult)
:bind (("C-c s s" . consult-yasnippet)))
#+end_src
** Language-specific settings ** Language-specific settings
*** kmonad *** kmonad
#+begin_src emacs-lisp #+begin_src emacs-lisp