Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
ae8c78d
nvim: Bootstrap empty config
Notgnoshi May 2, 2026
cdf08e0
nvim: Load config/*.lua modules
Notgnoshi May 2, 2026
38a1f05
nvim: Add telescope plugin
Notgnoshi May 2, 2026
7f086f2
nvim: search settings
Notgnoshi May 2, 2026
b81e692
nvim: display & editing option
Notgnoshi May 2, 2026
3ecb7e3
nvim: clipboard
Notgnoshi May 2, 2026
3df6116
nvim: Add treesitter
Notgnoshi May 2, 2026
c58a964
nvim: Add treesitter based folding
Notgnoshi May 2, 2026
7590924
nvim: Add spelling config and wordlist
Notgnoshi May 2, 2026
c928f07
nvim: undo
Notgnoshi May 2, 2026
02753f1
nvim: Terminal title
Notgnoshi May 2, 2026
ee64382
nvim: persistent history settings
Notgnoshi May 2, 2026
d31e33a
nvim: filetypes
Notgnoshi May 2, 2026
ca9ddf3
nvim: filewatching
Notgnoshi May 2, 2026
6891d36
nvim: misc builtins
Notgnoshi May 2, 2026
dcd7aa7
git: Switch to neovim as editor
Notgnoshi May 2, 2026
a3fa1e5
Switch to nvim as default
Notgnoshi May 2, 2026
acb0e12
nvim: run stylua on nvim configs
Notgnoshi May 3, 2026
d5f6835
nvim: LSP, linters, and formatters
Notgnoshi May 3, 2026
63a00dc
nvim: statusline
Notgnoshi May 3, 2026
0cf0f5f
nvim: completion
Notgnoshi May 3, 2026
1a0a827
vim|nvim: fix paste indentation in insert mode
Notgnoshi May 3, 2026
736c483
nvim: Surround and textobjects
Notgnoshi May 3, 2026
df47404
nvim: vim-eunuch
Notgnoshi May 3, 2026
4c4478f
nvim: Add flash.nvim
Notgnoshi May 3, 2026
876a39a
nvim: git
Notgnoshi May 3, 2026
799afe9
nvim: Add vim-tmux-navigator
Notgnoshi May 3, 2026
fb63cac
nvim: snippets
Notgnoshi May 3, 2026
74c7979
nvim: Add more filetypes
Notgnoshi May 3, 2026
c3708bd
nvim: color scheme
Notgnoshi May 3, 2026
c2eb6db
nvim: Presumably finish the port of vim -> nvim
Notgnoshi May 3, 2026
6853240
setup: Make HTTP errors in curl downloads visible
Notgnoshi May 3, 2026
5dd8c13
setup: Remove colout installation and update
Notgnoshi May 3, 2026
9b74995
vim-plugins: Update plugins
Notgnoshi May 3, 2026
cebf189
GEP: Update Submodule
Notgnoshi May 3, 2026
df2e04b
tmux: Replace tmux-window-name plugin with custom script
Notgnoshi May 3, 2026
f8aaceb
nvim: Detect file changes even when editor is not focused
Notgnoshi May 3, 2026
b4c18fd
nvim: Fallback to indent-based folding if there's no treesitter parser
Notgnoshi May 4, 2026
f94df59
nvim: Ensure Mason is setup even if no file is opened
Notgnoshi May 4, 2026
9f9bf9d
nvim: Fix treesitter for nvim 0.12+
Notgnoshi May 4, 2026
62d6207
nvim: Give :Lazy popup window a border
Notgnoshi May 4, 2026
2ab11fb
setup: Install nvim from GitHub releases
Notgnoshi May 5, 2026
fa18a86
nvim: Kanagawa colorscheme
Notgnoshi May 5, 2026
7a5cbf1
nvim: Add diagnostic popup keybind
Notgnoshi May 5, 2026
364ee2d
nvim: Fix lua_ls config not being applied
Notgnoshi May 6, 2026
8de8478
fixup! nvim: Kanagawa colorscheme
Notgnoshi May 6, 2026
e559b4e
nvim: Temporarily switch to light colorscheme during presentation
Notgnoshi May 6, 2026
c8c4344
fixup! nvim: LSP, linters, and formatters
Notgnoshi May 6, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion GEP
Submodule GEP updated 1 files
+21 −6 install.sh
24 changes: 9 additions & 15 deletions bashrc.d/070-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,22 @@ export FZF_CTRL_R_OPTS=" \
)\" \
"

# Use vim as my MANPAGER. Has folding, ability to follow links.
MANPAGER="vim -M +MANPAGER -"
MANWIDTH=100
# Use nvim as my MANPAGER. Has folding, ability to follow links.
export MANPAGER='nvim +Man!'
export MANWIDTH=100

# Add local header files to gcc include path
C_INCLUDE_PATH="$HOME/.local/include${C_INCLUDE_PATH:+:${C_INCLUDE_PATH}}"
CPLUS_INCLUDE_PATH="$HOME/.local/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}"
export C_INCLUDE_PATH="$HOME/.local/include${C_INCLUDE_PATH:+:${C_INCLUDE_PATH}}"
export CPLUS_INCLUDE_PATH="$HOME/.local/include${CPLUS_INCLUDE_PATH:+:${CPLUS_INCLUDE_PATH}}"

# Add local libraries to library path.
LIBRARY_PATH="$HOME/.local/lib${LIBRARY_PATH:+:${LIBRARY_PATH}}"
export LIBRARY_PATH="$HOME/.local/lib${LIBRARY_PATH:+:${LIBRARY_PATH}}"

# Setting LIBRARY_PATH is for linking, setting LD_LIBRARY_PATH is for running
LD_LIBRARY_PATH="$LIBRARY_PATH"
export LD_LIBRARY_PATH="$LIBRARY_PATH"

export C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH
export LIBRARY_PATH
export LD_LIBRARY_PATH
export MANPAGER
export MANWIDTH
export EDITOR=vim
export BAT_THEME=base16
export EDITOR=nvim
export BAT_THEME=gruvbox-light
# Fix less not rendering control characters with git-log on the Opp lab machines.
export LESS=FRX

Expand Down
25 changes: 21 additions & 4 deletions setup
Original file line number Diff line number Diff line change
Expand Up @@ -42,21 +42,38 @@ prompt_default_yes() {

github_latest_release_tag() {
local repo="$1"
local response
local tag

curl --silent --fail "https://api.github.com/repos/$repo/releases/latest" |
grep --only-matching --perl-regexp '"tag_name": "\K(.*)(?=")'
if ! response=$(curl --silent --show-error --fail "https://api.github.com/repos/$repo/releases/latest" 2>&1); then
error "Failed to fetch latest release for $repo: $response"
return 1
fi

if ! tag=$(printf '%s' "$response" | grep --only-matching --perl-regexp '"tag_name": "\K(.*)(?=")'); then
error "Could not parse tag_name from GitHub response for $repo"
return 1
fi

printf '%s\n' "$tag"
}

github_download_release() {
local repo="$1"
local version="$2"
local artifact="$3"
local output="${4:-$artifact}"
local url="https://github.com/$repo/releases/download/$version/$artifact"

curl \
if ! curl \
--fail \
--show-error \
--location \
--output "$output" \
--remote-name "https://github.com/$repo/releases/download/$version/$artifact"
--remote-name "$url"; then
error "Failed to download release artifact $artifact from $repo ($url)"
return 1
fi
}

debug() {
Expand Down
37 changes: 37 additions & 0 deletions setup.d/020-fancy-tools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,41 @@ if prompt_default_yes "Install/update fancy shell tools?"; then
download_and_install_delta "$latest_version"
fi
fi

download_and_install_nvim() {
local -r artifact="nvim-linux-x86_64.tar.gz"
pushd /tmp || exit 1

debug "downloading $artifact ..."
github_download_release "neovim/neovim" "stable" "$artifact"

debug "installing ..."
tar -C ~/.local/ --strip-components=1 -xzvf "$artifact"

popd || exit 1
}

if prompt_default_yes "Install/update nvim from GitHub?"; then
latest_version=$(github_latest_release_tag "neovim/neovim")
info "Found latest version: $latest_version"

if command -v nvim &>/dev/null; then
installed_version=$(nvim --version | sed -En 's/^NVIM (v[0-9]+\.[0-9]+\.[0-9]+).*$/\1/p')
debug "Found installed version: $installed_version"

if [[ "$installed_version" != "$latest_version" ]]; then
info "Updating nvim..."
download_and_install_nvim
else
info "nvim $installed_version already installed."
if prompt_default_no "Reinstall nvim?"; then
info "Reinstalling nvim..."
download_and_install_nvim
fi
fi
else
info "Installing nvim for the first time..."
download_and_install_nvim
fi
fi
fi
19 changes: 3 additions & 16 deletions setup.d/031-development-packages.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ if prompt_default_no "Install Python development packages?"; then
if prompt_default_no "Install Pip?"; then
if ! command -v pip &>/dev/null; then
info "Pip not installed. Installing..."
curl https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
curl --fail --show-error https://bootstrap.pypa.io/get-pip.py -o /tmp/get-pip.py
python3 /tmp/get-pip.py --user
else
info "Pip $(pip --version | grep -o '(.*)') already installed"
Expand All @@ -15,20 +15,6 @@ if prompt_default_no "Install Python development packages?"; then
info "${YELLOW}Modifying $(which pylint) to use environment python instead of system python..."
sed -i 's|/usr/bin/python3|/usr/bin/env python3|' "$(which pylint)"
fi

if prompt_default_yes "Install/update colout?"; then
mkdir -p "$HOME/src/"
if [[ -d "$HOME/src/colout/" ]]; then
pushd "$HOME/src/colout/" || exit 1
git pull
else
git clone https://github.com/nojhan/colout.git "$HOME/src/colout/"
pushd "$HOME/src/colout/" || exit 1
python setup.py install --user
fi

popd || exit 1
fi
fi # Python

download_and_install_shellcheck() {
Expand Down Expand Up @@ -150,6 +136,7 @@ if prompt_default_no "Install/update Rust?"; then
dump_syms \
minidump-stackwalk \
rustfilt \
tree-sitter-cli \
;
fi
fi # Rust
Expand Down Expand Up @@ -214,7 +201,7 @@ if prompt_default_no "Install nvm?"; then
popd || exit 1
else
debug "nvm not found. Installing nvm..."
curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$latest_version/install.sh" | bash
curl --fail --show-error -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$latest_version/install.sh" | bash
fi

# Source nvm so we can use it in following setup steps
Expand Down
2 changes: 1 addition & 1 deletion setup.d/032-sysworxx-can-drivers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ fi
if [[ ! -f /tmp/driver.tar.bz2 ]]; then
debug "Downloading driver ..."
pushd /tmp/
curl --location "$SYSWORXX_SOCKETCAN_DRIVER_DOWNLOAD_LINK" --output /tmp/driver.tar.bz2
curl --fail --show-error --location "$SYSWORXX_SOCKETCAN_DRIVER_DOWNLOAD_LINK" --output /tmp/driver.tar.bz2
tar -xjvf /tmp/driver.tar.bz2
popd
fi
Expand Down
6 changes: 3 additions & 3 deletions setup.d/050-apps-ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@ if prompt_default_no "Install base GUI packages?"; then
fi

if prompt_default_no "Install VS Code?"; then
curl --location https://go.microsoft.com/fwlink/?LinkID=760868 --output /tmp/code.deb
curl --fail --show-error --location https://go.microsoft.com/fwlink/?LinkID=760868 --output /tmp/code.deb
sudo apt install /tmp/code.deb
fi

if prompt_default_no "Install Discord?"; then
curl --location "https://discordapp.com/api/download?platform=linux&format=deb" --output /tmp/discord.deb
curl --fail --show-error --location "https://discordapp.com/api/download?platform=linux&format=deb" --output /tmp/discord.deb
sudo apt install /tmp/discord.deb
fi

if prompt_default_no "Install Spotify?"; then
curl -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -
curl --fail -sS https://download.spotify.com/debian/pubkey_0D811D58.gpg | sudo apt-key add -
echo "deb http://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt update
sudo apt install spotify-client
Expand Down
2 changes: 1 addition & 1 deletion setup.d/060-customizations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ fi
if prompt_default_no "Install Pointfree font?"; then
# https://docs.fedoraproject.org/en-US/quick-docs/fonts/
mkdir -p ~/.local/share/fonts
curl --location --output /tmp/pointfree.zip "https://dl.dafont.com/dl/?f=pointfree"
curl --fail --show-error --location --output /tmp/pointfree.zip "https://dl.dafont.com/dl/?f=pointfree"
unzip -d /tmp/ /tmp/pointfree.zip
mkdir -p ~/.local/share/fonts/
mv /tmp/pointfree.ttf ~/.local/share/fonts/
Expand Down
34 changes: 34 additions & 0 deletions stowdir/.config/nvim/init.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
vim.g.mapleader = "\\"
vim.g.maplocalleader = "\\"

-- Auto-load every lua/config/*.lua module in alphabetical order
for _, path in ipairs(vim.api.nvim_get_runtime_file("lua/config/*.lua", true)) do
require("config." .. path:match("lua/config/(.+)%.lua$"))
end

-- Bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
local out = vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"--branch=stable",
"https://github.com/folke/lazy.nvim.git",
lazypath,
})
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
}, true, {})
os.exit(1)
end
end
vim.opt.rtp:prepend(lazypath)

require("lazy").setup({
spec = { { import = "plugins" } },
checker = { enabled = true },
ui = { border = "single" },
})
30 changes: 30 additions & 0 deletions stowdir/.config/nvim/lazy-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"conform.nvim": { "branch": "master", "commit": "dca1a190aa85f9065979ef35802fb77131911106" },
"copilot.lua": { "branch": "master", "commit": "78c638293f0ea6a2245eca46e9933ee271792d7e" },
"flash.nvim": { "branch": "main", "commit": "fcea7ff883235d9024dc41e638f164a450c14ca2" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "dd3f588bacbeb041be6facf1742e42097f62165d" },
"kanagawa.nvim": { "branch": "master", "commit": "8ad3b4cdcc804b332c32db8f9743667e1bb82b99" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"lualine.nvim": { "branch": "master", "commit": "131a558e13f9f28b15cd235557150ccb23f89286" },
"marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "0c2823e0418f3d9230ff8b201c976e84de1cb401" },
"mason-tool-installer.nvim": { "branch": "main", "commit": "443f1ef8b5e6bf47045cb2217b6f748a223cf7dc" },
"mason.nvim": { "branch": "main", "commit": "cb8445f8ce85d957416c106b780efd51c6298f89" },
"nvim-lint": { "branch": "master", "commit": "eab58b48eb11d7745c11c505e0f3057165902461" },
"nvim-lspconfig": { "branch": "master", "commit": "31026a13eefb20681124706a79fc1df6bf11ab27" },
"nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" },
"telescope-undo.nvim": { "branch": "main", "commit": "928d0c2dc9606e01e2cc547196f48d2eaecf58e5" },
"telescope.nvim": { "branch": "master", "commit": "f04ab730b8f9c6bf3f54a206d0dcddfd70c52d59" },
"vim-bitbake": { "branch": "master", "commit": "e75f8ea12b4a0bcfe46c564a3a78ff7361b0a1c6" },
"vim-eunuch": { "branch": "master", "commit": "e86bb794a1c10a2edac130feb0ea590a00d03f1e" },
"vim-flatbuffers": { "branch": "master", "commit": "ecd75c33576d982f3c83545dff7b3c9245285e75" },
"vim-fugitive": { "branch": "master", "commit": "3b753cf8c6a4dcde6edee8827d464ba9b8c4a6f0" },
"vim-tmux-navigator": { "branch": "master", "commit": "e41c431a0c7b7388ae7ba341f01a0d217eb3a432" }
}
7 changes: 7 additions & 0 deletions stowdir/.config/nvim/lua/config/clipboard.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
-- System-clipboard bindings via the `clip` script. By using `clip`, I get x11, wayland, and sshclip support
vim.keymap.set("i", "<C-S-p>", [[<C-r><C-o>=system('clip --paste')<cr>]], { silent = true })
vim.keymap.set("i", "<C-y>", [[<Esc>"cyy:call system('clip --copy', @c)<cr>]], { silent = true })
vim.keymap.set("v", "<C-y>", [["cy:call system('clip --copy', @c)<cr>]], { silent = true })
vim.keymap.set("v", "<C-S-p>", [[:<C-u>let @c=system('clip --paste')<cr>gv"cP]], { silent = true })
vim.keymap.set("n", "<C-S-p>", [[:let @c=system('clip --paste')<cr>"cP]], { silent = true })
vim.keymap.set("n", "<C-y>", [["cyy:call system('clip --copy', @c)<cr>]], { silent = true })
7 changes: 7 additions & 0 deletions stowdir/.config/nvim/lua/config/diagnostics.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
vim.diagnostic.config({
virtual_text = { current_line = true },
severity_sort = true,
float = { border = "rounded", source = true },
})

vim.keymap.set("n", "gl", vim.diagnostic.open_float, { desc = "Show line diagnostics" })
70 changes: 70 additions & 0 deletions stowdir/.config/nvim/lua/config/editing.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
vim.opt.number = true
vim.opt.cursorline = true
vim.opt.colorcolumn = "100"
vim.opt.textwidth = 100
vim.opt.scrolloff = 6
vim.opt.sidescrolloff = 6
vim.opt.virtualedit = "all"
vim.opt.display = "truncate"

vim.opt.lazyredraw = true
vim.opt.showmatch = true

vim.api.nvim_create_autocmd("FileType", {
group = vim.api.nvim_create_augroup("editing_gitcommit", { clear = true }),
pattern = "gitcommit",
callback = function()
vim.opt_local.colorcolumn = "72"
end,
})

-- Reselect visual block after indent.
vim.keymap.set("v", "<", "<gv")
vim.keymap.set("v", ">", ">gv")

-- Move by visual line so wrapped lines feel like arrow-key movement.
vim.keymap.set("n", "j", "gj")
vim.keymap.set("n", "k", "gk")

-- Defeat smartindent's habit of yanking `#` to column 0.
vim.keymap.set("i", "#", "X<BS>#")

-- New empty buffer.
vim.keymap.set("n", "<C-t>", "<cmd>enew<cr>")

-- Buffer and quickfix navigation (replaces vim-unimpaired's ]b/[b/]q/[q).
vim.keymap.set("n", "]b", "<cmd>bnext<cr>")
vim.keymap.set("n", "[b", "<cmd>bprevious<cr>")
vim.keymap.set("n", "]q", "<cmd>cnext<cr>")
vim.keymap.set("n", "[q", "<cmd>cprevious<cr>")

-- :bd / :bd! delete the current buffer but keep the window open by switching to another buffer first.
vim.api.nvim_create_user_command("Bd", function(opts)
local current = vim.api.nvim_get_current_buf()

-- Surface "no write since last change" before switching, so the user
-- stays on the modified buffer rather than ending up on the alternate.
if not opts.bang and vim.bo[current].modified then
vim.notify(
("E89: No write since last change for buffer %d (use :Bd!)"):format(current),
vim.log.levels.ERROR
)
return
end

local has_others = false
for _, info in ipairs(vim.fn.getbufinfo({ buflisted = 1 })) do
if info.bufnr ~= current then
has_others = true
break
end
end
if has_others then
vim.cmd("bprevious")
else
vim.cmd("enew")
end
vim.cmd(("bdelete%s %d"):format(opts.bang and "!" or "", current))
end, { bang = true })

vim.cmd([[cnoreabbrev <expr> bd getcmdtype() == ':' && getcmdline() == 'bd' ? 'Bd' : 'bdelete']])
Loading