Compare commits

...

7 Commits

Author SHA1 Message Date
4bcd55c0b1 add zed dotfiles 2025-06-14 10:15:16 -06:00
39976567ed support plain fedora 2025-06-13 19:24:25 -06:00
f81012d8b8 use side-by-side for delta diff output 2025-06-13 18:14:02 -06:00
0a3aac427b add jj tug alias 2025-06-13 18:09:08 -06:00
749b57966d replace webman with mise 2025-06-13 18:03:07 -06:00
Andrew Lee
9ff02b60e7 upgrade to astronvim v5 2025-03-27 21:45:55 -06:00
Andrew Lee
a9b7c5aa4d add jjbm script to get latest bookmark 2025-01-02 12:49:44 -07:00
23 changed files with 447 additions and 250 deletions

View File

@@ -7,6 +7,9 @@ packages:
- direnv
casks:
- git-credential-manager
- ghostty
- orbstack
- raycast
linux:
dnfs:
- git-all
@@ -26,13 +29,25 @@ packages:
- bash
- fish
- direnv
webman:
pkgs:
- bat
- lsd
- fzf
- zellij
- nvim
- jj
groups:
- modern-unix
mise:
- jj
- lsd
- fzf
- zellij
- neovim
- delta
- bat
- fd
- rg
- hyperfine
- yazi
- jq
- btop
- bottom
- uv
- dust
- glow
- lazygit
- lazydocker
- zoxide

View File

@@ -5,7 +5,7 @@ RUN apt-get update && \
apt update && \
apt install -y git curl fish sudo && \
rm -rf /var/lib/apt/lists/*
RUN sh -c "$(curl -fsLS get.chezmoi.io)"
RUN sh -c "$(curl -fsLS get.chezmoi.io/lb)"
COPY . /root/.local/share/chezmoi/
RUN chezmoi init --apply

View File

@@ -10,9 +10,12 @@ These dotfiles are managed using [chezmoi](https://www.chezmoi.io/).
If you'd like to use these files long-term, fork this project to manage your own configuration. Then:
- Change the `email` and `name` in `.chezmoi.toml.tmpl` to your own info.
- Install with `sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply <YOUR_USERNAME> && fish`
- Install with `sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- -b $HOME/.local/bin init --apply <YOUR_USERNAME> && fish`
Personally, I run `sh -c "$(curl -fsLS git.io/chezmoi)" -- init --apply candrewlee14 && fish`
Personally, I run
```bash
sh -c "$(curl -fsLS get.chezmoi.io/lb)" -- -b $HOME/.local/bin init --apply candrewlee14 && fish
```
## Information
@@ -27,9 +30,7 @@ Here are a few of the primary tools installed here:
- **Post-Install**: run `tide configure` to change the appearance of the prompt
- [atuin](https://github.com/atuinsh/atuin) - helpful shell history
- by default, it rebinds `ctrl+r` and `up` to use `atuin`
- [webman](https://github.com/candrewlee14/webman) - cross-platform binary package manager
- run `webman upgrade nvim` to upgrade to the latest `nvim`, for example
- run `webman switch node` to use other versions of packages
- [mise](https://mise.jdx.dev) - a polyglot tool version manager
- [nvim](https://github.com/neovim/neovim) - a better vim-fork
- we use [AstroNvim](https://astronvim.com/) to get an IDE-like terminal editor experience
- [zellij](https://github.com/zellij-org/zellij) - a modern `tmux` replacement

View File

@@ -6,6 +6,19 @@ email = {{ .email | quote }}
editor = "nvim"
merge-editor = "vscode"
pager = "delta"
diff-formatter=":git"
[ui.diff]
format = "git"
[aliases]
# tug - move the nearest bookmark to the nearest non-empty change at or before @
tug = ["bookmark", "move", "--from", "closest_bookmark(@)", "--to", "closest_nonempty(@)"]
# closestbookmark - show the name of the nearest bookmark at or before @
closestbookmark = ["util", "exec", "--", "bash", "-c", """
jj log --no-graph -r 'closest_bookmark(@)' -T 'stringify(local_bookmarks.map(|b| b.name()).join("\n")).first_line()++"\n"'
""", ""]
[revset-aliases]
'closest_bookmark(to)' = 'heads(::to & bookmarks())'
'closest_nonempty(to)' = 'heads(::to ~ empty())'

View File

@@ -9,36 +9,35 @@ return {
-- import/override with your plugins folder
{ import = "astrocommunity.colorscheme.catppuccin" },
-- { import = "astrocommunity.editing-support.yanky-nvim" },
{ import = "astrocommunity.diagnostics.trouble-nvim" },
{ import = "astrocommunity.editing-support.todo-comments-nvim" },
{ import = "astrocommunity.editing-support.multicursors-nvim" },
-- { import = "astrocommunity.lsp.lsp-signature-nvim" },
{ import = "astrocommunity.lsp.inc-rename-nvim" },
-- { import = "astrocommunity.editing-support.multicursors-nvim" },
{ import = "astrocommunity.editing-support.rainbow-delimiters-nvim" },
-- { import = "astrocommunity.lsp.inc-rename-nvim" },
{ import = "astrocommunity.markdown-and-latex.glow-nvim" },
-- { import = "astrocommunity.motion.flash-nvim" },
{ import = "astrocommunity.recipes.vscode" },
{ import = "astrocommunity.scrolling.mini-animate" },
{ import = "astrocommunity.search.grug-far-nvim" },
{ import = "astrocommunity.test.neotest" },
{ import = "astrocommunity.utility.noice-nvim" },
-- { import = "astrocommunity.workflow.hardtime-nvim" },
-- { import = "astrocommunity.utility.noice-nvim" },
{ import = "astrocommunity.motion.nvim-surround" },
{
"kylechui/nvim-surround",
opts = {
keymaps = {
normal = '<leader>sa',
normal = "<Leader>sa",
normal_cur = false,
normal_line = false,
normal_cur_line = false,
visual = '<leader>s',
visual_line = '<leader>S',
delete = '<leader>sd',
change = '<leader>sr',
visual = "<Leader>s",
visual_line = "<Leader>S",
delete = "<Leader>sd",
change = "<Leader>sr",
},
aliases = {
['i'] = ']', -- Index
['r'] = ')', -- Round
['b'] = '}', -- Brackets
["i"] = "]", -- Index
["r"] = ")", -- Round
["b"] = "}", -- Brackets
},
},
},
@@ -58,24 +57,24 @@ return {
},
},
},
{
"folke/noice.nvim",
opts = {
routes = {
{
filter = {
event = 'msg_show',
any = {
{ find = '%d+L, %d+B' },
{ find = '; after #%d+' },
{ find = '; before #%d+' },
{ find = '%d fewer lines' },
{ find = '%d more lines' },
},
},
opts = { skip = true },
}
}
}
}
-- {
-- "folke/noice.nvim",
-- opts = {
-- routes = {
-- {
-- filter = {
-- event = "msg_show",
-- any = {
-- { find = "%d+L, %d+B" },
-- { find = "; after #%d+" },
-- { find = "; before #%d+" },
-- { find = "%d fewer lines" },
-- { find = "%d more lines" },
-- },
-- },
-- opts = { skip = true },
-- },
-- },
-- },
-- },
}

View File

@@ -1,13 +1,14 @@
require("lazy").setup({
{
"AstroNvim/AstroNvim",
version = "^4", -- Remove version tracking to elect for nighly AstroNvim
version = "^5", -- Remove version tracking to elect for nighly AstroNvim
import = "astronvim.plugins",
opts = { -- AstroNvim options must be set here with the `import` key
mapleader = " ", -- This ensures the leader key must be configured before Lazy is set up
maplocalleader = ",", -- This ensures the localleader key must be configured before Lazy is set up
icons_enabled = true, -- Set to false to disable icons (if no Nerd Font is available)
pin_plugins = nil, -- Default will pin plugins when tracking `version` of AstroNvim, set to true/false to override
update_notifications = true, -- Enable/disable notification about running `:Lazy update` twice to update pinned plugins
},
},
{ import = "community" },

View File

@@ -1,3 +1,5 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- AstroCore provides a central place to modify mappings, vim options, autocommands, and more!
-- Configuration documentation can be found with `:h astrocore`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
@@ -10,12 +12,12 @@ return {
opts = {
-- Configure core features of AstroNvim
features = {
large_buf = { size = 1024 * 500, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
autopairs = true, -- enable autopairs at start
cmp = true, -- enable completion at start
diagnostics_mode = 3, -- diagnostic mode on start (0 = off, 1 = no signs/virtual text, 2 = no virtual text, 3 = on)
highlighturl = true, -- highlight URLs at start
notifications = true, -- enable notifications at start
large_buf = { size = 1024 * 256, lines = 10000 }, -- set global limits for large files for disabling features like treesitter
autopairs = true, -- enable autopairs at start
cmp = true, -- enable completion at start
diagnostics = { virtual_text = true, virtual_lines = false }, -- diagnostic settings on startup
highlighturl = true, -- highlight URLs at start
notifications = true, -- enable notifications at start
},
-- Diagnostics configuration (for vim.diagnostics.config({...})) when diagnostics are on
diagnostics = {
@@ -24,14 +26,14 @@ return {
},
-- vim options can be configured here
options = {
opt = { -- vim.opt.<key>
opt = { -- vim.opt.<key>
relativenumber = true, -- sets vim.opt.relativenumber
number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell
signcolumn = "auto", -- sets vim.opt.signcolumn to auto
wrap = false, -- sets vim.opt.wrap
number = true, -- sets vim.opt.number
spell = false, -- sets vim.opt.spell
signcolumn = "yes", -- sets vim.opt.signcolumn to yes
wrap = false, -- sets vim.opt.wrap
},
g = { -- vim.g.<key>
g = { -- vim.g.<key>
-- configure global vim variables (vim.g)
-- NOTE: `mapleader` and `maplocalleader` must be set in the AstroNvim opts or before `lazy.setup`
-- This can be found in the `lua/lazy_setup.lua` file
@@ -44,45 +46,26 @@ return {
n = {
-- second key is the lefthand side of the map
-- navigate buffer tabs with `H` and `L`
-- L = {
-- function() require("astrocore.buffer").nav(vim.v.count > 0 and vim.v.count or 1) end,
-- desc = "Next buffer",
-- },
-- H = {
-- function() require("astrocore.buffer").nav(-(vim.v.count > 0 and vim.v.count or 1)) end,
-- desc = "Previous buffer",
-- },
["<C-j>"] = { "<C-d>", desc = "Scroll half down" },
["<C-k>"] = { "<C-u>", desc = "Scroll half up" },
-- navigate buffer tabs
["]b"] = { function() require("astrocore.buffer").nav(vim.v.count1) end, desc = "Next buffer" },
["[b"] = { function() require("astrocore.buffer").nav(-vim.v.count1) end, desc = "Previous buffer" },
["<leader>sw"] = { "<leader>saiw", desc = "Surround word", remap = true },
["<Leader>sW"] = { "<leader>saiW", desc = "Surround Word", remap = true },
["<Esc>"] = {
function()
require("notify").dismiss({ silent = true, pending = true })
end,
desc = "Dismiss notifications",
},
-- mappings seen under group name "Buffer"
["<leader>bn"] = { "<cmd>tabnew<cr>", desc = "New tab" },
["<Leader>bD"] = {
["<Leader>bd"] = {
function()
require("astroui.status.heirline").buffer_picker(
function(bufnr) require("astrocore.buffer").close(bufnr) end
)
end,
desc = "Pick to close",
desc = "Close buffer from tabline",
},
-- tables with just a `desc` key will be registered with which-key if it's installed
-- this is useful for naming menus
["<Leader>b"] = { desc = "Buffers" },
-- quick save
-- ["<C-s>"] = { ":w!<cr>", desc = "Save File" }, -- change description but the same command
},
t = {
-- ["<Leader>b"] = { desc = "Buffers" },
-- setting a mapping to false will disable it
-- ["<esc>"] = false,
-- ["<C-S>"] = false,
},
},
},

View File

@@ -1,3 +1,5 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- AstroLSP allows you to customize the features in AstroNvim's LSP configuration engine
-- Configuration documentation can be found with `:h astrolsp`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
@@ -10,16 +12,15 @@ return {
opts = {
-- Configuration table of features provided by AstroLSP
features = {
autoformat = true, -- enable or disable auto formatting on start
codelens = true, -- enable/disable codelens refresh on start
inlay_hints = false, -- enable/disable inlay hints on start
codelens = true, -- enable/disable codelens refresh on start
inlay_hints = false, -- enable/disable inlay hints on start
semantic_tokens = true, -- enable/disable semantic token highlighting
},
-- customize lsp formatting options
formatting = {
-- control auto formatting on save
format_on_save = {
enabled = true, -- enable or disable format on save globally
enabled = true, -- enable or disable format on save globally
allow_filetypes = { -- enable format on save for specified filetypes only
-- "go",
},
@@ -39,23 +40,11 @@ return {
-- enable servers that you already have installed without mason
servers = {
-- "pyright"
"zls",
},
-- customize language server configuration options passed to `lspconfig`
---@diagnostic disable: missing-fields
config = {
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
zls = {
cmd = { "zls" },
filetypes = { "zig" },
},
clangd = {
cmd = {
"clangd",
"--offset-encoding=utf-16",
},
filetypes = { "c", "cpp", "objc", "objcpp" },
},
},
-- customize how language servers are attached
handlers = {
@@ -69,43 +58,41 @@ return {
-- Configure buffer local auto commands to add when attaching a language server
autocmds = {
-- first key is the `augroup` to add the auto commands to (:h augroup)
lsp_document_highlight = {
lsp_codelens_refresh = {
-- Optional condition to create/delete auto command group
-- can either be a string of a client capability or a function of `fun(client, bufnr): boolean`
-- condition will be resolved for each client on each execution and if it ever fails for all clients,
-- the auto commands will be deleted for that buffer
cond = "textDocument/documentHighlight",
cond = "textDocument/codeLens",
-- cond = function(client, bufnr) return client.name == "lua_ls" end,
-- list of auto commands to set
{
-- events to trigger
event = { "CursorHold", "CursorHoldI" },
event = { "InsertLeave", "BufEnter" },
-- the rest of the autocmd options (:h nvim_create_autocmd)
desc = "Document Highlighting",
callback = function() vim.lsp.buf.document_highlight() end,
},
{
event = { "CursorMoved", "CursorMovedI", "BufLeave" },
desc = "Document Highlighting Clear",
callback = function() vim.lsp.buf.clear_references() end,
desc = "Refresh codelens (buffer)",
callback = function(args)
if require("astrolsp").config.features.codelens then vim.lsp.codelens.refresh { bufnr = args.buf } end
end,
},
},
},
-- mappings to be set up on attaching of a language server
mappings = {
n = {
gl = { function() vim.diagnostic.open_float() end, desc = "Hover diagnostics" },
-- a `cond` key can provided as the string of a server capability to be required to attach, or a function with `client` and `bufnr` parameters from the `on_attach` that returns a boolean
-- gD = {
-- function() vim.lsp.buf.declaration() end,
-- desc = "Declaration of current symbol",
-- cond = "textDocument/declaration",
-- },
-- ["<Leader>uY"] = {
-- function() require("astrolsp.toggles").buffer_semantic_tokens() end,
-- desc = "Toggle LSP semantic highlight (buffer)",
-- cond = function(client) return client.server_capabilities.semanticTokensProvider and vim.lsp.semantic_tokens end,
-- },
gD = {
function() vim.lsp.buf.declaration() end,
desc = "Declaration of current symbol",
cond = "textDocument/declaration",
},
["<Leader>uY"] = {
function() require("astrolsp.toggles").buffer_semantic_tokens() end,
desc = "Toggle LSP semantic highlight (buffer)",
cond = function(client)
return client.supports_method "textDocument/semanticTokens/full" and vim.lsp.semantic_tokens ~= nil
end,
},
},
},
-- A custom `on_attach` function to be run after the default `on_attach` function

View File

@@ -1,3 +1,5 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- AstroUI provides the basis for configuring the AstroNvim User Interface
-- Configuration documentation can be found with `:h astroui`
-- NOTE: We highly recommend setting up the Lua Language Server (`:LspInstall lua_ls`)
@@ -15,7 +17,7 @@ return {
init = { -- this table overrides highlights in all themes
-- Normal = { bg = "#000000" },
},
astrotheme = { -- a table of overrides/changes when applying the astrotheme theme
astrodark = { -- a table of overrides/changes when applying the astrotheme theme
-- Normal = { bg = "#000000" },
},
},

View File

@@ -1,41 +1,28 @@
-- Customize Mason plugins
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Mason
---@type LazySpec
return {
-- use mason-lspconfig to configure LSP installations
-- use mason-tool-installer for automatically installing Mason packages
{
"williamboman/mason-lspconfig.nvim",
-- overrides `require("mason-lspconfig").setup(...)`
opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
"lua_ls",
-- add more arguments for adding more language servers
})
end,
},
-- use mason-null-ls to configure Formatters/Linter installation for null-ls sources
{
"jay-babu/mason-null-ls.nvim",
-- overrides `require("mason-null-ls").setup(...)`
opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
"prettier",
"WhoIsSethDaniel/mason-tool-installer.nvim",
-- overrides `require("mason-tool-installer").setup(...)`
opts = {
-- Make sure to use the names found in `:Mason`
ensure_installed = {
-- install language servers
"lua-language-server",
-- install formatters
"stylua",
-- add more arguments for adding more null-ls sources
})
end,
},
{
"jay-babu/mason-nvim-dap.nvim",
-- overrides `require("mason-nvim-dap").setup(...)`
opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
"python",
-- add more arguments for adding more debuggers
})
end,
-- install debuggers
"debugpy",
-- install any other package
"tree-sitter-cli",
},
},
},
}

View File

@@ -1,20 +1,24 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize None-ls sources
---@type LazySpec
return {
"nvimtools/none-ls.nvim",
opts = function(_, config)
-- config variable is the default configuration table for the setup function call
opts = function(_, opts)
-- opts variable is the default configuration table for the setup function call
-- local null_ls = require "null-ls"
-- Check supported formatters and linters
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/formatting
-- https://github.com/nvimtools/none-ls.nvim/tree/main/lua/null-ls/builtins/diagnostics
config.sources = {
-- Only insert new sources, do not replace the existing ones
-- (If you wish to replace, use `opts.sources = {}` instead of the `list_insert_unique` function)
opts.sources = require("astrocore").list_insert_unique(opts.sources, {
-- Set a formatter
-- null_ls.builtins.formatting.stylua,
-- null_ls.builtins.formatting.prettier,
}
return config -- return final config table
})
end,
}

View File

@@ -1,14 +1,15 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- Customize Treesitter
---@type LazySpec
return {
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add more things to the ensure_installed table protecting against community packs modifying it
opts.ensure_installed = require("astrocore").list_insert_unique(opts.ensure_installed, {
opts = {
ensure_installed = {
"lua",
"vim",
-- add more arguments for adding more treesitter parsers
})
end,
},
},
}

View File

@@ -1,6 +1,7 @@
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
-- You can also add or configure plugins by creating files in this `plugins/` folder
-- PLEASE REMOVE THE EXAMPLES YOU HAVE NO INTEREST IN BEFORE ENABLING THIS FILE
-- Here are some examples:
---@type LazySpec
@@ -17,26 +18,28 @@ return {
-- == Examples of Overriding Plugins ==
-- customize alpha options
-- customize dashboard options
{
"goolord/alpha-nvim",
opts = function(_, opts)
-- customize the dashboard header
opts.section.header.val = {
" █████ ███████ ████████ ██████ ██████",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████",
" ",
" ███  ██ ██  ██ ██ ███  ███",
"███  ██ ██  ██ ██ ███ ███",
" ████  ██ ██  ██ ██ ██ ████ ██",
" ██ ██ ██ ██  ██  ██ ████ ██",
" ██   ████   ████   ██ ██  ██",
}
return opts
end,
"folke/snacks.nvim",
opts = {
dashboard = {
preset = {
header = table.concat({
" █████ ███████ ████████ ██████ ██████ ",
"██ ██ ██ ██ ██ ██ ██ ██",
"███████ ███████ ██ ██████ ██ ██",
"██ ██ ██ ██ ██ ██ ██ ██",
"██ ██ ███████ ██ ██ ██ ██████ ",
"",
"███  ██ ██  ██ ██ ███  ███",
"████  ██ ██  ██ ██ ████  ████",
"██ ██  ██ ██  ██ ██ ██ ████ ██",
"██  ████  ██ ██  ██ ██  ██  ██",
"██   ████   ████   ██ ██  ██",
}, "\n"),
},
},
},
},
-- You can disable default plugins as follows:

View File

@@ -1,9 +1,5 @@
if status is-interactive
# Commands to run in interactive sessions can go here
functions -q _insert_jj_after_git; and _insert_jj_after_git
if set -q GHOSTTY_RESOURCES_DIR
source "$GHOSTTY_RESOURCES_DIR/shell-integration/fish/vendor_conf.d/ghostty-shell-integration.fish"
end
if type -q zoxide
zoxide init fish | source
end
@@ -14,6 +10,13 @@ if status is-interactive
direnv hook fish | source
end
if type -q mise
mise activate fish | source
end
alias ls="lsd"
set -gx EDITOR nvim
if test -f ~/.config/fish/config.fish.local
source ~/.config/fish/config.fish.local
end
@@ -22,6 +25,4 @@ if status is-interactive
end
end
alias ls="lsd"
set -gx EDITOR nvim

View File

@@ -9,7 +9,8 @@ if not functions -q fisher
end
end
fish_add_path ~/.webman/bin/
fish_add_path ~/.local/bin/
set -gx --path XDG_DATA_DIRS $XDG_DATA_DIRS:$HOME/.local/share/
# if atuin is not installed, install it
if not type -q atuin
@@ -19,4 +20,6 @@ if not type -q atuin
else
atuin import auto
end
end
end

View File

@@ -0,0 +1,3 @@
function jjbm
jj log -r 'heads(::@ & bookmarks())' --ignore-working-copy --template 'bookmarks' --no-graph | head -n1 | cut -d " " -f1
end

152
dot_config/zed/keymap.json Normal file
View File

@@ -0,0 +1,152 @@
// Zed keymap
//
// For information on binding keys, see the Zed
// documentation: https://zed.dev/docs/key-bindings
//
// To see the default key bindings run `zed: open default keymap`
// from the command palette.
[
{
"context": "Editor && (vim_mode == normal || vim_mode == visual) && !VimWaiting && !menu",
"bindings": {
// put key-bindings here if you want them to work in normal & visual mode
// Git
"space g h d": "editor::ToggleSelectedDiffHunks",
"space g s": "git_panel::ToggleFocus",
// Toggle inlay hints
"space t i": "editor::ToggleInlayHints",
// Toggle soft wrap
"space u w": "editor::ToggleSoftWrap",
// Open markdown preview
"space m p": "markdown::OpenPreview",
"space m P": "markdown::OpenPreviewToTheSide",
// Open recent project
"space f p": "projects::OpenRecent",
// Search word under cursor
"space s w": "pane::DeploySearch",
"space f w": "pane::DeploySearch",
// Chat with AI
"space a c": "agent::ToggleFocus",
// Go to file with `gf`
"g f": "editor::OpenExcerpts"
}
},
{
"context": "Editor && vim_mode == normal && !VimWaiting && !menu",
"bindings": {
// put key-bindings here if you want them to work only in normal mode
// Window movement bindings
// Ctrl jklk to move between panes
"ctrl-h": "workspace::ActivatePaneLeft",
"ctrl-l": "workspace::ActivatePaneRight",
"ctrl-k": "workspace::ActivatePaneUp",
"ctrl-j": "workspace::ActivatePaneDown",
"ctrl-/": ["editor::ToggleComments", { "advance_downwards": false }],
"space c": "pane::CloseActiveItem",
"space w": "workspace::Save",
"space e": "workspace::ToggleLeftDock",
"space l r": "editor::Rename",
"space l a": "editor::ToggleCodeActions",
"space .": "editor::ToggleCodeActions",
"g d": "editor::GoToDefinition",
"g D": "editor::GoToDefinitionSplit",
"g i": "editor::GoToImplementation",
"g I": "editor::GoToImplementationSplit",
"g t": "editor::GoToTypeDefinition",
"g T": "editor::GoToTypeDefinitionSplit",
"g r": "editor::FindAllReferences",
"] d": "editor::GoToDiagnostic",
"[ d": "editor::GoToPreviousDiagnostic",
"s s": "outline::Toggle",
"s S": "project_symbols::Toggle",
"space x x": "diagnostics::Deploy",
"] h": "editor::GoToHunk",
"[ h": "editor::GoToPreviousHunk",
"space f f": "file_finder::Toggle"
}
},
{
"context": "EmptyPane || SharedScreen",
"bindings": {
// Open file finder
"space f f": "file_finder::Toggle",
// Open recent project
"space f p": "projects::OpenRecent"
}
},
// Comment code
{
"context": "Editor && vim_mode == visual && !VimWaiting && !menu",
"bindings": {
// visual, visual line & visual block modes
"g c": "editor::ToggleComments",
"ctrl-d": "vim::SelectNext"
}
},
{
"context": "Editor",
"bindings": {
// "j k": ["workspace::SendKeystrokes", "escape"]
"shift-alt-k": "editor::AddSelectionAbove", // Insert Cursor Above
"shift-alt-j": "editor::AddSelectionBelow", // Insert Cursor Below
"ctrl-l": "editor::AcceptEditPrediction"
}
},
{
"context": "ProjectPanel",
"bindings": {}
},
// Toggle terminal
{
"context": "Workspace",
"bindings": {
"ctrl-\\": "terminal_panel::ToggleFocus"
}
},
// Panel nagivation
{
"context": "Dock",
"bindings": {
"ctrl-w h": "workspace::ActivatePaneLeft",
"ctrl-w l": "workspace::ActivatePaneRight",
"ctrl-w k": "workspace::ActivatePaneUp",
"ctrl-w j": "workspace::ActivatePaneDown"
}
},
{
"context": "Terminal",
"bindings": {
"ctrl-h": "workspace::ActivatePaneLeft",
"ctrl-l": "workspace::ActivatePaneRight",
"ctrl-k": "workspace::ActivatePaneUp",
"ctrl-j": "workspace::ActivatePaneDown"
}
},
{
"context": "ProjectPanel && not_editing",
"bindings": {
"a": "project_panel::NewFile",
"x": "project_panel::Cut",
"y": "project_panel::Copy",
"Y": "workspace::CopyRelativePath",
"d": "project_panel::Delete",
"p": "project_panel::Paste",
"r": "project_panel::Rename",
// Navigate between panel
"ctrl-h": "workspace::ActivatePaneLeft",
"ctrl-l": "workspace::ActivatePaneRight",
"ctrl-k": "workspace::ActivatePaneUp",
"ctrl-j": "workspace::ActivatePaneDown",
"space e": "workspace::ToggleLeftDock"
}
}
]

View File

@@ -0,0 +1,77 @@
// Zed settings
//
// For information on how to configure Zed, see the Zed
// documentation: https://zed.dev/docs/configuring-zed
//
// To see all of Zed's default settings without changing your
// custom settings, run `zed: open default settings` from the
// command palette (cmd-shift-p / ctrl-shift-p)
{
"base_keymap": "VSCode",
"agent": {
"model_parameters": [],
"default_model": {
"provider": "zed.dev",
"model": "claude-sonnet-4"
},
"version": "2"
},
"vim_mode": true,
"vim": {
"enable_vim_sneak": true
},
"relative_line_numbers": true,
"ui_font_size": 16,
"buffer_font_size": 16,
"file_finder": {
"modal_width": "medium"
},
"tab_bar": {
"show": true,
"style": "default"
},
"tabs": {
"show_diagnostics": "errors"
},
"indent_guides": {
"enabled": true,
"coloring": "indent_aware"
},
"inlay_hints": {
"enabled": true
},
"terminal": {
"env": {
"EDITOR": "zed --wait"
}
},
"theme": {
"mode": "system",
"light": "One Light",
"dark": "Catppuccin Mocha"
},
"icon_theme": "Catppuccin Macchiato",
"file_scan_exclusions": [
"**/.git",
"**/.svn",
"**/.hg",
"**/CVS",
"**/.DS_Store",
"**/Thumbs.db",
"**/.classpath",
"**/.settings",
// above is default from Zed
"**/out",
"**/dist",
"**/.husky",
"**/.turbo",
"**/.vscode-test",
"**/.vscode",
"**/.next",
"**/.storybook",
"**/.tap",
"**/.nyc_output",
"**/report",
"**/node_modules"
]
}

View File

View File

@@ -18,13 +18,14 @@
[delta]
navigate = true # use n and N to move between diff sections
side-by-side = true
# delta detects terminal colors automatically; set one of these to disable auto-detection
# dark = true
# light = true
[merge]
conflictstyle = diff3
conflictstyle = zdiff3
[diff]
colorMoved = default

View File

@@ -7,7 +7,7 @@ echo "[-] Running post-installation script [-]"
{{- if eq .chezmoi.osRelease.id "alpine" }}
echo "Alpine Linux detected"
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
{{- else if (or (eq .chezmoi.osRelease.id "fedora") (eq .chezmoi.osRelease.idLike "fedora")) }}
echo "Fedora Linux detected"
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
@@ -57,26 +57,5 @@ else
chsh -s $(which fish) || echo "chsh failed"
fi
if test -x ~/.webman/bin/nvim; then
echo "nvim already installed"
else
echo "\n[-] Installing nvim [-]"
~/.webman/bin/webman add nvim
fi
echo "\n[-] Running fish install setup [-]"
/usr/bin/env fish ~/.config/fish/.on_install.fish
if test -f ~/.config/nvim/README.md ; then
echo "Already installed AstroNvim"
else
echo "\n[-] Installing AstroNvim [-]"
if test -x ~/.webman/bin/nvim ; then
~/.webman/bin/nvim --headless +q
else
echo "~/.webman/bin/nvim does not exist or is not executable"
fi
fi

View File

@@ -6,7 +6,7 @@ echo "[-] Running pre-installation script [-]"
{{- if eq .chezmoi.osRelease.id "alpine" }}
echo "Alpine Linux detected"
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
{{- else if (or (eq .chezmoi.osRelease.id "fedora") (eq .chezmoi.osRelease.idLike "fedora")) }}
echo "Fedora Linux detected"
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
@@ -42,9 +42,9 @@ fi
{{- end }}
echo "\n[-] Installing webman [-]"
if test -x ~/.webman/bin/webman; then
echo "webman already installed"
echo "\n[-] Installing mise [-]"
if test -x ~/.local/bin/mise; then
echo "mise already installed"
else
curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh
curl https://mise.run | sh
fi

View File

@@ -11,7 +11,7 @@ apk update
{{ range .packages.linux.apks -}}
apk add {{ . | quote }}
{{ end -}}
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
{{- else if (or (eq .chezmoi.osRelease.id "fedora") (eq .chezmoi.osRelease.idLike "fedora")) }}
{{ range .packages.linux.dnfs -}}
sudo dnf install -y {{ . | quote }}
{{ end -}}
@@ -35,22 +35,7 @@ echo "[-] Updating casks [-]"
{{ end -}}
{{ end -}}
echo "[-] Updating Webman groups [-]"
if test -x ~/.webman/bin/webman; then
echo "webman already installed"
else
echo "\n[-] Installing webman [-]"
curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh
fi
~/.webman/bin/webman upgrade webman
{{ range .packages.webman.groups -}}
~/.webman/bin/webman group upgrade {{ . | quote }} -a
{{ end -}}
echo "[-] Updating Webman packages [-]"
{{ range .packages.webman.pkgs -}}
~/.webman/bin/webman upgrade {{ . | quote }}
echo "[-] Updating Mise tools [-]"
{{ range .packages.mise -}}
~/.local/bin/mise use --global {{ . | quote }}
{{ end -}}