Renamed ListPlugins to ExportPlugins, added some more comments and some more global options

master
Wynd 2024-08-04 12:36:36 +03:00
parent 0750e72b69
commit d54500fa95
4 changed files with 30 additions and 25 deletions

View File

@ -13,7 +13,7 @@ autocmd("BufEnter", {
end,
})
user_command("ListPlugins", function()
user_command("ExportPlugins", function()
local plugins = require("lazy").plugins()
local f, err = io.open("plugins", "w+")

View File

@ -5,34 +5,35 @@ local map = vim.keymap.set
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("i", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
map("n", "<C-X>", "<cmd>bd!<CR>", { desc = "Close Buffer" })
-- filthy casual save keybind
map({ "n", "i" }, "<C-s>", "<cmd>w<cr>", { desc = "File Save" })
-- easy way to close the current 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", "K", ":m '<-2<CR>gv=gv")
map("v", "J", ":m '>+1<cr>gv=gv")
map("v", "K", ":m '<-2<cr>gv=gv")
-- terminal
map("t", "<ESC>", "<C-\\><C-n>")
-- telescope
map("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "[F]ind [F]iles" })
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", { desc = "[F]ind [H]elp" })
map("n", "<leader>fr", "<cmd>Telescope oldfiles<CR>", { desc = "[F]ind [R]ecent" })
map("n", "<leader>fh", "<cmd>Telescope help_tags<cr>", { desc = "[F]ind [H]elp" })
map("n", "<leader>fr", "<cmd>Telescope oldfiles<cr>", { desc = "[F]ind [R]ecent" })
map(
"n",
"<leader>fsb",
"<cmd>Telescope current_buffer_fuzzy_find<CR>",
"<cmd>Telescope current_buffer_fuzzy_find<cr>",
{ desc = "[F]ind [S]tring in current [B]uffer" }
)
map("n", "<leader>fsg", "<cmd>Telescope live_grep<CR>", { desc = "[F]ind [S]tring [G]lobal" })
map("n", "<leader>fsg", "<cmd>Telescope live_grep<cr>", { desc = "[F]ind [S]tring [G]lobal" })
map("n", "<leader>fgg", "<cmd>Telescope git_files<cr>", { desc = "[F]ind [G]it" })
map("n", "<leader>fgs", "<cmd>Telescope git_status<CR>", { desc = "[F]ind [G]it [S]tatus" })
map("n", "<leader>fgc", "<cmd>Telescope git_commits<CR>", { desc = "[F]ind [G]it [C]ommits" })
map("n", "<leader>fgs", "<cmd>Telescope git_status<cr>", { desc = "[F]ind [G]it [S]tatus" })
map("n", "<leader>fgc", "<cmd>Telescope git_commits<cr>", { desc = "[F]ind [G]it [C]ommits" })
map(
"n",
"<leader><leader>",
"<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<CR>",
"<cmd>Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true<cr>",
{ desc = "[ ] Find Buffers" }
)
@ -51,8 +52,8 @@ map("n", "<leader>ds", require("telescope.builtin").lsp_document_symbols, { desc
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" })
-- neo-tree
map("n", "<leader>n", "<cmd>Neotree toggle<CR>", { desc = "Toggle Filetree Window" })
map("n", "<leader>e", "<cmd>Neotree focus<CR>", { desc = "Focus Filetree Window" })
map("n", "<leader>n", "<cmd>Neotree toggle<cr>", { desc = "Toggle Filetree Window" })
map("n", "<leader>e", "<cmd>Neotree focus<cr>", { desc = "Focus Filetree Window" })
-- minimap
map("n", "<leader>m", MiniMap.toggle, { desc = "Toggle Minimap" })
@ -70,14 +71,14 @@ map("x", "<C-_>", function()
end, { desc = "Toggle Comment" })
-- trouble
map("n", "<leader>td", "<cmd>Trouble diagnostics toggle<CR>", { desc = "[T]rouble [D]iagnostics" })
map("n", "<leader>td", "<cmd>Trouble diagnostics toggle<cr>", { desc = "[T]rouble [D]iagnostics" })
map(
"n",
"<leader>te",
"<cmd>Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.ERROR<CR>",
"<cmd>Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.ERROR<cr>",
{ desc = "[T]rouble [E]rrors" }
)
map("n", "<leader>tt", "<cmd>Trouble todo toggle<CR>", { desc = "[T]rouble [T]odo" })
map("n", "<leader>tt", "<cmd>Trouble todo toggle<cr>", { desc = "[T]rouble [T]odo" })
-- 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

@ -1,5 +1,6 @@
local g = vim.g
local o = vim.o
local wo = vim.wo
-- changing the leader key
g.mapleader = " "
@ -20,11 +21,16 @@ o.numberwidth = 2
o.undofile = true
-- sync clipboard between OS and Neovim.
o.clipboard = "unnamedplus"
o.scrolloff = 8
o.updatetime = 100
o.colorcolumn = "100"
o.cursorline = true
wo.signcolumn = "yes"
-- search
o.hlsearch = true
o.incsearch = true
o.scrolloff = 8
o.updatetime = 50
o.colorcolumn = "100"
o.ignorecase = true
-- wrapping
-- disabled by default, should be enabled manually on a per case basis such as in markdown files

View File

@ -12,9 +12,7 @@ path = "~/.config/tmux/tmux.conf"
[[dots]]
path = "~/.config/nvim/**/*"
ignore = [
"README.md$"
]
ignore = ["README.md$", "/plugins$"]
[[dots]]
path = "~/.config/mpv/*.conf"