aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimen A. W. Olsen <so@bjerk.io>2024-07-27 16:37:06 +0200
committerSimen A. W. Olsen <so@bjerk.io>2024-07-27 16:37:06 +0200
commitd296370b1ea7c6969a64a2c02e1eca84db223880 (patch)
tree55b6188bfaaa432f09274830fa05d4cb74c19aa3
parent3a9c76d44f5c60c0f66acad9cbfbc8f255aff0dc (diff)
downloaddotfiles-d296370b1ea7c6969a64a2c02e1eca84db223880.tar.gz
dotfiles-d296370b1ea7c6969a64a2c02e1eca84db223880.zip
Refactor shell and Neovim configurations, update aliases, plugins, and settings.
-rw-r--r--.aliases1
-rwxr-xr-x.bashrc34
-rw-r--r--.config/nvim/lazy-lock.json3
-rw-r--r--.config/nvim/lua/simenandre/plugins/dap.lua4
-rw-r--r--.config/nvim/lua/simenandre/plugins/oil.lua21
-rw-r--r--.config/nvim/lua/simenandre/plugins/plugins.lua23
-rw-r--r--.config/starship.toml164
-rw-r--r--.path4
-rw-r--r--.zshrc28
9 files changed, 227 insertions, 55 deletions
diff --git a/.aliases b/.aliases
index 4aa8f10..ebda55c 100644
--- a/.aliases
+++ b/.aliases
@@ -5,6 +5,7 @@ alias gfr='git fetch upstream && git rebase upstream/main'
alias git-undo='git reset --soft HEAD~1'
alias git-clean-branches="git for-each-ref --format '%(refname:short)' refs/heads | grep -v 'master\|main' | xargs git branch -D"
alias :q='exit'
+alias ls='ls --color'
# Generic / Random / Utility
alias rg="rg --hidden --glob '!.git' --glob '!node_modules'"
diff --git a/.bashrc b/.bashrc
deleted file mode 100755
index d646fed..0000000
--- a/.bashrc
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/bash
-
-case $- in
-*i*) ;;
-*) return ;;
-esac
-
-# use a tty for gpg
-# solves error: "gpg: signing failed: Inappropriate ioctl for device"
-GPG_TTY=$(tty)
-export GPG_TTY
-
-# Shell
-if [ -z "$SSH_AUTH_SOCK" ]; then
- eval $(ssh-agent -s)
- {
- /usr/bin/ssh-add -K
- } &>/dev/null
-fi
-
-{
- /usr/bin/ssh-add -K
-} &>/dev/null
-
-export VISUAL="nvim"
-
-for file in ~/.{aliases,path,extras}; do
- if [[ -r "$file" ]] && [[ -f "$file" ]]; then
- # shellcheck source=/dev/null
- source "$file"
- fi
-done
-unset file
-. "$HOME/.cargo/env"
diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json
index 0f99e38..372f8e0 100644
--- a/.config/nvim/lazy-lock.json
+++ b/.config/nvim/lazy-lock.json
@@ -16,6 +16,8 @@
"mini.nvim": { "branch": "main", "commit": "2d0f10540efdbb1f5c480ebe19ce4de451936a5d" },
"neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" },
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
+ "nvim-dap": { "branch": "master", "commit": "bc03b83c94d0375145ff5ac6a6dcf28c1241e06f" },
+ "nvim-dap-go": { "branch": "main", "commit": "5030d53097fed7b75524a04048d8dbf417fa0140" },
"nvim-lspconfig": { "branch": "master", "commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820" },
"nvim-treesitter": { "branch": "master", "commit": "11a3584b81c3249d2b6279305aee1c7ad273985a" },
"oil.nvim": { "branch": "master", "commit": "9e3a02252dc5686f374f79f50a13cfe7547c05af" },
@@ -26,5 +28,6 @@
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
"tokyonight.nvim": { "branch": "main", "commit": "9bf9ec53d5e87b025e2404069b71e7ebdc3a13e5" },
"vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" },
+ "vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" },
"which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }
} \ No newline at end of file
diff --git a/.config/nvim/lua/simenandre/plugins/dap.lua b/.config/nvim/lua/simenandre/plugins/dap.lua
new file mode 100644
index 0000000..686e535
--- /dev/null
+++ b/.config/nvim/lua/simenandre/plugins/dap.lua
@@ -0,0 +1,4 @@
+return {
+ "mfussenegger/nvim-dap",
+ "leoluz/nvim-dap-go",
+}
diff --git a/.config/nvim/lua/simenandre/plugins/oil.lua b/.config/nvim/lua/simenandre/plugins/oil.lua
new file mode 100644
index 0000000..1861543
--- /dev/null
+++ b/.config/nvim/lua/simenandre/plugins/oil.lua
@@ -0,0 +1,21 @@
+return {
+ "stevearc/oil.nvim",
+ opts = {},
+ -- Optional dependencies
+ dependencies = { "nvim-tree/nvim-web-devicons" },
+ config = function()
+ require("oil").setup({
+ columns = { "icon" },
+ keymaps = {
+ ["<C-h>"] = false,
+ ["<M-h>"] = "actions.select_split",
+ },
+ view_options = {
+ show_hidden = true,
+ },
+ })
+
+ -- Open parent directory in current window
+ vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" })
+ end,
+}
diff --git a/.config/nvim/lua/simenandre/plugins/plugins.lua b/.config/nvim/lua/simenandre/plugins/plugins.lua
index e502cca..d1bb456 100644
--- a/.config/nvim/lua/simenandre/plugins/plugins.lua
+++ b/.config/nvim/lua/simenandre/plugins/plugins.lua
@@ -137,7 +137,6 @@ return {
vim.keymap.set("n", "<leader>/", function()
-- You can pass additional configuration to Telescope to change the theme, layout, etc.
builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({
- winblend = 10,
previewer = false,
}))
end, { desc = "[/] Fuzzily search in current buffer" })
@@ -320,7 +319,7 @@ return {
-- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/
local servers = {
-- clangd = {},
- -- gopls = {},
+ gopls = {},
-- pyright = {},
-- rust_analyzer = {},
-- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs
@@ -594,7 +593,23 @@ return {
"nvim-treesitter/nvim-treesitter",
build = ":TSUpdate",
opts = {
- ensure_installed = { "bash", "c", "diff", "html", "lua", "luadoc", "markdown", "vim", "vimdoc" },
+ ensure_installed = {
+ "bash",
+ "c",
+ "diff",
+ "html",
+ "lua",
+ "luadoc",
+ "markdown",
+ "vim",
+ "vimdoc",
+ "go",
+ "json",
+ "yaml",
+ "toml",
+ "gomod",
+ "gosum",
+ },
-- Autoinstall languages that are not installed
auto_install = true,
highlight = {
@@ -604,7 +619,7 @@ return {
-- the list of additional_vim_regex_highlighting and disabled languages for indent.
additional_vim_regex_highlighting = { "ruby" },
},
- indent = { enable = true, disable = { "ruby" } },
+ indent = { enable = true, disable = { "ruby", "go" } },
},
config = function(_, opts)
-- [[ Configure Treesitter ]] See `:help nvim-treesitter`
diff --git a/.config/starship.toml b/.config/starship.toml
new file mode 100644
index 0000000..1fb89cb
--- /dev/null
+++ b/.config/starship.toml
@@ -0,0 +1,164 @@
+[aws]
+symbol = " "
+
+[buf]
+symbol = " "
+
+[c]
+symbol = " "
+
+[conda]
+symbol = " "
+
+[crystal]
+symbol = " "
+
+[dart]
+symbol = " "
+
+[directory]
+read_only = " 󰌾"
+
+[docker_context]
+symbol = " "
+
+[elixir]
+symbol = " "
+
+[elm]
+symbol = " "
+
+[fennel]
+symbol = " "
+
+[fossil_branch]
+symbol = " "
+
+[git_branch]
+symbol = " "
+
+[golang]
+symbol = " "
+
+[guix_shell]
+symbol = " "
+
+[haskell]
+symbol = " "
+
+[haxe]
+symbol = " "
+
+[hg_branch]
+symbol = " "
+
+[hostname]
+ssh_symbol = " "
+
+[java]
+symbol = " "
+
+[julia]
+symbol = " "
+
+[kotlin]
+symbol = " "
+
+[lua]
+symbol = " "
+
+[memory_usage]
+symbol = "󰍛 "
+
+[meson]
+symbol = "󰔷 "
+
+[nim]
+symbol = "󰆥 "
+
+[nix_shell]
+symbol = " "
+
+[nodejs]
+symbol = " "
+
+[ocaml]
+symbol = " "
+
+[os.symbols]
+Alpaquita = " "
+Alpine = " "
+AlmaLinux = " "
+Amazon = " "
+Android = " "
+Arch = " "
+Artix = " "
+CentOS = " "
+Debian = " "
+DragonFly = " "
+Emscripten = " "
+EndeavourOS = " "
+Fedora = " "
+FreeBSD = " "
+Garuda = "󰛓 "
+Gentoo = " "
+HardenedBSD = "󰞌 "
+Illumos = "󰈸 "
+Kali = " "
+Linux = " "
+Mabox = " "
+Macos = " "
+Manjaro = " "
+Mariner = " "
+MidnightBSD = " "
+Mint = " "
+NetBSD = " "
+NixOS = " "
+OpenBSD = "󰈺 "
+openSUSE = " "
+OracleLinux = "󰌷 "
+Pop = " "
+Raspbian = " "
+Redhat = " "
+RedHatEnterprise = " "
+RockyLinux = " "
+Redox = "󰀘 "
+Solus = "󰠳 "
+SUSE = " "
+Ubuntu = " "
+Unknown = " "
+Void = " "
+Windows = "󰍲 "
+
+[package]
+symbol = "󰏗 "
+
+[perl]
+symbol = " "
+
+[php]
+symbol = " "
+
+[pijul_channel]
+symbol = " "
+
+[python]
+symbol = " "
+
+[rlang]
+symbol = "󰟔 "
+
+[ruby]
+symbol = " "
+
+[rust]
+symbol = "󱘗 "
+
+[scala]
+symbol = " "
+
+[swift]
+symbol = " "
+
+[zig]
+symbol = " "
diff --git a/.path b/.path
index 0d0f939..e5f68db 100644
--- a/.path
+++ b/.path
@@ -16,10 +16,6 @@ export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/path.zsh.inc"
source "$(brew --prefix)/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc"
-# Add VSCode to PATH
-export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin"
-export PATH="/opt/homebrew/opt/mysql-client/bin:$PATH"
-
# NPM Utilities
export PATH="$PATH:$HOME/.utilities/node_modules/.bin"
diff --git a/.zshrc b/.zshrc
index 2d81e5c..6282e9f 100644
--- a/.zshrc
+++ b/.zshrc
@@ -1,19 +1,21 @@
# If you come from bash you might have to change your $PATH.
# export PATH=$HOME/bin:/usr/local/bin:$PATH
-# Path to your oh-my-zsh installation.
-export ZSH="/Users/cobraz/.oh-my-zsh"
+# Download Znap, if it's not there yet.
+[[ -r ~/.zsh_repos/znap/znap.zsh ]] ||
+ git clone --depth 1 -- \
+ https://github.com/marlonrichert/zsh-snap.git ~/.zsh_repos/znap
+source ~/.zsh_repos/znap/znap.zsh # Start Znap
+znap eval starship 'starship init zsh --print-full-init'
+znap prompt
-ZSH_THEME="robbyrussell"
+znap source marlonrichert/zsh-autocomplete
+znap source zsh-users/zsh-autosuggestions
-lugins=(git)
+for file in ~/.{aliases,path,extras}; do
+ if [[ -r "$file" ]] && [[ -f "$file" ]]; then
+ # shellcheck source=/dev/null
+ source "$file"
+ fi
+done
-source $ZSH/oh-my-zsh.sh
-if [[ -r "${HOME}/.bashrc" ]]; then
- # shellcheck source=/dev/null
- source "${HOME}/.bashrc"
-fi
-
-
-. "$HOME/.cargo/env"
-autoload -U compinit; compinit