From 9375eae25c84af39812c972cd0fe440a324cbb1f Mon Sep 17 00:00:00 2001 From: Luke Johnson Date: Tue, 28 Feb 2023 12:21:33 -0700 Subject: [PATCH] add urlview plugin --- lua/custom/plugins/dashboard.lua | 39 ++++++++++++++------------------ lua/custom/plugins/init.lua | 38 +++++++++++++++++++++++++++++-- 2 files changed, 53 insertions(+), 24 deletions(-) diff --git a/lua/custom/plugins/dashboard.lua b/lua/custom/plugins/dashboard.lua index af482ac1..202a3bc7 100644 --- a/lua/custom/plugins/dashboard.lua +++ b/lua/custom/plugins/dashboard.lua @@ -1,34 +1,29 @@ return { 'glepnir/dashboard-nvim', event = 'VimEnter', - theme = 'hyper', + theme = 'doom', config = { - week_header = { - enable = true, - }, - shortcut = { - { desc = ' Update', group = '@property', action = 'Lazy update', key = 'u' }, + header = {}, --your header + center = { { - icon = ' ', - icon_hl = '@variable', - desc = 'Files', - group = 'Label', - action = 'Telescope find_files', - key = 'f', + icon = ' ', + icon_hl = 'Title', + desc = 'Find File ', + desc_hl = 'String', + key = 'b', + keymap = 'SPC f f', + key_hl = 'Number', + action = 'lua print(2)' }, { - desc = ' Apps', - group = 'DiagnosticHint', - action = 'Telescope app', - key = 'a', - }, - { - desc = ' dotfiles', - group = 'Number', - action = 'Telescope dotfiles', - key = 'd', + icon = ' ', + desc = 'Find Dotfiles', + key = 'f', + keymap = 'SPC f d', + action = 'lua print(3)' }, }, + footer = {} --your footer }, dependencies = { { 'nvim-tree/nvim-web-devicons' } } } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 47c81ab7..a2d2b57e 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -6,7 +6,7 @@ return { { 'mbbill/undotree', keys = { - { "U", "UndotreeToggle", desc = "Undotree Toggle" }, + { "ut", "UndotreeToggle", desc = "Undotree Toggle" }, }, }, @@ -39,5 +39,39 @@ return { -- end, } end, - } + }, + + { + "axieax/urlview.nvim", + config = function() + require("urlview").setup({ + -- Prompt title (` `, e.g. `Buffer Links:`) + default_title = "Links:", + -- Default picker to display links with + -- Options: "native" (vim.ui.select) or "telescope" + default_picker = "native", + -- Set the default protocol for us to prefix URLs with if they don't start with http/https + default_prefix = "https://", + -- Command or method to open links with + -- Options: "netrw", "system" (default OS browser), "clipboard"; or "firefox", "chromium" etc. + -- By default, this is "netrw", or "system" if netrw is disabled + default_action = "netrw", + -- Ensure links shown in the picker are unique (no duplicates) + unique = true, + -- Ensure links shown in the picker are sorted alphabetically + sorted = true, + -- Minimum log level (recommended at least `vim.log.levels.WARN` for error detection warnings) + log_level_min = vim.log.levels.INFO, + -- Keymaps for jumping to previous / next URL in buffer + jump = { + prev = "[u", + next = "]u", + }, + }) + end, + + keys = { + { "ul", "UrlView", desc = "View buffer URLs" }, + }, + }, }