From a52c051376d54636d929c2388d866f6826b431ad Mon Sep 17 00:00:00 2001 From: sloane <git@sloanelybutsurely.com> Date: Sun, 16 Feb 2025 10:37:38 -0500 Subject: [PATCH] dock, cmp, etc. updates --- home-manager/default.nix | 2 + home-manager/nixvim/default.nix | 39 ++++++++++++++++--- nix-darwin/default.nix | 1 + .../hosts/Sloanes-MacBook-Air/default.nix | 13 +++++++ 4 files changed, 49 insertions(+), 6 deletions(-) diff --git a/home-manager/default.nix b/home-manager/default.nix index 2bf6906..f492f82 100644 --- a/home-manager/default.nix +++ b/home-manager/default.nix @@ -25,6 +25,7 @@ font-family = "Maple Mono NF" font-size = 16 theme = "catppuccin-mocha" + confirm-close-surface = false ''; }; @@ -41,6 +42,7 @@ end ''; shellAbbrs = { + drs = "darwin-rebuild switch --flake ~/.config/nix-darwin"; j = "jj"; }; }; diff --git a/home-manager/nixvim/default.nix b/home-manager/nixvim/default.nix index a972fcc..5203df8 100644 --- a/home-manager/nixvim/default.nix +++ b/home-manager/nixvim/default.nix @@ -143,12 +143,39 @@ plugins.cmp = { enable = true; autoEnableSources = true; - settings.sources = [ - { name = "nvim_lsp"; } - { name = "luasnip"; } - { name = "path"; } - { name = "buffer"; } - ]; + settings = { + sources = [ + { name = "nvim_lsp"; } + { name = "luasnip"; } + { name = "path"; } + { name = "buffer"; } + ]; + mappings = { + "<C-n>" = '' + cmp.mapping(function() + if cmp.visible() then + cmp.select_next_item({behavior = 'insert'}) + else + cmp.complete() + end + end) + ''; + "<C-p>" = '' + cmp.mapping(function() + if cmp.visible() then + cmp.select_prev_item({behavior = 'insert'}) + else + cmp.complete() + end + end) + ''; + }; + snippet.expand = '' + function(args) + require('luasnip').lsp_expand(args.body) + end + ''; + }; }; plugins.tmux-navigator.enable = true; diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix index fda2253..8e29b4b 100644 --- a/nix-darwin/default.nix +++ b/nix-darwin/default.nix @@ -53,6 +53,7 @@ "ghostty" "karabiner-elements" "keepingyouawake" + "obsidian" "tailscale" ]; diff --git a/nix-darwin/hosts/Sloanes-MacBook-Air/default.nix b/nix-darwin/hosts/Sloanes-MacBook-Air/default.nix index e2a52ed..674fda7 100644 --- a/nix-darwin/hosts/Sloanes-MacBook-Air/default.nix +++ b/nix-darwin/hosts/Sloanes-MacBook-Air/default.nix @@ -1,5 +1,18 @@ { ... }: { + system.defaults = { + dock.persistent-apps = [ + "/Applications/Firefox.app" + "/System/Applications/Mail.app" + "/Applications/Fantastical.app" + "/Applications/Things3.app" + "/System/Applications/Messages.app" + "/Applications/Discord.app" + "/Applications/Obsidian.app" + "/Applications/Ghostty.app" + ]; + }; + homebrew = { casks = [ "discord"