diff options
| -rw-r--r-- | .aliases | 2 | ||||
| -rwxr-xr-x | .bashrc | 50 | ||||
| -rw-r--r-- | .config/nvim/after/plugin/lsp.lua | 61 | ||||
| -rw-r--r-- | .config/nvim/after/plugin/treesitter.lua | 22 | ||||
| -rw-r--r-- | .config/nvim/init.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lazy-lock.json | 14 | ||||
| -rw-r--r-- | .config/nvim/lua/simenandre/init.lua | 39 | ||||
| -rw-r--r-- | .config/nvim/lua/simenandre/lazy.lua | 12 | ||||
| -rw-r--r-- | .config/nvim/lua/simenandre/set.lua | 32 | ||||
| -rw-r--r-- | .config/yadm/encrypt | 1 | ||||
| -rw-r--r-- | .gitconfig | 89 | ||||
| -rw-r--r-- | .github/renovate.json | 7 | ||||
| -rw-r--r-- | .path | 27 | ||||
| -rw-r--r-- | .utilities/package.json | 10 | ||||
| -rw-r--r-- | .zshrc | 10 | ||||
| -rw-r--r-- | Brewfile | 79 |
16 files changed, 302 insertions, 154 deletions
@@ -13,6 +13,8 @@ alias dl="cd ~/Downloads" alias l='ls -l' alias todo='todoist l --filter "#Inbox"' alias docker=podman +alias docker-compose=podman-compose +alias today="open 'obsidian://advanced-uri?daily=true'" # Kill all the tabs in Chrome to free up memory # [C] explained: http://www.commandlinefu.com/commands/view/402/exclude-grep-from-your-grepped-output-of-ps-alias-included-in-description @@ -1,54 +1,26 @@ #!/bin/bash -# ~/.bashrc: executed by bash(1) for non-login shells. -# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) -# for examples -# If not running interactively, don't do anything case $- in - *i*) ;; - *) return;; +*i*) ;; +*) return ;; esac -# Start the gpg-agent if not already running -# if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then -# gpg-connect-agent /bye >/dev/null 2>&1 -# fi -# gpg-connect-agent updatestartuptty /bye >/dev/null - # use a tty for gpg # solves error: "gpg: signing failed: Inappropriate ioctl for device" GPG_TTY=$(tty) export GPG_TTY -USE_GKE_GCLOUD_AUTH_PLUGIN=True - -# Set SSH to use gpg-agent -# unset SSH_AGENT_PID -# if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then -# if [[ -z "$SSH_AUTH_SOCK" ]] || [[ "$SSH_AUTH_SOCK" == *"apple.launchd"* ]]; then -# SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)" -# export SSH_AUTH_SOCK -# fi -# fi - # Shell -if [ -z "$SSH_AUTH_SOCK" ] ; then - eval `ssh-agent -s` - { +if [ -z "$SSH_AUTH_SOCK" ]; then + eval $(ssh-agent -s) + { /usr/bin/ssh-add -K - } &> /dev/null + } &>/dev/null fi { /usr/bin/ssh-add -K -} &> /dev/null - -# TODO: Fix /dev/fd/13:type:12979: bad option: -t issue -# source kubectl bash completion -# if hash kubectl 2>/dev/null; then -# # shellcheck source=/dev/null -# source <(kubectl completion bash) -# fi +} &>/dev/null # Set Emacs as VISUAL export VISUAL="emacs" @@ -60,11 +32,3 @@ for file in ~/.{aliases,path,extras}; do fi done unset file - -export VOLTA_HOME="$HOME/.volta" -export PATH="$VOLTA_HOME/bin:$PATH" -. "$HOME/.cargo/env" - -export PYENV_ROOT="$HOME/.pyenv" -command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" -eval "$(pyenv init -)" diff --git a/.config/nvim/after/plugin/lsp.lua b/.config/nvim/after/plugin/lsp.lua new file mode 100644 index 0000000..718acae --- /dev/null +++ b/.config/nvim/after/plugin/lsp.lua @@ -0,0 +1,61 @@ +local lsp = require("lsp-zero") + +lsp.preset("recommended") + +lsp.ensure_installed({ + 'tsserver', + 'rust_analyzer', + 'astro-language-server' +}) + +-- Fix Undefined global 'vim' +lsp.nvim_workspace() + + +local cmp = require('cmp') +local cmp_select = {behavior = cmp.SelectBehavior.Select} +local cmp_mappings = lsp.defaults.cmp_mappings({ + ['<C-p>'] = cmp.mapping.select_prev_item(cmp_select), + ['<C-n>'] = cmp.mapping.select_next_item(cmp_select), + ['<C-y>'] = cmp.mapping.confirm({ select = true }), + ["<C-Space>"] = cmp.mapping.complete(), +}) + +cmp_mappings['<Tab>'] = nil +cmp_mappings['<S-Tab>'] = nil + +lsp.setup_nvim_cmp({ + mapping = cmp_mappings +}) + +lsp.set_preferences({ + suggest_lsp_servers = false, + sign_icons = { + error = 'E', + warn = 'W', + hint = 'H', + info = 'I' + } +}) + +lsp.on_attach(function(client, bufnr) + local opts = {buffer = bufnr, remap = false} + + vim.keymap.set("n", "gd", function() vim.lsp.buf.definition() end, opts) + vim.keymap.set("n", "K", function() vim.lsp.buf.hover() end, opts) + vim.keymap.set("n", "<leader>vws", function() vim.lsp.buf.workspace_symbol() end, opts) + vim.keymap.set("n", "<leader>vd", function() vim.diagnostic.open_float() end, opts) + vim.keymap.set("n", "[d", function() vim.diagnostic.goto_next() end, opts) + vim.keymap.set("n", "]d", function() vim.diagnostic.goto_prev() end, opts) + vim.keymap.set("n", "<leader>vca", function() vim.lsp.buf.code_action() end, opts) + vim.keymap.set("n", "<leader>vrr", function() vim.lsp.buf.references() end, opts) + vim.keymap.set("n", "<leader>vrn", function() vim.lsp.buf.rename() end, opts) + vim.keymap.set("i", "<C-h>", function() vim.lsp.buf.signature_help() end, opts) +end) + +lsp.setup() + +vim.diagnostic.config({ + virtual_text = true +}) + diff --git a/.config/nvim/after/plugin/treesitter.lua b/.config/nvim/after/plugin/treesitter.lua new file mode 100644 index 0000000..ddc9eef --- /dev/null +++ b/.config/nvim/after/plugin/treesitter.lua @@ -0,0 +1,22 @@ +require'nvim-treesitter.configs'.setup { + -- A list of parser names, or "all" + ensure_installed = { "vimdoc", "javascript", "typescript", "c", "lua", "rust" }, + + -- Install parsers synchronously (only applied to `ensure_installed`) + sync_install = false, + + -- Automatically install missing parsers when entering buffer + -- Recommendation: set to false if you don't have `tree-sitter` CLI installed locally + auto_install = true, + + highlight = { + -- `false` will disable the whole extension + enable = true, + + -- Setting this to true will run `:h syntax` and tree-sitter at the same time. + -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). + -- Using this option may slow down your editor, and you may see some duplicate highlights. + -- Instead of true it can also be a list of languages + additional_vim_regex_highlighting = false, + }, +} diff --git a/.config/nvim/init.lua b/.config/nvim/init.lua new file mode 100644 index 0000000..c7ebd7e --- /dev/null +++ b/.config/nvim/init.lua @@ -0,0 +1 @@ +require("simenandre") diff --git a/.config/nvim/lazy-lock.json b/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..db5c4d4 --- /dev/null +++ b/.config/nvim/lazy-lock.json @@ -0,0 +1,14 @@ +{ + "LuaSnip": { "branch": "master", "commit": "954c81b53989097faaff0fabc11c29575288c3e1" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "copilot.vim": { "branch": "release", "commit": "2c31989063b145830d5f0bea8ab529d2aef2427b" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lsp-zero.nvim": { "branch": "v2.x", "commit": "ffebf6f7b0649f1eb81b37c37b75552f8ff96337" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "nvim-cmp": { "branch": "main", "commit": "41d7633e4146dce1072de32cea31ee31b056a131" }, + "nvim-lspconfig": { "branch": "master", "commit": "bd405e45c5fb122c16af8f87fa2dd7ab1981b243" }, + "nvim-treesitter": { "branch": "master", "commit": "a6c655629cad421e432aa84af32cbfe35375113a" }, + "rose-pine": { "branch": "main", "commit": "92762f4fa2144c05db760ea254f4c399a56a7ef5" }, + "vim-be-good": { "branch": "master", "commit": "c290810728a4f75e334b07dc0f3a4cdea908d351" } +}
\ No newline at end of file diff --git a/.config/nvim/lua/simenandre/init.lua b/.config/nvim/lua/simenandre/init.lua new file mode 100644 index 0000000..2382eee --- /dev/null +++ b/.config/nvim/lua/simenandre/init.lua @@ -0,0 +1,39 @@ +require("simenandre.lazy") +require("simenandre.set") + +vim.g.mapleader = " " -- Make sure to set `mapleader` before lazy so your mappings are correct + +require("lazy").setup({ + "ThePrimeagen/vim-be-good", + { + 'rose-pine/neovim', + name = 'rose-pine', + config = function() + vim.cmd('colorscheme rose-pine') + end + }, + { + 'VonHeikemen/lsp-zero.nvim', + branch = 'v2.x', + dependencies = { + -- LSP Support + {'neovim/nvim-lspconfig'}, -- Required + {'williamboman/mason.nvim'}, -- Optional + {'williamboman/mason-lspconfig.nvim'}, -- Optional + + -- Autocompletion + {'hrsh7th/nvim-cmp'}, -- Required + {'hrsh7th/cmp-nvim-lsp'}, -- Required + {'L3MON4D3/LuaSnip'}, -- Required + } + }, + { + "nvim-treesitter/nvim-treesitter", + run = function() + local ts_update = require('nvim-treesitter.install').update({ with_sync = true }) + ts_update() + end + }, + "github/copilot.vim" +}) + diff --git a/.config/nvim/lua/simenandre/lazy.lua b/.config/nvim/lua/simenandre/lazy.lua new file mode 100644 index 0000000..d14f916 --- /dev/null +++ b/.config/nvim/lua/simenandre/lazy.lua @@ -0,0 +1,12 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not vim.loop.fs_stat(lazypath) then + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) +end +vim.opt.rtp:prepend(lazypath) diff --git a/.config/nvim/lua/simenandre/set.lua b/.config/nvim/lua/simenandre/set.lua new file mode 100644 index 0000000..039e58c --- /dev/null +++ b/.config/nvim/lua/simenandre/set.lua @@ -0,0 +1,32 @@ +vim.opt.guicursor = "" + +vim.opt.nu = true +vim.opt.relativenumber = true + +vim.opt.tabstop = 2 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 2 +vim.opt.expandtab = true + +vim.opt.smartindent = true + +vim.opt.wrap = false + +vim.opt.swapfile = false +vim.opt.backup = false +vim.opt.undodir = os.getenv("HOME") .. "/.vim/undodir" +vim.opt.undofile = true + +vim.opt.hlsearch = false +vim.opt.incsearch = true + +vim.opt.termguicolors = true + +vim.opt.scrolloff = 8 +vim.opt.signcolumn = "yes" +vim.opt.isfname:append("@-@") + +vim.opt.updatetime = 50 + +vim.opt.colorcolumn = "80" + diff --git a/.config/yadm/encrypt b/.config/yadm/encrypt deleted file mode 100644 index 11e2a17..0000000 --- a/.config/yadm/encrypt +++ /dev/null @@ -1 +0,0 @@ -.trippl-timely-auth/config.json
\ No newline at end of file @@ -1,51 +1,68 @@ +[user] +name = Simen A. W. Olsen +email = so@bjerk.io +signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIMCyUn5BfmAnd/6xi0X1mYF/+jPOmCS0bpNUePF55gCY + [apply] - # Detect whitespace errors when applying a patch - whitespace = fix +# Detect whitespace errors when applying a patch +whitespace = fix + [core] - # Make `git rebase` safer on OS X - # More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/> - trustctime = false - editor = emacs +# Make `git rebase` safer on OS X +# More info: <http://www.git-tower.com/blog/make-git-rebase-safe-on-osx/> +trustctime = false +editor = nvim +excludesfile = /Users/cobraz/.gitignore_global + [color] - # Use colors in Git commands that are capable of colored output when - # outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) - ui = auto +# Use colors in Git commands that are capable of colored output when +# outputting to the terminal. (This is the default setting in Git ≥ 1.8.4.) +ui = auto [color "branch"] - current = yellow reverse - local = yellow - remote = green +current = yellow reverse +local = yellow +remote = green [color "diff"] - meta = yellow bold - frag = magenta bold # line info - old = red # deletions - new = green # additions +meta = yellow bold +frag = magenta bold # line info +old = red # deletions +new = green # additions [color "status"] - added = yellow - changed = green - untracked = cyan +added = yellow +changed = green +untracked = cyan [diff] - # Detect copies as well as renames - renames = copies +# Detect copies as well as renames +renames = copies + [help] - # Automatically correct and execute mistyped commands - autocorrect = 1 +# Automatically correct and execute mistyped commands +autocorrect = 1 + [merge] - # Include summaries of merged commits in newly created merge commit messages - log = true -#[commit] -# gpgsign = true -#[pull] -# rebase = true -# [gpg] -# program = gpg -[user] - name = Simen A. W. Olsen - email = so@bjerk.io +# Include summaries of merged commits in newly created merge commit messages +log = true + +[push] +autoSetupRemote = true + +[gpg] +program = ssh +format = ssh + [github] - user = cobraz +user = simenandre + [pull] - rebase = true +rebase = true + +[url "git@github.com:"] + insteadOf = https://github.com/ +[gpg "ssh"] + program = /Applications/1Password.app/Contents/MacOS/op-ssh-sign +[commit] + gpgsign = true diff --git a/.github/renovate.json b/.github/renovate.json deleted file mode 100644 index 3dbcfbe..0000000 --- a/.github/renovate.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": ["config:base"], - "lockFileMaintenance": { "enabled": true, "automerge": true }, - "rangeStrategy": "replace", - "postUpdateOptions": ["yarnDedupeHighest"] -} @@ -5,15 +5,10 @@ export GOPATH=~/go export REPOS=~/ghq -# NPM Utilities -export PATH="$PATH:$HOME/.utilities/node_modules/.bin" - -# Golang -export PATH="$PATH:$GOPATH/bin" - -# Volta -export VOLTA_HOME="$HOME/.volta" -export PATH="$VOLTA_HOME/bin:$PATH" +# Add pyenv to PATH +export PYENV_ROOT="$HOME/.pyenv" +command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" +eval "$(pyenv init -)" # Add yarn packages to PATH export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" @@ -21,9 +16,17 @@ 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" -# The next line updates PATH for Netlify's Git Credential Helper. -if [ -f "$HOME/.netlify/helper/path.zsh.inc" ]; then source "$HOME/.netlify/helper/path.zsh.inc"; fi - # 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" + +# Golang +export PATH="$GOPATH/bin:$PATH" + +# Volta +export VOLTA_HOME="$HOME/.volta" +export PATH="$VOLTA_HOME/bin:$PATH" + diff --git a/.utilities/package.json b/.utilities/package.json deleted file mode 100644 index 4e252be..0000000 --- a/.utilities/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "dotfiles", - "version": "1.0.0", - "main": "index.js", - "author": "Simen A. W. Olsen", - "license": "Apache-2.0", - "dependencies": { - "gcloud-config-select": "^1.0.1" - } -} @@ -99,10 +99,16 @@ source $ZSH/oh-my-zsh.sh # Example aliases # alias zshconfig="mate ~/.zshrc" # alias ohmyzsh="mate ~/.oh-my-zsh" -export VOLTA_HOME="$HOME/.volta" -export PATH="$VOLTA_HOME/bin:$PATH" if [[ -r "${HOME}/.bashrc" ]]; then # shellcheck source=/dev/null source "${HOME}/.bashrc" fi + +# pnpm +export PNPM_HOME="/Users/cobraz/Library/pnpm" +case ":$PATH:" in + *":$PNPM_HOME:"*) ;; + *) export PATH="$PNPM_HOME:$PATH" ;; +esac +# pnpm end
\ No newline at end of file @@ -1,6 +1,6 @@ brew "mas" -# Some other useful utilities like `sponge` and `yadm` +brew "ghq" brew "moreutils" brew "yadm" @@ -61,13 +61,9 @@ brew "ssh-copy-id" brew "tree" brew "vbindiff" brew "zopfli" -brew "ghq" brew "kubectl" -brew "emacs" brew "nmap" -brew "fork-cleaner" brew "whalebrew" -brew "helm" brew "gh" brew "microplane" brew "jq" @@ -76,84 +72,81 @@ brew "asciinema" brew "goreleaser" brew "caddy" brew "git-secret" -brew "pnpm" brew "tmate" brew "doctl" -brew "cilium-cli" brew "act" -# Active taps: Pulumi ❤️ +# Javascript Runtimes and tools +tap "oven-sh/bun" +brew "bun" +brew "pnpm" +brew "volta" +brew "corepack" +brew "deno" + +# IaC tap "pulumi/tap" brew "pulumi" brew "crd2pulumi" brew "kube2pulumi" brew "pulumictl" brew "tf2pulumi" - -## Taskfile.dev -tap "go-task/tap" -brew "go-task" - -## Buf -tap "bufbuild/buf" -brew "buf" -brew "clang-format" - -## Minio -tap "minio/stable" -brew "mc" +brew "esc" +brew "helm" +brew "cilium-cli" # Container-related tools brew "podman" brew "podman-compose" cask "podman-desktop" -# Tools to keep us up to date -tap "frdmn/formulas" -brew "homebrew-update-notifier" # Remember to run: brew services start homebrew-update-notifier - # Taskfile tap "go-task/tap" brew "go-task" -# Actively used applications -cask "google-drive" +brew "neovim" + +# Google stuff cask "google-chrome" cask "google-drive-file-stream" -cask "visual-studio-code" +cask "google-drive" cask "google-cloud-sdk" + +# Turso +tap "tursodatabase/tap" +brew "turso" + +# Video meetings +cask "microsoft-teams" +cask "zoom" + +# Actively used applications +cask "visual-studio-code" cask "spotify" cask "memory" cask "slack" -cask "postman" cask "sonos" -cask "drawio" cask "figma" cask "discord" cask "warp" -cask "steam" cask "grammarly" cask "microsoft-remote-desktop" -cask "minecraft" cask "postico" cask "cyberduck" -cask "pandoc" -cask "todoist" +cask "adobe-creative-cloud" +cask "1password" +cask "openvpn-connect" +cask "devtoys" -# Deprecated applications -# --> Currently none 😎 +# Obsidian stuff +cask "obsidian" +tap "yakitrak/yakitrak" # My tools -tap "cobraz/tools" +tap "simenandre/tools" brew "trippl-timely" brew "xlsx-mxlookup" # App Store applications -mas "Bitwarden", id: 1352778147 -mas "GarageBand", id: 682658836 -mas "Gifski", id: 1351639930 -mas "LanScan", id: 472226235 -mas "Microsoft Remote Desktop", id: 1295203466 mas "Outline", id: 1356178125 mas "Remote Desktop", id: 409907375 -mas "SonicWall Mobile Connect", id: 822514576 |
