From 64d95dfef53121b170d3e6d30876765b61f72d8a Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Thu, 25 Jul 2024 12:29:25 -0400 Subject: [PATCH] add(base): thefuck & neotree bindings --- bash/default.nix | 1 + home.nix | 3 +- nvim/config/lua/lsp-config.lua | 5 +- nvim/config/lua/neotree-config.lua | 3 +- nvim/config/lua/which-key-config.lua | 116 ++++++++++++++------------- 5 files changed, 66 insertions(+), 62 deletions(-) diff --git a/bash/default.nix b/bash/default.nix index 0ac101c..8895b44 100644 --- a/bash/default.nix +++ b/bash/default.nix @@ -11,6 +11,7 @@ profileExtra = '' SHELL="$BASH" PATH=~/.bin:$PATH + eval "$(thefuck --alias)" set -o vi bind "set show-mode-in-prompt on" neofetch diff --git a/home.nix b/home.nix index d0b11e2..9ae7a30 100644 --- a/home.nix +++ b/home.nix @@ -20,7 +20,7 @@ in # Home Manager Config home.username = "evanreichard"; home.homeDirectory = "/Users/evanreichard"; - home.stateVersion = "23.11"; + home.stateVersion = "24.05"; programs.home-manager.enable = true; # Global Packages @@ -40,6 +40,7 @@ in pre-commit python311 ssm-session-manager-plugin + thefuck tldr ] ++ optionals isDarwin [ kitty diff --git a/nvim/config/lua/lsp-config.lua b/nvim/config/lua/lsp-config.lua index 02ab646..648477e 100644 --- a/nvim/config/lua/lsp-config.lua +++ b/nvim/config/lua/lsp-config.lua @@ -184,9 +184,8 @@ end null_ls.setup({ sources = { -- Prettier Formatting - null_ls.builtins.formatting.prettier.with({ - extra_filetypes = { "template" }, - }), + null_ls.builtins.formatting.prettier, + null_ls.builtins.formatting.prettier.with({ filetypes = { "template" } }), require("none-ls.diagnostics.eslint_d").with({ condition = function(utils) return has_eslint_in_parents(vim.fn.getcwd()) diff --git a/nvim/config/lua/neotree-config.lua b/nvim/config/lua/neotree-config.lua index d74e98e..4e4aa21 100644 --- a/nvim/config/lua/neotree-config.lua +++ b/nvim/config/lua/neotree-config.lua @@ -1 +1,2 @@ -require("neo-tree").setup({window = {mappings = {[""] = "none"}}}) +require("neo-tree").setup({ window = { mappings = { [""] = "none" } } }) +vim.keymap.set("n", "t", ":Neotree toggle", { silent = true }) diff --git a/nvim/config/lua/which-key-config.lua b/nvim/config/lua/which-key-config.lua index a3c5149..18395f0 100644 --- a/nvim/config/lua/which-key-config.lua +++ b/nvim/config/lua/which-key-config.lua @@ -3,61 +3,63 @@ local wk = require("which-key") wk.setup({}) wk.register({ - K = {"Definition Hover"}, - [""] = {"Signature Help"}, - [""] = { - q = { - name = "Diagnostics", - q = {"Toggle Diagnostic List"}, - t = {"Toggle Inline Diagnostics"}, - n = {"Next Diagnostic"}, - N = {"Previous Diagnostic"}, - e = {"Open Diagnostic Float"} - }, - d = { - name = "Debug", - b = {"Toggle Breakpoint"}, - u = {"Toggle UI"}, - c = {"Continue"}, - t = {"Run Test"} - }, - g = { - name = "DiffView", - o = {"DiffviewOpen", "Open Diff - Current"}, - O = {"DiffviewOpen origin/main...HEAD", "Open Diff - Main"}, - h = {"DiffviewFileHistory", "Diff History"}, - H = { - "DiffviewFileHistory --range=origin..HEAD", - "Diff History - Main" - }, - c = {"DiffviewClose", "Close Diff"}, - b = {"Git Blame Line"}, - B = {"Git Blame Full"} - }, - f = { - name = "Find - Telescope", - f = {"Telescope find_files", "Find File"}, - g = {"Telescope live_grep", "Live Grep"}, - b = {"Telescope buffers", "Find Buffer"}, - j = {"Telescope jumplist", "Jump List"}, - h = {"Telescope help_tags", "Help Tags"} - }, - l = { - name = "LSP", - D = {"Declaration"}, - d = {"Definition"}, - f = {"Format"}, - i = {"Implementation"}, - n = {"Rename"}, - r = {"References"}, - t = {"Type Definition"} - }, - s = { - name = "Screenshot", - mode = {'v', 'n'}, - b = {"Buffer Screenshot", mode = {'v', 'n'}}, - s = {"Selected Screenshot", mode = 'v'}, - v = {"Visual Screenshot", mode = 'n'} - } - } + K = { "Definition Hover" }, + [""] = { "Signature Help" }, + [""] = { + a = { "Aerial" }, + t = { "NeoTree" }, + q = { + name = "Diagnostics", + q = { "Toggle Diagnostic List" }, + t = { "Toggle Inline Diagnostics" }, + n = { "Next Diagnostic" }, + N = { "Previous Diagnostic" }, + e = { "Open Diagnostic Float" }, + }, + d = { + name = "Debug", + b = { "Toggle Breakpoint" }, + u = { "Toggle UI" }, + c = { "Continue" }, + t = { "Run Test" }, + }, + g = { + name = "DiffView", + o = { "DiffviewOpen", "Open Diff - Current" }, + O = { "DiffviewOpen origin/main...HEAD", "Open Diff - Main" }, + h = { "DiffviewFileHistory", "Diff History" }, + H = { + "DiffviewFileHistory --range=origin..HEAD", + "Diff History - Main", + }, + c = { "DiffviewClose", "Close Diff" }, + b = { "Git Blame Line" }, + B = { "Git Blame Full" }, + }, + f = { + name = "Find - Telescope", + f = { "Telescope find_files", "Find File" }, + g = { "Telescope live_grep", "Live Grep" }, + b = { "Telescope buffers", "Find Buffer" }, + j = { "Telescope jumplist", "Jump List" }, + h = { "Telescope help_tags", "Help Tags" }, + }, + l = { + name = "LSP", + D = { "Declaration" }, + d = { "Definition" }, + f = { "Format" }, + i = { "Implementation" }, + n = { "Rename" }, + r = { "References" }, + t = { "Type Definition" }, + }, + s = { + name = "Screenshot", + mode = { "v", "n" }, + b = { "Buffer Screenshot", mode = { "v", "n" } }, + s = { "Selected Screenshot", mode = "v" }, + v = { "Visual Screenshot", mode = "n" }, + }, + }, })