Compare commits
14 Commits
v0.1.0
...
099c3f209e
| Author | SHA1 | Date | |
|---|---|---|---|
| 099c3f209e | |||
| 5c7a7dcbb9 | |||
| 49569cc127 | |||
| 12663ac772 | |||
| 21d9b694ff | |||
| e5c3667a18 | |||
| a8e283cbec | |||
| f1892c5fb8 | |||
| e2120c3da1 | |||
| 717e88ea06 | |||
| 76c8250276 | |||
| edcd150662 | |||
| 5dad2e9bec | |||
| bfb3b5ee9b |
@@ -4,17 +4,28 @@ packages:
|
|||||||
- git
|
- git
|
||||||
- curl
|
- curl
|
||||||
- fish
|
- fish
|
||||||
|
- direnv
|
||||||
|
casks:
|
||||||
|
- git-credential-manager
|
||||||
linux:
|
linux:
|
||||||
|
dnfs:
|
||||||
|
- git-all
|
||||||
|
- curl
|
||||||
|
- bash
|
||||||
|
- fish
|
||||||
|
- direnv
|
||||||
apts:
|
apts:
|
||||||
- git
|
- git
|
||||||
- curl
|
- curl
|
||||||
- bash
|
- bash
|
||||||
- fish
|
- fish
|
||||||
|
- direnv
|
||||||
apks:
|
apks:
|
||||||
- git
|
- git
|
||||||
- curl
|
- curl
|
||||||
- bash
|
- bash
|
||||||
- fish
|
- fish
|
||||||
|
- direnv
|
||||||
webman:
|
webman:
|
||||||
pkgs:
|
pkgs:
|
||||||
- bat
|
- bat
|
||||||
@@ -22,5 +33,6 @@ packages:
|
|||||||
- fzf
|
- fzf
|
||||||
- zellij
|
- zellij
|
||||||
- nvim
|
- nvim
|
||||||
|
- jj
|
||||||
groups:
|
groups:
|
||||||
- modern-unix
|
- modern-unix
|
||||||
|
|||||||
@@ -8,3 +8,8 @@
|
|||||||
url = "https://github.com/junegunn/fzf/archive/master.tar.gz"
|
url = "https://github.com/junegunn/fzf/archive/master.tar.gz"
|
||||||
exact = true
|
exact = true
|
||||||
stripComponents = 1
|
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
|
Dockerfile
|
||||||
*.local
|
*.local
|
||||||
*.local.*
|
*.local.*
|
||||||
|
*/lazy-lock.json
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
# dotfiles
|
# dotfiles
|
||||||
My config for 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/).
|
These dotfiles are managed using [chezmoi](https://www.chezmoi.io/).
|
||||||
|
|
||||||
## Setup
|
## 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:
|
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.
|
- Change the `email` and `name` in `.chezmoi.toml.tmpl` to your own info.
|
||||||
|
|||||||
11
dot_config/jj/config.toml.tmpl
Normal file
11
dot_config/jj/config.toml.tmpl
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
[user]
|
||||||
|
name = {{ .name | quote }}
|
||||||
|
email = {{ .email | quote }}
|
||||||
|
|
||||||
|
[ui]
|
||||||
|
editor = "nvim"
|
||||||
|
merge-editor = "vscode"
|
||||||
|
pager = "delta"
|
||||||
|
|
||||||
|
[ui.diff]
|
||||||
|
format = "git"
|
||||||
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"
|
||||||
81
dot_config/nvim/lua/community.lua
Normal file
81
dot_config/nvim/lua/community.lua
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
-- 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.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.markdown-and-latex.glow-nvim" },
|
||||||
|
-- { import = "astrocommunity.motion.flash-nvim" },
|
||||||
|
{ import = "astrocommunity.scrolling.mini-animate" },
|
||||||
|
{ import = "astrocommunity.test.neotest" },
|
||||||
|
{ import = "astrocommunity.utility.noice-nvim" },
|
||||||
|
-- { import = "astrocommunity.workflow.hardtime-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 },
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
31
dot_config/nvim/lua/lazy_setup.lua
Normal file
31
dot_config/nvim/lua/lazy_setup.lua
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
require("lazy").setup({
|
||||||
|
{
|
||||||
|
"AstroNvim/AstroNvim",
|
||||||
|
version = "^4", -- 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
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{ 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]])
|
||||||
89
dot_config/nvim/lua/plugins/astrocore.lua
Normal file
89
dot_config/nvim/lua/plugins/astrocore.lua
Normal file
@@ -0,0 +1,89 @@
|
|||||||
|
-- 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 * 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
|
||||||
|
},
|
||||||
|
-- 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 = "auto", -- sets vim.opt.signcolumn to auto
|
||||||
|
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 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" },
|
||||||
|
|
||||||
|
["<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"] = {
|
||||||
|
function()
|
||||||
|
require("astroui.status.heirline").buffer_picker(
|
||||||
|
function(bufnr) require("astrocore.buffer").close(bufnr) end
|
||||||
|
)
|
||||||
|
end,
|
||||||
|
desc = "Pick to close",
|
||||||
|
},
|
||||||
|
-- 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 = {
|
||||||
|
-- setting a mapping to false will disable it
|
||||||
|
-- ["<esc>"] = false,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
118
dot_config/nvim/lua/plugins/astrolsp.lua
Normal file
118
dot_config/nvim/lua/plugins/astrolsp.lua
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
-- 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 = {
|
||||||
|
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
|
||||||
|
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"
|
||||||
|
"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 = {
|
||||||
|
-- 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_document_highlight = {
|
||||||
|
-- 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 = function(client, bufnr) return client.name == "lua_ls" end,
|
||||||
|
-- list of auto commands to set
|
||||||
|
{
|
||||||
|
-- events to trigger
|
||||||
|
event = { "CursorHold", "CursorHoldI" },
|
||||||
|
-- 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,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- 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,
|
||||||
|
-- },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-- 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,
|
||||||
|
},
|
||||||
|
}
|
||||||
37
dot_config/nvim/lua/plugins/astroui.lua
Normal file
37
dot_config/nvim/lua/plugins/astroui.lua
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
-- 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" },
|
||||||
|
},
|
||||||
|
astrotheme = { -- 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 = "⠏",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
41
dot_config/nvim/lua/plugins/mason.lua
Normal file
41
dot_config/nvim/lua/plugins/mason.lua
Normal file
@@ -0,0 +1,41 @@
|
|||||||
|
-- Customize Mason plugins
|
||||||
|
|
||||||
|
---@type LazySpec
|
||||||
|
return {
|
||||||
|
-- use mason-lspconfig to configure LSP installations
|
||||||
|
{
|
||||||
|
"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",
|
||||||
|
"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,
|
||||||
|
},
|
||||||
|
}
|
||||||
20
dot_config/nvim/lua/plugins/none-ls.lua
Normal file
20
dot_config/nvim/lua/plugins/none-ls.lua
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
-- 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
|
||||||
|
-- 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 = {
|
||||||
|
-- Set a formatter
|
||||||
|
-- null_ls.builtins.formatting.stylua,
|
||||||
|
-- null_ls.builtins.formatting.prettier,
|
||||||
|
}
|
||||||
|
return config -- return final config table
|
||||||
|
end,
|
||||||
|
}
|
||||||
14
dot_config/nvim/lua/plugins/treesitter.lua
Normal file
14
dot_config/nvim/lua/plugins/treesitter.lua
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
-- 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, {
|
||||||
|
"lua",
|
||||||
|
"vim",
|
||||||
|
-- add more arguments for adding more treesitter parsers
|
||||||
|
})
|
||||||
|
end,
|
||||||
|
}
|
||||||
85
dot_config/nvim/lua/plugins/user.lua
Normal file
85
dot_config/nvim/lua/plugins/user.lua
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
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
|
||||||
|
-- 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 alpha options
|
||||||
|
{
|
||||||
|
"goolord/alpha-nvim",
|
||||||
|
opts = function(_, opts)
|
||||||
|
-- customize the dashboard header
|
||||||
|
opts.section.header.val = {
|
||||||
|
" █████ ███████ ████████ ██████ ██████",
|
||||||
|
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||||
|
"███████ ███████ ██ ██████ ██ ██",
|
||||||
|
"██ ██ ██ ██ ██ ██ ██ ██",
|
||||||
|
"██ ██ ███████ ██ ██ ██ ██████",
|
||||||
|
" ",
|
||||||
|
" ███ ██ ██ ██ ██ ███ ███",
|
||||||
|
" ████ ██ ██ ██ ██ ████ ████",
|
||||||
|
" ██ ██ ██ ██ ██ ██ ██ ████ ██",
|
||||||
|
" ██ ██ ██ ██ ██ ██ ██ ██ ██",
|
||||||
|
" ██ ████ ████ ██ ██ ██",
|
||||||
|
}
|
||||||
|
return opts
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- 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"
|
||||||
@@ -1,11 +1,18 @@
|
|||||||
if status is-interactive
|
if status is-interactive
|
||||||
# Commands to run in interactive sessions can go here
|
# 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
|
if type -q zoxide
|
||||||
zoxide init fish | source
|
zoxide init fish | source
|
||||||
end
|
end
|
||||||
if type -q atuin
|
if type -q atuin
|
||||||
atuin init fish | source
|
atuin init fish | source
|
||||||
end
|
end
|
||||||
|
if type -q direnv
|
||||||
|
direnv hook fish | source
|
||||||
|
end
|
||||||
|
|
||||||
if test -f ~/.config/fish/config.fish.local
|
if test -f ~/.config/fish/config.fish.local
|
||||||
source ~/.config/fish/config.fish.local
|
source ~/.config/fish/config.fish.local
|
||||||
@@ -17,7 +24,4 @@ end
|
|||||||
|
|
||||||
alias ls="lsd"
|
alias ls="lsd"
|
||||||
|
|
||||||
fish_add_path $HOME/.webman/bin
|
|
||||||
|
|
||||||
set -gx EDITOR nvim
|
set -gx EDITOR nvim
|
||||||
|
|
||||||
|
|||||||
@@ -1,10 +1,12 @@
|
|||||||
# if fisher is not installed, install it
|
# if fisher is not installed, install it
|
||||||
if not functions -q fisher
|
if not functions -q fisher
|
||||||
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
|
curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher install jorgebucaran/fisher
|
||||||
end
|
if not functions -q fisher
|
||||||
if functions -q fisher
|
echo "fisher failed to install"
|
||||||
fisher install IlanCosman/tide@v6
|
else
|
||||||
fisher install PatrickF1/fzf.fish
|
fisher install IlanCosman/tide@v6
|
||||||
|
fisher install PatrickF1/fzf.fish
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
fish_add_path ~/.webman/bin/
|
fish_add_path ~/.webman/bin/
|
||||||
@@ -12,7 +14,9 @@ fish_add_path ~/.webman/bin/
|
|||||||
# if atuin is not installed, install it
|
# if atuin is not installed, install it
|
||||||
if not type -q atuin
|
if not type -q atuin
|
||||||
bash (curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh | psub)
|
bash (curl https://raw.githubusercontent.com/atuinsh/atuin/main/install.sh | psub)
|
||||||
end
|
if not type -q atuin
|
||||||
if type -q atuin
|
echo "atuin failed to install"
|
||||||
atuin import auto
|
else
|
||||||
end
|
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
|
||||||
2298
dot_gdbinit
2298
dot_gdbinit
File diff suppressed because it is too large
Load Diff
@@ -1,9 +1,9 @@
|
|||||||
[credential "https://github.com"]
|
[credential "https://github.com"]
|
||||||
helper =
|
helper =
|
||||||
helper = !~/.webman/bin/gh auth git-credential
|
helper = !gh auth git-credential
|
||||||
[credential "https://gist.github.com"]
|
[credential "https://gist.github.com"]
|
||||||
helper =
|
helper =
|
||||||
helper = !~/.webman/bin/gh auth git-credential
|
helper = !gh auth git-credential
|
||||||
|
|
||||||
[user]
|
[user]
|
||||||
email = {{ .email | quote }}
|
email = {{ .email | quote }}
|
||||||
|
|||||||
@@ -1,27 +1,27 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
echo "[-] Running installation script [-]"
|
echo "[-] Running post-installation script [-]"
|
||||||
|
|
||||||
|
|
||||||
{{- if eq .chezmoi.os "linux" }}
|
{{- if eq .chezmoi.os "linux" }}
|
||||||
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
{{- if eq .chezmoi.osRelease.id "alpine" }}
|
||||||
|
|
||||||
echo "Alpine Linux detected"
|
echo "Alpine Linux detected"
|
||||||
|
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
|
||||||
|
echo "Fedora Linux detected"
|
||||||
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
||||||
|
|
||||||
echo "Debian-based Linux detected"
|
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 }}
|
{{- else }}
|
||||||
echo "Linux OS release not recognized"
|
echo "Linux OS release not recognized"
|
||||||
exit 1
|
exit 1
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|
||||||
echo "\n[-] Downloading Nerd Fonts [-]"
|
|
||||||
if test -f ~/.fonts/GeistMonoNerdFontMono-Regular.otf; then
|
if test -f ~/.fonts/GeistMonoNerdFontMono-Regular.otf; then
|
||||||
echo "GeistMono already installed"
|
echo "GeistMono Nerd Font already installed"
|
||||||
else
|
else
|
||||||
|
echo "\n[-] Downloading Nerd Fonts [-]"
|
||||||
curl -L -O https://github.com/ryanoasis/nerd-fonts/releases/latest/download/GeistMono.zip && \
|
curl -L -O https://github.com/ryanoasis/nerd-fonts/releases/latest/download/GeistMono.zip && \
|
||||||
unzip GeistMono.zip -d ~/.fonts && \
|
unzip GeistMono.zip -d ~/.fonts && \
|
||||||
rm GeistMono.zip && \
|
rm GeistMono.zip && \
|
||||||
@@ -29,44 +29,50 @@ else
|
|||||||
echo "Failed to download GeistMono.zip"
|
echo "Failed to download GeistMono.zip"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "\n[-] Setting default shell to fish [-]"
|
|
||||||
chsh -s $(which fish) || echo "chsh failed"
|
|
||||||
|
|
||||||
{{- else if eq .osid "darwin" }}
|
{{- else if eq .osid "darwin" }}
|
||||||
|
|
||||||
echo "macOS detected"
|
echo "macOS detected"
|
||||||
echo "\n[-] Setting default shell to fish [-]"
|
|
||||||
chsh -s $(which fish) || echo "chsh failed"
|
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 }}
|
{{- end }}
|
||||||
|
|
||||||
echo "\n[-] Installing webman [-]"
|
# check if $SHELL is fish already
|
||||||
if test -x ~/.webman/bin/webman; then
|
|
||||||
echo "webman already installed"
|
if echo $SHELL | grep "fish" ; then
|
||||||
|
echo "Fish shell already set up"
|
||||||
else
|
else
|
||||||
curl https://raw.githubusercontent.com/candrewlee14/webman/main/scripts/install.sh | sh
|
echo "\n[-] Setting default shell to fish [-]"
|
||||||
|
chsh -s $(which fish) || echo "chsh failed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "\n[-] Installing nvim [-]"
|
|
||||||
|
|
||||||
if test -x ~/.webman/bin/nvim; then
|
if test -x ~/.webman/bin/nvim; then
|
||||||
echo "nvim already installed"
|
echo "nvim already installed"
|
||||||
else
|
else
|
||||||
|
echo "\n[-] Installing nvim [-]"
|
||||||
~/.webman/bin/webman add nvim
|
~/.webman/bin/webman add nvim
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "\n[-] Running fish install setup [-]"
|
echo "\n[-] Running fish install setup [-]"
|
||||||
/usr/bin/env fish ~/.config/fish/.on_install.fish
|
/usr/bin/env fish ~/.config/fish/.on_install.fish
|
||||||
|
|
||||||
echo "\n[-] Installing AstroNvim [-]"
|
if test -f ~/.config/nvim/README.md ; then
|
||||||
if test -f ~/.config/nvim/config.ld ; then
|
|
||||||
echo "Already installed AstroNvim"
|
echo "Already installed AstroNvim"
|
||||||
else
|
else
|
||||||
if test -d ~/.config/nvim/ ; then
|
echo "\n[-] Installing AstroNvim [-]"
|
||||||
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
|
if test -x ~/.webman/bin/nvim ; then
|
||||||
~/.webman/bin/nvim --headless +q
|
~/.webman/bin/nvim --headless +q
|
||||||
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 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 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
|
||||||
@@ -11,6 +11,10 @@ apk update
|
|||||||
{{ range .packages.linux.apks -}}
|
{{ range .packages.linux.apks -}}
|
||||||
apk add {{ . | quote }}
|
apk add {{ . | quote }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
{{- else if eq .chezmoi.osRelease.idLike "fedora" }}
|
||||||
|
{{ range .packages.linux.dnfs -}}
|
||||||
|
sudo dnf install -y {{ . | quote }}
|
||||||
|
{{ end -}}
|
||||||
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
{{- else if (eq .chezmoi.osRelease.id "debian" "ubuntu" "zorin") }}
|
||||||
echo "[-] Updating Apt packages [-]"
|
echo "[-] Updating Apt packages [-]"
|
||||||
sudo apt update
|
sudo apt update
|
||||||
@@ -22,7 +26,12 @@ sudo apt install -y {{ . | quote }}
|
|||||||
{{- else if eq .osid "darwin" }}
|
{{- else if eq .osid "darwin" }}
|
||||||
echo "[-] Updating brews [-]"
|
echo "[-] Updating brews [-]"
|
||||||
{{ range .packages.darwin.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 -}}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|
||||||
@@ -44,4 +53,4 @@ fi
|
|||||||
echo "[-] Updating Webman packages [-]"
|
echo "[-] Updating Webman packages [-]"
|
||||||
{{ range .packages.webman.pkgs -}}
|
{{ range .packages.webman.pkgs -}}
|
||||||
~/.webman/bin/webman upgrade {{ . | quote }}
|
~/.webman/bin/webman upgrade {{ . | quote }}
|
||||||
{{ end -}}
|
{{ end -}}
|
||||||
|
|||||||
Reference in New Issue
Block a user