configuration.nix/home/laptop/programs/emacs/default.nix

38 lines
909 B
Nix
Raw Normal View History

2023-08-12 14:35:08 +02:00
{ pkgs, lib, ... }: {
home.packages = with pkgs; [
nodePackages_latest.prettier
nodePackages_latest.typescript
2023-08-16 10:41:58 +02:00
nodePackages_latest.eslint
2023-08-12 14:35:08 +02:00
nodePackages_latest.typescript-language-server
nodePackages_latest."@tailwindcss/language-server"
nodePackages_latest."@prisma/language-server"
2023-08-16 08:29:12 +02:00
2023-08-16 08:51:00 +02:00
ispell
2023-08-16 08:29:12 +02:00
rnix-lsp
2023-08-09 22:10:48 +02:00
];
2023-08-12 14:35:08 +02:00
2023-08-14 21:53:33 +02:00
programs.emacs = {
2023-08-12 14:35:08 +02:00
enable = true;
2023-08-16 08:03:48 +02:00
package = with pkgs;
(emacsPackagesFor emacs-unstable).emacsWithPackages (epkgs:
with epkgs; [
treesit-grammars.with-all-grammars
treesit-auto
prisma-mode
2023-08-16 10:41:58 +02:00
lsp-tailwindcss
2023-08-16 08:03:48 +02:00
]);
extraConfig = ''
(use-package treesit-auto
:config
(global-treesit-auto-mode))
(use-package prisma-mode)
2023-08-16 08:51:00 +02:00
(add-hook 'prisma-mode-hook 'lsp)
2023-08-16 10:41:58 +02:00
(use-package lsp-tailwindcss
:init
(setq lsp-tailwindcss-add-on-mode t))
2023-08-16 08:03:48 +02:00
'';
2023-08-12 14:35:08 +02:00
};
2023-08-09 22:10:48 +02:00
}