From 55b3e8125e449e4a37155268b10262e9251a08f5 Mon Sep 17 00:00:00 2001 From: rootiest Date: Wed, 28 Aug 2024 06:38:38 -0400 Subject: [PATCH] feat: introduce customizable scope characters --- lua/data/types.lua | 71 +++++++++++++++++++++++++++++++++++++++------- 1 file changed, 60 insertions(+), 11 deletions(-) diff --git a/lua/data/types.lua b/lua/data/types.lua index fefba5d..b534282 100644 --- a/lua/data/types.lua +++ b/lua/data/types.lua @@ -134,17 +134,32 @@ M.highlights = { } -- Indent characters -M.indent_char = { - "󰎤", - "󰎧", - "󰎪", - "󰎭", - "󰎱", - "󰎳", - "󰎶", - "󰎹", - "󰎼", - "󰽽", +M.ibl = { + indent_char = { + fancy = { + "󰎤", + "󰎧", + "󰎪", + "󰎭", + "󰎱", + "󰎳", + "󰎶", + "󰎹", + "󰎼", + "󰽽", + }, + none = { " " }, + basic = { "󰇘" }, + }, + scope_char = { + light = { "" }, + none = { " " }, + fancy = { "‖" }, + strong = { "⦀" }, + basic = { "" }, + arrow = { "" }, + tab = { "󰌒" }, + }, } M.smart_splits = { @@ -231,11 +246,45 @@ M.llama_copilot = { M.substitute = { yank_substituted_text = false, preserve_cursor_position = true, + on_substitute = function() + require("yanky.integration").substitute() + end, } -- Image.nvim filetypes M.image = "markdown" +-- Todo-comments +M.todo = { + keywords = { + FIX = { + icon = " ", -- icon used for the sign, and in search results + color = "error", -- can be a hex color, or a named color (see below) + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords + -- signs = false, -- configure signs for some keywords individually + }, + TODO = { icon = " ", color = "info" }, + HACK = { icon = " ", color = "warning" }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + TEST = { + icon = "⏲ ", + color = "test", + alt = { "TESTING", "PASSED", "FAILED" }, + }, + }, + lualine = function() + local config = { + -- The todo-comments types to show & in what order: + order = { "TODO", "FIX", "HACK", "WARN", "NOTE", "PERF", "TEST" }, + keywords = M.todo.keywords, + when_empty = "", + } + return config + end, +} + -- Toggleterm plugin options M.toggleterm = { size = function(term)