Compare commits
21 Commits
v0.1.0
...
4bcd55c0b1
| Author | SHA1 | Date | |
|---|---|---|---|
| 4bcd55c0b1 | |||
| 39976567ed | |||
| f81012d8b8 | |||
| 0a3aac427b | |||
| 749b57966d | |||
|
|
9ff02b60e7 | ||
|
|
a9b7c5aa4d | ||
| 099c3f209e | |||
| 5c7a7dcbb9 | |||
| 49569cc127 | |||
| 12663ac772 | |||
| 21d9b694ff | |||
| e5c3667a18 | |||
| a8e283cbec | |||
| f1892c5fb8 | |||
| e2120c3da1 | |||
| 717e88ea06 | |||
| 76c8250276 | |||
| edcd150662 | |||
| 5dad2e9bec | |||
| bfb3b5ee9b |
@@ -4,23 +4,50 @@ packages:
|
||||
- git
|
||||
- curl
|
||||
- fish
|
||||
- direnv
|
||||
casks:
|
||||
- git-credential-manager
|
||||
- ghostty
|
||||
- orbstack
|
||||
- raycast
|
||||
linux:
|
||||
dnfs:
|
||||
- git-all
|
||||
- curl
|
||||
- bash
|
||||
- fish
|
||||
- direnv
|
||||
apts:
|
||||
- git
|
||||
- curl
|
||||
- bash
|
||||
- fish
|
||||
- direnv
|
||||
apks:
|
||||
- git
|
||||
- curl
|
||||
- bash
|
||||
- fish
|
||||
webman:
|
||||
pkgs:
|
||||
- bat
|
||||
- direnv
|
||||
mise:
|
||||
- jj
|
||||
- lsd
|
||||
- fzf
|
||||
- zellij
|
||||
- nvim
|
||||
groups:
|
||||
- modern-unix
|
||||
- neovim
|
||||
- delta
|
||||
- bat
|
||||
- fd
|
||||
- rg
|
||||
- hyperfine
|
||||
- yazi
|
||||
- jq
|
||||
- btop
|
||||
- bottom
|
||||
- uv
|
||||
- dust
|
||||
- glow
|
||||
- lazygit
|
||||
- lazydocker
|
||||
- zoxide
|
||||
|
||||
|
||||
@@ -8,3 +8,8 @@
|
||||
url = "https://github.com/junegunn/fzf/archive/master.tar.gz"
|
||||
exact = true
|
||||
stripComponents = 1
|
||||
[".config/gdb/gef"]
|
||||
type = "archive"
|
||||
url = "https://github.com/hugsy/gef/archive/master.tar.gz"
|
||||
exact = true
|
||||
stripComponents = 1
|
||||
@@ -5,4 +5,5 @@ README.md
|
||||
Dockerfile
|
||||
*.local
|
||||
*.local.*
|
||||
*/lazy-lock.json
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
15
README.md
15
README.md
@@ -1,18 +1,21 @@
|
||||
# dotfiles
|
||||
My config for dotfiles.
|
||||
Run `docker build -t test-devenv . && docker run -it test-devenv` to test them out!
|
||||
Clone and run `docker build -t test-devenv . && docker run -it test-devenv` to test them out!
|
||||
|
||||
These dotfiles are managed using [chezmoi](https://www.chezmoi.io/).
|
||||
|
||||
## Setup
|
||||
|
||||
**Prereqs**: `git`, `curl`, and on MacOS: `brew`
|
||||
**Prereqs**: `git`, `curl`
|
||||
|
||||
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
|
||||
|
||||
24
dot_config/jj/config.toml.tmpl
Normal file
24
dot_config/jj/config.toml.tmpl
Normal file
@@ -0,0 +1,24 @@
|
||||
[user]
|
||||
name = {{ .name | quote }}
|
||||
email = {{ .email | quote }}
|
||||
|
||||
[ui]
|
||||
editor = "nvim"
|
||||
merge-editor = "vscode"
|
||||
pager = "delta"
|
||||
diff-formatter=":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())'
|
||||
34
dot_config/nvim/README.md
Normal file
34
dot_config/nvim/README.md
Normal file
@@ -0,0 +1,34 @@
|
||||
# AstroNvim Template
|
||||
|
||||
**NOTE:** This is for AstroNvim v4+
|
||||
|
||||
A template for getting started with [AstroNvim](https://github.com/AstroNvim/AstroNvim)
|
||||
|
||||
## 🛠️ Installation
|
||||
|
||||
#### Make a backup of your current nvim and shared folder
|
||||
|
||||
```shell
|
||||
mv ~/.config/nvim ~/.config/nvim.bak
|
||||
mv ~/.local/share/nvim ~/.local/share/nvim.bak
|
||||
mv ~/.local/state/nvim ~/.local/state/nvim.bak
|
||||
mv ~/.cache/nvim ~/.cache/nvim.bak
|
||||
```
|
||||
|
||||
#### Create a new user repository from this template
|
||||
|
||||
Press the "Use this template" button above to create a new repository to store your user configuration.
|
||||
|
||||
You can also just clone this repository directly if you do not want to track your user configuration in GitHub.
|
||||
|
||||
#### Clone the repository
|
||||
|
||||
```shell
|
||||
git clone https://github.com/<your_user>/<your_repository> ~/.config/nvim
|
||||
```
|
||||
|
||||
#### Start Neovim
|
||||
|
||||
```shell
|
||||
nvim
|
||||
```
|
||||
20
dot_config/nvim/dot_neoconf.json
Normal file
20
dot_config/nvim/dot_neoconf.json
Normal file
@@ -0,0 +1,20 @@
|
||||
{
|
||||
"neodev": {
|
||||
"library": {
|
||||
"enabled": true,
|
||||
"plugins": true
|
||||
}
|
||||
},
|
||||
"neoconf": {
|
||||
"plugins": {
|
||||
"lua_ls": {
|
||||
"enabled": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"lspconfig": {
|
||||
"lua_ls": {
|
||||
"Lua.format.enable": false
|
||||
}
|
||||
}
|
||||
}
|
||||
7
dot_config/nvim/dot_stylua.toml
Normal file
7
dot_config/nvim/dot_stylua.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
column_width = 120
|
||||
line_endings = "Unix"
|
||||
indent_type = "Spaces"
|
||||
indent_width = 2
|
||||
quote_style = "AutoPreferDouble"
|
||||
call_parentheses = "None"
|
||||
collapse_simple_statement = "Always"
|
||||
19
dot_config/nvim/init.lua
Normal file
19
dot_config/nvim/init.lua
Normal file
@@ -0,0 +1,19 @@
|
||||
-- This file simply bootstraps the installation of Lazy.nvim and then calls other files for execution
|
||||
-- This file doesn't necessarily need to be touched, BE CAUTIOUS editing this file and proceed at your own risk.
|
||||
local lazypath = vim.env.LAZY or vim.fn.stdpath "data" .. "/lazy/lazy.nvim"
|
||||
if not (vim.env.LAZY or (vim.uv or vim.loop).fs_stat(lazypath)) then
|
||||
-- stylua: ignore
|
||||
vim.fn.system({ "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lazypath })
|
||||
end
|
||||
vim.opt.rtp:prepend(lazypath)
|
||||
|
||||
-- validate that lazy is available
|
||||
if not pcall(require, "lazy") then
|
||||
-- stylua: ignore
|
||||
vim.api.nvim_echo({ { ("Unable to load lazy from: %s\n"):format(lazypath), "ErrorMsg" }, { "Press any key to exit...", "MoreMsg" } }, true, {})
|
||||
vim.fn.getchar()
|
||||
vim.cmd.quit()
|
||||
end
|
||||
|
||||
require "lazy_setup"
|
||||
require "polish"
|
||||
80
dot_config/nvim/lua/community.lua
Normal file
80
dot_config/nvim/lua/community.lua
Normal file
@@ -0,0 +1,80 @@
|
||||
-- AstroCommunity: import any community modules here
|
||||
-- We import this file in `lazy_setup.lua` before the `plugins/` folder.
|
||||
-- This guarantees that the specs are processed before any user plugins.
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocommunity",
|
||||
{ import = "astrocommunity.pack.lua" },
|
||||
-- import/override with your plugins folder
|
||||
|
||||
{ import = "astrocommunity.colorscheme.catppuccin" },
|
||||
{ import = "astrocommunity.diagnostics.trouble-nvim" },
|
||||
{ import = "astrocommunity.editing-support.todo-comments-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.recipes.vscode" },
|
||||
{ import = "astrocommunity.scrolling.mini-animate" },
|
||||
{ import = "astrocommunity.search.grug-far-nvim" },
|
||||
{ import = "astrocommunity.test.neotest" },
|
||||
-- { import = "astrocommunity.utility.noice-nvim" },
|
||||
{ import = "astrocommunity.motion.nvim-surround" },
|
||||
{
|
||||
"kylechui/nvim-surround",
|
||||
opts = {
|
||||
keymaps = {
|
||||
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",
|
||||
},
|
||||
aliases = {
|
||||
["i"] = "]", -- Index
|
||||
["r"] = ")", -- Round
|
||||
["b"] = "}", -- Brackets
|
||||
},
|
||||
},
|
||||
},
|
||||
{ import = "astrocommunity.completion.copilot-lua" },
|
||||
{ -- further customize the options set by the community
|
||||
"zbirenbaum/copilot.lua",
|
||||
opts = {
|
||||
suggestion = {
|
||||
keymap = {
|
||||
accept = "<C-l>",
|
||||
accept_word = false,
|
||||
accept_line = false,
|
||||
next = "<C-.>",
|
||||
prev = "<C-,>",
|
||||
dismiss = "<C/>",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
-- {
|
||||
-- "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 },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
-- },
|
||||
}
|
||||
32
dot_config/nvim/lua/lazy_setup.lua
Normal file
32
dot_config/nvim/lua/lazy_setup.lua
Normal file
@@ -0,0 +1,32 @@
|
||||
require("lazy").setup({
|
||||
{
|
||||
"AstroNvim/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" },
|
||||
{ import = "plugins" },
|
||||
} --[[@as LazySpec]], {
|
||||
-- Configure any other `lazy.nvim` configuration options here
|
||||
install = { colorscheme = { "astrodark", "habamax" } },
|
||||
ui = { backdrop = 100 },
|
||||
performance = {
|
||||
rtp = {
|
||||
-- disable some rtp plugins, add more to your liking
|
||||
disabled_plugins = {
|
||||
"gzip",
|
||||
"netrwPlugin",
|
||||
"tarPlugin",
|
||||
"tohtml",
|
||||
"zipPlugin",
|
||||
},
|
||||
},
|
||||
},
|
||||
} --[[@as LazyConfig]])
|
||||
72
dot_config/nvim/lua/plugins/astrocore.lua
Normal file
72
dot_config/nvim/lua/plugins/astrocore.lua
Normal file
@@ -0,0 +1,72 @@
|
||||
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`)
|
||||
-- as this provides autocomplete and documentation while editing
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrocore",
|
||||
---@type AstroCoreOpts
|
||||
opts = {
|
||||
-- Configure core features of AstroNvim
|
||||
features = {
|
||||
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 = {
|
||||
virtual_text = true,
|
||||
underline = true,
|
||||
},
|
||||
-- vim options can be configured here
|
||||
options = {
|
||||
opt = { -- vim.opt.<key>
|
||||
relativenumber = true, -- sets vim.opt.relativenumber
|
||||
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>
|
||||
-- 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
|
||||
},
|
||||
},
|
||||
-- Mappings can be configured through AstroCore as well.
|
||||
-- NOTE: keycodes follow the casing in the vimdocs. For example, `<Leader>` must be capitalized
|
||||
mappings = {
|
||||
-- first key is the mode
|
||||
n = {
|
||||
-- second key is the lefthand side of the map
|
||||
|
||||
-- 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" },
|
||||
|
||||
-- mappings seen under group name "Buffer"
|
||||
["<Leader>bd"] = {
|
||||
function()
|
||||
require("astroui.status.heirline").buffer_picker(
|
||||
function(bufnr) require("astrocore.buffer").close(bufnr) end
|
||||
)
|
||||
end,
|
||||
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" },
|
||||
|
||||
-- setting a mapping to false will disable it
|
||||
-- ["<C-S>"] = false,
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
105
dot_config/nvim/lua/plugins/astrolsp.lua
Normal file
105
dot_config/nvim/lua/plugins/astrolsp.lua
Normal file
@@ -0,0 +1,105 @@
|
||||
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`)
|
||||
-- as this provides autocomplete and documentation while editing
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astrolsp",
|
||||
---@type AstroLSPOpts
|
||||
opts = {
|
||||
-- Configuration table of features provided by AstroLSP
|
||||
features = {
|
||||
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
|
||||
allow_filetypes = { -- enable format on save for specified filetypes only
|
||||
-- "go",
|
||||
},
|
||||
ignore_filetypes = { -- disable format on save for specified filetypes
|
||||
-- "python",
|
||||
},
|
||||
},
|
||||
disabled = { -- disable formatting capabilities for the listed language servers
|
||||
-- disable lua_ls formatting capability if you want to use StyLua to format your lua code
|
||||
-- "lua_ls",
|
||||
},
|
||||
timeout_ms = 1000, -- default format timeout
|
||||
-- filter = function(client) -- fully override the default formatting function
|
||||
-- return true
|
||||
-- end
|
||||
},
|
||||
-- enable servers that you already have installed without mason
|
||||
servers = {
|
||||
-- "pyright"
|
||||
},
|
||||
-- customize language server configuration options passed to `lspconfig`
|
||||
---@diagnostic disable: missing-fields
|
||||
config = {
|
||||
-- clangd = { capabilities = { offsetEncoding = "utf-8" } },
|
||||
},
|
||||
-- customize how language servers are attached
|
||||
handlers = {
|
||||
-- a function without a key is simply the default handler, functions take two parameters, the server name and the configured options table for that server
|
||||
-- function(server, opts) require("lspconfig")[server].setup(opts) end
|
||||
|
||||
-- the key is the server that is being setup with `lspconfig`
|
||||
-- rust_analyzer = false, -- setting a handler to false will disable the set up of that language server
|
||||
-- pyright = function(_, opts) require("lspconfig").pyright.setup(opts) end -- or a custom handler function can be passed
|
||||
},
|
||||
-- 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_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/codeLens",
|
||||
-- cond = function(client, bufnr) return client.name == "lua_ls" end,
|
||||
-- list of auto commands to set
|
||||
{
|
||||
-- events to trigger
|
||||
event = { "InsertLeave", "BufEnter" },
|
||||
-- the rest of the autocmd options (:h nvim_create_autocmd)
|
||||
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 = {
|
||||
-- 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.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
|
||||
-- takes two parameters `client` and `bufnr` (`:h lspconfig-setup`)
|
||||
on_attach = function(client, bufnr)
|
||||
-- this would disable semanticTokensProvider for all clients
|
||||
-- client.server_capabilities.semanticTokensProvider = nil
|
||||
end,
|
||||
},
|
||||
}
|
||||
39
dot_config/nvim/lua/plugins/astroui.lua
Normal file
39
dot_config/nvim/lua/plugins/astroui.lua
Normal file
@@ -0,0 +1,39 @@
|
||||
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`)
|
||||
-- as this provides autocomplete and documentation while editing
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
"AstroNvim/astroui",
|
||||
---@type AstroUIOpts
|
||||
opts = {
|
||||
-- change colorscheme
|
||||
colorscheme = "astrodark",
|
||||
-- AstroUI allows you to easily modify highlight groups easily for any and all colorschemes
|
||||
highlights = {
|
||||
init = { -- this table overrides highlights in all themes
|
||||
-- Normal = { bg = "#000000" },
|
||||
},
|
||||
astrodark = { -- a table of overrides/changes when applying the astrotheme theme
|
||||
-- Normal = { bg = "#000000" },
|
||||
},
|
||||
},
|
||||
-- Icons can be configured throughout the interface
|
||||
icons = {
|
||||
-- configure the loading of the lsp in the status line
|
||||
LSPLoading1 = "⠋",
|
||||
LSPLoading2 = "⠙",
|
||||
LSPLoading3 = "⠹",
|
||||
LSPLoading4 = "⠸",
|
||||
LSPLoading5 = "⠼",
|
||||
LSPLoading6 = "⠴",
|
||||
LSPLoading7 = "⠦",
|
||||
LSPLoading8 = "⠧",
|
||||
LSPLoading9 = "⠇",
|
||||
LSPLoading10 = "⠏",
|
||||
},
|
||||
},
|
||||
}
|
||||
28
dot_config/nvim/lua/plugins/mason.lua
Normal file
28
dot_config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,28 @@
|
||||
if true then return {} end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||
|
||||
-- Customize Mason
|
||||
|
||||
---@type LazySpec
|
||||
return {
|
||||
-- use mason-tool-installer for automatically installing Mason packages
|
||||
{
|
||||
"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",
|
||||
|
||||
-- install debuggers
|
||||
"debugpy",
|
||||
|
||||
-- install any other package
|
||||
"tree-sitter-cli",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
24
dot_config/nvim/lua/plugins/none-ls.lua
Normal file
24
dot_config/nvim/lua/plugins/none-ls.lua
Normal file
@@ -0,0 +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(_, 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
|
||||
|
||||
-- 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,
|
||||
})
|
||||
end,
|
||||
}
|
||||
15
dot_config/nvim/lua/plugins/treesitter.lua
Normal file
15
dot_config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +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 = {
|
||||
ensure_installed = {
|
||||
"lua",
|
||||
"vim",
|
||||
-- add more arguments for adding more treesitter parsers
|
||||
},
|
||||
},
|
||||
}
|
||||
88
dot_config/nvim/lua/plugins/user.lua
Normal file
88
dot_config/nvim/lua/plugins/user.lua
Normal file
@@ -0,0 +1,88 @@
|
||||
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
|
||||
return {
|
||||
|
||||
-- == Examples of Adding Plugins ==
|
||||
|
||||
"andweeb/presence.nvim",
|
||||
{
|
||||
"ray-x/lsp_signature.nvim",
|
||||
event = "BufRead",
|
||||
config = function() require("lsp_signature").setup() end,
|
||||
},
|
||||
|
||||
-- == Examples of Overriding Plugins ==
|
||||
|
||||
-- customize dashboard options
|
||||
{
|
||||
"folke/snacks.nvim",
|
||||
opts = {
|
||||
dashboard = {
|
||||
preset = {
|
||||
header = table.concat({
|
||||
" █████ ███████ ████████ ██████ ██████ ",
|
||||
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||
"███████ ███████ ██ ██████ ██ ██",
|
||||
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||
"██ ██ ███████ ██ ██ ██ ██████ ",
|
||||
"",
|
||||
"███ ██ ██ ██ ██ ███ ███",
|
||||
"████ ██ ██ ██ ██ ████ ████",
|
||||
"██ ██ ██ ██ ██ ██ ██ ████ ██",
|
||||
"██ ██ ██ ██ ██ ██ ██ ██ ██",
|
||||
"██ ████ ████ ██ ██ ██",
|
||||
}, "\n"),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- You can disable default plugins as follows:
|
||||
{ "max397574/better-escape.nvim", enabled = false },
|
||||
|
||||
-- You can also easily customize additional setup of plugins that is outside of the plugin's setup call
|
||||
{
|
||||
"L3MON4D3/LuaSnip",
|
||||
config = function(plugin, opts)
|
||||
require "astronvim.plugins.configs.luasnip"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||
-- add more custom luasnip configuration such as filetype extend or custom snippets
|
||||
local luasnip = require "luasnip"
|
||||
luasnip.filetype_extend("javascript", { "javascriptreact" })
|
||||
end,
|
||||
},
|
||||
|
||||
{
|
||||
"windwp/nvim-autopairs",
|
||||
config = function(plugin, opts)
|
||||
require "astronvim.plugins.configs.nvim-autopairs"(plugin, opts) -- include the default astronvim config that calls the setup call
|
||||
-- add more custom autopairs configuration such as custom rules
|
||||
local npairs = require "nvim-autopairs"
|
||||
local Rule = require "nvim-autopairs.rule"
|
||||
local cond = require "nvim-autopairs.conds"
|
||||
npairs.add_rules(
|
||||
{
|
||||
Rule("$", "$", { "tex", "latex" })
|
||||
-- don't add a pair if the next character is %
|
||||
:with_pair(cond.not_after_regex "%%")
|
||||
-- don't add a pair if the previous character is xxx
|
||||
:with_pair(
|
||||
cond.not_before_regex("xxx", 3)
|
||||
)
|
||||
-- don't move right when repeat character
|
||||
:with_move(cond.none())
|
||||
-- don't delete if the next character is xx
|
||||
:with_del(cond.not_after_regex "xx")
|
||||
-- disable adding a newline when you press <cr>
|
||||
:with_cr(cond.none()),
|
||||
},
|
||||
-- disable for .vim files, but it work for another filetypes
|
||||
Rule("a", "a", "-vim")
|
||||
)
|
||||
end,
|
||||
},
|
||||
}
|
||||
18
dot_config/nvim/lua/polish.lua
Normal file
18
dot_config/nvim/lua/polish.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
if true then return end -- WARN: REMOVE THIS LINE TO ACTIVATE THIS FILE
|
||||
|
||||
-- This will run last in the setup process and is a good place to configure
|
||||
-- things like custom filetypes. This just pure lua so anything that doesn't
|
||||
-- fit in the normal config locations above can go here
|
||||
|
||||
-- Set up custom filetypes
|
||||
vim.filetype.add {
|
||||
extension = {
|
||||
foo = "fooscript",
|
||||
},
|
||||
filename = {
|
||||
["Foofile"] = "fooscript",
|
||||
},
|
||||
pattern = {
|
||||
["~/%.config/foo/.*"] = "fooscript",
|
||||
},
|
||||
}
|
||||
6
dot_config/nvim/neovim.yml
Normal file
6
dot_config/nvim/neovim.yml
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
base: lua51
|
||||
|
||||
globals:
|
||||
vim:
|
||||
any: true
|
||||
8
dot_config/nvim/selene.toml
Normal file
8
dot_config/nvim/selene.toml
Normal file
@@ -0,0 +1,8 @@
|
||||
std = "neovim"
|
||||
|
||||
[rules]
|
||||
global_usage = "allow"
|
||||
if_same_then_else = "allow"
|
||||
incorrect_standard_library_use = "allow"
|
||||
mixed_table = "allow"
|
||||
multiple_statements = "allow"
|
||||
@@ -6,6 +6,16 @@ if status is-interactive
|
||||
if type -q atuin
|
||||
atuin init fish | source
|
||||
end
|
||||
if type -q direnv
|
||||
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
|
||||
@@ -15,9 +25,4 @@ if status is-interactive
|
||||
end
|
||||
end
|
||||
|
||||
alias ls="lsd"
|
||||
|
||||
fish_add_path $HOME/.webman/bin
|
||||
|
||||
set -gx EDITOR nvim
|
||||
|
||||
|
||||
@@ -1,18 +1,25 @@
|
||||
# if fisher is not installed, install it
|
||||
if not functions -q fisher
|
||||
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
|
||||
end
|
||||
if functions -q fisher
|
||||
if not functions -q fisher
|
||||
echo "fisher failed to install"
|
||||
else
|
||||
fisher install IlanCosman/tide@v6
|
||||
fisher install PatrickF1/fzf.fish
|
||||
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
|
||||
bash (curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh | psub)
|
||||
end
|
||||
if type -q atuin
|
||||
if not type -q atuin
|
||||
echo "atuin failed to install"
|
||||
else
|
||||
atuin import auto
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
18
dot_config/private_fish/functions/_insert_jj_after_git.fish
Normal file
18
dot_config/private_fish/functions/_insert_jj_after_git.fish
Normal file
@@ -0,0 +1,18 @@
|
||||
function _insert_jj_after_git
|
||||
# Get current items
|
||||
set -l current_items $tide_left_prompt_items
|
||||
|
||||
# Check if jj already exists
|
||||
if not contains jj $current_items
|
||||
# Find git's position
|
||||
set -l git_pos (contains -i git $current_items)
|
||||
|
||||
if test $git_pos -gt 0
|
||||
# Create new list: items before git + git + jj + items after git
|
||||
set -l new_items $current_items[1..$git_pos] jj $current_items[(math $git_pos + 1)..-1]
|
||||
|
||||
# Update the universal variable
|
||||
set -U tide_left_prompt_items $new_items
|
||||
end
|
||||
end
|
||||
end
|
||||
33
dot_config/private_fish/functions/_tide_item_jj.fish
Normal file
33
dot_config/private_fish/functions/_tide_item_jj.fish
Normal file
@@ -0,0 +1,33 @@
|
||||
function _tide_item_jj
|
||||
if not command -sq jj; or not jj root --quiet &>/dev/null
|
||||
return 1
|
||||
end
|
||||
|
||||
set jj_status (jj log -r@ -n1 --ignore-working-copy --no-graph --color always -T '
|
||||
separate(" ",
|
||||
bookmarks.map(|x| if(
|
||||
x.name().substr(0, 10).starts_with(x.name()),
|
||||
x.name().substr(0, 10),
|
||||
x.name().substr(0, 9) ++ "…")
|
||||
).join(" "),
|
||||
tags.map(|x| if(
|
||||
x.name().substr(0, 10).starts_with(x.name()),
|
||||
x.name().substr(0, 10),
|
||||
x.name().substr(0, 9) ++ "…")
|
||||
).join(" "),
|
||||
surround("\"","\"",
|
||||
if(
|
||||
description.first_line().substr(0, 24).starts_with(description.first_line()),
|
||||
description.first_line().substr(0, 24),
|
||||
description.first_line().substr(0, 23) ++ "…"
|
||||
)
|
||||
),
|
||||
change_id.shortest(),
|
||||
commit_id.shortest(),
|
||||
if(conflict, "conflict"),
|
||||
if(divergent, "divergent"),
|
||||
if(hidden, "hidden"),
|
||||
)' | string trim)
|
||||
set jj_info $jj_status
|
||||
_tide_print_item jj $tide_jj_icon' ' "($(string join ', ' $jj_info))"
|
||||
end
|
||||
3
dot_config/private_fish/functions/jjbm.fish
Normal file
3
dot_config/private_fish/functions/jjbm.fish
Normal 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
152
dot_config/zed/keymap.json
Normal 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"
|
||||
}
|
||||
}
|
||||
]
|
||||
77
dot_config/zed/private_settings.json
Normal file
77
dot_config/zed/private_settings.json
Normal 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"
|
||||
]
|
||||
}
|
||||
0
dot_config/zed/themes/.keep
Normal file
0
dot_config/zed/themes/.keep
Normal file
2298
dot_gdbinit
2298
dot_gdbinit
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
||||
[credential "https://github.com"]
|
||||
helper =
|
||||
helper = !~/.webman/bin/gh auth git-credential
|
||||
helper = !gh auth git-credential
|
||||
[credential "https://gist.github.com"]
|
||||
helper =
|
||||
helper = !~/.webman/bin/gh auth git-credential
|
||||
helper = !gh auth git-credential
|
||||
|
||||
[user]
|
||||
email = {{ .email | quote }}
|
||||
@@ -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
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "[-] Running installation script [-]"
|
||||
|
||||
{{- if eq .chezmoi.os "linux" }}
|
||||
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
||||
|
||||
echo "Alpine Linux detected"
|
||||
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
||||
|
||||
echo "Debian-based Linux detected"
|
||||
echo "\n[-] Adding fish package repository [-]"
|
||||
sudo apt-add-repository ppa:fish-shell/release-3
|
||||
sudo apt install -y fish
|
||||
|
||||
{{- else }}
|
||||
echo "Linux OS release not recognized"
|
||||
exit 1
|
||||
{{- end }}
|
||||
|
||||
echo "\n[-] Downloading Nerd Fonts [-]"
|
||||
if test -f ~/.fonts/GeistMonoNerdFontMono-Regular.otf; then
|
||||
echo "GeistMono already installed"
|
||||
else
|
||||
curl -L -O https://github.com/ryanoasis/nerd-fonts/releases/latest/download/GeistMono.zip && \
|
||||
unzip GeistMono.zip -d ~/.fonts && \
|
||||
rm GeistMono.zip && \
|
||||
fc-cache -fv || \
|
||||
echo "Failed to download GeistMono.zip"
|
||||
fi
|
||||
|
||||
echo "\n[-] Setting default shell to fish [-]"
|
||||
chsh -s $(which fish) || echo "chsh failed"
|
||||
|
||||
{{- else if eq .osid "darwin" }}
|
||||
|
||||
echo "macOS detected"
|
||||
echo "\n[-] Setting default shell to fish [-]"
|
||||
chsh -s $(which fish) || echo "chsh failed"
|
||||
|
||||
{{- end }}
|
||||
|
||||
echo "\n[-] Installing webman [-]"
|
||||
if test -x ~/.webman/bin/webman; then
|
||||
echo "webman already installed"
|
||||
else
|
||||
curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh
|
||||
fi
|
||||
|
||||
echo "\n[-] Installing nvim [-]"
|
||||
if test -x ~/.webman/bin/nvim; then
|
||||
echo "nvim already installed"
|
||||
else
|
||||
~/.webman/bin/webman add nvim
|
||||
fi
|
||||
|
||||
echo "\n[-] Running fish install setup [-]"
|
||||
/usr/bin/env fish ~/.config/fish/.on_install.fish
|
||||
|
||||
echo "\n[-] Installing AstroNvim [-]"
|
||||
if test -f ~/.config/nvim/config.ld ; then
|
||||
echo "Already installed AstroNvim"
|
||||
else
|
||||
if test -d ~/.config/nvim/ ; then
|
||||
echo "Moving current nvim config to nvim.bak"
|
||||
mv ~/.config/nvim ~/.config/nvim.bak || echo ""
|
||||
fi
|
||||
git clone --depth 1 https://github.com/AstroNvim/AstroNvim ~/.config/nvim
|
||||
git clone https://github.com/candrewlee14/astronvim_config ~/.config/nvim/lua/user
|
||||
|
||||
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
|
||||
61
run_once_after_install2.sh.tmpl
Normal file
61
run_once_after_install2.sh.tmpl
Normal file
@@ -0,0 +1,61 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "[-] Running post-installation script [-]"
|
||||
|
||||
|
||||
{{- if eq .chezmoi.os "linux" }}
|
||||
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
||||
|
||||
echo "Alpine Linux detected"
|
||||
{{- 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") }}
|
||||
|
||||
echo "Debian-based Linux detected"
|
||||
|
||||
{{- else }}
|
||||
echo "Linux OS release not recognized"
|
||||
exit 1
|
||||
{{- end }}
|
||||
|
||||
if test -f ~/.fonts/GeistMonoNerdFontMono-Regular.otf; then
|
||||
echo "GeistMono Nerd Font already installed"
|
||||
else
|
||||
echo "\n[-] Downloading Nerd Fonts [-]"
|
||||
curl -L -O https://github.com/ryanoasis/nerd-fonts/releases/latest/download/GeistMono.zip && \
|
||||
unzip GeistMono.zip -d ~/.fonts && \
|
||||
rm GeistMono.zip && \
|
||||
fc-cache -fv || \
|
||||
echo "Failed to download GeistMono.zip"
|
||||
fi
|
||||
|
||||
{{- else if eq .osid "darwin" }}
|
||||
|
||||
echo "macOS detected"
|
||||
|
||||
if test -f ~/Library/Fonts/GeistMonoNerdFontMono-Regular.otf; then
|
||||
echo "GeistMono Nerd Font already installed"
|
||||
else
|
||||
echo "\n[-] Downloading Nerd Fonts [-]"
|
||||
curl -L -O https://github.com/ryanoasis/nerd-fonts/releases/latest/download/GeistMono.zip && \
|
||||
unzip GeistMono.zip -d ~/Library/Fonts && \
|
||||
rm GeistMono.zip && \
|
||||
echo "GeistMono installed" || \
|
||||
echo "Failed to download GeistMono.zip"
|
||||
fi
|
||||
|
||||
sudo sh -c "echo $(which fish) >> /etc/shells"
|
||||
|
||||
{{- end }}
|
||||
|
||||
# check if $SHELL is fish already
|
||||
|
||||
if echo $SHELL | grep "fish" ; then
|
||||
echo "Fish shell already set up"
|
||||
else
|
||||
echo "\n[-] Setting default shell to fish [-]"
|
||||
chsh -s $(which fish) || echo "chsh failed"
|
||||
fi
|
||||
|
||||
echo "\n[-] Running fish install setup [-]"
|
||||
/usr/bin/env fish ~/.config/fish/.on_install.fish
|
||||
50
run_once_before_install.sh.tmpl
Normal file
50
run_once_before_install.sh.tmpl
Normal file
@@ -0,0 +1,50 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
echo "[-] Running pre-installation script [-]"
|
||||
|
||||
{{- if eq .chezmoi.os "linux" }}
|
||||
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
||||
|
||||
echo "Alpine Linux detected"
|
||||
{{- 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") }}
|
||||
|
||||
echo "Debian-based Linux detected"
|
||||
echo "\n[-] Adding fish package repository [-]"
|
||||
|
||||
# if fish already installed then skip adding repository
|
||||
if test -x /usr/bin/fish; then
|
||||
echo "Fish already installed"
|
||||
else
|
||||
sudo apt-add-repository ppa:fish-shell/release-3
|
||||
sudo apt update
|
||||
sudo apt install -y fish
|
||||
fi
|
||||
|
||||
{{- else }}
|
||||
echo "Linux OS release not recognized"
|
||||
exit 1
|
||||
{{- end }}
|
||||
|
||||
{{- else if eq .osid "darwin" }}
|
||||
|
||||
echo "macOS detected"
|
||||
|
||||
if test -x /usr/local/bin/brew; then
|
||||
echo "Homebrew already installed"
|
||||
elif test -x /opt/homebrew/bin/brew; then
|
||||
echo "Homebrew already installed"
|
||||
else
|
||||
echo "\n[-] Installing Homebrew [-]"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
||||
fi
|
||||
|
||||
{{- end }}
|
||||
|
||||
echo "\n[-] Installing mise [-]"
|
||||
if test -x ~/.local/bin/mise; then
|
||||
echo "mise already installed"
|
||||
else
|
||||
curl https://mise.run | sh
|
||||
fi
|
||||
@@ -11,6 +11,10 @@ apk update
|
||||
{{ range .packages.linux.apks -}}
|
||||
apk add {{ . | quote }}
|
||||
{{ end -}}
|
||||
{{- else if (or (eq .chezmoi.osRelease.id "fedora") (eq .chezmoi.osRelease.idLike "fedora")) }}
|
||||
{{ range .packages.linux.dnfs -}}
|
||||
sudo dnf install -y {{ . | quote }}
|
||||
{{ end -}}
|
||||
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
||||
echo "[-] Updating Apt packages [-]"
|
||||
sudo apt update
|
||||
@@ -22,26 +26,16 @@ sudo apt install -y {{ . | quote }}
|
||||
{{- else if eq .osid "darwin" }}
|
||||
echo "[-] Updating brews [-]"
|
||||
{{ range .packages.darwin.brews -}}
|
||||
brew install {{ . | quote }}
|
||||
/opt/homebrew/bin/brew install {{ . | quote }}
|
||||
{{ end -}}
|
||||
|
||||
echo "[-] Updating casks [-]"
|
||||
{{ range .packages.darwin.casks -}}
|
||||
/opt/homebrew/bin/brew install --cask {{ . | quote }}
|
||||
{{ 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 -}}
|
||||
Reference in New Issue
Block a user