mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-05-20 21:46:54 +02:00
feat: emacs - format nix files via alejandra
This commit is contained in:
@@ -74,7 +74,7 @@ in {
|
|||||||
}
|
}
|
||||||
|
|
||||||
(mkIf pkgs.stdenv.isLinux (
|
(mkIf pkgs.stdenv.isLinux (
|
||||||
# Do not use emacs-nox here, which makes the mouse wheel work abnormally
|
# Do not use emacs-nox here, which makes the mouse wheel work abnormally in terminal mode.
|
||||||
let emacsPkg = pkgs.emacs29; in
|
let emacsPkg = pkgs.emacs29; in
|
||||||
{
|
{
|
||||||
home.packages = [emacsPkg];
|
home.packages = [emacsPkg];
|
||||||
@@ -86,6 +86,7 @@ in {
|
|||||||
}))
|
}))
|
||||||
|
|
||||||
(mkIf pkgs.stdenv.isDarwin (
|
(mkIf pkgs.stdenv.isDarwin (
|
||||||
|
# Do not use emacs-nox here, which makes the mouse wheel work abnormally in terminal mode.
|
||||||
let emacsPkg = pkgs.emacs29; in
|
let emacsPkg = pkgs.emacs29; in
|
||||||
{
|
{
|
||||||
home.packages = [emacsPkg];
|
home.packages = [emacsPkg];
|
||||||
|
|||||||
@@ -123,6 +123,14 @@
|
|||||||
(after! markdown-mode
|
(after! markdown-mode
|
||||||
(global-font-lock-mode 0))
|
(global-font-lock-mode 0))
|
||||||
|
|
||||||
|
;; use alejandra to format nix files
|
||||||
|
(use-package lsp-nix
|
||||||
|
:ensure lsp-mode
|
||||||
|
:after (lsp-mode)
|
||||||
|
:demand t
|
||||||
|
:custom
|
||||||
|
(lsp-nix-nil-formatter ["alejandra"]))
|
||||||
|
|
||||||
;; fix yaml highlighting for catppuccin theme
|
;; fix yaml highlighting for catppuccin theme
|
||||||
;; https://github.com/catppuccin/emacs/issues/55
|
;; https://github.com/catppuccin/emacs/issues/55
|
||||||
(add-hook 'yaml-mode-hook
|
(add-hook 'yaml-mode-hook
|
||||||
|
|||||||
Reference in New Issue
Block a user