all repos — nixfiles @ 96b814111069b36c1c7a4395348e4af41d336bcc

System and user configuration, managed by nix and home-manager

Move language-based editor plugins to language files
Alan Pearce alan@alanpearce.eu
Tue, 14 Mar 2023 20:47:35 +0100
commit

96b814111069b36c1c7a4395348e4af41d336bcc

parent

39f730bcdc65b2e644531331c108ee225ea94929

M user/settings/base.nixuser/settings/base.nix
@@ -16,16 +16,11 @@ vimdiffAlias = true;     withNodeJs = true;
     plugins = with pkgs.vimPlugins; [
       commentary
-      coc-css
       coc-git
-      coc-html
       coc-json
       coc-tabnine
       coc-yaml
-      conjure
       vim-surround
-      vim-nix
-      zig-vim
     ];
     extraLuaConfig = builtins.readFile ../nvim/init.lua;
     coc = {
M user/settings/development/clojure.nixuser/settings/development/clojure.nix
@@ -8,4 +8,11 @@ clojure     node2nixPackages.node-cljfmt
     node2nixPackages.shadow-cljs
   ];
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    cider
+    clojure-mode
+  ]);
+  programs.neovim.plugins = with pkgs.vimPlugins; [
+    conjure
+  ];
 }
M user/settings/development/javascript.nixuser/settings/development/javascript.nix
@@ -51,6 +51,14 @@ home.sessionVariables = {     NO_UPDATE_NOTIFIER = "1"; # stop npm update-notifier
   };
 
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    add-node-modules-path
+    js2-mode
+    rjsx-mode
+    tide
+    typescript-mode
+  ]);
+
   programs.zsh.shellAliases = {
     ava = "pnpx ava";
     avt = "pnpx ava --tap";
M user/settings/development/rust.nixuser/settings/development/rust.nix
@@ -11,4 +11,7 @@ rustfmt     rust-analyzer
     clippy
   ];
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    rustic
+  ]);
 }
M user/settings/development/web.nixuser/settings/development/web.nix
@@ -12,4 +12,17 @@ ]     ++ [
       pkgs.nodePackages.stylelint
     ];
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    caddyfile-mode
+    company-web
+    emmet-mode
+    nginx-mode
+    restclient
+    scss-mode
+    web-mode
+  ]);
+  programs.neovim.plugins = with pkgs.vimPlugins; [
+    coc-css
+    coc-html
+  ];
 }
A user/settings/development/zig.nix
@@ -0,0 +1,12 @@+{
+  config,
+  pkgs,
+  ...
+}: {
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    zig-mode
+  ]);
+  programs.neovim.plugins = with pkgs.vimPlugins; [
+    zig-vim
+  ];
+}
M user/settings/emacs.nixuser/settings/emacs.nix
@@ -73,7 +73,6 @@ [         ace-link
         all-the-icons
         almost-mono-themes
-        add-node-modules-path
         ag
         all-the-icons
         amx
@@ -81,24 +80,17 @@ apheleia         auto-async-byte-compile
         avy
         bash-completion
-        caddyfile-mode
-        cider
-        clojure-mode
         company
-        company-web
         company-tabnine
         consult
         consult-eglot
         counsel
         counsel-projectile
         crux
-        docker-compose-mode
-        dockerfile-mode
         dired-git-info
         editorconfig
         eglot
         eldoc-box
-        emmet-mode
         esh-autosuggest
         esh-buf-stack
         esh-help
@@ -110,7 +102,6 @@ evil-anzu         evil-collection
         evil-commentary
         evil-embrace
-        evil-ledger
         evil-matchit
         evil-mu4e
         evil-numbers
@@ -119,7 +110,6 @@ evil-quickscope         evil-space
         evil-surround
         eyebrowse
-        feature-mode
         format-all
         flycheck
         flyspell-correct
@@ -129,64 +119,38 @@ git-gutter-fringe         git-messenger
         git-modes
         git-timemachine
-        gitlab-ci-mode
-        gitlab-ci-mode-flycheck
-        go-mode
         goto-chg
-        haskell-mode
         helpful
         ivy-hydra
-        janet-mode
-        jinja2-mode
-        js2-mode
         json-mode
-        k8s-mode
-        kubel
-        kubel-evil
         lua-mode
-        ledger-mode
         magit
         markdown-mode
         modus-themes
         doom-modeline
-        nginx-mode
-        nix-mode
-        nix-update
         org-journal
         paredit
         posframe
         projectile
         projectile-ripgrep
         quickrun
-        racket-mode
         rainbow-mode
         rainbow-delimiters
-        restclient
         ripgrep
-        rjsx-mode
-        rustic
-        scss-mode
         spacemacs-theme
         swiper
-        tide
         toml-mode
         tree-sitter
         tree-sitter-langs
         tree-sitter-indent
-        typescript-mode
         undo-tree
         use-package
         wucuo
-        web-mode
         wgrep-ag
         ws-butler
         which-key
         yaml-mode
         yasnippet
-        zig-mode
-      ]
-      ++ lib.optionals (!stdenv.isDarwin) [
-        pkgs.mu
       ]);
   };
   home.packages = [
M user/settings/golang.nixuser/settings/golang.nix
@@ -9,4 +9,7 @@ go-langserver     goimports
     gotools
   ];
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    go-mode
+  ]);
 }
M user/settings/ledger.nixuser/settings/ledger.nix
@@ -7,4 +7,8 @@ home.file.".ledgerrc".text = ''     --date-format %F
     --start-of-week 1
   '';
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    evil-ledger
+    ledger-mode
+  ]);
 }
M user/settings/nix.nixuser/settings/nix.nix
@@ -12,4 +12,11 @@ ];   nixpkgs.overlays = [
     (import ../overlays/extra-packages.nix)
   ];
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    nix-mode
+    nix-update
+  ]);
+  programs.neovim.plugins = with pkgs.vimPlugins; [
+    vim-nix
+  ];
 }
M user/settings/satoshipay.nixuser/settings/satoshipay.nix
@@ -45,6 +45,18 @@         ripcord
         robo3t
       ]));
+  programs.emacs.extraPackages = epkgs: (with epkgs; [
+    docker-compose-mode
+    dockerfile-mode
+    feature-mode
+    gitlab-ci-mode
+    gitlab-ci-mode-flycheck
+    k8s-mode
+    kubel
+    kubel-evil
+  ] ++ lib.optionals (!stdenv.isDarwin) [
+    pkgs.mu
+  ]);
 
   programs.git.includes = [
     {