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, + }, +}