Fix ls aliases and add herdr config
This commit is contained in:
@@ -3,6 +3,7 @@
|
|||||||
{
|
{
|
||||||
# Determinate already manages the Nix daemon, so nix-darwin shouldn't.
|
# Determinate already manages the Nix daemon, so nix-darwin shouldn't.
|
||||||
nix.enable = false;
|
nix.enable = false;
|
||||||
|
programs.zsh.enable = true;
|
||||||
|
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nixpkgs.hostPlatform = "aarch64-darwin"; # use x86_64-darwin for Intel CPU
|
nixpkgs.hostPlatform = "aarch64-darwin"; # use x86_64-darwin for Intel CPU
|
||||||
@@ -43,6 +44,7 @@
|
|||||||
];
|
];
|
||||||
casks = [
|
casks = [
|
||||||
"wezterm"
|
"wezterm"
|
||||||
|
"grok-build"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,6 +20,43 @@ in
|
|||||||
fonts.fontconfig.enable = true;
|
fonts.fontconfig.enable = true;
|
||||||
home.sessionVariables.EDITOR = "nvim";
|
home.sessionVariables.EDITOR = "nvim";
|
||||||
|
|
||||||
|
programs.zsh = {
|
||||||
|
enable = true;
|
||||||
|
autosuggestion.enable = true; # ghost text from history
|
||||||
|
syntaxHighlighting.enable = true; # commands turn green when valid
|
||||||
|
initContent = ''
|
||||||
|
bindkey '^f' autosuggest-accept
|
||||||
|
'';
|
||||||
|
shellAliases = {
|
||||||
|
".." = "cd ..";
|
||||||
|
ll = "ls -plart";
|
||||||
|
add = "git add .";
|
||||||
|
push = "git push";
|
||||||
|
pull = "git pull";
|
||||||
|
m = "git switch main";
|
||||||
|
cc = "claude --dangerously-skip-permissions";
|
||||||
|
co = "codex --full-auto";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
programs.starship = {
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
add_newline = false;
|
||||||
|
format = "$directory$git_branch$git_status$cmd_duration$line_break$character";
|
||||||
|
character = {
|
||||||
|
success_symbol = "[❯](purple)";
|
||||||
|
error_symbol = "[❯](red)";
|
||||||
|
};
|
||||||
|
cmd_duration.format = "[$duration]($style) ";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
# Edit-in-place: the real file stays in my repo, ~/.config just points at it.
|
||||||
home.file.".config/wezterm".source =
|
home.file.".config/wezterm".source =
|
||||||
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/wezterm";
|
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/wezterm";
|
||||||
|
home.file.".config/nvim".source =
|
||||||
|
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/nvim";
|
||||||
|
home.file.".config/herdr".source =
|
||||||
|
config.lib.file.mkOutOfStoreSymlink "${dotfiles}/home/.config/herdr";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
[keys]
|
||||||
|
prefix = "ctrl+b"
|
||||||
|
focus_pane_left = "prefix+h"
|
||||||
|
focus_pane_down = "prefix+j"
|
||||||
|
focus_pane_up = "prefix+k"
|
||||||
|
focus_pane_right = "prefix+l"
|
||||||
|
split_horizontal = "prefix+double_quote"
|
||||||
|
split_vertical = "prefix+percent"
|
||||||
|
new_tab = "prefix+c"
|
||||||
|
close_tab = "prefix+ampersand"
|
||||||
|
workspace_picker = "prefix+w"
|
||||||
|
goto = "prefix+g"
|
||||||
|
copy_mode = "prefix+y" # herdr's copy-mode entry key; copy-mode's own internal keys (v/space select, y/Enter copy, q/Esc cancel) aren't configurable
|
||||||
|
|
||||||
|
[ui]
|
||||||
|
# Agents panel order: explicit choice of "spaces" (grouped by space, the default) over "priority".
|
||||||
|
agent_panel_sort = "spaces"
|
||||||
@@ -0,0 +1,3 @@
|
|||||||
|
require('vim_config')
|
||||||
|
require('plugin')
|
||||||
|
require('keys')
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
{
|
||||||
|
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
|
||||||
|
"gitsigns.nvim": { "branch": "main", "commit": "31d6fb2d618bca1482b9f274751ead5f03461408" },
|
||||||
|
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
|
||||||
|
"neogit": { "branch": "master", "commit": "f8674ec894315c02449b61c9de9a116c5aafeb90" },
|
||||||
|
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
|
||||||
|
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
|
||||||
|
"snacks.nvim": { "branch": "main", "commit": "882c996cf28183f4d63640de0b4c02ec886d01f2" },
|
||||||
|
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
|
||||||
|
}
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
-- save by pressing Escape
|
||||||
|
vim.keymap.set('n', '<Esc>', ':w<CR>', { desc = 'Save' })
|
||||||
|
-- select all
|
||||||
|
vim.keymap.set('n', '<C-a>', 'ggVG', { desc = 'Select All' })
|
||||||
|
-- pasting over a selection no longer clobbers your clipboard
|
||||||
|
vim.cmd([[ xnoremap <expr> p 'pgv"'.v:register.'y' ]])
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim'
|
||||||
|
if not vim.uv.fs_stat(lazypath) then
|
||||||
|
vim.fn.system({ 'git', 'clone', '--filter=blob:none',
|
||||||
|
'https://github.com/folke/lazy.nvim.git', '--branch=stable', lazypath })
|
||||||
|
end
|
||||||
|
vim.opt.rtp:prepend(lazypath)
|
||||||
|
require('lazy').setup('plugins') -- load every file in lua/plugins/
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'NeogitOrg/neogit',
|
||||||
|
dependencies = { 'nvim-lua/plenary.nvim', 'sindrets/diffview.nvim' },
|
||||||
|
keys = { { '<leader>g', function() require('neogit').open() end, desc = 'Neogit' } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'lewis6991/gitsigns.nvim',
|
||||||
|
event = 'BufWinEnter',
|
||||||
|
opts = { current_line_blame = true }, -- who last touched this line
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'stevearc/oil.nvim',
|
||||||
|
opts = { view_options = { show_hidden = true } },
|
||||||
|
keys = { { '<leader>e', '<cmd>Oil<cr>', desc = 'File Browser' } },
|
||||||
|
},
|
||||||
|
{
|
||||||
|
'folke/snacks.nvim',
|
||||||
|
priority = 1000,
|
||||||
|
lazy = false,
|
||||||
|
opts = {
|
||||||
|
picker = { enabled = true },
|
||||||
|
notifier = { enabled = true },
|
||||||
|
input = { enabled = true },
|
||||||
|
},
|
||||||
|
keys = {
|
||||||
|
{ '<leader>f', function() Snacks.picker.files() end, desc = 'Find Files' },
|
||||||
|
{ '<leader>s', function() Snacks.picker.grep() end, desc = 'Search Text' },
|
||||||
|
{ '<leader>b', function() Snacks.picker.buffers() end, desc = 'Buffers' },
|
||||||
|
{ 'gd', function() Snacks.picker.lsp_definitions() end, desc = 'Goto Definition' },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
return {
|
||||||
|
{
|
||||||
|
'folke/which-key.nvim',
|
||||||
|
lazy = false,
|
||||||
|
config = true, -- popup that shows what my leader keys do
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
local o = vim.opt
|
||||||
|
vim.g.mapleader = ' ' -- space is the leader key
|
||||||
|
o.expandtab = true -- spaces, not tabs
|
||||||
|
o.shiftwidth = 2 -- 2 spaces per indent level
|
||||||
|
o.number = true -- absolute number on the cursor line, relative elsewhere
|
||||||
|
o.relativenumber = true -- relative line numbers for fast jumps
|
||||||
|
o.ignorecase = true -- search is case-insensitive by default
|
||||||
|
o.smartcase = true -- case-sensitive only if i type a capital
|
||||||
|
o.clipboard = 'unnamedplus' -- share the system clipboard
|
||||||
|
o.scrolloff = 16 -- keep cursor away from the screen edge
|
||||||
|
o.undofile = true -- persistent undo across sessions
|
||||||
|
o.mouse = '' -- no mouse in nvim; also lets Herdr keep host mouse capture off so Escape isn't swallowed
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
local wezterm = require("wezterm")
|
||||||
|
|
||||||
|
local config = wezterm.config_builder()
|
||||||
|
|
||||||
|
config.color_scheme = "rose-pine-moon"
|
||||||
|
config.font = wezterm.font("Hack Nerd Font")
|
||||||
|
config.font_size = 15.0
|
||||||
|
config.window_background_opacity = 0.8
|
||||||
|
config.macos_window_background_blur = 50
|
||||||
|
config.hide_tab_bar_if_only_one_tab = true
|
||||||
|
config.window_decorations = "RESIZE"
|
||||||
|
|
||||||
|
return config
|
||||||
Reference in New Issue
Block a user