emacs: Add haskell-mode and org-chef, minor tweaks
This commit is contained in:
parent
e857fb28cb
commit
69c7bef45e
2 changed files with 42 additions and 6 deletions
|
@ -115,7 +115,9 @@ Add repositories where packages are installed from.
|
|||
|
||||
If =use-package= is not installed, install it.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
*NOTE*: Disabled because it is builtin since emacs 29
|
||||
|
||||
#+begin_src emacs-lisp :tangle no
|
||||
(require 'package)
|
||||
(package-initialize)
|
||||
(unless (package-installed-p 'use-package)
|
||||
|
@ -299,6 +301,12 @@ Show matching parenthesese
|
|||
(setq show-paren-style 'expression)
|
||||
#+end_src
|
||||
|
||||
Surround marked text with (), [] or {}
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(electric-pair-mode 1)
|
||||
#+end_src
|
||||
|
||||
Centralise backup files (the =filename~= files), so they don't pollute the project.
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
|
@ -1090,9 +1098,10 @@ Indent 2 spaces
|
|||
Prettier has my preference for formatting JavaScript and TypeScript
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package prettier
|
||||
:config
|
||||
(setq prettier-enabled-parsers (css html json markdown scss svelte toml typescript vue)))
|
||||
(use-package prettier
|
||||
:config
|
||||
(setq prettier-enabled-parsers '
|
||||
(css html json markdown scss svelte toml typescript vue)))
|
||||
#+end_src
|
||||
|
||||
TypeScript stuff
|
||||
|
@ -1221,7 +1230,6 @@ Rust support with [[https://github.com/rust-lang/rust-mode][rust-mode]].
|
|||
(rust-mode . eglot-ensure)
|
||||
(rust-ts-mode . eglot-ensure)
|
||||
(before-save . eglot-format-buffer)
|
||||
(before-save . eglot-code-action-organize-imports)
|
||||
;; :init
|
||||
;; (setq lsp-rust-analyzer-cargo-watch-command "clippy"
|
||||
;; lsp-rust-analyzer-server-display-inlay-hints t
|
||||
|
@ -1555,6 +1563,17 @@ jinja2
|
|||
(use-package jinja2-mode)
|
||||
#+end_src
|
||||
|
||||
*** Haskell
|
||||
|
||||
[[https://github.com/haskell/haskell-mode][haskell-mode]] for Haskell files
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package haskell-mode
|
||||
:hook
|
||||
(((haskell-mode haskell-ts-mode) . eglot-ensure)
|
||||
turn-on-haskell-unicode-input-method))
|
||||
#+end_src
|
||||
|
||||
* Org
|
||||
|
||||
** Main org setup
|
||||
|
@ -1743,6 +1762,21 @@ The settings provided here are also the defaults, set any to =nil= to disable.
|
|||
org-roam-ui-open-on-start t))
|
||||
#+end_src
|
||||
|
||||
** org-chef
|
||||
|
||||
[[https://github.com/Chobbes/org-chef][org-chef]] is used to manage recipes and import them from supported websites
|
||||
|
||||
#+begin_src emacs-lisp
|
||||
(use-package org-chef
|
||||
:config
|
||||
(add-to-list 'org-capture-templates '("r" "Recipes"))
|
||||
(add-to-list 'org-capture-templates '("rr" "Recipe" entry (file "~/org/cookbook.org")
|
||||
"%(org-chef-get-recipe-from-url)"
|
||||
:empty-lines 1))
|
||||
(add-to-list 'org-capture-templates '("rm" "Manual recipe" entry (file "~/org/cookbook.org")
|
||||
"* %^{Recipe title: }\n :PROPERTIES:\n :source-url:\n :servings:\n :prep-time:\n :cook-time:\n :ready-in:\n :END:\n** Ingredients\n %?\n** Directions\n\n")))
|
||||
#+end_src
|
||||
|
||||
* Misc
|
||||
|
||||
** direnv
|
||||
|
|
|
@ -26,6 +26,8 @@ with lib; let
|
|||
extraEmacsPackages = epkgs: with epkgs; [
|
||||
vterm
|
||||
treesit-grammars.with-all-grammars
|
||||
emacsql
|
||||
emacsql-sqlite
|
||||
];
|
||||
};
|
||||
|
||||
|
@ -80,7 +82,7 @@ in
|
|||
nodePackages.bash-language-server
|
||||
aspell
|
||||
lldb
|
||||
nil
|
||||
(nil.overrideAttrs (_: { doCheck = false; }))
|
||||
nixpkgs-fmt
|
||||
python3
|
||||
(tree-sitter.withPlugins builtins.attrValues)
|
||||
|
|
Loading…
Reference in a new issue