mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
feat: emacs - nushell-mode & evil-smartparens
This commit is contained in:
@@ -31,10 +31,12 @@ when in doubt, run `doom sync`!
|
|||||||
|
|
||||||
## Structured editing of S-expression data
|
## Structured editing of S-expression data
|
||||||
|
|
||||||
- [ParEdit](https://www.emacswiki.org/emacs/ParEdit)
|
> https://wikemacs.org/wiki/Lisp_editing
|
||||||
- [lispy](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/lispy)
|
|
||||||
- [parinfer](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/parinfer)
|
- [lispy](https://github.com/doomemacs/doomemacs/tree/master/modules/editor/lispy): too complex
|
||||||
- Formatting: `M-x pp-buffer`
|
- [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
|
## Terminal Related
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,14 @@ in {
|
|||||||
|
|
||||||
config = mkIf cfg.enable (mkMerge [
|
config = mkIf cfg.enable (mkMerge [
|
||||||
{
|
{
|
||||||
home.packages = with pkgs; [
|
home.packages = with pkgs;
|
||||||
librime
|
let
|
||||||
|
epkgs = emacsPackages;
|
||||||
|
in
|
||||||
|
[
|
||||||
emacs-all-the-icons-fonts
|
emacs-all-the-icons-fonts
|
||||||
|
epkgs.parinfer-rust-mode
|
||||||
|
epkgs.rime
|
||||||
|
|
||||||
## Doom dependencies
|
## Doom dependencies
|
||||||
git
|
git
|
||||||
|
|||||||
@@ -104,6 +104,7 @@
|
|||||||
;; so avoid editing large markdown file in emacs, use neovim instead...
|
;; so avoid editing large markdown file in emacs, use neovim instead...
|
||||||
(after! markdown-mode
|
(after! markdown-mode
|
||||||
(global-font-lock-mode 0))
|
(global-font-lock-mode 0))
|
||||||
|
|
||||||
;; use alejandra to format nix files
|
;; use alejandra to format nix files
|
||||||
(use-package lsp-nix
|
(use-package lsp-nix
|
||||||
:ensure lsp-mode
|
:ensure lsp-mode
|
||||||
@@ -113,3 +114,10 @@
|
|||||||
:custom
|
:custom
|
||||||
(lsp-nix-nil-formatter
|
(lsp-nix-nil-formatter
|
||||||
["alejandra"]))
|
["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))
|
||||||
|
|||||||
@@ -13,6 +13,8 @@
|
|||||||
;;
|
;;
|
||||||
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
;; Alternatively, press 'gd' (or 'C-c c d') on a module to browse its
|
||||||
;; directory (for easy access to its source code).
|
;; directory (for easy access to its source code).
|
||||||
|
|
||||||
|
|
||||||
(doom! :input
|
(doom! :input
|
||||||
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
;;bidi ; (tfel ot) thgir etirw uoy gnipleh
|
||||||
chinese ; TODO: use (chinese +rime)
|
chinese ; TODO: use (chinese +rime)
|
||||||
@@ -58,10 +60,9 @@
|
|||||||
fold ; (nigh) universal code folding
|
fold ; (nigh) universal code folding
|
||||||
(format +onsave)
|
(format +onsave)
|
||||||
; automated prettiness
|
; automated prettiness
|
||||||
;;lispy ; vim for lisp, for people who don't like vim
|
|
||||||
multiple-cursors ; editing in many places at once
|
multiple-cursors ; editing in many places at once
|
||||||
;;objed ; text object editing for the innocent
|
;;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
|
;;rotate-text ; cycle region at point between text candidates
|
||||||
snippets ; my elves. They type so I don't have to
|
snippets ; my elves. They type so I don't have to
|
||||||
;;word-wrap ; soft wrapping with language-aware indent
|
;;word-wrap ; soft wrapping with language-aware indent
|
||||||
|
|||||||
@@ -16,6 +16,10 @@
|
|||||||
:recipe
|
:recipe
|
||||||
(:host github :repo "wakatime/wakatime-mode" :files
|
(:host github :repo "wakatime/wakatime-mode" :files
|
||||||
("*.el" "dist")))
|
("*.el" "dist")))
|
||||||
|
(package! nushell-mode :recipe
|
||||||
|
(:host github :repo "mrkkrp/nushell-mode"))
|
||||||
|
(package! evil-smartparens)
|
||||||
|
|
||||||
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
;; To install SOME-PACKAGE from MELPA, ELPA or emacsmirror:
|
||||||
;; (package! some-package)
|
;; (package! some-package)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user