overhaul of some dotfiles

This commit is contained in:
Blake Ridgway
2026-04-05 10:42:44 -05:00
parent 05cdb1ca14
commit 8a006faf65
69 changed files with 697 additions and 6191 deletions

View File

@@ -1,173 +0,0 @@
#!/bin/bash
# A script for setting up post install
# Relies on Flatpak to be installed
# Created by Blake Ridgway
# Function to detect the Linux distribution
detect_linux_distro() {
if [ -f /etc/os-release ]; then
. /etc/os-release
echo "$ID"
elif [ -f /etc/lsb-release ]; then
. /etc/lsb-release
echo "$DISTRIBUTOR_ID"
elif [ -f /etc/debian_version ]; then
echo "debian"
elif [ -f /etc/redhat-release ]; then
echo "redhat"
else
echo "unknown"
fi
}
# Detect the Linux distribution
DISTRO=$(detect_linux_distro)
# Determine the appropriate package manager
case "$DISTRO" in
fedora|rhel|centos)
PACKAGE_MANAGER="dnf"
;;
debian|ubuntu|pop)
PACKAGE_MANAGER="apt"
;;
*)
echo "Unsupported distribution: $DISTRO"
exit 1
;;
esac
# Update system before installing packages
if [ "$PACKAGE_MANAGER" == "dnf" ]; then
sudo dnf update && sudo dnf upgrade
elif [ "$PACKAGE_MANAGER" == "apt" ]; then
sudo apt update && sudo apt upgrade -y
fi
# Setup Flatpak
flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
PACKAGE_LIST=(
btop
curl
git
gh
fd-find
flatpak
libfontconfig-dev
libssl-dev
neofetch
python3
python3-pip
ripgrep
virt-manager
zsh
)
FLATPAK_LIST=(
com.bitwarden.desktop
com.github.tchx84.Flatseal
com.valvesoftware.Steam
net.davidotek.pupgui2
net.veloren.airshipper
org.videolan.VLC
)
echo #######################
echo # Installing Packages #
echo #######################
for package_name in ${PACKAGE_LIST[@]}; do
if [ "$PACKAGE_MANAGER" == "dnf" ]; then
if ! dnf list --installed | grep -q "^\<$package_name\>"; then
echo "Installing $package_name..."
sleep .5
sudo dnf install "$package_name" -y
echo "$package_name has been installed"
else
echo "$package_name already installed"
fi
elif [ "$PACKAGE_MANAGER" == "apt" ]; then
if ! dpkg -l | grep -q "^\<ii\> $package_name"; then
echo "Installing $package_name..."
sleep .5
sudo apt install "$package_name" -y
echo "$package_name has been installed"
else
echo "$package_name already installed"
fi
fi
done
for flatpak_name in ${FLATPAK_LIST[@]}; do
if ! flatpak list | grep -q $flatpak_name; then
flatpak install "$flatpak_name" -y
else
echo "$flatpak_name already installed"
fi
done
echo ###################
echo # Setting up NVIM #
echo ###################
curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf nvim-linux64.tar.gz
echo ##########
echo # pynvim #
echo ##########
/usr/bin/python3 -m pip install pynvim
echo #####################
echo # Install Nerd Font #
echo #####################
wget https://github.com/ryanoasis/nerd-fonts/releases/download/v3.0.2/Hack.zip && unzip Hack.zip -d Hack
mkdir -p ~/.local/share/fonts && cp Hack/HackNerdFont-Regular.ttf ~/.local/share/fonts
fc-cache -f -v
rm -rf Hack*
echo ######################
echo # Installing OhMyZSH #
echo ######################
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
echo ###################
echo # Install Rust Up #
echo ###################
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
echo ##################
echo # Setup Starship #
echo ##################
curl -sS https://starship.rs/install.sh | sh
echo ###############
echo # Config File #
echo ###############
cp terminal/starship.toml ~/.config/starship.toml
# Symlink files
FILES=('vimrc' 'vim' 'zshrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'gitmessage' 'aliases')
for file in ${FILES[@]}; do
echo ""
echo "Simlinking $file to $HOME"
ln -sf "$PWD/$file" "$HOME/.$file"
if [ $? -eq 0 ]; then
echo "$PWD/$file ~> $HOME/.$file"
else
echo 'Install failed to symlink.'
exit 1
fi
done

View File

@@ -6,13 +6,13 @@ alias e="$EDITOR"
alias v="$VISUAL"
alias tmux='tmux -u'
# Top
alias cpu='top -o CPU'
alias mem='top -o MEM'
# System monitor
alias cpu='btop'
alias mem='btop'
# Get your current public IP
alias ip="curl icanhazip.com"
alias ip6="wget -q0- -ti -T2 ipv6.icanhazip.com"
alias ip="curl -4 icanhazip.com"
alias ip6="curl -6 icanhazip.com"
# Git
alias ga="git add"
@@ -23,7 +23,6 @@ alias gs="git status"
alias nah="git reset --hard; git clean -df;"
alias grr="git remote remove origin"
alias gra="git remote add origin "
alias clonerepo="git fetch --all && git pull --all && git clone-branches"
# Python
alias initvenv='python3 -m venv venv'
@@ -35,20 +34,6 @@ alias py3='python3'
alias python='python3'
alias pip='pip3'
# Bundler
alias b="bundle"
alias bi="bundle install"
alias be="bundle exec"
alias bu="bundle update"
# Rails
alias migrate="rake db:migrate db:rollback && rake db:migrate"
alias s="rspec"
alias rk="rake"
alias rc="rails c"
alias rs="rails s"
alias gi="gem install"
# Pretty print the path
alias path='echo $PATH | tr -s ":" "\n"'
@@ -61,6 +46,6 @@ alias vim=nvim
alias vi=nvim
# Configuration
alias vimrc='nvim ~/.vimrc'
alias vimrc='nvim ~/.config/nvim/init.lua'
alias ealias='nvim ~/dotfiles/aliases.bash'
alias bashrc='nvim ~/.bashrc'

View File

@@ -6,13 +6,13 @@ alias e="$EDITOR"
alias v="$VISUAL"
alias tmux='tmux -u'
# top
alias cpu='top -o CPU'
alias mem='top -o MEM'
# System monitor
alias cpu='btop'
alias mem='btop'
# Get your current public IP
alias ip="curl icanhazip.com"
alias ip6="wget -q0- -ti -T2 ipv6.icanhazip.com"
alias ip="curl -4 icanhazip.com"
alias ip6="curl -6 icanhazip.com"
# Git
alias ga="git add"
@@ -23,7 +23,6 @@ alias gs="git status"
alias nah="git reset --hard; git clean -df;"
alias grr="git remote remove origin"
alias gra="git remote add origin "
alias clonerepo="git fetch --all && git pull --all && git clone-branches"
# Python
alias initvenv='python3 -m venv venv'
@@ -35,20 +34,6 @@ alias py3='python3'
alias python='python3'
alias pip='pip3'
# Bundler
alias b="bundle"
alias bi="bundle install"
alias be="bundle exec"
alias bu="bundle update"
# Rails
alias migrate="rake db:migrate db:rollback && rake db:migrate"
alias s="rspec"
alias rk="rake"
alias rc="rails c"
alias rs="rails s"
alias gi="gem install"
# Pretty print the path
alias path='echo $PATH | tr -s ":" "\n"'
@@ -60,7 +45,7 @@ alias zshreload='source ~/.zshrc'
alias vim=nvim
alias vi=nvim
# Configuration
alias vimrc='nvim ~/.vimrc'
# Configuration
alias vimrc='nvim ~/.config/nvim/init.lua'
alias ealias='nvim ~/dotfiles/aliases.zsh'
alias zshrc='nvim ~/.zshrc'

92
bashrc
View File

@@ -1,58 +1,50 @@
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return ;;
esac
# Set default user
DEFAULT_USER="$USER"
# Editor
export EDITOR='nvim'
# Environment variables
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:$GOPATH/bin:/usr/local/go/bin"
# Local bin
export PATH="$PATH:$HOME/.local/bin"
# Node.js and NVM configuration
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && . "$NVM_DIR/bash_completion"
# Go-specific paths
export PATH="$PATH:/usr/local/go/bin"
# Rust/Cargo
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
# Haskell tools
export PATH="$PATH:$HOME/.cabal/bin"
export PATH="$PATH:/opt/cabal/1.22/bin"
export PATH="$PATH:/opt/ghc/7.10.3/bin"
# Ruby tools
export PATH="$PATH:$HOME/.rvm/bin"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Neovim
export PATH="$PATH:/opt/nvim-linux64/bin"
# Postgres
export PATH="$PATH:/usr/local/var/postgres"
# Editor
export EDITOR='vim'
# SSH settings
# SSH agent
if [ -z "$SSH_AGENT_PID" ]; then
eval "$(ssh-agent -s)"
ssh-add -A 2>/dev/null;
eval "$(ssh-agent -s)"
ssh-add -A 2>/dev/null
fi
# FZF (if installed)
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# Starship prompt (if installed)
export PATH=$PATH:/home/cipher/.local/bin
eval "$(oh-my-posh init bash --config 'https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/refs/heads/main/themes/kali.omp.json')"
#eval "$(starship init bash)"
# Oh My Posh prompt
eval "$(oh-my-posh init bash --config ~/.config/oh-my-posh/theme.omp.json)"
# Bash completion for Git
if [ -f /usr/share/bash-completion/completions/git ]; then
source /usr/share/bash-completion/completions/git
source /usr/share/bash-completion/completions/git
fi
# Custom aliases (include your existing aliases.zsh content here or source it)
# Custom aliases
if [ -f "$HOME/dotfiles/aliases.bash" ]; then
source "$HOME/dotfiles/aliases.bash"
source "$HOME/dotfiles/aliases.bash"
fi
# Key timeout
@@ -61,37 +53,23 @@ export KEYTIMEOUT=1
# C++ include path
export CPLUS_INCLUDE_PATH=/usr/local/include
# If not running interactively, don't do anything
case $- in
*i*) ;;
*) return ;;
esac
work() {
set +e
set +e
local proj="$HOME/Drives/500GB/PycharmProjects/time_logix"
cd "$proj" || { echo "No such dir: $proj" >&2; return 1; }
local proj="$HOME/Drives/500GB/PycharmProjects/time_logix"
cd "$proj" || { echo "No such dir: $proj" >&2; return 1; }
# Ensure venv exists
[ -d venv ] || python3 -m venv venv || { echo "venv create failed" >&2; return 1; }
[ -d venv ] || python3 -m venv venv || { echo "venv create failed" >&2; return 1; }
# Activate venv
. venv/bin/activate
. venv/bin/activate
trap 'deactivate 2>/dev/null || true' RETURN
# Always deactivate when function returns
trap 'deactivate 2>/dev/null || true' RETURN
python main.py
local code=$?
# Run the app
python main.py
local code=$?
cd ~ || true
# Move back to home regardless of success/failure
cd ~ || true
if [ $code -ne 0 ]; then
echo "main.py exited with code $code"
fi
if [ $code -ne 0 ]; then
echo "main.py exited with code $code"
fi
}
# added by 02-dev-tools-setup.sh
export PATH=$PATH:/usr/local/go/bin

View File

@@ -1,6 +1,6 @@
[user]
email = hello@ciphervance.com
name = Cipher Vance
email = blake@blakeridgway.com
name = Blake Ridgway
[commit]
template = ~/dotfiles/commit-conventions.txt
[core]

View File

@@ -1,29 +1,39 @@
{
"LuaSnip": { "branch": "master", "commit": "3732756842a2f7e0e76a7b0487e9692072857277" },
"LuaSnip": { "branch": "master", "commit": "642b0c595e11608b4c18219e93b88d7637af27bc" },
"NvChad": { "branch": "v2.5", "commit": "eb209a4a82aecabe609d8206b865e00a760fb644" },
"base46": { "branch": "v3.0", "commit": "45b336ec52615dd1a3aa47848d894616dd6293a5" },
"cmp-async-path": { "branch": "main", "commit": "b8aade3a0626f2bc1d3cd79affcd7da9f47f7ab1" },
"base46": { "branch": "v3.0", "commit": "884b990dcdbe07520a0892da6ba3e8d202b46337" },
"cmp-async-path": { "branch": "main", "commit": "f8af3f726e07f2e9d37672eaa9102581aefce149" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "cbc7b02bb99fae35cb42f514762b89b5126651ef" },
"cmp-nvim-lua": { "branch": "main", "commit": "e3a22cb071eb9d6508a156306b102c45cd2d573d" },
"cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" },
"conform.nvim": { "branch": "master", "commit": "178b8f0d70ee63db616a8b3bda637218eef121dd" },
"friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" },
"gitsigns.nvim": { "branch": "main", "commit": "cdafc320f03f2572c40ab93a4eecb733d4016d07" },
"indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" },
"friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" },
"gitsigns.nvim": { "branch": "main", "commit": "4ed47e8c4c66c921dc1d6643977e0526e1f44396" },
"harpoon": { "branch": "harpoon2", "commit": "87b1a3506211538f460786c23f98ec63ad9af4e5" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" },
"lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
"mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" },
"menu": { "branch": "main", "commit": "7a0a4a2896b715c066cfbe320bdc048091874cc6" },
"minty": { "branch": "main", "commit": "aafc9e8e0afe6bf57580858a2849578d8d8db9e0" },
"nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" },
"nvim-cmp": { "branch": "main", "commit": "d97d85e01339f01b842e6ec1502f639b080cb0fc" },
"nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" },
"nvim-cmp": { "branch": "main", "commit": "a1d504892f2bc56c2e79b65c6faded2fd21f3eca" },
"nvim-dap": { "branch": "master", "commit": "4f5deb110d9ff8994d96c21df95e2271d11214f9" },
"nvim-dap-go": { "branch": "main", "commit": "b4421153ead5d726603b02743ea40cf26a51ed5f" },
"nvim-dap-ui": { "branch": "master", "commit": "d9770a55188bb34c2bdce7d90a6151181beb6966" },
"nvim-lspconfig": { "branch": "master", "commit": "dc7e7c7699cc01b1b6fefa97f9b496d8f447d7a1" },
"nvim-tree.lua": { "branch": "master", "commit": "1eda2569394f866360e61f590f1796877388cb8a" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" },
"nvim-tree.lua": { "branch": "master", "commit": "31503ad5d869fca61461d82a9126f62480ecb0ab" },
"nvim-treesitter": { "branch": "main", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"nvim-web-devicons": { "branch": "master", "commit": "40e9d5a6cc3db11b309e39593fc7ac03bb844e38" },
"oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" },
"plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" },
"telescope.nvim": { "branch": "master", "commit": "3a12a853ebf21ec1cce9a92290e3013f8ae75f02" },
"ui": { "branch": "v3.0", "commit": "bea2af0a76c1098fac0988ad296aa028cad2a333" },
"telescope.nvim": { "branch": "master", "commit": "cfb85dcf7f822b79224e9e6aef9e8c794211b20b" },
"todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"trouble.nvim": { "branch": "main", "commit": "bd67efe408d4816e25e8491cc5ad4088e708a69a" },
"ui": { "branch": "v3.0", "commit": "cb75908a86720172594b30de147272c1b3a7f452" },
"volt": { "branch": "main", "commit": "620de1321f275ec9d80028c68d1b88b409c0c8b1" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
}

View File

@@ -1,24 +1,19 @@
-- This file needs to have same structure as nvconfig.lua
-- https://github.com/NvChad/ui/blob/v3.0/lua/nvconfig.lua
-- Please read that file to know all available options :(
---@type ChadrcConfig
local M = {}
M.base46 = {
theme = "onedark",
-- hl_override = {
-- Comment = { italic = true },
-- ["@comment"] = { italic = true },
-- },
theme = "onedark",
}
-- M.nvdash = { load_on_startup = true }
-- M.ui = {
-- tabufline = {
-- lazyload = false
-- }
-- }
-- Enable the startup dashboard
M.nvdash = {
load_on_startup = true,
}
M.ui = {
tabufline = {
lazyload = false,
},
}
return M

View File

@@ -1,15 +1,17 @@
local options = {
return {
formatters_by_ft = {
lua = { "stylua" },
-- css = { "prettier" },
-- html = { "prettier" },
go = { "goimports", "gofmt" },
cs = { "csharpier" },
yaml = { "prettier" },
json = { "prettier" },
jsonc = { "prettier" },
sh = { "shfmt" },
bash = { "shfmt" },
},
-- format_on_save = {
-- -- These options will be passed to conform.format()
-- timeout_ms = 500,
-- lsp_fallback = true,
-- },
format_on_save = {
timeout_ms = 1000,
lsp_fallback = true,
},
}
return options

92
nvim/lua/configs/dap.lua Normal file
View File

@@ -0,0 +1,92 @@
local dap = require "dap"
local dapui = require "dapui"
-- DAP UI setup
dapui.setup {
icons = { expanded = "", collapsed = "", current_frame = "" },
layouts = {
{
elements = {
{ id = "scopes", size = 0.35 },
{ id = "breakpoints", size = 0.15 },
{ id = "stacks", size = 0.25 },
{ id = "watches", size = 0.25 },
},
size = 45,
position = "left",
},
{
elements = {
{ id = "repl", size = 0.5 },
{ id = "console", size = 0.5 },
},
size = 12,
position = "bottom",
},
},
}
-- Auto open/close UI with debug session
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
dap.listeners.before.event_terminated["dapui_config"] = function()
dapui.close()
end
dap.listeners.before.event_exited["dapui_config"] = function()
dapui.close()
end
-- Go: powered by nvim-dap-go (wraps delve)
require("dap-go").setup {
dap_configurations = {
{
type = "go",
name = "Debug file",
request = "launch",
program = "${file}",
},
{
type = "go",
name = "Debug package",
request = "launch",
program = "${fileDirname}",
},
{
type = "go",
name = "Attach to process",
mode = "local",
request = "attach",
processId = require("dap.utils").pick_process,
},
},
}
-- C# / .NET: netcoredbg
dap.adapters.coreclr = {
type = "executable",
command = vim.fn.stdpath "data" .. "/mason/bin/netcoredbg",
args = { "--interpreter=vscode" },
}
dap.configurations.cs = {
{
type = "coreclr",
name = "Launch .NET",
request = "launch",
program = function()
return vim.fn.input("Path to dll: ", vim.fn.getcwd() .. "/bin/Debug/", "file")
end,
},
{
type = "coreclr",
name = "Attach .NET",
request = "attach",
processId = require("dap.utils").pick_process,
},
}
-- Signs
vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DiagnosticError", linehl = "", numhl = "" })
vim.fn.sign_define("DapBreakpointCondition", { text = "", texthl = "DiagnosticWarn", linehl = "", numhl = "" })
vim.fn.sign_define("DapStopped", { text = "", texthl = "DiagnosticOk", linehl = "DapStoppedLine", numhl = "" })

View File

@@ -1,6 +1,48 @@
-- NvChad sets default capabilities (nvim-cmp) and on_attach via vim.lsp.config("*", ...)
require("nvchad.configs.lspconfig").defaults()
local servers = { "html", "cssls" }
vim.lsp.enable(servers)
-- Go
vim.lsp.config("gopls", {
settings = {
gopls = {
gofumpt = true,
usePlaceholders = true,
staticcheck = true,
analyses = {
unusedparams = true,
shadow = true,
nilness = true,
},
hints = {
assignVariableTypes = true,
compositeLiteralFields = true,
functionTypeParameters = true,
parameterNames = true,
rangeVariableTypes = true,
},
},
},
})
-- read :h vim.lsp.config for changing options of lsp servers
-- YAML
vim.lsp.config("yamlls", {
settings = {
yaml = {
validate = true,
schemaStore = {
enable = true,
url = "https://www.schemastore.org/api/json/catalog.json",
},
},
},
})
-- C# / OmniSharp
vim.lsp.config("omnisharp", {
enable_roslyn_analyzers = true,
organize_imports_on_format = true,
enable_import_completion = true,
})
-- Enable all servers (Mason puts their binaries on PATH automatically)
vim.lsp.enable({ "gopls", "yamlls", "bashls", "omnisharp" })

View File

@@ -1,10 +1,79 @@
require "nvchad.mappings"
-- add yours here
local map = vim.keymap.set
-- Quick command mode
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
map("i", "jk", "<ESC>", { desc = "Escape insert mode" })
-- map({ "n", "i", "v" }, "<C-s>", "<cmd> w <cr>")
-- Save with Ctrl+S
map({ "n", "i", "v" }, "<C-s>", "<cmd>w<cr>", { desc = "Save file" })
-- ── Git ──────────────────────────────────────────────────────────────────────
map("n", "<leader>gg", "<cmd>LazyGit<cr>", { desc = "Open LazyGit" })
-- ── Diagnostics (Trouble) ────────────────────────────────────────────────────
map("n", "<leader>xx", "<cmd>Trouble diagnostics toggle<cr>", { desc = "Workspace diagnostics" })
map("n", "<leader>xb", "<cmd>Trouble diagnostics toggle filter.buf=0<cr>", { desc = "Buffer diagnostics" })
map("n", "<leader>xs", "<cmd>Trouble symbols toggle focus=false<cr>", { desc = "Document symbols" })
map("n", "<leader>xl", "<cmd>Trouble lsp toggle focus=false win.position=right<cr>", { desc = "LSP references" })
map("n", "<leader>xq", "<cmd>Trouble qflist toggle<cr>", { desc = "Quickfix list" })
-- ── DAP ──────────────────────────────────────────────────────────────────────
map("n", "<leader>db", "<cmd>DapToggleBreakpoint<cr>", { desc = "Toggle breakpoint" })
map("n", "<leader>dB", function()
require("dap").set_breakpoint(vim.fn.input "Condition: ")
end, { desc = "Conditional breakpoint" })
map("n", "<leader>dc", "<cmd>DapContinue<cr>", { desc = "Continue" })
map("n", "<leader>di", "<cmd>DapStepInto<cr>", { desc = "Step into" })
map("n", "<leader>do", "<cmd>DapStepOver<cr>", { desc = "Step over" })
map("n", "<leader>dO", "<cmd>DapStepOut<cr>", { desc = "Step out" })
map("n", "<leader>dt", "<cmd>DapTerminate<cr>", { desc = "Terminate" })
map("n", "<leader>du", function() require("dapui").toggle() end, { desc = "Toggle DAP UI" })
map("n", "<leader>dr", function() require("dap").repl.open() end,{ desc = "Open REPL" })
map("n", "<leader>dgt", function() require("dap-go").debug_test() end, { desc = "Debug Go test" })
map("n", "<leader>dgl", function() require("dap-go").debug_last_test() end, { desc = "Debug last Go test" })
-- ── Terminal ──────────────────────────────────────────────────────────────────
map("n", "<leader>tf", "<cmd>ToggleTerm direction=float<cr>", { desc = "Float terminal" })
map("n", "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>", { desc = "Horizontal terminal" })
map("n", "<leader>tv", "<cmd>ToggleTerm direction=vertical<cr>", { desc = "Vertical terminal" })
-- ── TODO comments ─────────────────────────────────────────────────────────────
map("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "Find TODOs" })
map("n", "]t", function() require("todo-comments").jump_next() end, { desc = "Next TODO" })
map("n", "[t", function() require("todo-comments").jump_prev() end, { desc = "Prev TODO" })
-- ── Harpoon ───────────────────────────────────────────────────────────────────
map("n", "<leader>ha", function() require("harpoon"):list():add() end, { desc = "Add file" })
map("n", "<leader>hh", function()
local h = require "harpoon"
h.ui:toggle_quick_menu(h:list())
end, { desc = "Toggle menu" })
map("n", "<leader>h1", function() require("harpoon"):list():select(1) end, { desc = "File 1" })
map("n", "<leader>h2", function() require("harpoon"):list():select(2) end, { desc = "File 2" })
map("n", "<leader>h3", function() require("harpoon"):list():select(3) end, { desc = "File 3" })
map("n", "<leader>h4", function() require("harpoon"):list():select(4) end, { desc = "File 4" })
-- cycle through harpoon list
map("n", "<leader>hp", function() require("harpoon"):list():prev() end, { desc = "Prev file" })
map("n", "<leader>hn", function() require("harpoon"):list():next() end, { desc = "Next file" })
-- ── Oil ───────────────────────────────────────────────────────────────────────
map("n", "-", "<cmd>Oil<cr>", { desc = "Open parent dir (Oil)" })
map("n", "<leader>oo", "<cmd>Oil --float<cr>", { desc = "Oil (float)" })
-- ── which-key group labels ────────────────────────────────────────────────────
vim.schedule(function()
local ok, wk = pcall(require, "which-key")
if not ok then return end
wk.add {
{ "<leader>d", group = "Debug" },
{ "<leader>dg", group = "Go" },
{ "<leader>x", group = "Diagnostics" },
{ "<leader>t", group = "Terminal" },
{ "<leader>g", group = "Git" },
{ "<leader>h", group = "Harpoon" },
{ "<leader>o", group = "Oil" },
{ "<leader>f", group = "Find" },
}
end)

View File

@@ -1,6 +1,23 @@
require "nvchad.options"
-- add yours here!
local o = vim.opt
-- local o = vim.o
-- o.cursorlineopt ='both' -- to enable cursorline!
o.relativenumber = true -- relative line numbers for fast navigation
o.scrolloff = 8 -- keep 8 lines visible above/below cursor
o.sidescrolloff = 8
o.wrap = false -- no line wrapping
o.undofile = true -- persist undo history across sessions
o.splitbelow = true -- horizontal splits open below
o.splitright = true -- vertical splits open to the right
o.colorcolumn = "120" -- column ruler at 120 chars
o.cursorline = true -- highlight current line
-- Go uses real tabs; everything else uses 4-space soft tabs
vim.api.nvim_create_autocmd("FileType", {
pattern = "go",
callback = function()
vim.opt_local.expandtab = false
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 4
end,
})

View File

@@ -1,11 +1,22 @@
return {
-- Treesitter: syntax highlighting + code understanding
{
"stevearc/conform.nvim",
-- event = 'BufWritePre', -- uncomment for format on save
opts = require "configs.conform",
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim", "lua", "vimdoc",
"go", "gomod", "gowork", "gosum",
"c_sharp",
"yaml",
"bash",
"json", "jsonc",
"toml",
"markdown", "markdown_inline",
},
},
},
-- These are some examples, uncomment them if you want to see them work!
-- LSP servers
{
"neovim/nvim-lspconfig",
config = function()
@@ -13,16 +24,107 @@ return {
end,
},
-- test new blink
-- { import = "nvchad.blink.lazyspec" },
-- Formatting (with format-on-save)
{
"stevearc/conform.nvim",
event = "BufWritePre",
opts = require "configs.conform",
},
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "vim", "lua", "vimdoc",
-- "html", "css"
-- },
-- },
-- },
-- Mason: auto-install LSPs, formatters, and DAP adapters
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
-- LSPs
"gopls",
"omnisharp",
"yaml-language-server",
"bash-language-server",
-- Formatters / linters
"goimports",
"csharpier",
"prettier",
"shfmt",
"stylua",
-- DAP adapters
"delve", -- Go debugger
"netcoredbg", -- .NET debugger
},
},
},
-- Diagnostics panel
{
"folke/trouble.nvim",
cmd = "Trouble",
opts = { use_diagnostic_signs = true },
},
-- Floating terminal
{
"akinsho/toggleterm.nvim",
version = "*",
cmd = "ToggleTerm",
keys = { [[<C-\>]] },
opts = {
open_mapping = [[<C-\>]],
direction = "float",
float_opts = { border = "curved" },
},
},
-- Lazygit inside Neovim
{
"kdheepak/lazygit.nvim",
cmd = "LazyGit",
dependencies = { "nvim-lua/plenary.nvim" },
},
-- DAP core + UI
{
"mfussenegger/nvim-dap",
dependencies = {
"rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio", -- required by dap-ui
"leoluz/nvim-dap-go",
},
config = function()
require "configs.dap"
end,
},
-- Highlight TODO/FIXME/HACK/NOTE comments
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
event = "BufReadPost",
opts = {},
},
-- Harpoon2: quick-jump between pinned files per project
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
opts = {},
},
-- Oil: edit the filesystem like a buffer
{
"stevearc/oil.nvim",
lazy = false,
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
-- Keep nvim-tree as the default explorer; oil opens on demand via `-`
default_file_explorer = false,
columns = { "icon", "permissions", "size", "mtime" },
view_options = { show_hidden = true },
-- Don't clobber window-navigation keys
keymaps = {
["<C-h>"] = false,
["<C-l>"] = false,
},
},
},
}

1
nvim/nvim Symbolic link
View File

@@ -0,0 +1 @@
/home/bridgway/dotfiles/nvim

View File

@@ -7,22 +7,31 @@ echo "--- Starting Development Tools Setup ---"
# Setup NVIM
echo "Setting up Neovim..."
if command -v nvim &>/dev/null && [[ "$(nvim --version | head -n 1)" == "NVIM"* ]]; then
echo "Neovim appears to be installed. Checking version/source or skipping."
# Add logic here if you want to ensure it's your /opt/nvim version
_nvim_asset_name() {
case "$(uname -m)" in
x86_64) echo "nvim-linux-x86_64" ;;
aarch64) echo "nvim-linux-arm64" ;;
*) echo "Unsupported arch for Neovim: $(uname -m)" >&2; exit 1 ;;
esac
}
NVIM_LATEST="$(curl -fsSL https://api.github.com/repos/neovim/neovim/releases/latest | grep '"tag_name"' | cut -d'"' -f4)"
NVIM_INSTALLED="$(nvim --version 2>/dev/null | head -n1 | awk '{print $2}')"
if [ "$NVIM_INSTALLED" = "$NVIM_LATEST" ]; then
echo "Neovim ${NVIM_LATEST} already up-to-date."
else
echo "Downloading and installing Neovim to /opt/nvim..."
NVIM_ASSET="$(_nvim_asset_name)"
echo "Installing Neovim ${NVIM_LATEST} (${NVIM_ASSET})..."
TEMP_NVIM_DIR=$(mktemp -d)
curl -Lo "${TEMP_NVIM_DIR}/nvim-linux64.tar.gz" https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz
curl -fsSLo "${TEMP_NVIM_DIR}/${NVIM_ASSET}.tar.gz" \
"https://github.com/neovim/neovim/releases/latest/download/${NVIM_ASSET}.tar.gz"
sudo rm -rf /opt/nvim
sudo tar -C /opt -xzf "${TEMP_NVIM_DIR}/nvim-linux64.tar.gz"
rm -rf "${TEMP_NVIM_DIR}" # Clean up
echo "Neovim installed to /opt/nvim. Add /opt/nvim-linux64/bin to your PATH."
# Consider adding to PATH via a profile script if not handled by zshrc/bashrc symlinks
if [ ! -f /usr/local/bin/nvim ] && [ -d /opt/nvim-linux64/bin ]; then
sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/nvim
echo "Symlinked nvim to /usr/local/bin/nvim"
fi
sudo tar -C /opt -xzf "${TEMP_NVIM_DIR}/${NVIM_ASSET}.tar.gz"
sudo mv "/opt/${NVIM_ASSET}" /opt/nvim 2>/dev/null || true
rm -rf "${TEMP_NVIM_DIR}"
sudo ln -sf /opt/nvim/bin/nvim /usr/local/bin/nvim
echo "Neovim ${NVIM_LATEST} installed to /opt/nvim, symlinked to /usr/local/bin/nvim"
fi
# pynvim
@@ -116,17 +125,16 @@ if ! command -v oh-my-posh &>/dev/null; then
echo "➤ Installing Oh-My-Posh latest release..."
# GitHub /releases/latest/download will 302 redirect to actual asset
BIN_URL="https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-${OS}-${ARCH}"
THEME_URL="https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/jandedobbeleer.omp.json"
mkdir -p "${HOME}/.local/bin"
TMPBIN="$(mktemp)"
curl -fsSL -L "${BIN_URL}" -o "${TMPBIN}"
sudo install -m755 "${TMPBIN}" /usr/local/bin/oh-my-posh
install -m755 "${TMPBIN}" "${HOME}/.local/bin/oh-my-posh"
rm -f "${TMPBIN}"
echo "Installed oh-my-posh to /usr/local/bin/oh-my-posh"
echo "Installed oh-my-posh to ~/.local/bin/oh-my-posh"
mkdir -p "${HOME}/.poshthemes"
curl -fsSL -L "${THEME_URL}" -o "${HOME}/.poshthemes/jandedobbeleer.omp.json"
echo "Downloaded default theme to ~/.poshthemes/"
echo "Theme is managed via dotfiles repo at terminal/posh-theme.omp.json"
echo "Run 04-config-symlinks.sh to link it to ~/.config/oh-my-posh/theme.omp.json"
else
echo "✔ Oh-My-Posh already installed: $(oh-my-posh --version | head -n1)"
@@ -144,18 +152,5 @@ else
echo "For the current session, you can run: source \"\$HOME/.cargo/env\""
fi
# Setup Starship
echo "Installing Starship prompt..."
if command -v starship &>/dev/null; then
echo "Starship already installed."
else
# The -y flag attempts a non-interactive install
if curl -sS https://starship.rs/install.sh | sh -s -- -y; then
echo "Starship installed. Add 'eval \"\$(starship init zsh)\"' (or bash/fish) to your shell config."
else
echo "ERROR: Starship installation failed."
fi
fi
echo "--- Development Tools Setup Finished ---"

View File

@@ -11,19 +11,19 @@ if [ -z "$SCRIPT_ROOT_DIR" ]; then
exit 1
fi
# Starship Config File
STARSHIP_CONFIG_SOURCE="${SCRIPT_ROOT_DIR}/terminal/starship.toml"
STARSHIP_CONFIG_DEST_DIR="$HOME/.config"
STARSHIP_CONFIG_DEST_FILE="${STARSHIP_CONFIG_DEST_DIR}/starship.toml"
# Oh My Posh theme
echo ""
echo "Setting up Starship configuration..."
if [ -f "$STARSHIP_CONFIG_SOURCE" ]; then
mkdir -p "$STARSHIP_CONFIG_DEST_DIR"
cp "$STARSHIP_CONFIG_SOURCE" "$STARSHIP_CONFIG_DEST_FILE"
echo "Copied starship.toml to $STARSHIP_CONFIG_DEST_FILE"
echo "Setting up Oh My Posh theme..."
POSH_THEME_SOURCE="${SCRIPT_ROOT_DIR}/terminal/posh-theme.omp.json"
POSH_THEME_DEST_DIR="$HOME/.config/oh-my-posh"
POSH_THEME_DEST="${POSH_THEME_DEST_DIR}/theme.omp.json"
if [ -f "$POSH_THEME_SOURCE" ]; then
mkdir -p "$POSH_THEME_DEST_DIR"
ln -sf "$POSH_THEME_SOURCE" "$POSH_THEME_DEST"
echo "${POSH_THEME_SOURCE} ~> ${POSH_THEME_DEST}"
else
echo "WARNING: Starship config source not found: $STARSHIP_CONFIG_SOURCE. Skipping copy."
echo "WARNING: Oh My Posh theme not found: ${POSH_THEME_SOURCE}. Skipping."
fi
# Teams for Linux Configuration
@@ -58,7 +58,7 @@ fi
echo ""
echo "Symlinking dotfiles..."
FILES=('vimrc' 'vim' 'bashrc' 'zsh' 'agignore' 'gitconfig' 'gitignore' 'commit-conventions.txt' 'aliases.zsh')
FILES=('bashrc' 'zshrc' 'aliases.bash' 'aliases.zsh' 'agignore' 'gitconfig' 'gitignore' 'commit-conventions.txt')
for file in "${FILES[@]}"; do
echo ""
@@ -78,5 +78,31 @@ for file in "${FILES[@]}"; do
fi
done
# Nushell config (~/.config/nushell)
echo ""
echo "Symlinking nushell config to ~/.config/nushell..."
NUSHELL_SRC="${SCRIPT_ROOT_DIR}/terminal/nushell"
NUSHELL_DEST="$HOME/.config/nushell"
if [ -d "$NUSHELL_SRC" ]; then
mkdir -p "$HOME/.config"
ln -sf "$NUSHELL_SRC" "$NUSHELL_DEST"
echo "${NUSHELL_SRC} ~> ${NUSHELL_DEST}"
else
echo "WARNING: nushell config source not found: ${NUSHELL_SRC}. Skipping."
fi
# Neovim config (~/.config/nvim)
echo ""
echo "Symlinking nvim config to ~/.config/nvim..."
NVIM_SRC="${SCRIPT_ROOT_DIR}/nvim"
NVIM_DEST="$HOME/.config/nvim"
if [ -e "$NVIM_SRC" ]; then
mkdir -p "$HOME/.config"
ln -sf "$NVIM_SRC" "$NVIM_DEST"
echo "${NVIM_SRC} ~> ${NVIM_DEST}"
else
echo "WARNING: nvim config source not found: ${NVIM_SRC}. Skipping."
fi
echo ""
echo "--- Configuration and Symlinking Finished ---"

View File

@@ -1,2 +0,0 @@
@nClientDownloadEnableHTTP2PlatformLinux 0
@fDownloadRateImprovementToAddAnotherConnection 1.0

View File

@@ -1,105 +0,0 @@
**Fedora 42 DotNet Setup Checklist**
**Important Preliminary Note:**
* [ ] **Fedora 42 Specifics:** Since Fedora 42 is a future release, always double-check the *exact* package names and commands against the official Fedora and Microsoft documentation once Fedora 42 is available. The commands below are based on current Fedora practices.
---
**I. Core .NET Development Environment**
* [ ] **Register Microsoft Package Repository:**
* [ ] Import Microsoft GPG key (e.g., `sudo rpm --import https://packages.microsoft.com/keys/microsoft.asc`).
* [ ] Add Microsoft package repository for Fedora 42 (e.g., `sudo wget https://packages.microsoft.com/config/fedora/42/packages-microsoft-prod.rpm -O packages-microsoft-prod.rpm` - *verify exact URL for F42*).
* [ ] Install the downloaded repository configuration (e.g., `sudo dnf install -y packages-microsoft-prod.rpm`).
* [ ] Clean up downloaded .rpm file (e.g., `rm packages-microsoft-prod.rpm`).
* [ ] **Install .NET SDK:**
* [ ] Install the desired .NET SDK version (e.g., `sudo dnf install -y dotnet-sdk-8.0` or latest LTS).
* [ ] **Verify .NET Installation:**
* [ ] Check SDK version: `dotnet --version`
* [ ] List installed SDKs: `dotnet --list-sdks`
* [ ] List installed runtimes: `dotnet --list-runtimes`
---
**II. Code Editor/IDE (Visual Studio Code Recommended)**
* [ ] **Install Visual Studio Code:**
* [ ] Option A: From Fedora repositories (e.g., `sudo dnf install -y code`).
* [ ] Option B: Download `.rpm` from [code.visualstudio.com](https://code.visualstudio.com/) and install (e.g., `sudo dnf install -y ./<vscode_downloaded_file>.rpm`).
* [ ] **Install Essential VS Code Extensions (Open VS Code to do this):**
* [ ] **C# Dev Kit** (from Microsoft - this is key and bundles other C# tools).
* [ ] (Optional but Recommended) NuGet Package Manager GUI.
* [ ] (Optional but Recommended) GitLens.
* [ ] (Optional but Recommended) Prettier - Code formatter.
* [ ] (Optional) Any Blazor-specific snippet or tooling extensions you find useful.
* [ ] *Restart VS Code if prompted after extension installations.*
---
**III. Version Control**
* [ ] **Install Git:**
* [ ] `sudo dnf install -y git`
* [ ] **Configure Git (Global Settings):**
* [ ] Set user name: `git config --global user.name "Your Name"`
* [ ] Set user email: `git config --global user.email "youremail@example.com"`
---
**IV. Web Browser for Frontend Testing**
* [ ] **Install/Verify Modern Web Browser:**
* [ ] Firefox (usually pre-installed on Fedora).
* [ ] Or, install another like Chromium (e.g., `sudo dnf install -y chromium`) or Google Chrome.
* [ ] *Familiarize yourself with its Developer Tools (Inspector, Console, Network).*
---
**V. Database (Optional - PostgreSQL Example)**
* [ ] **Install PostgreSQL Server & Contrib Packages:**
* [ ] `sudo dnf install -y postgresql-server postgresql-contrib`
* [ ] **Initialize PostgreSQL Database Cluster:**
* [ ] `sudo postgresql-setup --initdb`
* [ ] **Enable and Start PostgreSQL Service:**
* [ ] `sudo systemctl enable --now postgresql`
* [ ] **Create PostgreSQL User and Database (via `psql`):**
* [ ] Access `psql`: `sudo -u postgres psql`
* [ ] Create user: `CREATE USER myappuser WITH PASSWORD 'yoursecurepassword';` (Replace with your details)
* [ ] Create database: `CREATE DATABASE myappdb OWNER myappuser;` (Replace with your details)
* [ ] Exit `psql`: `\q`
* [ ] **(Optional) Install PostgreSQL GUI Tool:**
* [ ] e.g., pgAdmin 4: `sudo dnf install -y pgadmin4`
* [ ] Or DBeaver (download from their website or check Fedora repos).
---
**VI. Containerization (Optional but Recommended)**
* [ ] **Install Docker Engine (moby-engine on Fedora):**
* [ ] `sudo dnf install -y moby-engine`
* [ ] **Enable and Start Docker Service:**
* [ ] `sudo systemctl enable --now docker`
* [ ] **Add User to Docker Group:**
* [ ] `sudo usermod -aG docker $USER`
* [ ] **IMPORTANT: Log out and log back in for this group change to take effect.**
* [ ] **Install Docker Compose:**
* [ ] `sudo dnf install -y docker-compose` (or check official Docker docs for other methods if needed).
* [ ] **Verify Docker Installation:**
* [ ] `docker --version`
* [ ] `docker-compose --version`
* [ ] `docker run hello-world` (after logging back in)
---
**VII. Final Checks**
* [ ] **Reboot (Optional but can ensure all services/paths are correctly initialized):**
* [ ] `sudo reboot`
* [ ] **Create a Test Project:**
* [ ] `dotnet new webapi -o TestApi`
* [ ] `cd TestApi`
* [ ] `dotnet run` (and check in browser)
* [ ] `dotnet new blazorserver -o TestBlazorApp` (or `blazorwasm`)
* [ ] `cd TestBlazorApp`
* [ ] `dotnet run` (and check in browser)

1
terminal/nushell/nushell Symbolic link
View File

@@ -0,0 +1 @@
/home/bridgway/dotfiles/terminal/nushell

View File

@@ -0,0 +1,164 @@
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#c386f1",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
"style": "diamond",
"template": " {{ .UserName }} ",
"trailing_diamond": "\ue0b0",
"type": "session"
},
{
"background": "#ff479c",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"options": {
"folder_separator_icon": " \ue0b1 ",
"home_icon": "~",
"style": "folder"
},
"style": "powerline",
"template": " \uea83 {{ .Path }} ",
"type": "path"
},
{
"background": "#fffb38",
"background_templates": [
"{{ if or (.Working.Changed) (.Staging.Changed) }}#FF9248{{ end }}",
"{{ if and (gt .Ahead 0) (gt .Behind 0) }}#ff4500{{ end }}",
"{{ if gt .Ahead 0 }}#B388FF{{ end }}",
"{{ if gt .Behind 0 }}#B388FF{{ end }}"
],
"foreground": "#193549",
"leading_diamond": "\ue0b6",
"powerline_symbol": "\ue0b0",
"options": {
"branch_template": "{{ trunc 25 .Branch }}",
"fetch_status": true,
"fetch_upstream_icon": true
},
"style": "powerline",
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
"trailing_diamond": "\ue0b4",
"type": "git"
},
{
"background": "#6CA35E",
"foreground": "#ffffff",
"powerline_symbol": "\ue0b0",
"options": {
"fetch_version": true
},
"style": "powerline",
"template": " \ue718 {{ if .PackageManagerIcon }}{{ .PackageManagerIcon }} {{ end }}{{ .Full }} ",
"type": "node"
},
{
"background": "#8ED1F7",
"foreground": "#111111",
"powerline_symbol": "\ue0b0",
"options": {
"fetch_version": true
},
"style": "powerline",
"template": " \ue626 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "go"
},
{
"background": "#FFDE57",
"foreground": "#111111",
"powerline_symbol": "\ue0b0",
"options": {
"display_mode": "files",
"fetch_virtual_env": false
},
"style": "powerline",
"template": " \ue235 {{ if .Error }}{{ .Error }}{{ else }}{{ .Full }}{{ end }} ",
"type": "python"
},
{
"background": "#ffff66",
"foreground": "#111111",
"powerline_symbol": "\ue0b0",
"style": "powerline",
"template": " \uf0ad ",
"type": "root"
},
{
"background": "#83769c",
"foreground": "#ffffff",
"options": {
"always_enabled": true
},
"style": "plain",
"template": "<transparent>\ue0b0</> \ueba2 {{ .FormattedMs }}\u2800",
"type": "executiontime"
},
{
"background": "#00897b",
"background_templates": [
"{{ if gt .Code 0 }}#e91e63{{ end }}"
],
"foreground": "#ffffff",
"options": {
"always_enabled": true
},
"style": "diamond",
"template": "<parentBackground>\ue0b0</> \ue23a ",
"trailing_diamond": "\ue0b4",
"type": "status"
}
],
"type": "prompt"
},
{
"segments": [
{
"background": "#0077c2",
"foreground": "#ffffff",
"style": "plain",
"template": "<#0077c2,transparent>\ue0b6</> \uf489 {{ .Name }} <transparent,#0077c2>\ue0b2</>",
"type": "shell"
},
{
"background": "#f36943",
"background_templates": [
"{{if eq \"Charging\" .State.String}}#40c4ff{{end}}",
"{{if eq \"Discharging\" .State.String}}#ff5722{{end}}",
"{{if eq \"Full\" .State.String}}#4caf50{{end}}"
],
"foreground": "#ffffff",
"invert_powerline": true,
"powerline_symbol": "\ue0b2",
"options": {
"charged_icon": "\ue22f ",
"charging_icon": "\ue234 ",
"discharging_icon": "\ue231 "
},
"style": "powerline",
"template": " {{ if not .Error }}{{ .Icon }}{{ .Percentage }}{{ end }}{{ .Error }}\uf295 ",
"type": "battery"
},
{
"background": "#2e9599",
"foreground": "#111111",
"invert_powerline": true,
"leading_diamond": "\ue0b2",
"style": "diamond",
"template": " {{ .CurrentDate | date .Format }} ",
"trailing_diamond": "\ue0b4",
"type": "time"
}
],
"type": "rprompt"
}
],
"console_title_template": "{{ .Shell }} in {{ .Folder }}",
"final_space": true,
"version": 4
}

View File

@@ -1,64 +0,0 @@
format = """
[](#a3aed2)\
[ 󰌽 ](bg:#a3aed2 fg:#090c0c)\
[](bg:#769ff0 fg:#a3aed2)\
$directory\
[](fg:#769ff0 bg:#394260)\
$git_branch\
$git_status\
[](fg:#394260 bg:#212736)\
$nodejs\
$rust\
$golang\
$php\
[](fg:#212736 bg:#1d2230)\
$time\
[ ](fg:#1d2230)\
\n$character"""
[directory]
style = "fg:#e3e5e5 bg:#769ff0"
format = "[ $path ]($style)"
truncation_length = 3
truncation_symbol = "…/"
[directory.substitutions]
"Documents" = "󰈙 "
"Downloads" = " "
"Music" = " "
"Pictures" = " "
[git_branch]
symbol = ""
style = "bg:#394260"
format = '[[ $symbol $branch ](fg:#769ff0 bg:#394260)]($style)'
[git_status]
style = "bg:#394260"
format = '[[($all_status$ahead_behind )](fg:#769ff0 bg:#394260)]($style)'
[nodejs]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[rust]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[golang]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[php]
symbol = ""
style = "bg:#212736"
format = '[[ $symbol ($version) ](fg:#769ff0 bg:#212736)]($style)'
[time]
disabled = false
time_format = "%R" # Hour:Minute Format
style = "bg:#1d2230"
format = '[[  $time ](fg:#a0a9cb bg:#1d2230)]($style)'

View File

@@ -1,2 +0,0 @@
let g:netrw_dirhistmax =10
let g:netrw_dirhist_cnt =0

File diff suppressed because it is too large Load Diff

View File

@@ -1,5 +0,0 @@
" augroup vimwiki
" au! BufRead ~/vimwiki/index.wiki !git pull
" au! BufRead ~/vimwiki/diary/diary.wiki !git pull
" au! BufWritePost ~/vimwiki/* !git add --all;git commit -m "Auto commit + push.";git push
" augroup END

Submodule vim/plugged/ack.vim deleted from 36e40f9ec9

Submodule vim/plugged/ale deleted from edffffac25

Submodule vim/plugged/edge deleted from a531977881

Submodule vim/plugged/emmet-vim deleted from def5d57a1a

Submodule vim/plugged/jasmine.vim deleted from 50cae137f8

Submodule vim/plugged/javascript-libraries-syntax.vim deleted from 5ef435d8c2

Submodule vim/plugged/lightline.vim deleted from b1e91b41f5

Submodule vim/plugged/mru.vim deleted from 9f25db6639

Submodule vim/plugged/neoformat deleted from bb32035068

Submodule vim/plugged/neomake deleted from 0556893d7f

Submodule vim/plugged/neosnippet deleted from b7c241fb57

Submodule vim/plugged/neosnippet-snippets deleted from 725c989f18

Submodule vim/plugged/nerdtree deleted from fc85a6f07c

Submodule vim/plugged/supertab deleted from f0093ae12a

Submodule vim/plugged/tabular deleted from 339091ac4d

Submodule vim/plugged/typescript-vim deleted from 52f3ca3474

Submodule vim/plugged/vim-autoclose deleted from a9a3b73846

Submodule vim/plugged/vim-closetag deleted from d0a562f8bd

Submodule vim/plugged/vim-commentary deleted from e87cd90dc0

Submodule vim/plugged/vim-eclim deleted from 6d8c6e5224

Submodule vim/plugged/vim-endwise deleted from 4e5c8358d7

Submodule vim/plugged/vim-floaterm deleted from 280b34a076

Submodule vim/plugged/vim-gitgutter deleted from 400a12081f

Submodule vim/plugged/vim-javacomplete2 deleted from a716e32bbe

Submodule vim/plugged/vim-javascript deleted from c470ce1399

Submodule vim/plugged/vim-jsx deleted from 8879e0d9c5

Submodule vim/plugged/vim-multiple-cursors deleted from 6456718e1d

Submodule vim/plugged/vim-quickrun deleted from 50f9ced186

Submodule vim/plugged/vim-rails deleted from a6d2bac95b

Submodule vim/plugged/vim-ruby deleted from d8ef4c3584

Submodule vim/plugged/vim-sensible deleted from 8985da7669

Submodule vim/plugged/vimproc.vim deleted from f396529d78

Submodule vim/plugged/vimwiki deleted from 63af6e72dd

View File

@@ -1,7 +0,0 @@
psychopompos
Argeiphontes
apotropaic
Herms
herms
#onsemate
ss

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@@ -1 +0,0 @@
/home/bridgway/dotfiles/vim

609
vimrc
View File

@@ -1,609 +0,0 @@
" Created By Jeremy Winterberg (github.com/jeremydwayne 2017)
" A LOT of config pulled from the Ultimate VimRC (github.com/amix/vimrc)
filetype plugin indent on
if empty(glob('~/.vim/autoload/plug.vim'))
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC
endif
call plug#begin('~/.vim/plugged/')
" Sensible Default Vim Config
Plug 'tpope/vim-sensible'
Plug 'Shougo/vimproc.vim', {'do' : 'make'}
Plug 'thinca/vim-quickrun'
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --all' }
" ctrl+p :FZF
" vim floaterm
Plug 'voldikss/vim-floaterm'
" vim colorscheme
Plug 'sainnhe/edge'
" tab autocomplete
Plug 'ervandew/supertab'
Plug 'alvan/vim-closetag'
Plug 'airblade/vim-gitgutter'
Plug 'Townk/vim-autoclose'
" Auto end statements
Plug 'tpope/vim-endwise'
" gcc commenting
Plug 'tpope/vim-commentary'
" Markdown Support
Plug 'godlygeek/tabular'
Plug 'vimwiki/vimwiki'
" HTML shortcuts ,y,
Plug 'mattn/emmet-vim'
" Most Recently Used files ,f
Plug 'vim-scripts/mru.vim'
" <C-s>
Plug 'terryma/vim-multiple-cursors'
Plug 'itchyny/lightline.vim'
Plug 'mileszs/ack.vim'
Plug 'scrooloose/nerdtree', { 'on': [ 'NERDTreeToggle', 'NERDTree' ] }
" Syntax
Plug 'leafgarland/typescript-vim', { 'for': ['javascript', 'typescript'] }
Plug 'vim-ruby/vim-ruby', { 'for': 'ruby' }
Plug 'tpope/vim-rails', { 'for': 'ruby' }
Plug 'w0rp/ale'
Plug 'sbdchd/neoformat'
" Autonomous make integration (Compile)
Plug 'neomake/neomake'
Plug 'artur-shaik/vim-javacomplete2'
Plug 'dansomething/vim-eclim'
Plug 'Shougo/neosnippet'
Plug 'Shougo/neosnippet-snippets'
" Javascript Plugins
Plug 'othree/javascript-libraries-syntax.vim', { 'for': ['javascript', 'typescript'] }
Plug 'claco/jasmine.vim', { 'for': ['javascript', 'typescript'] }
Plug 'pangloss/vim-javascript', { 'for': 'javascript' }
Plug 'mxw/vim-jsx', { 'for': 'javascript' }
call plug#end()
let mapleader=","
let python_highlight_all = 1
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Fast editing and reloading of vimrc configs
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
map <leader>e :e! ~/.vimrc<cr>
autocmd! bufwritepost vimrc source ~/.vimrc
set timeoutlen=1000 ttimeoutlen=0
" CTags
set tags=./tags;
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Colors and Fonts
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Enable syntax highlighting
" For Neovim 0.1.3 and 0.1.4
let $NVIM_TUI_ENABLE_TRUE_COLOR=1
" Or if you have Neovim >= 0.1.5
if (has("termguicolors"))
set termguicolors
endif
" for vim 7
set t_Co=256
" for vim 8
if (has("termguicolors"))
set termguicolors
endif
syntax enable
set noshowmode
" Set utf8 as standard encoding and en_US as the standard language
set encoding=utf8
" Use Unix as the standard file type
set ffs=unix,dos,mac
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Files, backups and undo
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Turn backup off, since most stuff is in SVN, git et.c anyway...
set nobackup
set nowb
set noswapfile
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Text, tab and indent related
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Use spaces instead of tabs
set expandtab
" Be smart when using tabs ;)
set smarttab
" Linebreak on 500 characters
set lbr
set tw=500
set ai "Auto indent
set si "Smart indent
set wrap "Wrap lines
set guifont=InputMono:h14
set hidden
set history=500
set tabstop=2
set softtabstop=2
set shiftwidth=2
set textwidth=79
set expandtab
set autoindent
set fileformat=unix
set number
set mouse=a
set so=7
let $LANG='en'
set langmenu=en
"Always show current position
set ruler
" Height of the command bar
set cmdheight=1
" A buffer becomes hidden when it is abandoned
set hid
" Configure backspace so it acts as it should act
set backspace=eol,start,indent
set whichwrap+=<,>,h,l
" Ignore case when searching
set ignorecase
" When searching try to be smart about cases
set smartcase
" Highlight search results
set hlsearch
" Makes search act like search in modern browsers
set incsearch
" Don't redraw while executing macros (good performance config)
set lazyredraw
" For regular expressions turn magic on
set magic
" Show matching brackets when text indicator is over them
set showmatch
" How many tenths of a second to blink when matching brackets
set mat=2
" No annoying sound on errors
set noerrorbells
set novisualbell
set t_vb=
set tm=500
" Add a bit extra margin to the left
set foldcolumn=1
" write quit map
nmap <leader>wq :wq<cr>
nmap <leader>q :q!<cr>
nmap <leader>w :w<cr>
" NO MORE FAILED FILE SAVES BECAUSE MY FINGERS ARE TOO FAT TO LET UP ON SHIFT
" Open and Close Location List (Error Messages)
nmap <leader>lc :lclose<cr>
nmap <leader>lo :lopen<cr>
" Highlights single column if you go past 80 columns for code legibility, this comment is an example
highlight OverLength ctermbg=darkred ctermfg=white guibg=#592929
match OverLength /\%81v./
" Markdown and VimWiki Filetypes
autocmd BufRead,BufNewFile *.md setlocal spell
au BufNewFile,BufFilePre,BufRead *.md set filetype=markdown
autocmd BufRead,BufNewFile *.wiki setlocal spell
au BufNewFile,BufFilePre,BufRead *.wiki set filetype=wiki
" Vim yank to clipboard
set clipboard=unnamed
" Fix airline fonts from not displaying correctly
let g:airline_powerline_fonts = 1
set statusline+=%#warningmsg#
set statusline+=%{SyntasticStatuslineFlag()}
set statusline+=%*
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Nerd Tree
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" autocmd VimEnter * NERDTree | wincmd p
let NERDTreeIgnore=['\~$', '.o$', 'bower_components', 'node_modules', '\.pyc$', '__pycache__']
let g:NERDTreeWinPos = "right"
let NERDTreeShowHidden=0
let g:NERDTreeWinSize=35
nmap <leader>nn :NERDTreeToggle<cr>
nnoremap <silent> <leader>nb :NERDTreeFind<cr>
" Close NerdTree when vim exits
autocmd bufenter * if (winnr("$") == 1 && exists("b:NERDTree") && b:NERDTree.isTabTree()) | q | endif
" NERDTress File highlighting
function! NERDTreeHighlightFile(extension, fg, bg, guifg, guibg)
exec 'autocmd filetype nerdtree highlight ' . a:extension .' ctermbg='. a:bg .' ctermfg='. a:fg .' guibg='. a:guibg .' guifg='. a:guifg
exec 'autocmd filetype nerdtree syn match ' . a:extension .' #^\s\+.*'. a:extension .'$#'
endfunction
call NERDTreeHighlightFile('ini', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('md', 'blue', 'none', '#3366FF', '#151515')
call NERDTreeHighlightFile('yml', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('config', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('conf', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('json', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('html', 'yellow', 'none', 'yellow', '#151515')
call NERDTreeHighlightFile('css', 'Red', 'none', '#ffa500', '#151515')
call NERDTreeHighlightFile('sass', 'Red', 'none', '#ffa500', '#151515')
call NERDTreeHighlightFile('ts', 'cyan', 'none', 'cyan', '#151515')
call NERDTreeHighlightFile('js', 'cyan', 'none', 'cyan', '#151515')
call NERDTreeHighlightFile('rb', 'Magenta', 'none', '#ff00ff', '#151515')
" Syntax Hilighting for ANTLR
au BufRead,BufNewFile *.g set syntax=antlr3
" New File Skeletons
autocmd BufNewFile *
\ let templatefile = expand("~/.dotfiles/templates/") . expand("%:e")|
\ if filereadable(templatefile)|
\ execute "silent! 0r " . templatefile|
\ execute "normal Gdd/CURSOR\<CR>dw"|
\ endif|
" vim-markdown
set nofoldenable
let g:vim_markdown_new_list_item_indent = 2
let g:markdown_fenced_languages = ['html', 'python', 'ruby', 'yaml', 'haml', 'bash=sh']
" vim-wiki
nmap <leader>whtml :VimwikiAll2HTML<cr>
nmap <leader>wit :VimwikiTable
let g:user_emmet_leader_key='<Tab>'
let g:user_emmet_settings = {
\ 'javascript.jsx' : {
\ 'extends' : 'jsx',
\ },
\}
""""""""""""""""""""""""""""""
" => MRU plugin
""""""""""""""""""""""""""""""
let MRU_Max_Entries = 400
map <leader>f :MRU<CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => vim-multiple-cursors
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:multi_cursor_next_key="\<C-s>"
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Git gutter (Git diff)
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
let g:gitgutter_enabled=0
let g:gitgutter_highlight_lines=1
nnoremap <silent> <leader>d :GitGutterToggle<cr>
""""""""""""""""""""""""""""""
" => Visual mode related
""""""""""""""""""""""""""""""
" Visual mode pressing * or # searches for the current selection
" Super useful! From an idea by Michael Naumann
vnoremap <silent> * :<C-u>call VisualSelection('', '')<CR>/<C-R>=@/<CR><CR>
vnoremap <silent> # :<C-u>call VisualSelection('', '')<CR>?<C-R>=@/<CR><CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Moving around, tabs, windows and buffers
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Map <Space> to / (search) and Ctrl-<Space> to ? (backwards search)
map <space> /
map <c-space> ?
" Disable highlight when <leader><cr> is pressed
map <silent> <leader><cr> :noh<cr>
" Smart way to move between windows
map <C-j> <C-W>j
map <C-k> <C-W>k
map <C-h> <C-W>h
map <C-l> <C-W>l
" Useful mappings for managing tabs
map <leader>tn :tabnew<cr>
map <leader>to :tabonly<cr>
map <leader>tc :tabclose<cr>
map <leader>tm :tabmove
map <leader>t<leader> :tabnext
" Exit insert with JK
inoremap jk <Esc>
" Move lines of code around
nnoremap <C-j> :m .+1<CR>==
nnoremap <C-k> :m .-2<CR>==
inoremap <C-j> <Esc>:m .+1<CR>==gi
inoremap <C-k> <Esc>:m .-2<CR>==gi
vnoremap <C-j> :m '>+1<CR>gv=gv
vnoremap <C-k> :m '<-2<CR>gv=gv
" Let 'tl' toggle between this and the last accessed tab
let g:lasttab = 1
nmap <Leader>tl :exe "tabn ".g:lasttab<CR>
au TabLeave * let g:lasttab = tabpagenr()
" Opens a new tab with the current buffer's path
" Super useful when editing files in the same directory
map <leader>te :tabedit <c-r>=expand("%:p:h")<cr>/
" Switch CWD to the directory of the open buffer
map <leader>cd :cd %:p:h<cr>:pwd<cr>
" Specify the behavior when switching between buffers
try
set switchbuf=useopen,usetab,newtab
set stal=2
catch
endtry
" Return to last edit position when opening files (You want this!)
au BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") | exe "normal! g'\"" | endif
""""""""""""""""""""""""""""""
" => Status line
""""""""""""""""""""""""""""""
" Always show the status line
set laststatus=2
" Format the status line
set statusline=\ %{HasPaste()}%F%m%r%h\ %w\ \ CWD:\ %r%{getcwd()}%h\ \ \ Line:\ %l\ \ Column:\ %c
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Editing mappings
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remap VIM 0 to first non-blank character
map 0 ^
" Remaps jk to ignore wrapped lines
nmap j gj
nmap k gk
" Delete trailing white space on save, useful for Python and CoffeeScript ;)
func! DeleteTrailingWS()
exe "normal mz"
%s/\s\+$//ge
exe "normal `z"
endfunc
autocmd BufWrite *.py :call DeleteTrailingWS()
autocmd BufWrite *.coffee :call DeleteTrailingWS()
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" The Silver Searcher
" => Ag searching and cope displaying
" requires ag.vim - it's much better than vimgrep/grep
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" When you press gv you Ag after the selected text
vnoremap <silent> gv :call VisualSelection('gv', '')<CR>
" Open Ag and put the cursor in the right position
map <leader>g :Ag
" bind \ (backward slash) to grep shortcut
command! -nargs=+ -complete=file -bar Ag silent! grep! <args>|cwindow|redraw!
cnoreabbrev ag Ack
cnoreabbrev aG Ack
cnoreabbrev Ag Ack
cnoreabbrev AG Ack
nnoremap \ :Ag<SPACE>
if executable('ag')
" Use ag over grep
set grepprg=ag\ --nogroup\ --nocolor
let g:ackprg = 'ag --vimgrep --smart-case'
endif
" bind K to grep word under cursor
nnoremap K :grep! "\b<C-R><C-W>\b"<CR>:cw<CR><CR>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Spell checking
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Pressing ,ss will toggle and untoggle spell checking
map <leader>ss :setlocal spell!<cr>
" Shortcuts using <leader>
map <leader>sn ]s
map <leader>sp [s
map <leader>sa zg
map <leader>s? z=
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Misc
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" Remove the Windows ^M - when the encodings gets messed up
noremap <Leader>m mmHmt:%s/<C-V><cr>//ge<cr>'tzt'm
" Toggle paste mode on and off
map <leader>pp :setlocal paste!<cr>
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Helper functions
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
function! VisualSelection(direction, extra_filter) range
let l:saved_reg = @"
execute "normal! vgvy"
let l:pattern = escape(@", '\\/.*$^~[]')
let l:pattern = substitute(l:pattern, "\n$", "", "")
if a:direction == 'gv'
call CmdLine("Ag \"" . l:pattern . "\" " )
elseif a:direction == 'replace'
call CmdLine("%s" . '/'. l:pattern . '/')
endif
let @/ = l:pattern
let @" = l:saved_reg
endfunction
" Returns true if paste mode is enabled
function! HasPaste()
if &paste
return 'PASTE MODE '
endif
return ''
endfunction
" Disable scrollbars (real hackers don't use scrollbars for navigation!)
set guioptions-=r
set guioptions-=R
set guioptions-=l
set guioptions-=L
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => Turn persistent undo on
" means that you can undo even when you close a buffer/VIM
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
try
set undodir=~/.vim_runtime/temp_dirs/undodir
set undofile
catch
endtry
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" => General abbreviations
"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
iab xdate <c-r>=strftime("%d/%m/%y %H:%M:%S")
""""""""""""""""""""""""""""""
" => Python section
""""""""""""""""""""""""""""""
" let python_highlight_all = 1
" au FileType python syn keyword pythonDecorator True None False self
au BufNewFile,BufRead *.jinja set syntax=htmljinja
au BufNewFile,BufRead *.mako set ft=mako
au FileType gitcommit call setpos('.', [0, 1, 1, 0])
" important!!
set termguicolors
" for dark version
set background=dark
" the configuration options should be placed before `colorscheme edge`
let g:edge_disable_italic_comment = 1
let g:edge_popup_menu_selection_background = 'green'
" edge
colorscheme edge
" or this line
let g:lightline = {'colorscheme' : 'edge'}
" vertical line indentation
let g:indentLine_color_term = 239
let g:indentLine_color_gui = '#09AA08'
let g:indentLine_char = '│'
" When reading a buffer (after 1s), and when writing.
" call neomake#configure#automake('rw', 1000)
autocmd! BufWritePost,BufEnter * Neomake
let g:deoplete#enable_at_startup = 1
let g:AutoClosePumvisible = {"ENTER": "<C-Y>", "ESC": "<ESC>"}
nnoremap <C-p> :<C-u>FZF<CR>
let g:syntastic_javascript_checkers = ['eslint']
" w0rp/ale
let g:ale_emit_conflict_warnings = 0
let g:ale_sign_error = '●' " Less aggressive than the default '>>'
let g:ale_sign_warning = '.'
let g:ale_lint_on_enter = 0 " Less distracting when opening a new file
" Neoformat / Prettier
autocmd BufWritePre *.js Neoformat
autocmd BufWritePre *.jsx Neoformat
let g:ale_set_loclist = 0
let g:ale_set_quickfix = 1
" Conceal Level is dumb
autocmd InsertEnter *.json setlocal conceallevel=0 concealcursor=
autocmd InsertLeave *.json setlocal conceallevel=2 concealcursor=inc
autocmd InsertEnter *.md setlocal conceallevel=0 concealcursor=
autocmd InsertLeave *.md setlocal conceallevel=2 concealcursor=inc
" javacomplete config
autocmd FileType java setlocal omnifunc=javacomplete#Complete
nmap <F4> <Plug>(JavaComplete-Imports-AddSmart)
imap <F4> <Plug>(JavaComplete-Imports-AddSmart)
nmap <F5> <Plug>(JavaComplete-Imports-Add)
imap <F5> <Plug>(JavaComplete-Imports-Add)
nmap <F6> <Plug>(JavaComplete-Imports-AddMissing)
imap <F6> <Plug>(JavaComplete-Imports-AddMissing)
nmap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
imap <F7> <Plug>(JavaComplete-Imports-RemoveUnused)
" Run current file tests
map <leader>ju :JUnit %<cr>
" Run all tests
map <leader>ja :JUnit *<cr>

File diff suppressed because it is too large Load Diff

Binary file not shown.

View File

@@ -1,51 +0,0 @@
#-- START ZCACHE GENERATED FILE
#-- GENERATED: Wed Aug 9 14:15:05 CDT 2017
#-- ANTIGEN v2.0.2
_antigen () {
local -a _1st_arguments
_1st_arguments=('apply:Load all bundle completions' 'bundle:Install and load the given plugin' 'bundles:Bulk define bundles' 'cleanup:Clean up the clones of repos which are not used by any bundles currently loaded' 'cache-gen:Generate cache' 'init:Load Antigen configuration from file' 'list:List out the currently loaded bundles' 'purge:Remove a cloned bundle from filesystem' 'reset:Clears cache' 'restore:Restore the bundles state as specified in the snapshot' 'revert:Revert the state of all bundles to how they were before the last antigen update' 'selfupdate:Update antigen itself' 'snapshot:Create a snapshot of all the active clones' 'theme:Switch the prompt theme' 'update:Update all bundles' 'use:Load any (supported) zsh pre-packaged framework')
_1st_arguments+=('help:Show this message' 'version:Display Antigen version')
__bundle () {
_arguments '--loc[Path to the location <path-to/location>]' '--url[Path to the repository <github-account/repository>]' '--branch[Git branch name]' '--no-local-clone[Do not create a clone]'
}
__list () {
_arguments '--simple[Show only bundle name]' '--short[Show only bundle name and branch]' '--long[Show bundle records]'
}
__cleanup () {
_arguments '--force[Do not ask for confirmation]'
}
_arguments '*:: :->command'
if (( CURRENT == 1 ))
then
_describe -t commands "antigen command" _1st_arguments
return
fi
local -a _command_args
case "$words[1]" in
(bundle) __bundle ;;
(use) compadd "$@" "oh-my-zsh" "prezto" ;;
(cleanup) __cleanup ;;
(update|purge) compadd $(type -f \-antigen-get-bundles &> /dev/null || antigen &> /dev/null; -antigen-get-bundles --simple 2> /dev/null) ;;
(theme) compadd $(type -f \-antigen-get-themes &> /dev/null || antigen &> /dev/null; -antigen-get-themes 2> /dev/null) ;;
(list) __list ;;
esac
}
antigen () {
[[ "$ZSH_EVAL_CONTEXT" =~ "toplevel:*" || "$ZSH_EVAL_CONTEXT" =~ "cmdarg:*" ]] && source "/Users/winterjd/.dotfiles/zsh/autoload/antigen.zsh" && eval antigen $@;
return 0;
}
fpath+=(/Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-syntax-highlighting /Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-autosuggestions /Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-completions /Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-history-substring-search); PATH="$PATH:"
_antigen_compinit () {
autoload -Uz compinit; compinit -C -d "/Users/winterjd/.zsh/antigen/.zcompdump"; compdef _antigen antigen
add-zsh-hook -D precmd _antigen_compinit
}
autoload -Uz add-zsh-hook; add-zsh-hook precmd _antigen_compinit
compdef () {}
source "/Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-syntax-highlighting/zsh-syntax-highlighting.plugin.zsh";
source "/Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh";
source "/Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-completions/zsh-completions.plugin.zsh";
source "/Users/winterjd/.zsh/antigen/bundles/zsh-users/zsh-history-substring-search/zsh-history-substring-search.zsh";
typeset -aU _ANTIGEN_BUNDLE_RECORD; _ANTIGEN_BUNDLE_RECORD=('https://github.com/zsh-users/zsh-syntax-highlighting.git / plugin true' 'https://github.com/zsh-users/zsh-autosuggestions.git / plugin true' 'https://github.com/zsh-users/zsh-completions.git / plugin true' 'https://github.com/zsh-users/zsh-history-substring-search.git / plugin true')
_ANTIGEN_CACHE_LOADED=true ANTIGEN_CACHE_VERSION='v2.0.2'
#-- END ZCACHE GENERATED FILE

Binary file not shown.

View File

@@ -1 +0,0 @@
/home/bridgway/dotfiles/zsh

40
zshrc
View File

@@ -1,39 +1,45 @@
# Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
GITSTATUS_LOG_LEVEL=DEBUG
DEFAULT_USER="bridgway"
DEFAULT_USER="$USER"
plugins=(git)
# User configuration
# Editor
export EDITOR='nvim'
# Go
export GOPATH=$HOME/go
export PATH=$PATH:/usr/local/go/bin
export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin
# Local bin
export PATH="$PATH:$HOME/.local/bin:$HOME/bin"
# Node.js and NVM configuration
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
export PATH="$PATH:$HOME/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.10.3/bin:$HOME/.rvm/gems:$HOME/.rvm/bin:$HOME/bin:/usr/local/bin:/usr/local/nwjs:/usr/local/var/postgres"
# Rust/Cargo
[ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env"
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
export PATH="$PATH:/opt/nvim-linux64/bin"
source $ZSH/oh-my-zsh.sh
source $HOME/dotfiles/aliases.zsh
# source $HOME/.cargo/env
eval "$(ssh-agent -s)"
ssh-add -A 2>/dev/null;
# SSH agent
if [ -z "$SSH_AGENT_PID" ]; then
eval "$(ssh-agent -s)"
ssh-add -A 2>/dev/null
fi
# Set preferred editor
export EDITOR='vim'
KEYTIMEOUT=1
# Key timeout
export KEYTIMEOUT=1
# C++ include path
export CPLUS_INCLUDE_PATH=/usr/local/include
# FZF (if installed)
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
eval "$(starship init zsh)"
# Oh My Posh prompt
eval "$(oh-my-posh init zsh --config ~/.config/oh-my-posh/theme.omp.json)"