From 87b169a5e1a0bd86d6933fd48c62f01f550bdd22 Mon Sep 17 00:00:00 2001 From: Joost Agterhoek Date: Wed, 9 Oct 2024 17:03:09 +0200 Subject: [PATCH] added or changed some plugins --- lua/custom/plugins/barbar.lua | 6 +++--- lua/custom/plugins/markdown.lua | 8 ++++--- lua/custom/plugins/mini-align.lua | 7 +++++- lua/custom/plugins/neoclip.lua | 9 ++++++++ lua/custom/plugins/obsidian.lua | 8 +++++++ lua/custom/plugins/oil.lua | 14 ++++++++++++ lua/custom/plugins/pastify.lua | 2 +- lua/custom/plugins/render-markdown.lua | 30 ++++++++++++++++++++++++++ lua/custom/plugins/smoji.lua | 11 +++++++++- lua/custom/plugins/vim-markdown.lua | 1 + lua/custom/plugins/wrapping.lua | 6 ++++++ 11 files changed, 93 insertions(+), 9 deletions(-) create mode 100644 lua/custom/plugins/neoclip.lua create mode 100644 lua/custom/plugins/oil.lua create mode 100644 lua/custom/plugins/render-markdown.lua create mode 100644 lua/custom/plugins/vim-markdown.lua create mode 100644 lua/custom/plugins/wrapping.lua diff --git a/lua/custom/plugins/barbar.lua b/lua/custom/plugins/barbar.lua index 6089b61..c94b93c 100644 --- a/lua/custom/plugins/barbar.lua +++ b/lua/custom/plugins/barbar.lua @@ -5,8 +5,8 @@ return { }, config = function() require('barbar').setup() - vim.keymap.set('n', '', ':BufferNext', { silent = true }) - vim.keymap.set('n', '', ':BufferPrevious', { silent = true }) - vim.keymap.set('n', 'x', ':BufferClose', { silent = true }) + vim.keymap.set('n', '', ':BufferNext', { silent = true, desc = 'To buffer on the right' }) + vim.keymap.set('n', '', ':BufferPrevious', { silent = true, desc = 'To buffer on the left' }) + vim.keymap.set('n', 'x', ':BufferClose', { silent = true, desc = 'Close buffer' }) end, } diff --git a/lua/custom/plugins/markdown.lua b/lua/custom/plugins/markdown.lua index 5b51511..1d8876b 100644 --- a/lua/custom/plugins/markdown.lua +++ b/lua/custom/plugins/markdown.lua @@ -1,5 +1,7 @@ return { - 'MeanderingProgrammer/render-markdown.nvim', - opts = {}, - dependencies = { 'nvim-treesitter/nvim-treesitter' }, + 'tadmccorkle/markdown.nvim', + ft = 'markdown', -- or 'event = "VeryLazy"' + opts = { + -- configuration here or empty for defaults + }, } diff --git a/lua/custom/plugins/mini-align.lua b/lua/custom/plugins/mini-align.lua index 5b65978..efaf73a 100644 --- a/lua/custom/plugins/mini-align.lua +++ b/lua/custom/plugins/mini-align.lua @@ -2,6 +2,11 @@ return { 'echasnovski/mini.align', version = false, config = function() - require('mini.align').setup() + require('mini.align').setup { + mappings = { + start = 'ma', + start_with_preview = 'mA', + }, + } end, } diff --git a/lua/custom/plugins/neoclip.lua b/lua/custom/plugins/neoclip.lua new file mode 100644 index 0000000..0bd245c --- /dev/null +++ b/lua/custom/plugins/neoclip.lua @@ -0,0 +1,9 @@ +return { + 'AckslD/nvim-neoclip.lua', + dependencies = { + 'nvim-telescope/telescope.nvim', + }, + config = function() + require('neoclip').setup() + end, +} diff --git a/lua/custom/plugins/obsidian.lua b/lua/custom/plugins/obsidian.lua index 7a98b71..fee7785 100644 --- a/lua/custom/plugins/obsidian.lua +++ b/lua/custom/plugins/obsidian.lua @@ -23,5 +23,13 @@ return { time_format = '%H:%M', }, disable_frontmatter = true, + ui = { + enable = true, + -- checkboxes = { + -- [' '] = { char = '👀', hl_group = 'ObsidianTodo' }, + -- ['/'] = { char = '🚧', hl_group = 'ObsidianDoing' }, + -- ['x'] = { char = '✅', hl_group = 'ObsidianDone' }, + -- }, + }, }, } diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua new file mode 100644 index 0000000..b5d2024 --- /dev/null +++ b/lua/custom/plugins/oil.lua @@ -0,0 +1,14 @@ +return { + 'stevearc/oil.nvim', + ---@module 'oil' + ---@type oil.SetupOpts + opts = {}, + -- Optional dependencies + -- dependencies = { { 'echasnovski/mini.icons', opts = {} } }, + dependencies = { 'nvim-tree/nvim-web-devicons' }, -- use if prefer nvim-web-devicons + config = function() + require('oil').setup { + vim.keymap.set('n', 'o', ':Oil'), + } + end, +} diff --git a/lua/custom/plugins/pastify.lua b/lua/custom/plugins/pastify.lua index 317e57b..9185883 100644 --- a/lua/custom/plugins/pastify.lua +++ b/lua/custom/plugins/pastify.lua @@ -12,7 +12,7 @@ return { opts = { absolute_path = false, -- use absolute or relative path to the working directory apikey = '', -- Api key, required for online saving - local_path = '/assets/imgs/', -- The path to put local files in, ex ~/Projects//assets/images/.png + local_path = '/attachments/', -- The path to put local files in, ex ~/Projects//assets/images/.png save = 'local', -- Either 'local' or 'online' or 'local_file' filename = function() return vim.fn.expand '%:t:r' .. '_' .. os.date '%Y-%m-%d_%H-%M-%S' diff --git a/lua/custom/plugins/render-markdown.lua b/lua/custom/plugins/render-markdown.lua new file mode 100644 index 0000000..564ff82 --- /dev/null +++ b/lua/custom/plugins/render-markdown.lua @@ -0,0 +1,30 @@ +return { + 'MeanderingProgrammer/render-markdown.nvim', + opts = {}, + dependencies = { 'nvim-treesitter/nvim-treesitter' }, + config = function() + require('render-markdown').setup { + enabled = true, + bullet = { + right_pad = 1, + }, + checkbox = { + enabled = true, + position = 'inline', + unchecked = { + icon = '👀', + highlight = 'RenderMarkdownUnchecked', + }, + checked = { + icon = '✅', + highlight = 'RenderMarkdownChecked', + }, + custom = { + doing = { raw = '[/]', rendered = '🔜', highlight = 'RenderMarkdownTodo' }, + cancelled = { raw = '[-]', rendered = '❌', highlight = 'RenderMarkdownBullet' }, + }, + }, + } + vim.keymap.set('n', 'rm', ':RenderMarkdown toggle', { silent = true }) + end, +} diff --git a/lua/custom/plugins/smoji.lua b/lua/custom/plugins/smoji.lua index fef0e9e..2d5bdc4 100644 --- a/lua/custom/plugins/smoji.lua +++ b/lua/custom/plugins/smoji.lua @@ -1,7 +1,16 @@ return { 'zakissimo/smoji.nvim', + -- config = function() + -- require 'smoji' + -- vim.keymap.set('n', 'em', 'Smoji') + -- end, + cmd = 'Smoji', + keys = { + { 'e', 'Smoji', desc = 'Git [e]moji' }, + -- { '', 'Smoji', desc = 'Git [e]moji', mode = 'i' }, + -- { '', 'Smoji', desc = 'Git [e]moji', mode = 't' }, + }, config = function() require 'smoji' - vim.keymap.set('n', 'em', 'Smoji') end, } diff --git a/lua/custom/plugins/vim-markdown.lua b/lua/custom/plugins/vim-markdown.lua new file mode 100644 index 0000000..7f91923 --- /dev/null +++ b/lua/custom/plugins/vim-markdown.lua @@ -0,0 +1 @@ +return { 'preservim/vim-markdown' } diff --git a/lua/custom/plugins/wrapping.lua b/lua/custom/plugins/wrapping.lua new file mode 100644 index 0000000..e1e1dbe --- /dev/null +++ b/lua/custom/plugins/wrapping.lua @@ -0,0 +1,6 @@ +return { + 'andrewferrier/wrapping.nvim', + config = function() + require('wrapping').setup() + end, +}