From ffb88edcf8b924556e0ed316d8ab098e50abe2ec Mon Sep 17 00:00:00 2001 From: Andrzej Date: Wed, 15 May 2024 11:47:53 +0200 Subject: [PATCH] add default config --- nvim/.config/nvim/lua/plugins/docs.lua | 27 +++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/nvim/.config/nvim/lua/plugins/docs.lua b/nvim/.config/nvim/lua/plugins/docs.lua index 28ee581..e8c0a1c 100644 --- a/nvim/.config/nvim/lua/plugins/docs.lua +++ b/nvim/.config/nvim/lua/plugins/docs.lua @@ -5,5 +5,30 @@ return { "nvim-telescope/telescope.nvim", "nvim-treesitter/nvim-treesitter", }, - opts = {}, + opts = { + dir_path = vim.fn.stdpath("data") .. "/devdocs", -- installation directory + telescope = {}, -- passed to the telescope picker + filetypes = { + -- extends the filetype to docs mappings used by the `DevdocsOpenCurrent` command, the version doesn't have to be specified + -- scss = "sass", + -- javascript = { "node", "javascript" } + }, + 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" } + mappings = { -- keymaps for the doc buffer + open_in_browser = "", + }, + ensure_installed = {}, -- get automatically installed + after_open = function(bufnr) end, -- callback that runs after the Devdocs window is opened. Devdocs buffer ID will be passed in + }, }