From b49ac717433f806c34302312d73455d612d497bd Mon Sep 17 00:00:00 2001 From: Dustin Stiles Date: Wed, 7 Aug 2024 10:45:13 -0400 Subject: [PATCH] chore: initial commit --- bin/bin/t | 22 ++ bin/setup.sh | 11 + nvim/nvim/init.lua | 4 + nvim/nvim/lazy-lock.json | 60 ++++ nvim/nvim/lua/theme.lua | 3 + nvim/nvim/lua/wqtt/core/options.lua | 35 +++ nvim/nvim/lua/wqtt/core/remap.lua | 22 ++ nvim/nvim/lua/wqtt/lazy.lua | 23 ++ nvim/nvim/lua/wqtt/plugins/autopairs.lua | 25 ++ nvim/nvim/lua/wqtt/plugins/comment.lua | 16 + nvim/nvim/lua/wqtt/plugins/formatting.lua | 37 +++ nvim/nvim/lua/wqtt/plugins/gitsigns.lua | 6 + nvim/nvim/lua/wqtt/plugins/harpoon.lua | 10 + nvim/nvim/lua/wqtt/plugins/hop.lua | 9 + nvim/nvim/lua/wqtt/plugins/init.lua | 7 + nvim/nvim/lua/wqtt/plugins/lazygit.lua | 19 ++ nvim/nvim/lua/wqtt/plugins/linting.lua | 25 ++ nvim/nvim/lua/wqtt/plugins/lsp/lspconfig.lua | 96 ++++++ nvim/nvim/lua/wqtt/plugins/lsp/mason.lua | 48 +++ nvim/nvim/lua/wqtt/plugins/lualine.lua | 12 + nvim/nvim/lua/wqtt/plugins/luarocks.lua | 5 + nvim/nvim/lua/wqtt/plugins/neorg.lua | 31 ++ nvim/nvim/lua/wqtt/plugins/neoscroll.lua | 6 + nvim/nvim/lua/wqtt/plugins/nvim-cmp.lua | 57 ++++ nvim/nvim/lua/wqtt/plugins/nvimtree.lua | 283 ++++++++++++++++++ nvim/nvim/lua/wqtt/plugins/telescope.lua | 34 +++ .../lua/wqtt/plugins/themes/everforest.lua | 3 + nvim/nvim/lua/wqtt/plugins/themes/github.lua | 1 + nvim/nvim/lua/wqtt/plugins/themes/gruvbox.lua | 3 + .../nvim/lua/wqtt/plugins/themes/nightfox.lua | 3 + nvim/nvim/lua/wqtt/plugins/themes/nord.lua | 1 + nvim/nvim/lua/wqtt/plugins/themes/onedark.lua | 4 + nvim/nvim/lua/wqtt/plugins/themes/onenord.lua | 1 + .../lua/wqtt/plugins/themes/rose-pine.lua | 4 + .../nvim/lua/wqtt/plugins/themes/seoul256.lua | 3 + .../lua/wqtt/plugins/themes/solarized.lua | 10 + nvim/nvim/lua/wqtt/plugins/themes/sweetie.lua | 3 + .../lua/wqtt/plugins/themes/tokyo-night.lua | 3 + nvim/nvim/lua/wqtt/plugins/themes/vscode.lua | 3 + .../nvim/lua/wqtt/plugins/themes/zenbones.lua | 7 + nvim/nvim/lua/wqtt/plugins/todo-comments.lua | 10 + nvim/nvim/lua/wqtt/plugins/transparent.lua | 50 ++++ nvim/nvim/lua/wqtt/plugins/tree-sitter.lua | 39 +++ nvim/nvim/lua/wqtt/plugins/trouble.lua | 37 +++ nvim/nvim/lua/wqtt/plugins/which-key.lua | 13 + nvim/setup.sh | 7 + tmux/setup.sh | 12 + tmux/tmux/.tmux.conf | 20 ++ wezterm/setup.sh | 3 + wezterm/wezterm/.wezterm.lua | 16 + zsh/setup.sh | 16 + zsh/zsh/.zshrc | 32 ++ 52 files changed, 1210 insertions(+) create mode 100755 bin/bin/t create mode 100755 bin/setup.sh create mode 100644 nvim/nvim/init.lua create mode 100644 nvim/nvim/lazy-lock.json create mode 100644 nvim/nvim/lua/theme.lua create mode 100644 nvim/nvim/lua/wqtt/core/options.lua create mode 100644 nvim/nvim/lua/wqtt/core/remap.lua create mode 100644 nvim/nvim/lua/wqtt/lazy.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/autopairs.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/comment.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/formatting.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/gitsigns.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/harpoon.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/hop.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/init.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/lazygit.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/linting.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/lsp/lspconfig.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/lsp/mason.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/lualine.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/luarocks.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/neorg.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/neoscroll.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/nvim-cmp.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/nvimtree.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/telescope.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/everforest.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/github.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/gruvbox.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/nightfox.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/nord.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/onedark.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/onenord.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/rose-pine.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/seoul256.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/solarized.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/sweetie.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/tokyo-night.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/vscode.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/themes/zenbones.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/todo-comments.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/transparent.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/tree-sitter.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/trouble.lua create mode 100644 nvim/nvim/lua/wqtt/plugins/which-key.lua create mode 100755 nvim/setup.sh create mode 100755 tmux/setup.sh create mode 100644 tmux/tmux/.tmux.conf create mode 100755 wezterm/setup.sh create mode 100644 wezterm/wezterm/.wezterm.lua create mode 100755 zsh/setup.sh create mode 100644 zsh/zsh/.zshrc diff --git a/bin/bin/t b/bin/bin/t new file mode 100755 index 0000000..189956d --- /dev/null +++ b/bin/bin/t @@ -0,0 +1,22 @@ +#!/bin/bash + +# Ask zoxide which directory matches the query. +ZOXIDE_RESULT=$(zoxide query $1) + +if [ -z "$ZOXIDE_RESULT" ]; then + exit 0 +fi + +FOLDER=$(basename $ZOXIDE_RESULT) + +SESSION=$(tmux list-sessions | grep $FOLDER) + + +if [[ -z "${TMUX}" ]]; then + echo "not in tmux" + cd "$ZOXIDE_RESULT" && tmux new -t $1 +else + cd $ZOXIDE_RESULT + tmux new-session -d -s $1 + tmux switch-client -t $1 +fi diff --git a/bin/setup.sh b/bin/setup.sh new file mode 100755 index 0000000..c5d2a2c --- /dev/null +++ b/bin/setup.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +if [ -d "~/bin" ]; then + echo "detected existing ~/bin" + echo "please backup, remove, and try again" + exit 1 +fi + +mkdir ~/bin + +stow -t ~/bin bin diff --git a/nvim/nvim/init.lua b/nvim/nvim/init.lua new file mode 100644 index 0000000..83afed9 --- /dev/null +++ b/nvim/nvim/init.lua @@ -0,0 +1,4 @@ +require("wqtt.core.remap") +require("wqtt.lazy") +require("wqtt.core.options") +require("theme") diff --git a/nvim/nvim/lazy-lock.json b/nvim/nvim/lazy-lock.json new file mode 100644 index 0000000..6e65a1f --- /dev/null +++ b/nvim/nvim/lazy-lock.json @@ -0,0 +1,60 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "conform.nvim": { "branch": "master", "commit": "25d48271e3d4404ba017cb92a37d3a681c1ad149" }, + "everforest": { "branch": "master", "commit": "b49ba81e79b20d2b47bb71e98fa984bae90731be" }, + "friendly-snippets": { "branch": "main", "commit": "00ebcaa159e817150bd83bfe2d51fa3b3377d5c4" }, + "github-nvim-theme": { "branch": "main", "commit": "80b7f448d7f7fa36070ffbe2a43458e57058bb72" }, + "gitsigns.nvim": { "branch": "main", "commit": "58bd9e98d8e3c5a1c98af312e85247ee1afd3ed2" }, + "gruvbox.nvim": { "branch": "main", "commit": "7a1b23e4edf73a39642e77508ee6b9cbb8c60f9e" }, + "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, + "hop.nvim": { "branch": "v2", "commit": "90db1b2c61b820e230599a04fedcd2679e64bd07" }, + "lazy.nvim": { "branch": "main", "commit": "077102c5bfc578693f12377846d427f49bc50076" }, + "lazygit.nvim": { "branch": "main", "commit": "dc56df433bfbf107fee0139e187eb9750878fa84" }, + "lspkind.nvim": { "branch": "master", "commit": "cff4ae321a91ee3473a92ea1a8c637e3a9510aec" }, + "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, + "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, + "luarocks.nvim": { "branch": "main", "commit": "1db9093915eb16ba2473cfb8d343ace5ee04130a" }, + "lush.nvim": { "branch": "main", "commit": "6a254139d077ad53be7e4f3602c8da0c84447fd9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "62360f061d45177dda8afc1b0fd1327328540301" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "neodev.nvim": { "branch": "main", "commit": "46aa467dca16cf3dfe27098042402066d2ae242d" }, + "neorg": { "branch": "main", "commit": "81ee90cb2d72ac43bfadb7dd276646f34c8f85be" }, + "neoscroll.nvim": { "branch": "master", "commit": "532dcc8cea4287c4cad6bb77532989a8217cfc7b" }, + "nightfox.nvim": { "branch": "main", "commit": "d3e8b1acc095baf57af81bb5e89fe7c4359eb619" }, + "nord.nvim": { "branch": "master", "commit": "80c1e5321505aeb22b7a9f23eb82f1e193c12470" }, + "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, + "nvim-autopairs": { "branch": "master", "commit": "e38c5d837e755ce186ae51d2c48e1b387c4425c6" }, + "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" }, + "nvim-lint": { "branch": "master", "commit": "efc6fc83f0772283e064c53a8f9fb5645bde0bc0" }, + "nvim-lsp-file-operations": { "branch": "master", "commit": "92a673de7ecaa157dd230d0128def10beb56d103" }, + "nvim-lspconfig": { "branch": "master", "commit": "e6528f4613c8db2e04be908eb2b5886d63f62a98" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, + "nvim-tree.lua": { "branch": "master", "commit": "48d0e82f9434691cc50d970898142a8c084a49d6" }, + "nvim-treesitter": { "branch": "master", "commit": "d7353a6b72008b38aa873ace49aa97bea257941b" }, + "nvim-ts-autotag": { "branch": "main", "commit": "dc5e1687ab76ee02e0f11c5ce137f530b36e98b3" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "6b5f95aa4d24f2c629a74f2c935c702b08dbde62" }, + "nvim-web-devicons": { "branch": "master", "commit": "3722e3d1fb5fe1896a104eb489e8f8651260b520" }, + "onedarkpro.nvim": { "branch": "main", "commit": "c825a3490dc3f6fb413607ed2602c1280a127756" }, + "onenord.nvim": { "branch": "main", "commit": "70b716fd36a18284ad768402523b79ccdadafedf" }, + "pathlib.nvim": { "branch": "main", "commit": "7a5a6facd29e306bc73a37719fa67c0d2226f852" }, + "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, + "rose-pine": { "branch": "main", "commit": "e4b08d74b7272cb21e4e9c71b8b9e0830fd722fe" }, + "seoul256.vim": { "branch": "master", "commit": "b21c9e63f7c2d543db8b34a393a0b42ec7e9b891" }, + "solarized.nvim": { "branch": "main", "commit": "3a197875c76803e4a64d4b1491c6dd0d22b161cd" }, + "sweetie.nvim": { "branch": "master", "commit": "4f0dc96ea3adeeac0507eb64cb7dc70fe0ddcecf" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, + "todo-comments.nvim": { "branch": "main", "commit": "8f45f353dc3649cb9b44cecda96827ea88128584" }, + "tokyonight.nvim": { "branch": "main", "commit": "b0e7c7382a7e8f6456f2a95655983993ffda745e" }, + "transparent.nvim": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" }, + "trouble.nvim": { "branch": "main", "commit": "6efc446226679fda0547c0fd6a7892fd5f5b15d8" }, + "vscode.nvim": { "branch": "main", "commit": "f6c88cdf9d37d5c0bb1e492a13a3b4b4cc4dd13e" }, + "which-key.nvim": { "branch": "main", "commit": "6c1584eb76b55629702716995cca4ae2798a9cca" }, + "zenbones.nvim": { "branch": "main", "commit": "e9ba8305f65524f9355515cdd8704b2c6ba2def6" } +} diff --git a/nvim/nvim/lua/theme.lua b/nvim/nvim/lua/theme.lua new file mode 100644 index 0000000..9a458a3 --- /dev/null +++ b/nvim/nvim/lua/theme.lua @@ -0,0 +1,3 @@ +vim.opt.background = "dark" + +vim.cmd("colorscheme dawnfox") diff --git a/nvim/nvim/lua/wqtt/core/options.lua b/nvim/nvim/lua/wqtt/core/options.lua new file mode 100644 index 0000000..f91759a --- /dev/null +++ b/nvim/nvim/lua/wqtt/core/options.lua @@ -0,0 +1,35 @@ +-- Line Numbers +vim.opt.number = true +vim.opt.relativenumber = true + +-- Tabs & Indentation +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true +vim.opt.autoindent = true + +-- No line wraps +vim.opt.wrap = false + +-- Search Settings +vim.opt.ignorecase = true +vim.opt.smartcase = true + +-- Higlight the line the cursor is currently on +vim.opt.cursorline = true + +-- Tell neovim that our terminal is true color +vim.opt.termguicolors = true +vim.opt.signcolumn = "yes" + +-- Allow backspace to work as you would expect +vim.opt.backspace = "indent,eol,start" + +-- Use system clipboard as default register +vim.opt.clipboard:append("unnamedplus") + +vim.cmd([[ + set nobackup "no backup files + set nowritebackup "only in case you don't want a backup file while editing + set noswapfile "no swap files +]]) diff --git a/nvim/nvim/lua/wqtt/core/remap.lua b/nvim/nvim/lua/wqtt/core/remap.lua new file mode 100644 index 0000000..78708ba --- /dev/null +++ b/nvim/nvim/lua/wqtt/core/remap.lua @@ -0,0 +1,22 @@ +vim.g.mapleader = " " + +vim.keymap.set("i", "jj", "", { desc = "Exit insert mode with jj" }) +vim.keymap.set("n", "nh", ":nohl", { desc = "Clear highlights with nh" }) + +vim.keymap.set("n", "wc", ":w", { desc = "Write the current buffer" }) +vim.keymap.set("n", "wa", ":wa", { desc = "Write all open buffers" }) +vim.keymap.set("n", "q", ":q", { desc = "Quit" }) + +vim.keymap.set("n", "ns", ":source ~/.config/nvim/init.lua", { desc = "Source the nvim configuration" }) + +vim.keymap.set("v", "fmt", ":!column -t -s '|' -o '|'", { desc = "format the selected markdown table" }) + +vim.keymap.set("n", "rgm", ":! go run main.go", { desc = "Run the main.go file" }) + +vim.keymap.set("n", "fc", ":foldclose", { desc = "Close a fold" }) +vim.keymap.set("n", "fo", ":foldopen", { desc = "Open a fold" }) + +vim.cmd([[ + vnoremap :m '<-2gv=gv + vnoremap :m '>+1gv=gv +]]) diff --git a/nvim/nvim/lua/wqtt/lazy.lua b/nvim/nvim/lua/wqtt/lazy.lua new file mode 100644 index 0000000..e948789 --- /dev/null +++ b/nvim/nvim/lua/wqtt/lazy.lua @@ -0,0 +1,23 @@ +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" +if not (vim.uv or 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) + +require("lazy").setup({ + { import = "wqtt.plugins" }, + { import = "wqtt.plugins.lsp" }, + { import = "wqtt.plugins.themes" }, +}, { + change_detection = { + enabled = true, + notify = true, + }, +}) diff --git a/nvim/nvim/lua/wqtt/plugins/autopairs.lua b/nvim/nvim/lua/wqtt/plugins/autopairs.lua new file mode 100644 index 0000000..50274c1 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/autopairs.lua @@ -0,0 +1,25 @@ +return { + "windwp/nvim-autopairs", + event = { "InsertEnter" }, + dependencies = { + "hrsh7th/nvim-cmp", + }, + config = function() + local autopairs = require("nvim-autopairs") + + autopairs.setup({ + check_ts = true, + ts_config = { + lua = { "string" }, + javascript = { "template_string" }, + java = false, + }, + }) + + local cmp_autopairs = require("nvim-autopairs.completion.cmp") + + local cmp = require("cmp") + + cmp.event:on("confirm_done", cmp_autopairs.on_confirm_done()) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/comment.lua b/nvim/nvim/lua/wqtt/plugins/comment.lua new file mode 100644 index 0000000..92e52f4 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/comment.lua @@ -0,0 +1,16 @@ +return { + "numToStr/Comment.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "JoosepAlviste/nvim-ts-context-commentstring", + }, + config = function() + local comment = require("Comment") + + local ts_context_contextstring = require("ts_context_commentstring.integrations.comment_nvim") + + comment.setup({ + pre_hook = ts_context_contextstring.create_pre_hook(), + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/formatting.lua b/nvim/nvim/lua/wqtt/plugins/formatting.lua new file mode 100644 index 0000000..a037f7d --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/formatting.lua @@ -0,0 +1,37 @@ +return { + "stevearc/conform.nvim", + event = { "BufReadPre", "BufNewFile" }, + config = function() + local conform = require("conform") + + conform.setup({ + formatters_by_ft = { + javascript = { "prettier" }, + typescript = { "prettier" }, + javascriptreact = { "prettier" }, + typescriptreact = { "prettier" }, + css = { "prettier" }, + html = { "prettier" }, + json = { "prettier" }, + yaml = { "prettier" }, + markdown = { "prettier" }, + graphql = { "prettier" }, + lua = { "stylua" }, + elm = { "elm-format" }, + }, + format_on_save = { + lsp_fallback = true, + async = false, + timeout_ms = 1000, + }, + }) + + vim.keymap.set({ "n", "v" }, "mp", function() + conform.format({ + lsp_fallback = true, + async = false, + timeout_ms = 1000, + }) + end, { desc = "Format file or range" }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/gitsigns.lua b/nvim/nvim/lua/wqtt/plugins/gitsigns.lua new file mode 100644 index 0000000..df45ec6 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/gitsigns.lua @@ -0,0 +1,6 @@ +return { + "lewis6991/gitsigns.nvim", + config = function() + require("gitsigns").setup() + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/harpoon.lua b/nvim/nvim/lua/wqtt/plugins/harpoon.lua new file mode 100644 index 0000000..1c3781e --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/harpoon.lua @@ -0,0 +1,10 @@ +return { + "ThePrimeagen/harpoon", + config = function() + local mark = require("harpoon.mark") + local ui = require("harpoon.ui") + + vim.keymap.set("n", "a", function() mark.add_file() end, { desc = "Add the current file to harpoon" }) + vim.keymap.set("n", "h", function() ui.toggle_quick_menu() end, { desc = "Show the harpoon quick menu" }) + end +} diff --git a/nvim/nvim/lua/wqtt/plugins/hop.lua b/nvim/nvim/lua/wqtt/plugins/hop.lua new file mode 100644 index 0000000..6dc1d46 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/hop.lua @@ -0,0 +1,9 @@ +return { + "phaazon/hop.nvim", + branch = "v2", -- optional but strongly recommended + config = function() + require("hop").setup() + + vim.keymap.set("n", "gw", "HopWord", { desc = "Activate word jumping" }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/init.lua b/nvim/nvim/lua/wqtt/plugins/init.lua new file mode 100644 index 0000000..943fccd --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/init.lua @@ -0,0 +1,7 @@ +return { + "nvim-lua/plenary.nvim", + { + 'nvim-lualine/lualine.nvim', + requires = { 'nvim-tree/nvim-web-devicons', opt = true }, + }, +} diff --git a/nvim/nvim/lua/wqtt/plugins/lazygit.lua b/nvim/nvim/lua/wqtt/plugins/lazygit.lua new file mode 100644 index 0000000..3574f55 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/lazygit.lua @@ -0,0 +1,19 @@ +return { + "kdheepak/lazygit.nvim", + cmd = { + "LazyGit", + "LazyGitConfig", + "LazyGitCurrentFile", + "LazyGitFilter", + "LazyGitFilterCurrentFile", + }, + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", + }, + -- setting the keybinding for LazyGit with 'keys' is recommended in + -- order to load the plugin when the command is run for the first time + keys = { + { "lg", "LazyGit", desc = "LazyGit" }, + }, +} diff --git a/nvim/nvim/lua/wqtt/plugins/linting.lua b/nvim/nvim/lua/wqtt/plugins/linting.lua new file mode 100644 index 0000000..eac3387 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/linting.lua @@ -0,0 +1,25 @@ +return { + "mfussenegger/nvim-lint", + event = { "BufReadPre", "BufNewFile" }, + config = function() + local lint = require("lint") + + lint.linters_by_ft = { + python = { "pylint" }, + go = { "revive" }, + } + + local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true }) + + vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost", "InsertLeave" }, { + group = lint_augroup, + callback = function() + lint.try_lint() + end, + }) + + vim.keymap.set("n", "l", function() + lint.try_lint() + end, { desc = "Trigger linting for current file" }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/lsp/lspconfig.lua b/nvim/nvim/lua/wqtt/plugins/lsp/lspconfig.lua new file mode 100644 index 0000000..53e7e81 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/lsp/lspconfig.lua @@ -0,0 +1,96 @@ +return { + "neovim/nvim-lspconfig", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "hrsh7th/cmp-nvim-lsp", + { "antosha417/nvim-lsp-file-operations", config = true }, + { "folke/neodev.nvim", opts = {} }, + }, + config = function() + local lspconfig = require("lspconfig") + local mason_lspconfig = require("mason-lspconfig") + local cmp_nvim_lsp = require("cmp_nvim_lsp") + + lspconfig.gleam.setup({}) + + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("UserLspConfig", {}), + callback = function(ev) + local opts = { buffer = ev.buf, silent = true } + + opts.desc = "Show LSP references" + vim.keymap.set("n", "gR", "Telescope lsp_references", opts) + + opts.desc = "Go to declaration" + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts) + + opts.desc = "Show LSP definitions" + vim.keymap.set("n", "gi", "Telescope lsp_definitions", opts) + + opts.desc = "Show LSP type definitions" + vim.keymap.set("n", "gt", "Telescope lsp_type_definitions", opts) + + opts.desc = "See available code actions" + vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts) + + opts.desc = "Smart rename" + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts) + + opts.desc = "Show buffer diagnostics" + vim.keymap.set("n", "D", "Telescope diagnostics bufnr=0", opts) + + opts.desc = "Show line diagnostics" + vim.keymap.set("n", "d", vim.diagnostic.open_float, opts) + + opts.desc = "Go to previous diagnostic" + vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, opts) + + opts.desc = "Go to next diagnostic" + vim.keymap.set("n", "]d", vim.diagnostic.goto_next, opts) + + opts.desc = "Show documentation for current symbol" + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts) + + opts.desc = "Restart LSP" + vim.keymap.set("n", "rs", ":LspRestart", opts) + end, + }) + + local capabilities = cmp_nvim_lsp.default_capabilities() + + mason_lspconfig.setup_handlers({ + function(server_name) + lspconfig[server_name].setup({ + capabilities = capabilities, + }) + end, + ["tailwindcss"] = function() + lspconfig["tailwindcss"].setup({ + capabilities = capabilities, + filetypes = { "html", "ts", "tsx", "js", "jsx", "elm", "gleam" }, + }) + end, + ["clangd"] = function() + lspconfig["clangd"].setup({ + capabilities = capabilities, + filetypes = { "c", "cpp" }, + }) + end, + ["lua_ls"] = function() + lspconfig["lua_ls"].setup({ + capabilities = capabilities, + settings = { + Lua = { + diagnostics = { + globals = { "vim" }, + }, + completion = { + callSnippet = "Replace", + }, + }, + }, + }) + end, + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/lsp/mason.lua b/nvim/nvim/lua/wqtt/plugins/lsp/mason.lua new file mode 100644 index 0000000..26a0d91 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/lsp/mason.lua @@ -0,0 +1,48 @@ +return { + "williamboman/mason.nvim", + dependencies = { + "williamboman/mason-lspconfig.nvim", + "WhoIsSethDaniel/mason-tool-installer.nvim", + }, + config = function() + local mason = require("mason") + local mason_lspconfig = require("mason-lspconfig") + + mason.setup() + + mason_lspconfig.setup({ + ensure_installed = { + "tsserver", + "html", + "cssls", + "tailwindcss", + "lua_ls", + "graphql", + "prismals", + "pyright", + "elmls", + "golangci_lint_ls", + "gopls", + "yamlls", + "terraformls", + "rust_analyzer", + "marksman", + "elixirls", + "docker_compose_language_service", + "cypher_ls", + "clangd", + "bashls", + }, + }) + + local mason_tool_installer = require("mason-tool-installer") + + mason_tool_installer.setup({ + ensure_installed = { + "prettier", + "stylua", + "elm-format", + }, + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/lualine.lua b/nvim/nvim/lua/wqtt/plugins/lualine.lua new file mode 100644 index 0000000..c178872 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/lualine.lua @@ -0,0 +1,12 @@ +return { + "nvim-lualine/lualine.nvim", + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require("lualine").setup({ + options = { + component_separators = { left = "", right = "" }, + section_separators = { left = "", right = "" }, + }, + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/luarocks.lua b/nvim/nvim/lua/wqtt/plugins/luarocks.lua new file mode 100644 index 0000000..e877dae --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/luarocks.lua @@ -0,0 +1,5 @@ +return { + "vhyrro/luarocks.nvim", + priority = 1000, -- Very high priority is required, luarocks.nvim should run as the first plugin in your config. + config = true, +} diff --git a/nvim/nvim/lua/wqtt/plugins/neorg.lua b/nvim/nvim/lua/wqtt/plugins/neorg.lua new file mode 100644 index 0000000..1c8f4db --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/neorg.lua @@ -0,0 +1,31 @@ +return { + "nvim-neorg/neorg", + lazy = false, -- Disable lazy loading as some `lazy.nvim` distributions set `lazy = true` by default + version = "*", -- Pin Neorg to the latest stable release + config = function() + require("neorg").setup({ + load = { + ["core.defaults"] = {}, + ["core.dirman"] = { + config = { + workspaces = { + stablekernel = "~/repos/notes/stablekernel", + }, + }, + }, + ["core.concealer"] = {}, + ["core.summary"] = {}, + ["core.completion"] = { + config = { + engine = "nvim-cmp", + }, + }, + ["core.integrations.nvim-cmp"] = {}, + }, + }) + + vim.keymap.set("n", "ni", ":Neorg inject-metadata", { desc = "Inject neorg metadata" }) + vim.keymap.set("n", "nu", ":Neorg update-metadata", { desc = "Update neorg metadata" }) + vim.keymap.set("n", "nt", ":Neorg toc", { desc = "Update neorg metadata" }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/neoscroll.lua b/nvim/nvim/lua/wqtt/plugins/neoscroll.lua new file mode 100644 index 0000000..b79bc5a --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/neoscroll.lua @@ -0,0 +1,6 @@ +return { + "karb94/neoscroll.nvim", + config = function() + require("neoscroll").setup({}) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/nvim-cmp.lua b/nvim/nvim/lua/wqtt/plugins/nvim-cmp.lua new file mode 100644 index 0000000..cc09f49 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/nvim-cmp.lua @@ -0,0 +1,57 @@ +return { + "hrsh7th/nvim-cmp", + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + { + "L3MON4D3/LuaSnip", + version = "v2.*", + build = "make install_jsregexp", + }, + "saadparwaiz1/cmp_luasnip", + "rafamadriz/friendly-snippets", + "onsails/lspkind.nvim", + "hrsh7th/cmp-nvim-lsp", + }, + config = function() + local cmp = require("cmp") + local luasnip = require("luasnip") + local lspkind = require("lspkind") + + require("luasnip.loaders.from_vscode").lazy_load() + + cmp.setup({ + completion = { + completeopt = "menu,menuone,preview,noselect", + }, + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.select_prev_item(), + [""] = cmp.mapping.select_next_item(), + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ select = false }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "buffer" }, + { name = "path" }, + { name = "neorg" }, + }), + formatting = { + format = lspkind.cmp_format({ + maxwidth = 50, + ellipsis_char = "...", + }), + }, + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/nvimtree.lua b/nvim/nvim/lua/wqtt/plugins/nvimtree.lua new file mode 100644 index 0000000..221b9fc --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/nvimtree.lua @@ -0,0 +1,283 @@ +return { + "nvim-tree/nvim-tree.lua", + dependencies = "nvim-tree/nvim-web-devicons", + config = function() + require("nvim-tree").setup({ -- BEGIN_DEFAULT_OPTS + on_attach = "default", + hijack_cursor = false, + auto_reload_on_write = true, + disable_netrw = false, + hijack_netrw = true, + hijack_unnamed_buffer_when_opening = false, + root_dirs = {}, + prefer_startup_root = false, + sync_root_with_cwd = false, + reload_on_bufenter = false, + respect_buf_cwd = false, + select_prompts = false, + sort = { + sorter = "name", + folders_first = true, + files_first = false, + }, + view = { + centralize_selection = false, + cursorline = true, + debounce_delay = 15, + side = "right", + preserve_window_proportions = false, + number = false, + relativenumber = false, + signcolumn = "yes", + width = 30, + float = { + enable = false, + quit_on_focus_loss = true, + open_win_config = { + relative = "editor", + border = "rounded", + width = 30, + height = 30, + row = 1, + col = 1, + }, + }, + }, + renderer = { + add_trailing = false, + group_empty = false, + full_name = false, + root_folder_label = ":~:s?$?/..?", + indent_width = 2, + special_files = { "Cargo.toml", "Makefile", "README.md", "readme.md" }, + symlink_destination = true, + highlight_git = "none", + highlight_diagnostics = "none", + highlight_opened_files = "none", + highlight_modified = "none", + highlight_hidden = "none", + highlight_bookmarks = "none", + highlight_clipboard = "name", + indent_markers = { + enable = false, + inline_arrows = true, + icons = { + corner = "└", + edge = "│", + item = "│", + bottom = "─", + none = " ", + }, + }, + icons = { + web_devicons = { + file = { + enable = true, + color = true, + }, + folder = { + enable = false, + color = true, + }, + }, + git_placement = "before", + modified_placement = "after", + hidden_placement = "after", + diagnostics_placement = "signcolumn", + bookmarks_placement = "signcolumn", + padding = " ", + symlink_arrow = " ➛ ", + show = { + file = true, + folder = true, + folder_arrow = true, + git = true, + modified = true, + hidden = false, + diagnostics = true, + bookmarks = true, + }, + glyphs = { + default = "", + symlink = "", + bookmark = "󰆤", + modified = "●", + hidden = "󰜌", + folder = { + arrow_closed = "", + arrow_open = "", + default = "", + open = "", + empty = "", + empty_open = "", + symlink = "", + symlink_open = "", + }, + git = { + unstaged = "✗", + staged = "✓", + unmerged = "", + renamed = "➜", + untracked = "★", + deleted = "", + ignored = "◌", + }, + }, + }, + }, + hijack_directories = { + enable = true, + auto_open = true, + }, + update_focused_file = { + enable = false, + update_root = { + enable = false, + ignore_list = {}, + }, + exclude = false, + }, + system_open = { + cmd = "", + args = {}, + }, + git = { + enable = true, + show_on_dirs = true, + show_on_open_dirs = true, + disable_for_dirs = {}, + timeout = 400, + cygwin_support = false, + }, + diagnostics = { + enable = false, + show_on_dirs = false, + show_on_open_dirs = true, + debounce_delay = 50, + severity = { + min = vim.diagnostic.severity.HINT, + max = vim.diagnostic.severity.ERROR, + }, + icons = { + hint = "", + info = "", + warning = "", + error = "", + }, + }, + modified = { + enable = false, + show_on_dirs = true, + show_on_open_dirs = true, + }, + filters = { + enable = true, + git_ignored = true, + dotfiles = false, + git_clean = false, + no_buffer = false, + no_bookmark = false, + custom = {}, + exclude = {}, + }, + live_filter = { + prefix = "[FILTER]: ", + always_show_folders = true, + }, + filesystem_watchers = { + enable = true, + debounce_delay = 50, + ignore_dirs = {}, + }, + actions = { + use_system_clipboard = true, + change_dir = { + enable = true, + global = false, + restrict_above_cwd = false, + }, + expand_all = { + max_folder_discovery = 300, + exclude = {}, + }, + file_popup = { + open_win_config = { + col = 1, + row = 1, + relative = "cursor", + border = "shadow", + style = "minimal", + }, + }, + open_file = { + quit_on_open = false, + eject = true, + resize_window = true, + window_picker = { + enable = true, + picker = "default", + chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890", + exclude = { + filetype = { "notify", "packer", "qf", "diff", "fugitive", "fugitiveblame" }, + buftype = { "nofile", "terminal", "help" }, + }, + }, + }, + remove_file = { + close_window = true, + }, + }, + trash = { + cmd = "gio trash", + }, + tab = { + sync = { + open = false, + close = false, + ignore = {}, + }, + }, + notify = { + threshold = vim.log.levels.INFO, + absolute_path = true, + }, + help = { + sort_by = "key", + }, + ui = { + confirm = { + remove = true, + trash = true, + default_yes = false, + }, + }, + experimental = { + actions = { + open_file = { + relative_path = false, + }, + }, + }, + log = { + enable = false, + truncate = false, + types = { + all = false, + config = false, + copy_paste = false, + dev = false, + diagnostics = false, + git = false, + profile = false, + watcher = false, + }, + }, + }) -- END_DEFAULT_OPTS + + local api = require("nvim-tree.api") + + vim.keymap.set("n", "e", function() + api.tree.toggle() + end, { desc = "Toggle the file explorer" }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/telescope.lua b/nvim/nvim/lua/wqtt/plugins/telescope.lua new file mode 100644 index 0000000..e14d634 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/telescope.lua @@ -0,0 +1,34 @@ +return { + "nvim-telescope/telescope.nvim", + tag = "0.1.6", + dependencies = { + "nvim-lua/plenary.nvim", + { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, + "folke/todo-comments.nvim", + }, + config = function() + local telescope = require("telescope") + local builtin = require("telescope.builtin") + + telescope.load_extension("fzf") + + vim.keymap.set("n", "", builtin.git_files, { desc = "Show all files in git" }) + vim.keymap.set("n", "fr", builtin.oldfiles, { desc = "Show recent files" }) + vim.keymap.set("n", "ff", builtin.find_files, { desc = "show all files in the current directory" }) + vim.keymap.set("n", "fg", builtin.live_grep, { desc = "live grep" }) + vim.keymap.set("n", "fb", builtin.buffers, { desc = "show all open buffers" }) + vim.keymap.set("n", "ft", "TodoTelescope", { desc = "find todos" }) + vim.keymap.set( + "n", + "fs", + "Telescope lsp_document_symbols query=searchTerm", + { desc = "Search the document for symbols" } + ) + vim.keymap.set( + "n", + "fws", + "Telescope lsp_workspace_symbols query=searchTerm", + { desc = "Search the workspace for symbols" } + ) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/everforest.lua b/nvim/nvim/lua/wqtt/plugins/themes/everforest.lua new file mode 100644 index 0000000..8858238 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/everforest.lua @@ -0,0 +1,3 @@ +return { + "sainnhe/everforest", +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/github.lua b/nvim/nvim/lua/wqtt/plugins/themes/github.lua new file mode 100644 index 0000000..90df9b3 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/github.lua @@ -0,0 +1 @@ +return { "projekt0n/github-nvim-theme" } diff --git a/nvim/nvim/lua/wqtt/plugins/themes/gruvbox.lua b/nvim/nvim/lua/wqtt/plugins/themes/gruvbox.lua new file mode 100644 index 0000000..6e2599a --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/gruvbox.lua @@ -0,0 +1,3 @@ +return { + "ellisonleao/gruvbox.nvim", +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/nightfox.lua b/nvim/nvim/lua/wqtt/plugins/themes/nightfox.lua new file mode 100644 index 0000000..e28ef35 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/nightfox.lua @@ -0,0 +1,3 @@ +return { + "EdenEast/nightfox.nvim", +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/nord.lua b/nvim/nvim/lua/wqtt/plugins/themes/nord.lua new file mode 100644 index 0000000..20102f5 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/nord.lua @@ -0,0 +1 @@ +return { "shaunsingh/nord.nvim" } diff --git a/nvim/nvim/lua/wqtt/plugins/themes/onedark.lua b/nvim/nvim/lua/wqtt/plugins/themes/onedark.lua new file mode 100644 index 0000000..76c739c --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/onedark.lua @@ -0,0 +1,4 @@ +return { + "olimorris/onedarkpro.nvim", + priority = 1000, -- Ensure it loads first +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/onenord.lua b/nvim/nvim/lua/wqtt/plugins/themes/onenord.lua new file mode 100644 index 0000000..c23c3cd --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/onenord.lua @@ -0,0 +1 @@ +return { "rmehri01/onenord.nvim" } diff --git a/nvim/nvim/lua/wqtt/plugins/themes/rose-pine.lua b/nvim/nvim/lua/wqtt/plugins/themes/rose-pine.lua new file mode 100644 index 0000000..41f94c4 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/rose-pine.lua @@ -0,0 +1,4 @@ +return { + "rose-pine/neovim", + name = "rose-pine", +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/seoul256.lua b/nvim/nvim/lua/wqtt/plugins/themes/seoul256.lua new file mode 100644 index 0000000..1dfef79 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/seoul256.lua @@ -0,0 +1,3 @@ +return { + "junegunn/seoul256.vim", +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/solarized.lua b/nvim/nvim/lua/wqtt/plugins/themes/solarized.lua new file mode 100644 index 0000000..907b49c --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/solarized.lua @@ -0,0 +1,10 @@ +return { + "maxmx03/solarized.nvim", + lazy = false, + priority = 1000, + setup = function() + require("solarized").setup({ + transparent = true, + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/sweetie.lua b/nvim/nvim/lua/wqtt/plugins/themes/sweetie.lua new file mode 100644 index 0000000..1a42688 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/sweetie.lua @@ -0,0 +1,3 @@ +return { + { "NTBBloodbath/sweetie.nvim" }, +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/tokyo-night.lua b/nvim/nvim/lua/wqtt/plugins/themes/tokyo-night.lua new file mode 100644 index 0000000..446339a --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/tokyo-night.lua @@ -0,0 +1,3 @@ +return { + "folke/tokyonight.nvim", +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/vscode.lua b/nvim/nvim/lua/wqtt/plugins/themes/vscode.lua new file mode 100644 index 0000000..93e6d20 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/vscode.lua @@ -0,0 +1,3 @@ +return { + "Mofiqul/vscode.nvim", +} diff --git a/nvim/nvim/lua/wqtt/plugins/themes/zenbones.lua b/nvim/nvim/lua/wqtt/plugins/themes/zenbones.lua new file mode 100644 index 0000000..cd025f6 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/themes/zenbones.lua @@ -0,0 +1,7 @@ +return { + "zenbones-theme/zenbones.nvim", + -- Optionally install Lush. Allows for more configuration or extending the colorscheme + -- If you don't want to install lush, make sure to set g:zenbones_compat = 1 + -- In Vim, compat mode is turned on as Lush only works in Neovim. + dependencies = { "rktjmp/lush.nvim" }, +} diff --git a/nvim/nvim/lua/wqtt/plugins/todo-comments.lua b/nvim/nvim/lua/wqtt/plugins/todo-comments.lua new file mode 100644 index 0000000..0045e68 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/todo-comments.lua @@ -0,0 +1,10 @@ +return { + "folke/todo-comments.nvim", + event = { "BufReadPre", "BufNewFile" }, + dependencies = { + "nvim-lua/plenary.nvim", + }, + config = function() + require("todo-comments").setup() + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/transparent.lua b/nvim/nvim/lua/wqtt/plugins/transparent.lua new file mode 100644 index 0000000..7e3cea7 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/transparent.lua @@ -0,0 +1,50 @@ +return { + "xiyaowong/transparent.nvim", + config = function() + require("transparent").setup({ -- Optional, you don't have to run setup. + groups = { -- table: default groups + "Normal", + "NormalNC", + "Comment", + "Constant", + "Special", + "Identifier", + "Statement", + "PreProc", + "Type", + "Underlined", + "Todo", + "String", + "Function", + "Conditional", + "Repeat", + "Operator", + "Structure", + "LineNr", + "NonText", + "SignColumn", + "CursorLine", + "CursorLineNr", + "StatusLine", + "StatusLineNC", + "EndOfBuffer", + "NormalFloat", + "NvimTreeNormal", + "TelescopeNormal", + "TelescopeSelection", + "TelescopePromptTitle", + "TelescopePromptNormal", + "TelescopePromptBorder", + "TelescopeResultsTitle", + "TelescopeResultsNormal", + "TelescopeResultsBorder", + "TelescopePreviewTitle", + "TelescopePreviewNormal", + "TelescopePreviewBorder", + "TelescopePromptCounter", + }, + extra_groups = {}, -- table: additional groups that should be cleared + exclude_groups = {}, -- table: groups you don't want to clear + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/tree-sitter.lua b/nvim/nvim/lua/wqtt/plugins/tree-sitter.lua new file mode 100644 index 0000000..a384f27 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/tree-sitter.lua @@ -0,0 +1,39 @@ +return { + "nvim-treesitter/nvim-treesitter", + event = { "BufReadPre", "BufNewFile" }, + build = ":TSUpdate", + dependencies = { + "windwp/nvim-ts-autotag", + }, + config = function() + local treesitter = require("nvim-treesitter.configs") + + treesitter.setup({ + highlight = { enable = true }, + indent = { enable = true }, + autotag = { enable = true }, + ensure_installed = { + "json", + "javascript", + "typescript", + "tsx", + "yaml", + "html", + "css", + "prisma", + "markdown", + "markdown_inline", + "graphql", + "bash", + "lua", + "vim", + "dockerfile", + "gitignore", + "c", + "rust", + "elm", + "go", + }, + }) + end, +} diff --git a/nvim/nvim/lua/wqtt/plugins/trouble.lua b/nvim/nvim/lua/wqtt/plugins/trouble.lua new file mode 100644 index 0000000..ea93837 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/trouble.lua @@ -0,0 +1,37 @@ +return { + "folke/trouble.nvim", + opts = {}, -- for default options, refer to the configuration section for custom setup. + cmd = "Trouble", + keys = { + { + "xx", + "Trouble diagnostics toggle", + desc = "Diagnostics (Trouble)", + }, + { + "xw", + "Trouble diagnostics toggle filter.buf=0", + desc = "Buffer Diagnostics (Trouble)", + }, + { + "xd", + "Trouble symbols toggle focus=false", + desc = "Symbols (Trouble)", + }, + { + "xq", + "Trouble lsp toggle focus=false win.position=right", + desc = "LSP Definitions / references / ... (Trouble)", + }, + { + "xl", + "Trouble loclist toggle", + desc = "Location List (Trouble)", + }, + { + "xt", + "Trouble qflist toggle", + desc = "Quickfix List (Trouble)", + }, + }, +} diff --git a/nvim/nvim/lua/wqtt/plugins/which-key.lua b/nvim/nvim/lua/wqtt/plugins/which-key.lua new file mode 100644 index 0000000..6f820e0 --- /dev/null +++ b/nvim/nvim/lua/wqtt/plugins/which-key.lua @@ -0,0 +1,13 @@ +return { + "folke/which-key.nvim", + event = "VeryLazy", + init = function() + vim.o.timeout = true + vim.o.timeoutlen = 300 + end, + opts = { + -- your configuration comes here + -- or leave it empty to use the default settings + -- refer to the configuration section below + } +} diff --git a/nvim/setup.sh b/nvim/setup.sh new file mode 100755 index 0000000..d7ee67b --- /dev/null +++ b/nvim/setup.sh @@ -0,0 +1,7 @@ +#!/bin/bash + +if ! [ -d ~/.config/nvim ]; then + mkdir -p ~/.config/nvim +fi + +stow -t ~/.config/nvim nvim diff --git a/tmux/setup.sh b/tmux/setup.sh new file mode 100755 index 0000000..6adadf6 --- /dev/null +++ b/tmux/setup.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ -f "$HOME/.tmux.conf" ]; then + echo "detected existing ~/.tmux.conf, exiting" + echo "please backup, remove, and try again" + exit 1 +fi + +echo "installing tmux plugin manager" +git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm + +stow -t ~ tmux diff --git a/tmux/tmux/.tmux.conf b/tmux/tmux/.tmux.conf new file mode 100644 index 0000000..8fe9ca6 --- /dev/null +++ b/tmux/tmux/.tmux.conf @@ -0,0 +1,20 @@ +set -g base-index 1 # start indexing windows at 1 instead of 0 +set -g detach-on-destroy off # don't exit from tmux when closing a session +set -g escape-time 0 # zero-out escape time delay +set -g history-limit 1000000 # increase history size (from 2,000) +set -g mouse on # enable mouse support +set -g renumber-windows on # renumber all windows when any window is closed +set -g set-clipboard on # use system clipboard +set -g status-interval 3 # update the status bar every 3 seconds + +# Persist sessions across machine shutdowns +set -g @plugin 'tmux-plugins/tmux-resurrect' + +# SessionX session management +set -g @plugin 'omerxx/tmux-sessionx' + + +# Tmux Plugin Manager + +set -g @plugin 'tmux-plugins/tpm' +run '~/.tmux/plugins/tpm/tpm' diff --git a/wezterm/setup.sh b/wezterm/setup.sh new file mode 100755 index 0000000..2a743bf --- /dev/null +++ b/wezterm/setup.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +stow -t $HOME wezterm diff --git a/wezterm/wezterm/.wezterm.lua b/wezterm/wezterm/.wezterm.lua new file mode 100644 index 0000000..41b4688 --- /dev/null +++ b/wezterm/wezterm/.wezterm.lua @@ -0,0 +1,16 @@ +local wezterm = require("wezterm") + +local config = wezterm.config_builder() + +config.font = wezterm.font("Monofur Nerd Font Mono") +config.font_size = 20 +config.line_height = 1.2 + +config.enable_tab_bar = false +config.window_background_opacity = 0.7 + +config.window_decorations = "TITLE" + +config.color_scheme = "nord" + +return config diff --git a/zsh/setup.sh b/zsh/setup.sh new file mode 100755 index 0000000..a22f0de --- /dev/null +++ b/zsh/setup.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +if [ -f "$HOME/.zshrc" ]; then + echo "detected existing .zshrc, exiting." + echo "please backup, remove, and try again" + exit 1 +fi + +echo "Beginning ohmyzsh installation..." +sleep 1 +sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" + +echo "Deleting default ohmyzsh .zshrc" +rm ~/.zshrc + +stow . -t zsh diff --git a/zsh/zsh/.zshrc b/zsh/zsh/.zshrc new file mode 100644 index 0000000..99a46f1 --- /dev/null +++ b/zsh/zsh/.zshrc @@ -0,0 +1,32 @@ +export ZSH="$HOME/.oh-my-zsh" +ZSH_THEME="alanpeabody" +plugins=(git) +source $ZSH/oh-my-zsh.sh + +export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" +[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm + +alias vi="nvim" +alias vim="nvim" +alias c="clear" +alias lg="lazygit" +alias ldr="lazydocker" +alias ls="eza --icons always --git-repos" +alias cat=bat +alias tml="tmux list-sessions" +alias tma="tmux attach-session -t" +alias tmn="tmux new -s" + +export BAT_THEME=ansi +export EDITOR=nvim +export PATH=$PATH:~/bin +export PATH=$PATH:~/go/bin +export PATH=$PATH:~/.local/bin +export PATH=$PATH:~/.cargo/bin +export PATH=$PATH:~/.config/emacs/bin +export PATH=$PATH:/home/linuxbrew/.linuxbrew/bin + +export GOFLAGS="-tags=unit,integration,mage" + +eval "$(zoxide init zsh)" +eval "$(direnv hook zsh)"