From c46912da4f1499650ce03aeba38910b798d9b455 Mon Sep 17 00:00:00 2001 From: windowsrefund Date: Sun, 28 Apr 2024 12:21:08 -0400 Subject: [PATCH 1/2] add DevdocsToggle and fix focus on float window --- lua/astrocommunity/editing-support/nvim-devdocs/init.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lua/astrocommunity/editing-support/nvim-devdocs/init.lua b/lua/astrocommunity/editing-support/nvim-devdocs/init.lua index f397e8cbb..51e60837e 100644 --- a/lua/astrocommunity/editing-support/nvim-devdocs/init.lua +++ b/lua/astrocommunity/editing-support/nvim-devdocs/init.lua @@ -24,9 +24,11 @@ return { "DevdocsOpenFloat", "DevdocsUpdate", "DevdocsUpdateAll", + "DevdocsToggle", }, keys = { - { prefix .. "d", "DevdocsOpenCurrentFloat", desc = "Find Devdocs for current file", mode = { "n" } }, + { prefix .. "dd", "DevdocsOpenCurrentFloat", desc = "Find Devdocs for current file", mode = { "n" } }, + { prefix .. "dt", "DevdocsToggle", desc = "Toggle last Devdocs item", mode = { "n" } }, { prefix .. "D", "DevdocsOpenFloat", desc = "Find Devdocs", mode = { "n" } }, }, opts = { @@ -38,5 +40,8 @@ return { typescript = { "node", "javascript", "typescript" }, }, }, + after_open = function() + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, false, true), "n", true) + end, }, } From a203053dafbfd029a3f55545e2e4ed69630dceb2 Mon Sep 17 00:00:00 2001 From: windowsrefund Date: Sun, 28 Apr 2024 13:19:23 -0400 Subject: [PATCH 2/2] schema --- lua/astrocommunity/editing-support/nvim-devdocs/init.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/astrocommunity/editing-support/nvim-devdocs/init.lua b/lua/astrocommunity/editing-support/nvim-devdocs/init.lua index 51e60837e..4d299ea9a 100644 --- a/lua/astrocommunity/editing-support/nvim-devdocs/init.lua +++ b/lua/astrocommunity/editing-support/nvim-devdocs/init.lua @@ -39,9 +39,9 @@ return { filetypes = { typescript = { "node", "javascript", "typescript" }, }, + after_open = function() + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, false, true), "n", true) + end, }, - after_open = function() - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("", true, false, true), "n", true) - end, }, }