diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index cd63316..67e6617 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -130,13 +130,9 @@ require('lazy').setup({ }, { -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help indent_blankline.txt` - opts = { - char = '┊', - show_trailing_blankline_indent = false, - }, + "lukas-reineke/indent-blankline.nvim", + main = "ibl", + opts = {}, }, -- "gc" to comment visual regions/lines @@ -254,6 +250,11 @@ vim.api.nvim_create_autocmd('TextYankPost', { -- [[ Configure Telescope ]] -- See `:help telescope` and `:help telescope.setup()` require('telescope').setup { + pickers = { + colorscheme = { + enable_preview = true + } + }, defaults = { mappings = { i = { @@ -273,7 +274,7 @@ vim.keymap.set('n', '', require('telescope.builtin').buffers, { d vim.keymap.set('n', '/', function() -- You can pass additional configuration to telescope to change theme, layout, etc. require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { - winblend = 10, + winblend = 1, previewer = false, }) end, { desc = '[/] Fuzzily search in current buffer' }) @@ -290,9 +291,15 @@ require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'typescript', 'vimdoc', 'vim' }, + sync_install = false, + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, + ignore_install = {}, + + modules = {}, + highlight = { enable = true }, indent = { enable = true }, incremental_selection = { @@ -401,6 +408,9 @@ local on_attach = function(_, bufnr) end, { desc = 'Format current buffer with LSP' }) end +require('mason').setup() +require('mason-lspconfig').setup() + -- Enable the following language servers -- Feel free to add/remove any LSPs that you want here. They will automatically be installed. -- @@ -408,7 +418,30 @@ end -- the `settings` field of the server config. You must look up that documentation yourself. local servers = { -- clangd = {}, - gopls = {}, + gopls = { + gopls = { + gofumpt = true, + codelenses = { + run_govulncheck = true, + test = true, + vendor = true, + }, + hints = { + assignVariableTypes = true, + functionTypeParameters = true, + parameterNames = true, + rangeVariableNames = true, + }, + analyses = { + unusedparams = true, + }, + usePlaceholders = true, + completeUnimported = true, + directoryFilters = { "-.git", "-.vscode", "-.idea", "-.vscode-test", "-node_modules" }, + staticcheck = true, + }, + }, + pyright = {}, -- rust_analyzer = {}, -- tsserver = {}, diff --git a/nvim/.config/nvim/lazy-lock.json b/nvim/.config/nvim/lazy-lock.json index 66633d1..70da3dc 100644 --- a/nvim/.config/nvim/lazy-lock.json +++ b/nvim/.config/nvim/lazy-lock.json @@ -1,29 +1,32 @@ { - "Comment.nvim": { "branch": "master", "commit": "176e85eeb63f1a5970d6b88f1725039d85ca0055" }, - "LuaSnip": { "branch": "master", "commit": "45a4e899ca8f54936fe32ead6bba65f2a8d42e12" }, - "catppuccin": { "branch": "main", "commit": "e0dd3f9bb1513c98ab4ef9404ea26e18babf858a" }, + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "LuaSnip": { "branch": "master", "commit": "954c81b53989097faaff0fabc11c29575288c3e1" }, + "catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" }, "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, - "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, - "friendly-snippets": { "branch": "main", "commit": "8f5db6c5b691a6bbaa5dabd9afeb164ef8a06d04" }, - "gitsigns.nvim": { "branch": "main", "commit": "5a04466685008f29c71fa5ec25d421deb1c83fea" }, - "indent-blankline.nvim": { "branch": "master", "commit": "4541d690816cb99a7fc248f1486aa87f3abce91c" }, - "lazy.nvim": { "branch": "main", "commit": "14d76aac4bd3ff07c1fca074c210f28f766a931e" }, - "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "828a538ac8419f586c010996aefa5df6eb7c250b" }, - "mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "9b5b4c874b13e372500f07c37187ba06c0c1ac0a" }, - "neodev.nvim": { "branch": "main", "commit": "d89c108a091172fa46dbdcb8486c6645127aabe1" }, - "nvim-cmp": { "branch": "main", "commit": "c4e491a87eeacf0408902c32f031d802c7eafce8" }, - "nvim-lspconfig": { "branch": "master", "commit": "4b26897a80c41eb2f116b271cbdcd4686fb52dd6" }, - "nvim-treesitter": { "branch": "master", "commit": "51ea343f705a89326cff8dd7a0542d7fe0e6699a" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "52f1f3280d9092bfaee5c45be5962fabee3d9654" }, - "plenary.nvim": { "branch": "master", "commit": "1a6a7c929628566cf406aa7da1d048a1ddc7e9a8" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" }, - "vim-fugitive": { "branch": "master", "commit": "43f18ab9155c853a84ded560c6104e6300ad41da" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "87640f5a877b18bdd49884dbcac220fed924b867" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "neo-tree.nvim": { "branch": "v3.x", "commit": "230ff118613fa07138ba579b89d13ec2201530b9" }, + "neodev.nvim": { "branch": "main", "commit": "c4ce017bd4bacf60bf59330cec9e93c5d5e104a6" }, + "nui.nvim": { "branch": "main", "commit": "c9b4de623d19a85b353ff70d2ae9c77143abe69c" }, + "nvim-cmp": { "branch": "main", "commit": "0b751f6beef40fd47375eaf53d3057e0bfa317e4" }, + "nvim-lspconfig": { "branch": "master", "commit": "511609ae0311abfcfaed3c398429a147e895ce2c" }, + "nvim-treesitter": { "branch": "master", "commit": "180e1ca385442e35e1d18420221a148c5e045671" }, + "nvim-treesitter-context": { "branch": "master", "commit": "cfa8ee19ac9bae9b7fb2958eabe2b45b70c56ccb" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "nvim-web-devicons": { "branch": "master", "commit": "8b2e5ef9eb8a717221bd96cb8422686d65a09ed5" }, + "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, - "vim-tmux-navigator": { "branch": "master", "commit": "addb64a772cb4a3ae1f1363583012b2cada2cd66" }, - "which-key.nvim": { "branch": "main", "commit": "38b990f6eabf62014018b4aae70a97d7a6c2eb88" } + "vim-tmux-navigator": { "branch": "master", "commit": "7db70e08ea03b3e4d91f63713d76134512e28d7e" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/nvim/.config/nvim/lua/custom/plugins/autocmds.lua b/nvim/.config/nvim/lua/custom/plugins/autocmds.lua new file mode 100644 index 0000000..1f1bfc0 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/autocmds.lua @@ -0,0 +1,15 @@ +-- Create group to assign commands +-- "clear = true" must be set to prevent loading an +-- auto-command repeatedly every time a file is resourced +local autocmd_group = vim.api.nvim_create_augroup("Custom auto-commands", { clear = true }) + +vim.api.nvim_create_autocmd({ "BufWritePost" }, { + pattern = { "*.go"}, + desc = "Auto-format go files after saving", + callback = function() + local fileName = vim.api.nvim_buf_get_name(0) + vim.cmd("silent :!gofmt -w -e " .. fileName) + end, + group = autocmd_group, +}) +return {} diff --git a/nvim/.config/nvim/lua/custom/plugins/custom.lua b/nvim/.config/nvim/lua/custom/plugins/custom.lua index 0cebd3a..a8d7e95 100644 --- a/nvim/.config/nvim/lua/custom/plugins/custom.lua +++ b/nvim/.config/nvim/lua/custom/plugins/custom.lua @@ -11,7 +11,12 @@ return { { "catppuccin/nvim", name = "catppuccin", - priority = 1000 + priority = 1000, + config = function() + require("catppuccin").setup({ + transparent_background = true, + }) + end }, { -- Set lualine as statusline @@ -19,17 +24,27 @@ return { -- See `:help lualine.txt` opts = { options = { - icons_enabled = false, + icons_enabled = true, theme = 'catppuccin-mocha', component_separators = '|', section_separators = '', }, + sections = { + lualine_c = { + { + 'filename', + path = 1, + } + } + } }, }, - - "christoomey/vim-tmux-navigator", - -vim.keymap.set('n', 'sj', require('telescope.builtin').jumplist, { desc = '[S]earch [J]umplist' }) - + { + "nvim-treesitter/nvim-treesitter-context", + enable = true, + }, + { + "christoomey/vim-tmux-navigator", + }, } diff --git a/nvim/.config/nvim/lua/custom/plugins/keymaps.lua b/nvim/.config/nvim/lua/custom/plugins/keymaps.lua new file mode 100644 index 0000000..0cc4625 --- /dev/null +++ b/nvim/.config/nvim/lua/custom/plugins/keymaps.lua @@ -0,0 +1,2 @@ +vim.keymap.set('n', 'sj', require('telescope.builtin').jumplist, { desc = '[S]earch [J]umplist' }); +return {} diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 783fbaf..f93fbd2 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -11,7 +11,6 @@ set -sg escape-time 0 ## mouse set -g mouse on - # binds ## prefix @@ -20,6 +19,7 @@ set-option -g prefix C-a bind-key C-a send-prefix ## windows +bind c new-window -c "/Users/mike.vanbuskirk/truffle-build/" bind -n C-PgDn next-window bind -n C-PgUp previous-window diff --git a/zsh/.zshenv b/zsh/.zshenv index 7e83ae4..c3e95e2 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,4 +1,4 @@ -#!/usr/local/bin/zsh +#!/bin/zsh #GO stuff export GOPATH=$HOME/go @@ -8,7 +8,9 @@ export GOBIN=$GOPATH/bin export PYENV_ROOT=$HOME/.pyenv export WORKON_HOME=$HOME/.virtualenvs -#PATH -export PATH=/usr/local/opt/gettext/bin:/usr/local/bin:/usr/local/sbin:/usr/local/go/bin:$HOME/scripts:$GOBIN:$PYENV_ROOT/bin:~/.emacs.d/bin:$HOME/.tfenv/bin:$PATH +#gcloud +export USE_GKE_GCLOUD_AUTH_PLUGIN=True +#PATH +export PATH=/usr/local/opt/gettext/bin:/usr/local/bin:/usr/local/sbin:/usr/local/go/bin:$HOME/scripts:$GOBIN:$PYENV_ROOT/bin:~/.emacs.d/bin:$HOME/.tfenv/bin:/opt/homebrew/bin:$HOME/.local/bin:$PATH . "$HOME/.cargo/env" diff --git a/zsh/.zshrc b/zsh/.zshrc index 9c7a586..2488a1e 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -26,13 +26,55 @@ bindkey '^[[B' history-substring-search-down # Aliases alias ls='exa' alias cat='bat' +alias dev-tmux="~/scripts/dev-tmux.zsh" +alias history='history 1' + +# hist config +# https://www.reddit.com/r/zsh/comments/13jg6ru/nomyzsh_killed_my_history/jkg04xo/ +zopts_hist=( + bang_hist + extended_history + hist_expire_dups_first + hist_find_no_dups + hist_ignore_all_dups + hist_ignore_dups + hist_ignore_space + hist_reduce_blanks + hist_save_no_dups + hist_verify + inc_append_history + NO_hist_beep + NO_share_history +) +setopt $zopts_hist + +## hist file location +export HISTFILE=$HOME/.zsh_history +# the detailed meaning of the below three variable can be found in `man zshparam`. +export HISTSIZE=1000000 # the number of items for the internal history list +export SAVEHIST=1000000 # maximum number of items for the history file +export HISTTIMEFORMAT="[%F %T] " + +# The meaning of these options can be found in man page of `zshoptions`. +setopt HIST_IGNORE_ALL_DUPS # do not put duplicated command into history list +setopt HIST_SAVE_NO_DUPS # do not save duplicated command +setopt HIST_REDUCE_BLANKS # remove unnecessary blanks +setopt INC_APPEND_HISTORY_TIME # append command to history file immediately after execution +setopt EXTENDED_HISTORY # record command start time + +# gvm +[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm" # nvm export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm -PATH="$PATH:$(pyenv root)/shims:/usr/local/bin:/usr/bin:/bin:$HOME/.local/bin" +source /Users/mike.vanbuskirk/.docker/init-zsh.sh || true # Added by Docker Desktop +source /opt/homebrew/Caskroom/google-cloud-sdk/latest/google-cloud-sdk/completion.zsh.inc + +eval "$(pyenv init -)" +[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh