From ebca54d8b86d5fcd9d0fdb45211d40b92e348b14 Mon Sep 17 00:00:00 2001 From: Drew Haven Date: Tue, 25 Feb 2025 17:40:44 -0800 Subject: [PATCH] [mac] Adds rust devel. [nvim] Uses snacks for buffer picker --- .../macos.nix} | 2 +- home-manager/features/development/rust.nix | 7 +++++++ .../features/neovim/config/lua/plugins/snacks.lua | 15 +++++++++++++++ .../neovim/config/lua/plugins/telescope.lua | 1 + system/hosts/tarro-mbp/drew.nix | 3 ++- 5 files changed, 26 insertions(+), 2 deletions(-) rename home-manager/features/{development-macos.nix => development/macos.nix} (89%) create mode 100644 home-manager/features/development/rust.nix create mode 100644 home-manager/features/neovim/config/lua/plugins/snacks.lua diff --git a/home-manager/features/development-macos.nix b/home-manager/features/development/macos.nix similarity index 89% rename from home-manager/features/development-macos.nix rename to home-manager/features/development/macos.nix index b73af6f..9ebe4bf 100644 --- a/home-manager/features/development-macos.nix +++ b/home-manager/features/development/macos.nix @@ -3,7 +3,7 @@ { lib, ... }: { imports = [ - ./development/development.nix + ./development.nix ]; # OS X seems to render these fonts a bit smaller than Linux diff --git a/home-manager/features/development/rust.nix b/home-manager/features/development/rust.nix new file mode 100644 index 0000000..7dbaf65 --- /dev/null +++ b/home-manager/features/development/rust.nix @@ -0,0 +1,7 @@ +{ pkgs, ...}: +{ + home.packages = with pkgs; [ + rust-analyzer + rustfmt + ]; +} diff --git a/home-manager/features/neovim/config/lua/plugins/snacks.lua b/home-manager/features/neovim/config/lua/plugins/snacks.lua new file mode 100644 index 0000000..d39d858 --- /dev/null +++ b/home-manager/features/neovim/config/lua/plugins/snacks.lua @@ -0,0 +1,15 @@ +return { + "folke/snacks.nvim", + opts = { + keys = { + { + "", + function() + Snacks.picker.buffers() + end, + desc = "Open Files", + }, + { "", false }, + }, + }, +} diff --git a/home-manager/features/neovim/config/lua/plugins/telescope.lua b/home-manager/features/neovim/config/lua/plugins/telescope.lua index ca30ca9..95dac01 100644 --- a/home-manager/features/neovim/config/lua/plugins/telescope.lua +++ b/home-manager/features/neovim/config/lua/plugins/telescope.lua @@ -1,5 +1,6 @@ return { "nvim-telescope/telescope.nvim", + enabled = false, keys = { -- Switch the default keybind to switch buffers instead of find files { diff --git a/system/hosts/tarro-mbp/drew.nix b/system/hosts/tarro-mbp/drew.nix index c3f52a0..e53a9fa 100644 --- a/system/hosts/tarro-mbp/drew.nix +++ b/system/hosts/tarro-mbp/drew.nix @@ -1,10 +1,11 @@ { pkgs, self, ... }: { imports = [ - ../../../home-manager/features/development-macos.nix ../../../home-manager/features/kubernetes.nix ../../../home-manager/features/macos ../../../home-manager/features/nix.nix + ../../../home-manager/features/development/macos.nix + ../../../home-manager/features/development/rust.nix ]; home.username = "drew";