chore: initial commit
This commit is contained in:
commit
b49ac71743
22
bin/bin/t
Executable file
22
bin/bin/t
Executable file
@ -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
|
11
bin/setup.sh
Executable file
11
bin/setup.sh
Executable file
@ -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
|
4
nvim/nvim/init.lua
Normal file
4
nvim/nvim/init.lua
Normal file
@ -0,0 +1,4 @@
|
||||
require("wqtt.core.remap")
|
||||
require("wqtt.lazy")
|
||||
require("wqtt.core.options")
|
||||
require("theme")
|
60
nvim/nvim/lazy-lock.json
Normal file
60
nvim/nvim/lazy-lock.json
Normal file
@ -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" }
|
||||
}
|
3
nvim/nvim/lua/theme.lua
Normal file
3
nvim/nvim/lua/theme.lua
Normal file
@ -0,0 +1,3 @@
|
||||
vim.opt.background = "dark"
|
||||
|
||||
vim.cmd("colorscheme dawnfox")
|
35
nvim/nvim/lua/wqtt/core/options.lua
Normal file
35
nvim/nvim/lua/wqtt/core/options.lua
Normal file
@ -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
|
||||
]])
|
22
nvim/nvim/lua/wqtt/core/remap.lua
Normal file
22
nvim/nvim/lua/wqtt/core/remap.lua
Normal file
@ -0,0 +1,22 @@
|
||||
vim.g.mapleader = " "
|
||||
|
||||
vim.keymap.set("i", "jj", "<Esc>", { desc = "Exit insert mode with jj" })
|
||||
vim.keymap.set("n", "nh", ":nohl<CR>", { desc = "Clear highlights with nh" })
|
||||
|
||||
vim.keymap.set("n", "<leader>wc", ":w<CR>", { desc = "Write the current buffer" })
|
||||
vim.keymap.set("n", "<leader>wa", ":wa<CR>", { desc = "Write all open buffers" })
|
||||
vim.keymap.set("n", "<leader>q", ":q<CR>", { desc = "Quit" })
|
||||
|
||||
vim.keymap.set("n", "<leader>ns", ":source ~/.config/nvim/init.lua<CR>", { desc = "Source the nvim configuration" })
|
||||
|
||||
vim.keymap.set("v", "<leader>fmt", ":!column -t -s '|' -o '|'<CR>", { desc = "format the selected markdown table" })
|
||||
|
||||
vim.keymap.set("n", "<leader>rgm", ":! go run main.go<CR>", { desc = "Run the main.go file" })
|
||||
|
||||
vim.keymap.set("n", "<leader>fc", ":foldclose<CR>", { desc = "Close a fold" })
|
||||
vim.keymap.set("n", "<leader>fo", ":foldopen<CR>", { desc = "Open a fold" })
|
||||
|
||||
vim.cmd([[
|
||||
vnoremap <C-k> :m '<-2<CR>gv=gv
|
||||
vnoremap <C-j> :m '>+1<CR>gv=gv
|
||||
]])
|
23
nvim/nvim/lua/wqtt/lazy.lua
Normal file
23
nvim/nvim/lua/wqtt/lazy.lua
Normal file
@ -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,
|
||||
},
|
||||
})
|
25
nvim/nvim/lua/wqtt/plugins/autopairs.lua
Normal file
25
nvim/nvim/lua/wqtt/plugins/autopairs.lua
Normal file
@ -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,
|
||||
}
|
16
nvim/nvim/lua/wqtt/plugins/comment.lua
Normal file
16
nvim/nvim/lua/wqtt/plugins/comment.lua
Normal file
@ -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,
|
||||
}
|
37
nvim/nvim/lua/wqtt/plugins/formatting.lua
Normal file
37
nvim/nvim/lua/wqtt/plugins/formatting.lua
Normal file
@ -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" }, "<leader>mp", function()
|
||||
conform.format({
|
||||
lsp_fallback = true,
|
||||
async = false,
|
||||
timeout_ms = 1000,
|
||||
})
|
||||
end, { desc = "Format file or range" })
|
||||
end,
|
||||
}
|
6
nvim/nvim/lua/wqtt/plugins/gitsigns.lua
Normal file
6
nvim/nvim/lua/wqtt/plugins/gitsigns.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"lewis6991/gitsigns.nvim",
|
||||
config = function()
|
||||
require("gitsigns").setup()
|
||||
end,
|
||||
}
|
10
nvim/nvim/lua/wqtt/plugins/harpoon.lua
Normal file
10
nvim/nvim/lua/wqtt/plugins/harpoon.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
"ThePrimeagen/harpoon",
|
||||
config = function()
|
||||
local mark = require("harpoon.mark")
|
||||
local ui = require("harpoon.ui")
|
||||
|
||||
vim.keymap.set("n", "<leader>a", function() mark.add_file() end, { desc = "Add the current file to harpoon" })
|
||||
vim.keymap.set("n", "<leader>h", function() ui.toggle_quick_menu() end, { desc = "Show the harpoon quick menu" })
|
||||
end
|
||||
}
|
9
nvim/nvim/lua/wqtt/plugins/hop.lua
Normal file
9
nvim/nvim/lua/wqtt/plugins/hop.lua
Normal file
@ -0,0 +1,9 @@
|
||||
return {
|
||||
"phaazon/hop.nvim",
|
||||
branch = "v2", -- optional but strongly recommended
|
||||
config = function()
|
||||
require("hop").setup()
|
||||
|
||||
vim.keymap.set("n", "<leader>gw", "<cmd>HopWord<CR>", { desc = "Activate word jumping" })
|
||||
end,
|
||||
}
|
7
nvim/nvim/lua/wqtt/plugins/init.lua
Normal file
7
nvim/nvim/lua/wqtt/plugins/init.lua
Normal file
@ -0,0 +1,7 @@
|
||||
return {
|
||||
"nvim-lua/plenary.nvim",
|
||||
{
|
||||
'nvim-lualine/lualine.nvim',
|
||||
requires = { 'nvim-tree/nvim-web-devicons', opt = true },
|
||||
},
|
||||
}
|
19
nvim/nvim/lua/wqtt/plugins/lazygit.lua
Normal file
19
nvim/nvim/lua/wqtt/plugins/lazygit.lua
Normal file
@ -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 = {
|
||||
{ "<leader>lg", "<cmd>LazyGit<cr>", desc = "LazyGit" },
|
||||
},
|
||||
}
|
25
nvim/nvim/lua/wqtt/plugins/linting.lua
Normal file
25
nvim/nvim/lua/wqtt/plugins/linting.lua
Normal file
@ -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", "<leader>l", function()
|
||||
lint.try_lint()
|
||||
end, { desc = "Trigger linting for current file" })
|
||||
end,
|
||||
}
|
96
nvim/nvim/lua/wqtt/plugins/lsp/lspconfig.lua
Normal file
96
nvim/nvim/lua/wqtt/plugins/lsp/lspconfig.lua
Normal file
@ -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", "<cmd>Telescope lsp_references<CR>", 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", "<cmd>Telescope lsp_definitions<CR>", opts)
|
||||
|
||||
opts.desc = "Show LSP type definitions"
|
||||
vim.keymap.set("n", "gt", "<cmd>Telescope lsp_type_definitions<CR>", opts)
|
||||
|
||||
opts.desc = "See available code actions"
|
||||
vim.keymap.set({ "n", "v" }, "<leader>ca", vim.lsp.buf.code_action, opts)
|
||||
|
||||
opts.desc = "Smart rename"
|
||||
vim.keymap.set("n", "<leader>rn", vim.lsp.buf.rename, opts)
|
||||
|
||||
opts.desc = "Show buffer diagnostics"
|
||||
vim.keymap.set("n", "<leader>D", "<cmd>Telescope diagnostics bufnr=0<CR>", opts)
|
||||
|
||||
opts.desc = "Show line diagnostics"
|
||||
vim.keymap.set("n", "<leader>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", "<leader>rs", ":LspRestart<CR>", 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,
|
||||
}
|
48
nvim/nvim/lua/wqtt/plugins/lsp/mason.lua
Normal file
48
nvim/nvim/lua/wqtt/plugins/lsp/mason.lua
Normal file
@ -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,
|
||||
}
|
12
nvim/nvim/lua/wqtt/plugins/lualine.lua
Normal file
12
nvim/nvim/lua/wqtt/plugins/lualine.lua
Normal file
@ -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,
|
||||
}
|
5
nvim/nvim/lua/wqtt/plugins/luarocks.lua
Normal file
5
nvim/nvim/lua/wqtt/plugins/luarocks.lua
Normal file
@ -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,
|
||||
}
|
31
nvim/nvim/lua/wqtt/plugins/neorg.lua
Normal file
31
nvim/nvim/lua/wqtt/plugins/neorg.lua
Normal file
@ -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", "<leader>ni", ":Neorg inject-metadata<cr>", { desc = "Inject neorg metadata" })
|
||||
vim.keymap.set("n", "<leader>nu", ":Neorg update-metadata<cr>", { desc = "Update neorg metadata" })
|
||||
vim.keymap.set("n", "<leader>nt", ":Neorg toc<cr>", { desc = "Update neorg metadata" })
|
||||
end,
|
||||
}
|
6
nvim/nvim/lua/wqtt/plugins/neoscroll.lua
Normal file
6
nvim/nvim/lua/wqtt/plugins/neoscroll.lua
Normal file
@ -0,0 +1,6 @@
|
||||
return {
|
||||
"karb94/neoscroll.nvim",
|
||||
config = function()
|
||||
require("neoscroll").setup({})
|
||||
end,
|
||||
}
|
57
nvim/nvim/lua/wqtt/plugins/nvim-cmp.lua
Normal file
57
nvim/nvim/lua/wqtt/plugins/nvim-cmp.lua
Normal file
@ -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({
|
||||
["<C-k>"] = cmp.mapping.select_prev_item(),
|
||||
["<C-j>"] = cmp.mapping.select_next_item(),
|
||||
["<C-b>"] = cmp.mapping.scroll_docs(-4),
|
||||
["<C-f>"] = cmp.mapping.scroll_docs(4),
|
||||
["<C-Space>"] = cmp.mapping.complete(),
|
||||
["<C-e>"] = cmp.mapping.abort(),
|
||||
["<CR>"] = 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,
|
||||
}
|
283
nvim/nvim/lua/wqtt/plugins/nvimtree.lua
Normal file
283
nvim/nvim/lua/wqtt/plugins/nvimtree.lua
Normal file
@ -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", "<leader>e", function()
|
||||
api.tree.toggle()
|
||||
end, { desc = "Toggle the file explorer" })
|
||||
end,
|
||||
}
|
34
nvim/nvim/lua/wqtt/plugins/telescope.lua
Normal file
34
nvim/nvim/lua/wqtt/plugins/telescope.lua
Normal file
@ -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", "<C-p>", builtin.git_files, { desc = "Show all files in git" })
|
||||
vim.keymap.set("n", "<leader>fr", builtin.oldfiles, { desc = "Show recent files" })
|
||||
vim.keymap.set("n", "<leader>ff", builtin.find_files, { desc = "show all files in the current directory" })
|
||||
vim.keymap.set("n", "<leader>fg", builtin.live_grep, { desc = "live grep" })
|
||||
vim.keymap.set("n", "<leader>fb", builtin.buffers, { desc = "show all open buffers" })
|
||||
vim.keymap.set("n", "<leader>ft", "<cmd>TodoTelescope<cr>", { desc = "find todos" })
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>fs",
|
||||
"<cmd>Telescope lsp_document_symbols query=searchTerm<CR>",
|
||||
{ desc = "Search the document for symbols" }
|
||||
)
|
||||
vim.keymap.set(
|
||||
"n",
|
||||
"<leader>fws",
|
||||
"<cmd>Telescope lsp_workspace_symbols query=searchTerm<CR>",
|
||||
{ desc = "Search the workspace for symbols" }
|
||||
)
|
||||
end,
|
||||
}
|
3
nvim/nvim/lua/wqtt/plugins/themes/everforest.lua
Normal file
3
nvim/nvim/lua/wqtt/plugins/themes/everforest.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"sainnhe/everforest",
|
||||
}
|
1
nvim/nvim/lua/wqtt/plugins/themes/github.lua
Normal file
1
nvim/nvim/lua/wqtt/plugins/themes/github.lua
Normal file
@ -0,0 +1 @@
|
||||
return { "projekt0n/github-nvim-theme" }
|
3
nvim/nvim/lua/wqtt/plugins/themes/gruvbox.lua
Normal file
3
nvim/nvim/lua/wqtt/plugins/themes/gruvbox.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"ellisonleao/gruvbox.nvim",
|
||||
}
|
3
nvim/nvim/lua/wqtt/plugins/themes/nightfox.lua
Normal file
3
nvim/nvim/lua/wqtt/plugins/themes/nightfox.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"EdenEast/nightfox.nvim",
|
||||
}
|
1
nvim/nvim/lua/wqtt/plugins/themes/nord.lua
Normal file
1
nvim/nvim/lua/wqtt/plugins/themes/nord.lua
Normal file
@ -0,0 +1 @@
|
||||
return { "shaunsingh/nord.nvim" }
|
4
nvim/nvim/lua/wqtt/plugins/themes/onedark.lua
Normal file
4
nvim/nvim/lua/wqtt/plugins/themes/onedark.lua
Normal file
@ -0,0 +1,4 @@
|
||||
return {
|
||||
"olimorris/onedarkpro.nvim",
|
||||
priority = 1000, -- Ensure it loads first
|
||||
}
|
1
nvim/nvim/lua/wqtt/plugins/themes/onenord.lua
Normal file
1
nvim/nvim/lua/wqtt/plugins/themes/onenord.lua
Normal file
@ -0,0 +1 @@
|
||||
return { "rmehri01/onenord.nvim" }
|
4
nvim/nvim/lua/wqtt/plugins/themes/rose-pine.lua
Normal file
4
nvim/nvim/lua/wqtt/plugins/themes/rose-pine.lua
Normal file
@ -0,0 +1,4 @@
|
||||
return {
|
||||
"rose-pine/neovim",
|
||||
name = "rose-pine",
|
||||
}
|
3
nvim/nvim/lua/wqtt/plugins/themes/seoul256.lua
Normal file
3
nvim/nvim/lua/wqtt/plugins/themes/seoul256.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"junegunn/seoul256.vim",
|
||||
}
|
10
nvim/nvim/lua/wqtt/plugins/themes/solarized.lua
Normal file
10
nvim/nvim/lua/wqtt/plugins/themes/solarized.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
"maxmx03/solarized.nvim",
|
||||
lazy = false,
|
||||
priority = 1000,
|
||||
setup = function()
|
||||
require("solarized").setup({
|
||||
transparent = true,
|
||||
})
|
||||
end,
|
||||
}
|
3
nvim/nvim/lua/wqtt/plugins/themes/sweetie.lua
Normal file
3
nvim/nvim/lua/wqtt/plugins/themes/sweetie.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
{ "NTBBloodbath/sweetie.nvim" },
|
||||
}
|
3
nvim/nvim/lua/wqtt/plugins/themes/tokyo-night.lua
Normal file
3
nvim/nvim/lua/wqtt/plugins/themes/tokyo-night.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"folke/tokyonight.nvim",
|
||||
}
|
3
nvim/nvim/lua/wqtt/plugins/themes/vscode.lua
Normal file
3
nvim/nvim/lua/wqtt/plugins/themes/vscode.lua
Normal file
@ -0,0 +1,3 @@
|
||||
return {
|
||||
"Mofiqul/vscode.nvim",
|
||||
}
|
7
nvim/nvim/lua/wqtt/plugins/themes/zenbones.lua
Normal file
7
nvim/nvim/lua/wqtt/plugins/themes/zenbones.lua
Normal file
@ -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" },
|
||||
}
|
10
nvim/nvim/lua/wqtt/plugins/todo-comments.lua
Normal file
10
nvim/nvim/lua/wqtt/plugins/todo-comments.lua
Normal file
@ -0,0 +1,10 @@
|
||||
return {
|
||||
"folke/todo-comments.nvim",
|
||||
event = { "BufReadPre", "BufNewFile" },
|
||||
dependencies = {
|
||||
"nvim-lua/plenary.nvim",
|
||||
},
|
||||
config = function()
|
||||
require("todo-comments").setup()
|
||||
end,
|
||||
}
|
50
nvim/nvim/lua/wqtt/plugins/transparent.lua
Normal file
50
nvim/nvim/lua/wqtt/plugins/transparent.lua
Normal file
@ -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,
|
||||
}
|
39
nvim/nvim/lua/wqtt/plugins/tree-sitter.lua
Normal file
39
nvim/nvim/lua/wqtt/plugins/tree-sitter.lua
Normal file
@ -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,
|
||||
}
|
37
nvim/nvim/lua/wqtt/plugins/trouble.lua
Normal file
37
nvim/nvim/lua/wqtt/plugins/trouble.lua
Normal file
@ -0,0 +1,37 @@
|
||||
return {
|
||||
"folke/trouble.nvim",
|
||||
opts = {}, -- for default options, refer to the configuration section for custom setup.
|
||||
cmd = "Trouble",
|
||||
keys = {
|
||||
{
|
||||
"<leader>xx",
|
||||
"<cmd>Trouble diagnostics toggle<cr>",
|
||||
desc = "Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xw",
|
||||
"<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
|
||||
desc = "Buffer Diagnostics (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xd",
|
||||
"<cmd>Trouble symbols toggle focus=false<cr>",
|
||||
desc = "Symbols (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xq",
|
||||
"<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
|
||||
desc = "LSP Definitions / references / ... (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xl",
|
||||
"<cmd>Trouble loclist toggle<cr>",
|
||||
desc = "Location List (Trouble)",
|
||||
},
|
||||
{
|
||||
"<leader>xt",
|
||||
"<cmd>Trouble qflist toggle<cr>",
|
||||
desc = "Quickfix List (Trouble)",
|
||||
},
|
||||
},
|
||||
}
|
13
nvim/nvim/lua/wqtt/plugins/which-key.lua
Normal file
13
nvim/nvim/lua/wqtt/plugins/which-key.lua
Normal file
@ -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
|
||||
}
|
||||
}
|
7
nvim/setup.sh
Executable file
7
nvim/setup.sh
Executable file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
if ! [ -d ~/.config/nvim ]; then
|
||||
mkdir -p ~/.config/nvim
|
||||
fi
|
||||
|
||||
stow -t ~/.config/nvim nvim
|
12
tmux/setup.sh
Executable file
12
tmux/setup.sh
Executable file
@ -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
|
20
tmux/tmux/.tmux.conf
Normal file
20
tmux/tmux/.tmux.conf
Normal file
@ -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'
|
3
wezterm/setup.sh
Executable file
3
wezterm/setup.sh
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
|
||||
stow -t $HOME wezterm
|
16
wezterm/wezterm/.wezterm.lua
Normal file
16
wezterm/wezterm/.wezterm.lua
Normal file
@ -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
|
16
zsh/setup.sh
Executable file
16
zsh/setup.sh
Executable file
@ -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
|
32
zsh/zsh/.zshrc
Normal file
32
zsh/zsh/.zshrc
Normal file
@ -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)"
|
Loading…
Reference in New Issue
Block a user