diff --git a/lua/custom/init.lua b/lua/custom/init.lua index ccb9501..c2175ee 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -7,3 +7,5 @@ opt.foldlevel = 4 opt.signcolumn = "yes" opt.spelllang = "en,de" opt.clipboard = "" -- dont just use the system clipboard +opt.wrap = false +opt.breakindent = false diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index cc866b7..d0f166a 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -3,12 +3,96 @@ local M = {} M.disabled = { n = { - ["h"] = "", - ["ff"] = "", [""] = "", [""] = "", + [""] = "", + ["n"] = "", + ["rn"] = "", + [""] = "", + [""] = "", + ["x"] = "", + ["/"] = "", + ["ra"] = "", + ["[d"] = "", + ["]d"] = "", + ["[c"] = "", + ["]c"] = "", + ["h"] = "", + ["ff"] = "", + ["fa"] = "", + ["fw"] = "", + ["fb"] = "", + ["fh"] = "", + ["fo"] = "", + ["fz"] = "", + ["cm"] = "", + ["gt"] = "", + ["pt"] = "", + ["th"] = "", + ["ma"] = "", + ["v"] = "", + ["rh"] = "", + ["ph"] = "", + ["gb"] = "", + ["td"] = "", + }, + t = { + [""] = "", + }, + v = { + + ["/"] = "", + }, +} + +M.tabufline = { + plugin = true, + + n = { + -- cycle through buffers + [""] = { + function() + require("nvchad.tabufline").tabuflineNext() + end, + "Goto next buffer", + }, + + [""] = { + function() + require("nvchad.tabufline").tabuflinePrev() + end, + "Goto prev buffer", + }, + + -- close buffer + hide terminal buffer + [""] = { + function() + require("nvchad.tabufline").close_buffer() + end, + "Close buffer", + }, + }, +} + +M.comment = { + plugin = true, + + -- toggle comment in both modes + n = { + ["v"] = { + function() + require("Comment.api").toggle.linewise.current() + end, + "Toggle comment", + }, + }, + + v = { + ["v"] = { + "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", + "Toggle comment", + }, }, - v = {}, } M.leap = { @@ -64,6 +148,25 @@ M.lazygit = { }, } +M.lspconfig = { + plugin = true, + n = { + ["[d"] = { + function() + vim.diagnostic.goto_prev { float = { border = "rounded" } } + end, + "Goto prev", + }, + + ["cj"] = { + function() + vim.diagnostic.goto_next { float = { border = "rounded" } } + end, + "Goto next", + }, + }, +} + M.clipboard = { plugin = false, n = { @@ -104,6 +207,18 @@ M.telescope = { }, } +M.nvterm = { + plugin = true, + + t = { + -- preserve defaults + }, + + n = { + -- preserve defaults + }, +} + M.nvimtree = { plugin = true, n = { @@ -168,8 +283,10 @@ M.edit = { -- split and join lines -- "J" for join is defaul - ["S"] = { - "ik", "split line"}, + ["S"] = { + "ik", + "split line", + }, -- do something useful with the arrows [""] = { " move-2", "Move line up", opts = { expr = true } },