Closed Mykhailo-Sichkaruk closed 10 months ago
Sorry my bad, it was terminal mode and Ctrl+\
and then Ctrl+n
fix the issue).
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
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 :terminal
command in your nvim and you will get into terminal where you can write shell commands as usual while normal nvim's motions and commands line w,e,d,i
won't work. Nvim's commands/motions won't work because all input is redirected to the shell. Then you can press Ctrl + \ Ctrl + n
and you will be in the nvim's Normal mode.
So, a workaround I see - adding a more convenient shortcut to exit Terminal mode. I use: Map('t', '<A-a>', '<C-\\><C-n>')
If someone else stumble across this issue, the workaround is to use after_open
in config options
---@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