diff --git a/.config/nvim/lua/plugins/extras/coding/documentation.lua b/.config/nvim/lua/plugins/extras/coding/documentation.lua index 4bd9a9a7..b662308f 100644 --- a/.config/nvim/lua/plugins/extras/coding/documentation.lua +++ b/.config/nvim/lua/plugins/extras/coding/documentation.lua @@ -63,49 +63,4 @@ return { }, }, }, - { - "luckasRanarison/nvim-devdocs", - cmd = { - "DevdocsFetch", - "DevdocsInstall", - "DevdocsUninstall", - "DevdocsOpen", - "DevdocsOpenFloat", - "DevdocsOpenCurrent", - "DevdocsOpenCurrentFloat", - "DevdocsUpdate", - "DevdocsUpdateAll", - }, - keys = { - { "sE", "DevdocsOpen", desc = "Devdocs" }, - { "se", "DevdocsOpenCurrent", desc = "Devdocs Current" }, - }, - opts = { - ensure_installed = { - "css", - "html", - "javascript", - "lua-5.4", - "python-3.11", - "react", - "typescript", - "angular", - "bash", - "fish-3.6", - "git", - "go", - "rust", - "sass", - "vue-3", - "docker", - "markdown", - "svelte", - "tailwindcss", - "eslint", - "prettier", - "npm", - "node", - }, - }, - }, } diff --git a/.config/nvim/lua/plugins/telescope.lua b/.config/nvim/lua/plugins/telescope.lua index 227ea02b..57efa258 100644 --- a/.config/nvim/lua/plugins/telescope.lua +++ b/.config/nvim/lua/plugins/telescope.lua @@ -22,6 +22,68 @@ return { end) end, }, + { + "luckasRanarison/nvim-devdocs", + cmd = { + "DevdocsFetch", + "DevdocsInstall", + "DevdocsUninstall", + "DevdocsOpen", + "DevdocsOpenFloat", + "DevdocsOpenCurrent", + "DevdocsOpenCurrentFloat", + "DevdocsUpdate", + "DevdocsUpdateAll", + }, + keys = { + { "sE", "DevdocsOpen", desc = "Devdocs" }, + { "se", "DevdocsOpenCurrent", desc = "Devdocs Current" }, + }, + opts = { + dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory + telescope = {}, -- passed to the telescope picker + float_win = { -- passed to nvim_open_win(), see :h api-floatwin + relative = "editor", + height = 25, + width = 100, + border = "rounded", + }, + wrap = false, -- text wrap, only applies to floating window + previewer_cmd = nil, -- for example: "glow" + cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "80" } + cmd_ignore = {}, -- ignore cmd rendering for the listed docs + picker_cmd = false, -- use cmd previewer in picker preview + picker_cmd_args = {}, -- example using glow: { "-s", "dark", "-w", "50" } + after_open = function(bufnr) + vim.api.nvim_buf_set_keymap(bufnr, "n", "q", ":close", {}) + end, + ensure_installed = { + "css", + "html", + "javascript", + "lua-5.4", + "python-3.11", + "react", + "typescript", + "angular", + "bash", + "fish-3.6", + "git", + "go", + "rust", + "sass", + "vue-3", + "docker", + "markdown", + "svelte", + "tailwindcss", + "eslint", + "prettier", + "npm", + "node", + }, + }, + }, { "dawsers/telescope-floaterm.nvim", config = function()