diff --git a/lvim/config.lua b/lvim/config.lua index 6e64946..7107e43 100644 --- a/lvim/config.lua +++ b/lvim/config.lua @@ -23,21 +23,26 @@ lvim.keys.normal_mode[""] = ":w" lvim.builtin.terminal.open_mapping = "" -- Use which-key to add extra bindings with the leader-key prefix -lvim.builtin.which_key.mappings["g"].g = {"TermExec cmd='gitui&&exit'", "Gitui"} +lvim.builtin.which_key.mappings["g"].g = {"ToggleTermTermExec cmd='gitui&&exit'", "Gitui"} lvim.builtin.which_key.mappings["s"].B = {"Telescope git_branches", "Checkout branch"} lvim.builtin.which_key.mappings["s"].b = {"Telescope buffers", "Buffer"} - - lvim.builtin.which_key.mappings["t"] = { - name = "+Trouble", - r = { "Trouble lsp_references", "References" }, - f = { "Trouble lsp_definitions", "Definitions" }, - d = { "Trouble document_diagnostics", "Diagnostics" }, - q = { "Trouble quickfix", "QuickFix" }, - l = { "Trouble loclist", "LocationList" }, - w = { "Trouble workspace_diagnostics", "Workspace Diagnostics" }, + name = "+Terminal", + r = { "ToggleTerm", "Floating terminal" }, + y = { "ToggleTerm size=60 direction=vertical", "Split vertical" }, + t = { "ToggleTerm size=15 direction=horizontal", "Split horizontal" }, } +-- lvim.builtin.which_key.mappings["t"] = { +-- name = "+Trouble", +-- r = { "Trouble lsp_references", "References" }, +-- f = { "Trouble lsp_definitions", "Definitions" }, +-- d = { "Trouble document_diagnostics", "Diagnostics" }, +-- q = { "Trouble quickfix", "QuickFix" }, +-- l = { "Trouble loclist", "LocationList" }, +-- w = { "Trouble workspace_diagnostics", "Workspace Diagnostics" }, +-- } + lvim.builtin.alpha.active = true lvim.builtin.alpha.mode = "dashboard" lvim.builtin.terminal.active = true @@ -181,15 +186,13 @@ local fcs = vim.opt.fillchars:get() -- Stolen from Akinsho local function get_fold(lnum) if vim.fn.foldlevel(lnum) <= vim.fn.foldlevel(lnum - 1) - then return ' ' end - -local fold_sym = vim.fn.foldclosed(lnum) == -1 and fcs.foldopen or fcs.foldclose return fold_sym end - - --- Stolen from Akinsho local function get_fold(lnum) if vim.fn.foldlevel(lnum) <= vim.fn.foldlevel(lnum - 1) then return ' ' end return vim.fn.foldclosed(lnum) == -1 and fcs.foldopen or fcs.foldclose end - + then return ' ' +end +local fold_sym = + vim.fn.foldclosed(lnum) == -1 and fcs.foldopen or fcs.foldclose + return fold_sym +end _G.get_statuscol = function() return "%s%l " .. get_fold(vim.v.lnum) .. " " end - vim.o.statuscolumn = "%!v:lua.get_statuscol()"