New nvim plugins added + new keybindings

master
Wynd 2024-07-09 13:37:12 +03:00
parent af69d33685
commit 18cf50a4ff
10 changed files with 74 additions and 51 deletions

View File

@ -2,34 +2,37 @@
## plugins used ## plugins used
- [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip.git)
- [fidget.nvim](https://github.com/j-hui/fidget.nvim.git)
- [catppuccin](https://github.com/catppuccin/nvim.git)
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git)
- [lspkind.nvim](https://github.com/onsails/lspkind.nvim.git)
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git)
- [dressing.nvim](https://github.com/stevearc/dressing.nvim.git) - [dressing.nvim](https://github.com/stevearc/dressing.nvim.git)
- [lsp-zero.nvim](https://github.com/VonHeikemen/lsp-zero.nvim.git) - [lspkind.nvim](https://github.com/onsails/lspkind.nvim.git)
- [plenary.nvim](https://github.com/nvim-lua/plenary.nvim.git) - [plenary.nvim](https://github.com/nvim-lua/plenary.nvim.git)
- [which-key.nvim](https://github.com/folke/which-key.nvim.git) - [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp.git)
- [lazy.nvim](https://github.com/folke/lazy.nvim.git) - [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig.git)
- [zen-mode.nvim](https://github.com/folke/zen-mode.nvim.git)
- [neodev.nvim](https://github.com/folke/neodev.nvim.git)
- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git)
- [Comment.nvim](https://github.com/numToStr/Comment.nvim.git)
- [cmp-path](https://github.com/hrsh7th/cmp-path.git) - [cmp-path](https://github.com/hrsh7th/cmp-path.git)
- [twilight.nvim](https://github.com/folke/twilight.nvim.git)
- [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag.git)
- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons.git)
- [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git)
- [cmp-buffer](https://github.com/hrsh7th/cmp-buffer.git) - [cmp-buffer](https://github.com/hrsh7th/cmp-buffer.git)
- [LuaSnip](https://github.com/L3MON4D3/LuaSnip.git)
- [lsp-zero.nvim](https://github.com/VonHeikemen/lsp-zero.nvim.git)
- [cmp_luasnip](https://github.com/saadparwaiz1/cmp_luasnip.git)
- [luvit-meta](https://github.com/Bilal2453/luvit-meta.git)
- [catppuccin](https://github.com/catppuccin/nvim.git)
- [nvim-treesitter](https://github.com/nvim-treesitter/nvim-treesitter.git)
- [nvim-autopairs](https://github.com/windwp/nvim-autopairs.git) - [nvim-autopairs](https://github.com/windwp/nvim-autopairs.git)
- [nvim-notify](https://github.com/rcarriga/nvim-notify.git) - [nvim-ts-autotag](https://github.com/windwp/nvim-ts-autotag.git)
- [trouble.nvim](https://github.com/folke/trouble.nvim.git) - [Comment.nvim](https://github.com/numToStr/Comment.nvim.git)
- [todo-comments.nvim](https://github.com/folke/todo-comments.nvim.git)
- [nvim-surround](https://github.com/kylechui/nvim-surround.git)
- [neo-tree.nvim](https://github.com/nvim-neo-tree/neo-tree.nvim.git)
- [nvim-web-devicons](https://github.com/nvim-tree/nvim-web-devicons.git)
- [nui.nvim](https://github.com/MunifTanjim/nui.nvim.git) - [nui.nvim](https://github.com/MunifTanjim/nui.nvim.git)
- [conform.nvim](https://github.com/stevearc/conform.nvim.git) - [conform.nvim](https://github.com/stevearc/conform.nvim.git)
- [LuaSnip](https://github.com/L3MON4D3/LuaSnip.git)
- [nvim-lspconfig](https://github.com/neovim/nvim-lspconfig.git)
- [cmp-nvim-lsp](https://github.com/hrsh7th/cmp-nvim-lsp.git)
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp.git)
- [image.nvim](https://github.com/3rd/image.nvim.git) - [image.nvim](https://github.com/3rd/image.nvim.git)
- [twilight.nvim](https://github.com/folke/twilight.nvim.git)
- [trouble.nvim](https://github.com/folke/trouble.nvim.git)
- [zen-mode.nvim](https://github.com/folke/zen-mode.nvim.git)
- [which-key.nvim](https://github.com/folke/which-key.nvim.git)
- [lazy.nvim](https://github.com/folke/lazy.nvim.git)
- [telescope.nvim](https://github.com/nvim-telescope/telescope.nvim.git)
- [lazydev.nvim](https://github.com/folke/lazydev.nvim.git)
- [nvim-notify](https://github.com/rcarriga/nvim-notify.git)
- [lualine.nvim](https://github.com/nvim-lualine/lualine.nvim.git)
- [nvim-cmp](https://github.com/hrsh7th/nvim-cmp.git)
- [fidget.nvim](https://github.com/j-hui/fidget.nvim.git)

View File

@ -6,7 +6,7 @@ local wo = vim.wo[winid][0]
local bo = vim.bo[bufnr] local bo = vim.bo[bufnr]
wo.spell = true wo.spell = true
bo.textwidth = 120 -- bo.textwidth = 120
vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" }) vim.cmd.highlight({ "SpellBad", "gui=undercurl", "guifg=#DA6464" })

View File

@ -1,36 +1,36 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"LuaSnip": { "branch": "master", "commit": "50fcf17db7c75af80e6b6109acfbfb4504768780" }, "LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" },
"catppuccin": { "branch": "main", "commit": "5215ea59df6d0a7e27da9a5cd1165e06d1b04cbe" }, "catppuccin": { "branch": "main", "commit": "2d3419c2aead379b7d1854d32458f20ffaa58562" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
"conform.nvim": { "branch": "master", "commit": "069e971295a34a810484b7b2ef54b3c735214181" }, "conform.nvim": { "branch": "master", "commit": "cd75be867f2331b22905f47d28c0c270a69466aa" },
"dressing.nvim": { "branch": "master", "commit": "e3714c8049b2243e792492c4149e4cc395c68eb9" }, "dressing.nvim": { "branch": "master", "commit": "6741f1062d3dc6e4755367a7e9b347b553623f04" },
"fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" }, "fidget.nvim": { "branch": "main", "commit": "c12f8a58ee472ce5983c3a3f3aad0ff6c49a6a83" },
"image.nvim": { "branch": "master", "commit": "a2a0849e0b3dbed90f9283603cedb683bda5d4d1" }, "image.nvim": { "branch": "master", "commit": "61c76515cfc3cdac8123ece9e9761b20c3dc1315" },
"lazy.nvim": { "branch": "main", "commit": "eb4957442e3182f051b0ae11da32e06d22c190e3" }, "lazy.nvim": { "branch": "main", "commit": "1870238cf9c579c5d7eb8ea8b296f10b81978d34" },
"lazydev.nvim": { "branch": "main", "commit": "107231114623e2c4f90c626ec83b3120816b554e" }, "lazydev.nvim": { "branch": "main", "commit": "cea5d0fb556cdc35122d9cae772e7e0ed65b4505" },
"lsp-zero.nvim": { "branch": "v3.x", "commit": "16de3b18c5f7b6230d89b8e64ce9a4801b6f8d08" }, "lsp-zero.nvim": { "branch": "v3.x", "commit": "87701af045b3032515776abeb47eb8c2ddb5e679" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" }, "lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "lualine.nvim": { "branch": "master", "commit": "6a40b530539d2209f7dc0492f3681c8c126647ad" },
"luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" },
"neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "29f7c215332ba95e470811c380ddbce2cebe2af4" },
"nui.nvim": { "branch": "main", "commit": "322978c734866996274467de084a95e4f9b5e0b1" }, "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" },
"nvim-autopairs": { "branch": "master", "commit": "c15de7e7981f1111642e7e53799e1211d4606cb9" }, "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" },
"nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" }, "nvim-cmp": { "branch": "main", "commit": "a110e12d0b58eefcf5b771f533fc2cf3050680ac" },
"nvim-lspconfig": { "branch": "master", "commit": "92166b89ab4b3d60f24e58170cac53b7141fd032" }, "nvim-lspconfig": { "branch": "master", "commit": "cf97d2485fc3f6d4df1b79a3ea183e24c272215e" },
"nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" },
"nvim-surround": { "branch": "main", "commit": "ae876ab0f8d41213131c3ed4eeb4c48328f45e12" }, "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
"nvim-treesitter": { "branch": "master", "commit": "c1e1e24b6433d4539bad9f5daa207df39633071b" }, "nvim-treesitter": { "branch": "master", "commit": "c1ad655b6a0c83ab48e55240f367e2bc0c15af31" },
"nvim-ts-autotag": { "branch": "main", "commit": "6eb4120a1aadef07ac312f1c4bc6456712220007" }, "nvim-ts-autotag": { "branch": "main", "commit": "323a3e16ed603e2e17b26b1c836d1e86c279f726" },
"nvim-web-devicons": { "branch": "master", "commit": "b4b302d6ae229f67df7a87ef69fa79473fe788a9" }, "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" },
"plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" },
"telescope.nvim": { "branch": "master", "commit": "3a743491e5c6be0ed0aa8c31c6905df8f66179ba" }, "telescope.nvim": { "branch": "master", "commit": "bfcc7d5c6f12209139f175e6123a7b7de6d9c18a" },
"todo-comments.nvim": { "branch": "main", "commit": "70a93ce66083699571adc361166504b03cc39c2b" }, "todo-comments.nvim": { "branch": "main", "commit": "313b04e5b02d29ab9275c9295ff5e2b73921b0eb" },
"trouble.nvim": { "branch": "main", "commit": "806c50491078b66daf13c408042f2e74da46d0ff" }, "trouble.nvim": { "branch": "main", "commit": "4453fea6bb597830fbd58d2c484612f37b97bd8c" },
"twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" }, "twilight.nvim": { "branch": "main", "commit": "da4fe0a9e1397ecd9b012c52fb34313fbd3b862f" },
"which-key.nvim": { "branch": "main", "commit": "0099511294f16b81c696004fa6a403b0ae61f7a0" }, "which-key.nvim": { "branch": "main", "commit": "af4ded85542d40e190014c732fa051bdbf88be3d" },
"zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" } "zen-mode.nvim": { "branch": "main", "commit": "21976479c7a0146b05a42707cf91c86b1e510945" }
} }

View File

@ -1,9 +1,14 @@
local map = vim.keymap.set local map = vim.keymap.set
-- generic -- generic
-- prevents selected text we past over to be moved in a registry and override our paste
map("x", "p", '"_dP')
-- special delete keybind that will not move the deleted selection in a registry
map({ "n", "v" }, "<leader>d", '"_d')
map("n", "<C-s>", "<cmd>w<CR>", { desc = "File Save" }) map("n", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
map("i", "<C-s>", "<cmd>w<CR>", { desc = "File Save" }) map("i", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
map("n", "<C-X>", "<cmd>bd!<CR>", { desc = "Close Buffer" }) map("n", "<C-X>", "<cmd>bd!<CR>", { desc = "Close Buffer" })
-- moves the selection up or down using K and J (uppercase)
map("v", "J", ":m '>+1<CR>gv=gv") map("v", "J", ":m '>+1<CR>gv=gv")
map("v", "K", ":m '<-2<CR>gv=gv") map("v", "K", ":m '<-2<CR>gv=gv")
@ -40,6 +45,7 @@ map("n", "<S-z>", function()
vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = 0 })) vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = 0 }))
end, { desc = "Toggle Inlay Hint" }) end, { desc = "Toggle Inlay Hint" })
map("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" }) map("n", "<leader>ca", vim.lsp.buf.code_action, { desc = "[C]ode [A]ction" })
map("n", "<leader>cf", vim.lsp.buf.format, { desc = "[C]ode [F]ormat" })
map("n", "<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" }) map("n", "<leader>ws", require("telescope.builtin").lsp_dynamic_workspace_symbols, { desc = "[W]orkspace [S]ymbols" })
map("n", "<leader>ds", require("telescope.builtin").lsp_document_symbols, { desc = "[D]ocument [S]ymbols" }) map("n", "<leader>ds", require("telescope.builtin").lsp_document_symbols, { desc = "[D]ocument [S]ymbols" })
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" }) map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" })
@ -61,7 +67,8 @@ map("x", "<C-_>", function()
end, { desc = "Toggle Comment" }) end, { desc = "Toggle Comment" })
-- trouble -- trouble
map("n", "<leader>t", "<cmd>TroubleToggle<CR>", { desc = "Trouble Toggle" }) map("n", "<leader>td", "<cmd>Trouble diagnostics toggle<CR>", { desc = "[T]rouble [D]iagnostics" })
map("n", "<leader>tt", "<cmd>Trouble todo toggle<CR>", { desc = "[T]rouble [T]odo" })
-- whichkey -- whichkey
map("n", "<leader>wK", "<cmd>WhichKey<CR>", { desc = "Whichkey show all keymaps" }) map("n", "<leader>wK", "<cmd>WhichKey<CR>", { desc = "Whichkey show all keymaps" })

View File

@ -23,6 +23,7 @@ return {
css = { "prettier" }, css = { "prettier" },
json = { "prettier" }, json = { "prettier" },
scss = { "prettier" }, scss = { "prettier" },
javascript = { "prettier" },
markdown = { "dprint" }, markdown = { "dprint" },
zig = { "zigfmt" }, zig = { "zigfmt" },
toml = { "taplo" }, toml = { "taplo" },

View File

@ -87,7 +87,7 @@ return {
-- HTML -- HTML
lspconfig.html.setup({ lspconfig.html.setup({
capabilities = capabilities, capabilities = capabilities,
filetypes = { "html", "templ", "htmldjango" }, filetypes = { "html", "templ", "htmldjango", "handlebars" },
}) })
-- CSS -- CSS

View File

@ -5,6 +5,8 @@ return {
config = function() config = function()
local configs = require("nvim-treesitter.configs") local configs = require("nvim-treesitter.configs")
vim.treesitter.language.register("html", "handlebars")
configs.setup({ configs.setup({
ensure_installed = { ensure_installed = {
-- web dev -- web dev

View File

@ -12,7 +12,6 @@ SFX
NPCs NPCs
NPC NPC
Glowstone Glowstone
Eisen
flatpak flatpak
github github
oauth oauth
@ -24,3 +23,6 @@ Gitea
Hetzner Hetzner
overworld overworld
WIP WIP
JSON
debuff
debuffs

Binary file not shown.

8
.zshrc
View File

@ -70,6 +70,7 @@ alias ls='eza --icons'
alias ll='eza -alh -F always --icons' alias ll='eza -alh -F always --icons'
alias grep='rg' alias grep='rg'
alias nv='nvim' alias nv='nvim'
alias ff='fastfetch'
# quick helpers # quick helpers
alias uuid='printf "$(uuidgen)" | xclip -selection c' alias uuid='printf "$(uuidgen)" | xclip -selection c'
@ -77,6 +78,7 @@ alias reload="source ~/.zshrc"
alias untar="tar -xvzf" alias untar="tar -xvzf"
alias myip="curl http://ipecho.net/plain; echo" alias myip="curl http://ipecho.net/plain; echo"
alias diskspace="df -ht ext4" alias diskspace="df -ht ext4"
alias since="days_since"
# git shortcuts # git shortcuts
alias glo="git log --pretty='format:%C(yellow)%as %C(blue)%cn %C(green)%h %C(reset)%s' --no-merges" alias glo="git log --pretty='format:%C(yellow)%as %C(blue)%cn %C(green)%h %C(reset)%s' --no-merges"
@ -87,6 +89,12 @@ function git_last_modified() {(
git diff $(git log -1 --before=@{$days.days.ago} --format=%H) --stat git diff $(git log -1 --before=@{$days.days.ago} --format=%H) --stat
)} )}
function days_since() {(
now=$(date --date="now" +%s)
input=$(date --date=$1 +%s)
echo $(( ( now - input )/(60*60*24) ))
)}
# private SSH stuff # private SSH stuff
source ~/.piwrc source ~/.piwrc