emacs: Add fcitx, latex and web mode.

Lilim/emacs: Change enabled packages.
This commit is contained in:
Kevin Baensch 2020-01-26 17:50:05 +01:00
parent fafa62f917
commit 8295a87aa8
Signed by: derped
GPG key ID: C0F1D326C7626543
4 changed files with 81 additions and 10 deletions

View file

@ -19,30 +19,33 @@ with lib;
]; ];
pkgs = [ pkgs = [
"base" "base"
"cpp"
"dict" "dict"
"emacs" "emacs"
"emacs::doom-themes"
"emacs::doom-modeline"
# "emacs::solarized-theme"
"emacs::company" "emacs::company"
"emacs::flyspell" "emacs::doom-modeline"
"emacs::doom-themes"
"emacs::elpy"
"emacs::flycheck" "emacs::flycheck"
# "emacs::powerline" "emacs::flyspell"
"emacs::nix-mode" "emacs::latex"
"emacs::magit" "emacs::magit"
"emacs::mu4e" "emacs::mu4e"
"emacs::nix-mode"
"emacs::org" "emacs::org"
"emacs::elpy" "emacs::fcitx"
"emacs::transmission" "emacs::transmission"
# "emacs::rust" "emacs::web-mode"
# "emacs::lsp"
"extra" "extra"
"cpp"
"haskell" "haskell"
"mail_utils" "mail_utils"
"python3" "python3"
"rustpkgs" "rustpkgs"
"xpkgs" "xpkgs"
# "emacs::lsp"
# "emacs::powerline"
# "emacs::rust"
# "emacs::solarized-theme"
]; ];
services = [ services = [
"desktop" "desktop"

View file

@ -0,0 +1,16 @@
{ config, lib, ... }:
with lib;
mkIf (elem "emacs::fcitx" config.machine.pkgs) {
programs.emacs.init.usePackage = {
fcitx = {
enable = true;
demand = true;
config = ''
;; (setq fcitx-use-dbus t)
(fcitx-default-setup)
'';
};
};
}

View file

@ -0,0 +1,27 @@
{ config, lib, pkgs, ... }:
with lib;
mkIf (elem "emacs::latex" config.machine.pkgs) {
programs.emacs.init.usePackage = {
latex-mode = {
enable = true;
package = epkgs: null;
defer = true;
};
tex-site = {
enable = true;
defer = true;
package = epkgs: epkgs.auctex;
hook = [];
mode = [ ''("\\.tex\\'" . TeX-latex-mode)'' ];
};
preview = {
enable = true;
defer = true;
package = epkgs: epkgs.auctex;
};
};
}

View file

@ -0,0 +1,25 @@
{ config, lib, ... }:
with lib;
mkIf (elem "emacs::web-mode" config.machine.pkgs) {
programs.emacs.init.usePackage.web-mode = {
enable = true;
mode = [
''("\\.html?\\'" . web-mode)''
''("\\.phtml\\'" . web-mode)''
''("\\.tpl\\.php\\'" . web-mode)''
''("\\.[agj]sp\\'" . web-mode)''
''("\\.as[cp]x\\'" . web-mode)''
''("\\.erb\\'" . web-mode)''
''("\\.mustache\\'" . web-mode)''
''("\\.djhtml\\'" . web-mode)''
];
config = ''
(setq web-mode-engines-alist
'(("php" . "\\.phtml\\'")
("blade" . "\\.blade\\."))
)
'';
};
}