Renamed ListPlugins to ExportPlugins, added some more comments and some more global options
parent
0750e72b69
commit
d54500fa95
|
@ -13,7 +13,7 @@ autocmd("BufEnter", {
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
|
||||||
user_command("ListPlugins", function()
|
user_command("ExportPlugins", function()
|
||||||
local plugins = require("lazy").plugins()
|
local plugins = require("lazy").plugins()
|
||||||
|
|
||||||
local f, err = io.open("plugins", "w+")
|
local f, err = io.open("plugins", "w+")
|
||||||
|
|
|
@ -5,34 +5,35 @@ local map = vim.keymap.set
|
||||||
map("x", "p", '"_dP')
|
map("x", "p", '"_dP')
|
||||||
-- special delete keybind that will not move the deleted selection in a registry
|
-- special delete keybind that will not move the deleted selection in a registry
|
||||||
map({ "n", "v" }, "<leader>d", '"_d')
|
map({ "n", "v" }, "<leader>d", '"_d')
|
||||||
map("n", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
|
-- filthy casual save keybind
|
||||||
map("i", "<C-s>", "<cmd>w<CR>", { desc = "File Save" })
|
map({ "n", "i" }, "<C-s>", "<cmd>w<cr>", { desc = "File Save" })
|
||||||
map("n", "<C-X>", "<cmd>bd!<CR>", { desc = "Close Buffer" })
|
-- 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)
|
-- 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")
|
||||||
|
|
||||||
-- terminal
|
-- terminal
|
||||||
map("t", "<ESC>", "<C-\\><C-n>")
|
map("t", "<ESC>", "<C-\\><C-n>")
|
||||||
|
|
||||||
-- telescope
|
-- telescope
|
||||||
map("n", "<leader>ff", "<cmd>Telescope find_files<cr>", { desc = "[F]ind [F]iles" })
|
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>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>fr", "<cmd>Telescope oldfiles<cr>", { desc = "[F]ind [R]ecent" })
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>fsb",
|
"<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" }
|
{ 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>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>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>fgc", "<cmd>Telescope git_commits<cr>", { desc = "[F]ind [G]it [C]ommits" })
|
||||||
map(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader><leader>",
|
"<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" }
|
{ 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" })
|
map("n", "<leader>rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" })
|
||||||
|
|
||||||
-- neo-tree
|
-- neo-tree
|
||||||
map("n", "<leader>n", "<cmd>Neotree toggle<CR>", { desc = "Toggle 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" })
|
map("n", "<leader>e", "<cmd>Neotree focus<cr>", { desc = "Focus Filetree Window" })
|
||||||
|
|
||||||
-- minimap
|
-- minimap
|
||||||
map("n", "<leader>m", MiniMap.toggle, { desc = "Toggle Minimap" })
|
map("n", "<leader>m", MiniMap.toggle, { desc = "Toggle Minimap" })
|
||||||
|
@ -70,14 +71,14 @@ map("x", "<C-_>", function()
|
||||||
end, { desc = "Toggle Comment" })
|
end, { desc = "Toggle Comment" })
|
||||||
|
|
||||||
-- trouble
|
-- 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(
|
map(
|
||||||
"n",
|
"n",
|
||||||
"<leader>te",
|
"<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" }
|
{ 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
|
-- 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" })
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
local g = vim.g
|
local g = vim.g
|
||||||
local o = vim.o
|
local o = vim.o
|
||||||
|
local wo = vim.wo
|
||||||
|
|
||||||
-- changing the leader key
|
-- changing the leader key
|
||||||
g.mapleader = " "
|
g.mapleader = " "
|
||||||
|
@ -20,11 +21,16 @@ o.numberwidth = 2
|
||||||
o.undofile = true
|
o.undofile = true
|
||||||
-- sync clipboard between OS and Neovim.
|
-- sync clipboard between OS and Neovim.
|
||||||
o.clipboard = "unnamedplus"
|
o.clipboard = "unnamedplus"
|
||||||
|
o.scrolloff = 8
|
||||||
|
o.updatetime = 100
|
||||||
|
o.colorcolumn = "100"
|
||||||
|
o.cursorline = true
|
||||||
|
wo.signcolumn = "yes"
|
||||||
|
|
||||||
|
-- search
|
||||||
o.hlsearch = true
|
o.hlsearch = true
|
||||||
o.incsearch = true
|
o.incsearch = true
|
||||||
o.scrolloff = 8
|
o.ignorecase = true
|
||||||
o.updatetime = 50
|
|
||||||
o.colorcolumn = "100"
|
|
||||||
|
|
||||||
-- wrapping
|
-- wrapping
|
||||||
-- disabled by default, should be enabled manually on a per case basis such as in markdown files
|
-- disabled by default, should be enabled manually on a per case basis such as in markdown files
|
||||||
|
|
Loading…
Reference in New Issue