Skip to content

Commit

Permalink
fix(nvim-devdocs): focus float and toggle (#921)
Browse files Browse the repository at this point in the history
* add DevdocsToggle and fix focus on float window

* schema

---------

Co-authored-by: windowsrefund <mtf8>
  • Loading branch information
windowsrefund authored Apr 28, 2024
1 parent ab4e806 commit c24f6b6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lua/astrocommunity/editing-support/nvim-devdocs/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ return {
"DevdocsOpenFloat",
"DevdocsUpdate",
"DevdocsUpdateAll",
"DevdocsToggle",
},
keys = {
{ prefix .. "d", "<Cmd>DevdocsOpenCurrentFloat<CR>", desc = "Find Devdocs for current file", mode = { "n" } },
{ prefix .. "dd", "<Cmd>DevdocsOpenCurrentFloat<CR>", desc = "Find Devdocs for current file", mode = { "n" } },
{ prefix .. "dt", "<Cmd>DevdocsToggle<CR>", desc = "Toggle last Devdocs item", mode = { "n" } },
{ prefix .. "D", "<Cmd>DevdocsOpenFloat<CR>", desc = "Find Devdocs", mode = { "n" } },
},
opts = {
Expand All @@ -37,6 +39,9 @@ return {
filetypes = {
typescript = { "node", "javascript", "typescript" },
},
after_open = function()
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, false, true), "n", true)
end,
},
},
}

0 comments on commit c24f6b6

Please sign in to comment.