From bcc6a42f1ac1344f81f6bcbfa2989734e0325215 Mon Sep 17 00:00:00 2001 From: Tobias Ostner Date: Mon, 4 Nov 2024 09:21:50 +0100 Subject: [PATCH] Control snippets directory --- nix/config/emacs/snippets/tsx-ts-mode/rnfc | 17 +++++++++++++++++ nix/module/home-manager.nix | 2 ++ nix/system/darwin.nix | 1 + 3 files changed, 20 insertions(+) create mode 100644 nix/config/emacs/snippets/tsx-ts-mode/rnfc diff --git a/nix/config/emacs/snippets/tsx-ts-mode/rnfc b/nix/config/emacs/snippets/tsx-ts-mode/rnfc new file mode 100644 index 0000000..a3ebb89 --- /dev/null +++ b/nix/config/emacs/snippets/tsx-ts-mode/rnfc @@ -0,0 +1,17 @@ +# -*- mode: snippet -*- +# name: react native functional component +# key: rnfc +# -- +import { Text, View } from "react-native"; + +const ${1:App} = () => { + return ( + + $1 + + ); +} + +export default $1; + + diff --git a/nix/module/home-manager.nix b/nix/module/home-manager.nix index ee8b618..1aff611 100644 --- a/nix/module/home-manager.nix +++ b/nix/module/home-manager.nix @@ -1,6 +1,8 @@ { email }: { pkgs, ... }: { home.file.".emacs.d/early-init.el".source = ../config/emacs/early-init.el; home.file.".emacs.d/tree-sitter/libtree-sitter-swift.dylib".source = ../config/emacs/tree-sitter/libtree-sitter-swift.dylib; + home.file.".emacs.d/snippets".source = ../config/emacs/snippets; + home.file.".clojure/deps.edn".source = ../config/clojure/deps.edn; home.language = { diff --git a/nix/system/darwin.nix b/nix/system/darwin.nix index a0807b3..0b039c5 100644 --- a/nix/system/darwin.nix +++ b/nix/system/darwin.nix @@ -30,6 +30,7 @@ inputs.darwin.lib.darwinSystem { home-manager.useGlobalPkgs = true; home-manager.useUserPackages = true; home-manager.users."${username}" = home-manager-config; + home-manager.backupFileExtension = "backup"; } ]; }