-
Notifications
You must be signed in to change notification settings - Fork 21
Focus loss in glow #73
Focus loss in glow #73
Comments
Sorry my bad, it was terminal mode and I was struggling with the settings of the plugins and other stuff but it was so easy. |
hey @Mykhailo-Sichkaruk having the same problem, do we need to press ctrl+\ and ctrl+n everytime we open it or is there a persistent solution |
As I understood Terminal mode is a feature of the nvim, not a bug. For example, you can try So, a workaround I see - adding a more convenient shortcut to exit Terminal mode. I use: |
If someone else stumble across this issue, the workaround is to use ---@type LazySpec
return {
"luckasRanarison/nvim-devdocs",
cond = not vim.g.vscode,
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-telescope/telescope.nvim",
"nvim-treesitter/nvim-treesitter",
},
cmd = {
"DevdocsFetch",
"DevdocsInstall",
"DevdocsUninstall",
"DevdocsOpen",
"DevdocsOpenCurrent",
"DevdocsOpenFloat",
"DevdocsUpdate",
"DevdocsUpdateAll",
"DevdocsOpenCurrentFloat",
},
keys = {
{
"<leader>fd",
function()
if vim.bo.ft == "python" then
local check_version_cmd = [[python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))']]
local python_version = "python-" .. vim.fn.system(check_version_cmd)
local cmd = ("DevdocsOpenFloat %s"):format(python_version)
vim.cmd(cmd)
else
vim.cmd("DevdocsOpenCurrentFloat")
end
end,
desc = "Find Devdocs for current ft",
mode = { "n" },
},
{ "<leader>fD", "<cmd>DevdocsOpenFloat<CR>", desc = "Find Devdocs", mode = { "n" } },
},
opts = {
previewer_cmd = vim.fn.executable("glow") == 1 and "glow" or nil,
cmd_args = { "-s", "dark", "-w", "80" },
picker_cmd = true,
picker_cmd_args = { "-s", "dark", "-w", "50" },
float_win = { -- passed to nvim_open_win(), see :h api-floatwin
relative = "editor",
height = 35,
width = 125,
border = "rounded",
},
after_open = function()
vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes("<C-\\><C-n>", true, false, true), "n", true)
end,
},
} |
Thank you @RayJameson !!! copypasted this right away |
I have an issue with opened docs via
glow
. When I select some docs to be opened my neovim loses focus and I simply can't do anything with my keyboard in the neovim window. I need to click with my mouse over neovim to be able to navigate with the keyboard. Here are my settings:What am I doing wrong?
My setup:
nvim: 0.9.5
fedora: 38
alacritty: 0.13.1
X11
The text was updated successfully, but these errors were encountered: