diff --git a/.gitignore b/.gitignore index 397b4a7..a54c3ba 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ *.log +monkeylist.lua diff --git a/init.lua b/init.lua index 2076c27..9f14e84 100644 --- a/init.lua +++ b/init.lua @@ -36,22 +36,18 @@ vim.cmd("set clipboard=unnamedplus") -- │ Chars │ -- ╰───────╯ vim.opt.fillchars = { - horiz = "━", - vert = " ", - stl = " ", - eob = " ", + horiz = "━", + vert = "│", + stl = " ", + eob = " ", } vim.opt.listchars = { - tab = "> ", - trail = " ", - nbsp = "+", + tab = "> ", + trail = " ", + nbsp = "+", } -vim.fn.sign_define("DiagnosticSignError", - { text = " ", texthl = "DiagnosticSignError" }) -vim.fn.sign_define("DiagnosticSignWarn", - { text = " ", texthl = "DiagnosticSignWarn" }) -vim.fn.sign_define("DiagnosticSignInfo", - { text = " ", texthl = "DiagnosticSignInfo" }) -vim.fn.sign_define("DiagnosticSignHint", - { text = "󰌵", texthl = "DiagnosticSignHint" }) +vim.fn.sign_define("DiagnosticSignError", { text = " ", texthl = "DiagnosticSignError" }) +vim.fn.sign_define("DiagnosticSignWarn", { text = " ", texthl = "DiagnosticSignWarn" }) +vim.fn.sign_define("DiagnosticSignInfo", { text = " ", texthl = "DiagnosticSignInfo" }) +vim.fn.sign_define("DiagnosticSignHint", { text = "󰌵", texthl = "DiagnosticSignHint" }) diff --git a/lazy-lock.json b/lazy-lock.json index 3a7e58a..3240b96 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,7 +4,6 @@ "blueprints": { "branch": "main", "commit": "e5825c30464f98e77e8b5ffb88d59fd98df6c802" }, "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, - "ctrlsf.vim": { "branch": "master", "commit": "50186c529c881b7844bcd66c7b8e9826eb8990a4" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "friendly-snippets": { "branch": "main", "commit": "572f5660cf05f8cd8834e096d7b4c921ba18e175" }, "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, @@ -18,6 +17,7 @@ "no-neck-pain.nvim": { "branch": "main", "commit": "0463fbb77bcab4cc9716ba1e87255bbe4d002de7" }, "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, + "nvim-scrollbar": { "branch": "main", "commit": "5b103ef0fd2e8b9b4be3878ed38d224522192c6c" }, "nvim-spectre": { "branch": "master", "commit": "72f56f7585903cd7bf92c665351aa585e150af0f" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-treesitter-context": { "branch": "master", "commit": "41847d3dafb5004464708a3db06b14f12bde548a" }, @@ -34,6 +34,5 @@ "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, - "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" }, - "windline.nvim": { "branch": "master", "commit": "1630ab15aa3349f1ad32ef78d5cff632ae74625d" } + "vim-fugitive": { "branch": "master", "commit": "61b51c09b7c9ce04e821f6cf76ea4f6f903e3cf4" } } diff --git a/lua/config/remap.lua b/lua/config/remap.lua index 9cbcb67..e9eb849 100644 --- a/lua/config/remap.lua +++ b/lua/config/remap.lua @@ -68,9 +68,6 @@ end, { desc = "Lazygit (Root Dir)" }) map("n", "gG", function() Snacks.lazygit() end, { desc = "Lazygit (cwd)" }) -map("n", "gb", function() - Snacks.lazygit.blame_line() -end, { desc = "Git Blame Line" }) map("n", "gB", function() Snacks.lazygit.browse() end, { desc = "Git Browse" }) @@ -269,6 +266,9 @@ map("n", "[w", diagnostic_goto(false, "WARN"), { desc = "Prev Warning" }) ---- Toggle options ---- +map("n", "um", function() + require("monkey-alert").enable() -- does not toggle :O +end, { desc = "Toggle monkey alert" }) map("n", "uf", function() LazyVim.format.toggle() end, { desc = "Toggle Auto Format (Global)" }) diff --git a/lua/plugins/context.lua b/lua/plugins/context.lua index d436d42..35ce4d1 100644 --- a/lua/plugins/context.lua +++ b/lua/plugins/context.lua @@ -57,17 +57,40 @@ return { }, }, + { + "petertriho/nvim-scrollbar", + opts = function() + return require("plugins.opts.scrollbar") + end, + config = function(_, opts) + require("scrollbar").setup(opts) + end, + }, + { "lukas-reineke/indent-blankline.nvim", main = "ibl", opts = {}, init = function() require("ibl").setup({ + indent = { + -- highlight = { "hl-IblIndent" }, + smart_indent_cap = true, + char = "▏", + }, whitespace = { highlight = { "Whitespace", "NonText" }, remove_blankline_trail = true, }, - scope = { exclude = { language = { "lua", "css" } } }, + scope = { + char = "⋅", + enabled = true, + show_start = true, + show_end = true, + highlight = { "Function", "Label" }, + priority = 500, + exclude = { language = { "css" } }, + }, }) end, }, diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua index 414025d..3b67b1c 100644 --- a/lua/plugins/git.lua +++ b/lua/plugins/git.lua @@ -21,7 +21,7 @@ return { "dqnid/monkey-alert.nvim", name = "monkey-alert", opts = { - monkey_mail_list = "john@doe.org,another@dude.me,dani.heras@hotmail.com", + monkey_mail_list = require("config.monkeylist"), blame_text_color_hex = "#c0ffee", blame_text = "- Monkey alert 🐒", blame_position = "eol", diff --git a/lua/plugins/opts/bufferline.lua b/lua/plugins/opts/bufferline.lua index 096b6c2..1634cde 100644 --- a/lua/plugins/opts/bufferline.lua +++ b/lua/plugins/opts/bufferline.lua @@ -45,7 +45,7 @@ local config = { filetype = "neo-tree", text = "", highlight = "Directory", - separator = "", -- use a "true" to enable the default, or set your own character + separator = "│", -- use a "true" to enable the default, or set your own character }, }, groups = { @@ -55,7 +55,7 @@ local config = { items = { { name = "Tests", - highlight = { underline = true, sp = "blue" }, + highlight = { underline = false, sp = "blue" }, priority = 2, -- icon = " ", matcher = function(buf) diff --git a/lua/plugins/opts/gitsigns.lua b/lua/plugins/opts/gitsigns.lua index abda5ea..5b3cbfa 100644 --- a/lua/plugins/opts/gitsigns.lua +++ b/lua/plugins/opts/gitsigns.lua @@ -1,15 +1,15 @@ local config = { signs = { - add = { text = "┃" }, - change = { text = "┃" }, + add = { text = "▌" }, + change = { text = "▌" }, delete = { text = "_" }, topdelete = { text = "‾" }, changedelete = { text = "~" }, untracked = { text = "┆" }, }, signs_staged = { - add = { text = "┃" }, - change = { text = "┃" }, + add = { text = "▌" }, + change = { text = "▌" }, delete = { text = "_" }, topdelete = { text = "‾" }, changedelete = { text = "~" }, diff --git a/lua/plugins/opts/scrollbar.lua b/lua/plugins/opts/scrollbar.lua new file mode 100644 index 0000000..69f3114 --- /dev/null +++ b/lua/plugins/opts/scrollbar.lua @@ -0,0 +1,153 @@ +return { + show = true, + show_in_active_only = false, + set_highlights = true, + folds = 1000, -- handle folds, set to number to disable folds if no. of lines in buffer exceeds this + max_lines = false, -- disables if no. of lines in buffer exceeds this + hide_if_all_visible = false, -- Hides everything if all lines are visible + throttle_ms = 100, + handle = { + text = " ", + blend = 30, -- Integer between 0 and 100. 0 for fully opaque and 100 to full transparent. Defaults to 30. + color = nil, + color_nr = nil, -- cterm + highlight = "CursorColumn", + hide_if_all_visible = true, -- Hides handle if all lines are visible + }, + marks = { + Cursor = { + text = "•", + priority = 0, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "Normal", + }, + Search = { + text = { "-", "=" }, + priority = 1, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "Search", + }, + Error = { + text = { "-", "x" }, + priority = 2, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "DiagnosticVirtualTextError", + }, + Warn = { + text = { "-", "!" }, + priority = 3, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "DiagnosticVirtualTextWarn", + }, + Info = { + text = { "-", "" }, + priority = 4, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "DiagnosticVirtualTextInfo", + }, + Hint = { + text = { "-", "=" }, + priority = 5, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "DiagnosticVirtualTextHint", + }, + Misc = { + text = { "-", "=" }, + priority = 6, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "Normal", + }, + GitAdd = { + text = "+", + priority = 7, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "GitSignsAdd", + }, + GitChange = { + text = "~", + priority = 7, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "GitSignsChange", + }, + GitDelete = { + text = "▁", + priority = 7, + gui = nil, + color = nil, + cterm = nil, + color_nr = nil, -- cterm + highlight = "GitSignsDelete", + }, + }, + excluded_buftypes = { + "terminal", + "neo-tree", + "filesystem", + }, + excluded_filetypes = { + "blink-cmp-menu", + "dropbar_menu", + "dropbar_menu_fzf", + "DressingInput", + "cmp_docs", + "cmp_menu", + "noice", + "prompt", + "TelescopePrompt", + "neo-tree", + "filesystem", + }, + autocmd = { + render = { + "BufWinEnter", + "TabEnter", + "TermEnter", + "WinEnter", + "CmdwinLeave", + "TextChanged", + "VimResized", + "WinScrolled", + }, + clear = { + "BufWinLeave", + "TabLeave", + "TermLeave", + "WinLeave", + }, + }, + handlers = { + cursor = true, + diagnostic = true, + gitsigns = true, -- Requires gitsigns + handle = true, + search = false, -- Requires hlslens + ale = false, -- Requires ALE + }, +} diff --git a/lua/plugins/opts/treesitterContext.lua b/lua/plugins/opts/treesitterContext.lua index b9f8972..8e4b873 100644 --- a/lua/plugins/opts/treesitterContext.lua +++ b/lua/plugins/opts/treesitterContext.lua @@ -1,16 +1,16 @@ local options = { - enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) - max_lines = 1, -- How many lines the window should span. Values <= 0 mean no limit. - min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. - line_numbers = true, - multiline_threshold = 20, -- Maximum number of lines to show for a single context - trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' - mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline' - -- Separator between context and content. Should be a single character string, like '-'. - -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. - separator = nil, - zindex = 20, -- The Z-index of the context window - on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching + enable = true, -- Enable this plugin (Can be enabled/disabled later via commands) + max_lines = 1, -- How many lines the window should span. Values <= 0 mean no limit. + min_window_height = 0, -- Minimum editor window height to enable context. Values <= 0 mean no limit. + line_numbers = true, + multiline_threshold = 20, -- Maximum number of lines to show for a single context + trim_scope = "outer", -- Which context lines to discard if `max_lines` is exceeded. Choices: 'inner', 'outer' + mode = "cursor", -- Line used to calculate context. Choices: 'cursor', 'topline' + -- Separator between context and content. Should be a single character string, like '-'. + -- When separator is set, the context will only show up when there are at least 2 lines above cursorline. + separator = nil, + zindex = 20, -- The Z-index of the context window + on_attach = nil, -- (fun(buf: integer): boolean) return false to disable attaching } return options