feat: emacs - nushell-mode & evil-smartparens

This commit is contained in:
Ryan Yin
2024-01-05 00:31:28 +08:00
parent 55efe14c41
commit e82b5e0770
5 changed files with 28 additions and 8 deletions

View File

@@ -31,10 +31,12 @@ when in doubt, run `doom sync`!
## Structured editing of S-expression data
- [ParEdit](https://www.emacswiki.org/emacs/ParEdit)
- [lispy](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/lispy)
- [parinfer](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/parinfer)
- Formatting: `M-x pp-buffer`
> https://wikemacs.org/wiki/Lisp_editing
- [lispy](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/lispy): too complex
- [evil-smartparens](https://github.com/expez/evil-smartparens)
- [parinfer](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/parinfer): It helps to keep both indentation and parens balanced and it introduces to more advanced features similar to Paredit
- works not well with some other completion plugins.
## Terminal Related

View File

@@ -31,9 +31,14 @@ in {
config = mkIf cfg.enable (mkMerge [
{
home.packages = with pkgs; [
librime
home.packages = with pkgs;
let
epkgs = emacsPackages;
in
[
emacs-all-the-icons-fonts
epkgs.parinfer-rust-mode
epkgs.rime
## Doom dependencies
git

View File

@@ -104,6 +104,7 @@
;; so avoid editing large markdown file in emacs, use neovim instead...
(after! markdown-mode
(global-font-lock-mode 0))
;; use alejandra to format nix files
(use-package lsp-nix
:ensure lsp-mode
@@ -113,3 +114,10 @@
:custom
(lsp-nix-nil-formatter
["alejandra"]))
(use-package nushell-mode
:config
(setq nushell-enable-auto-indent 1))
;; enable evil-smartparens
(after! smartparens
(add-hook 'smartparens-enabled-hook #'evil-smartparens-mode))

View File

@@ -13,6 +13,8 @@
;;
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
;; directory (for easy access to its source code).
(doom! :input
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
chinese ; TODO: use (chinese +rime)
@@ -58,10 +60,9 @@
fold ; (nigh) universal code folding
(format +onsave)
; automated prettiness
;;lispy ; vim for lisp, for people who don't like vim
multiple-cursors ; editing in many places at once
;;objed ; text object editing for the innocent
;;parinfer ; turn lisp into python, sort of
;; parinfer ; turn lisp into python, sort of
;;rotate-text ; cycle region at point between text candidates
snippets ; my elves. They type so I don't have to
;;word-wrap ; soft wrapping with language-aware indent

View File

@@ -16,6 +16,10 @@
:recipe
(:host github :repo "wakatime/wakatime-mode" :files
("*.el" "dist")))
(package! nushell-mode :recipe
(:host github :repo "mrkkrp/nushell-mode"))
(package! evil-smartparens)
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
;; (package! some-package)