From d54500fa953a07a7be87b220637b6e107ae17152 Mon Sep 17 00:00:00 2001 From: Wynd Date: Sun, 4 Aug 2024 12:36:36 +0300 Subject: [PATCH] Renamed ListPlugins to ExportPlugins, added some more comments and some more global options --- .config/nvim/lua/nvwynd/autocmds.lua | 2 +- .config/nvim/lua/nvwynd/keymaps.lua | 37 ++++++++++++++-------------- .config/nvim/lua/nvwynd/options.lua | 12 ++++++--- dot.toml | 4 +-- 4 files changed, 30 insertions(+), 25 deletions(-) diff --git a/.config/nvim/lua/nvwynd/autocmds.lua b/.config/nvim/lua/nvwynd/autocmds.lua index ca1633a..521f740 100644 --- a/.config/nvim/lua/nvwynd/autocmds.lua +++ b/.config/nvim/lua/nvwynd/autocmds.lua @@ -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+") diff --git a/.config/nvim/lua/nvwynd/keymaps.lua b/.config/nvim/lua/nvwynd/keymaps.lua index c02636a..7089140 100644 --- a/.config/nvim/lua/nvwynd/keymaps.lua +++ b/.config/nvim/lua/nvwynd/keymaps.lua @@ -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" }, "d", '"_d') -map("n", "", "w", { desc = "File Save" }) -map("i", "", "w", { desc = "File Save" }) -map("n", "", "bd!", { desc = "Close Buffer" }) +-- filthy casual save keybind +map({ "n", "i" }, "", "w", { desc = "File Save" }) +-- easy way to close the current buffer +map("n", "", "bd!", { desc = "Close Buffer" }) -- moves the selection up or down using K and J (uppercase) -map("v", "J", ":m '>+1gv=gv") -map("v", "K", ":m '<-2gv=gv") +map("v", "J", ":m '>+1gv=gv") +map("v", "K", ":m '<-2gv=gv") -- terminal map("t", "", "") -- telescope map("n", "ff", "Telescope find_files", { desc = "[F]ind [F]iles" }) -map("n", "fh", "Telescope help_tags", { desc = "[F]ind [H]elp" }) -map("n", "fr", "Telescope oldfiles", { desc = "[F]ind [R]ecent" }) +map("n", "fh", "Telescope help_tags", { desc = "[F]ind [H]elp" }) +map("n", "fr", "Telescope oldfiles", { desc = "[F]ind [R]ecent" }) map( "n", "fsb", - "Telescope current_buffer_fuzzy_find", + "Telescope current_buffer_fuzzy_find", { desc = "[F]ind [S]tring in current [B]uffer" } ) -map("n", "fsg", "Telescope live_grep", { desc = "[F]ind [S]tring [G]lobal" }) +map("n", "fsg", "Telescope live_grep", { desc = "[F]ind [S]tring [G]lobal" }) map("n", "fgg", "Telescope git_files", { desc = "[F]ind [G]it" }) -map("n", "fgs", "Telescope git_status", { desc = "[F]ind [G]it [S]tatus" }) -map("n", "fgc", "Telescope git_commits", { desc = "[F]ind [G]it [C]ommits" }) +map("n", "fgs", "Telescope git_status", { desc = "[F]ind [G]it [S]tatus" }) +map("n", "fgc", "Telescope git_commits", { desc = "[F]ind [G]it [C]ommits" }) map( "n", "", - "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", + "Telescope buffers sort_mru=true sort_lastused=true ignore_current_buffer=true", { desc = "[ ] Find Buffers" } ) @@ -51,8 +52,8 @@ map("n", "ds", require("telescope.builtin").lsp_document_symbols, { desc map("n", "rn", vim.lsp.buf.rename, { desc = "[R]e[n]ame" }) -- neo-tree -map("n", "n", "Neotree toggle", { desc = "Toggle Filetree Window" }) -map("n", "e", "Neotree focus", { desc = "Focus Filetree Window" }) +map("n", "n", "Neotree toggle", { desc = "Toggle Filetree Window" }) +map("n", "e", "Neotree focus", { desc = "Focus Filetree Window" }) -- minimap map("n", "m", MiniMap.toggle, { desc = "Toggle Minimap" }) @@ -70,14 +71,14 @@ map("x", "", function() end, { desc = "Toggle Comment" }) -- trouble -map("n", "td", "Trouble diagnostics toggle", { desc = "[T]rouble [D]iagnostics" }) +map("n", "td", "Trouble diagnostics toggle", { desc = "[T]rouble [D]iagnostics" }) map( "n", "te", - "Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.ERROR", + "Trouble diagnostics toggle filter.severity=vim.diagnostic.severity.ERROR", { desc = "[T]rouble [E]rrors" } ) -map("n", "tt", "Trouble todo toggle", { desc = "[T]rouble [T]odo" }) +map("n", "tt", "Trouble todo toggle", { desc = "[T]rouble [T]odo" }) -- whichkey -map("n", "wK", "WhichKey", { desc = "Whichkey show all keymaps" }) +map("n", "wK", "WhichKey", { desc = "Whichkey show all keymaps" }) diff --git a/.config/nvim/lua/nvwynd/options.lua b/.config/nvim/lua/nvwynd/options.lua index c8c8b00..4269bcd 100644 --- a/.config/nvim/lua/nvwynd/options.lua +++ b/.config/nvim/lua/nvwynd/options.lua @@ -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 diff --git a/dot.toml b/dot.toml index 5b33fd3..d964d6f 100644 --- a/dot.toml +++ b/dot.toml @@ -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"