spacemacs: add run-assoc mode
fix
This commit is contained in:
parent
19c2b1d73b
commit
3b5156a88a
1 changed files with 20 additions and 1 deletions
|
@ -163,9 +163,28 @@ in
|
||||||
(require 'lsp-haskell)
|
(require 'lsp-haskell)
|
||||||
;; (add-hook 'haskell-mode-hook #'lsp)
|
;; (add-hook 'haskell-mode-hook #'lsp)
|
||||||
(add-hook 'haskell-mode-hook #'direnv-update-environment)
|
(add-hook 'haskell-mode-hook #'direnv-update-environment)
|
||||||
|
|
||||||
|
;; setup run-assoc
|
||||||
|
;; in dired mode use C-<RETURN> to open file in associated program
|
||||||
|
(load "~/.spacemacs.d/run-assoc.el")
|
||||||
|
(setq associated-program-alist
|
||||||
|
'(
|
||||||
|
("${pkgs.evince}/bin/evince" "\\.pdf$")
|
||||||
|
("${pkgs.libreoffice}/bin/libreoffice" "\\.odt$")
|
||||||
|
${
|
||||||
|
let
|
||||||
|
suffixes = ["jpg" "jpeg" "png"];
|
||||||
|
rule = suffix: ''("${pkgs.feh}/bin/feh --auto-rotate --auto-zoom" "\\.${suffix}$")'';
|
||||||
|
in
|
||||||
|
lib.concatStringsSep "\n " (builtins.map rule suffixes)}
|
||||||
|
)
|
||||||
|
)
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
home.file.".spacemacs.d/run-assoc.el".source = pkgs.fetchurl {
|
||||||
|
url = "https://www.emacswiki.org/emacs/download/run-assoc.el";
|
||||||
|
sha256 = "1rg0pa09zfslgqnhbqvaa6vdi2fmanrpyzq67ppiin0h1kdgs4im";
|
||||||
|
};
|
||||||
|
|
||||||
home.file.".ctags.d/terraform.ctags".text = ''
|
home.file.".ctags.d/terraform.ctags".text = ''
|
||||||
--langdef=terraform
|
--langdef=terraform
|
||||||
|
|
Loading…
Reference in a new issue