From 5d5dcabad73e754bbbfdc4e2d51443f2e72cc5c6 Mon Sep 17 00:00:00 2001 From: topper3418 <67675579+topper3418@users.noreply.github.com> Date: Thu, 11 Jul 2024 22:17:06 -0500 Subject: [PATCH] tidying up --- init.lua | 4 +++- lua/kickstart/plugins/doc_view.lua | 9 +++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lua/kickstart/plugins/doc_view.lua diff --git a/init.lua b/init.lua index 9f1e8237..fb2c9de3 100644 --- a/init.lua +++ b/init.lua @@ -303,7 +303,8 @@ require('lazy').setup({ -- require 'kickstart.plugins.autopairs', require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps - + -- add the documentation viewer + require 'kickstart.plugins.doc_view', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- @@ -350,5 +351,6 @@ vim.opt.smartindent = true vim.api.nvim_set_hl(0, 'Normal', { bg = 'none' }) vim.api.nvim_set_hl(0, 'NormalFloat', { bg = 'none' }) +vim.keymap.set('n', 'dt', ':DocsViewToggle', { desc = 'Toggle Documentation' }) -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/kickstart/plugins/doc_view.lua b/lua/kickstart/plugins/doc_view.lua new file mode 100644 index 00000000..3f734b4c --- /dev/null +++ b/lua/kickstart/plugins/doc_view.lua @@ -0,0 +1,9 @@ +return { + 'amrbashir/nvim-docs-view', + lazy = true, + cmd = 'DocsViewToggle', + opts = { + position = 'right', + width = 60, + }, +}