- Terminal name/version: `alacritty 0.9.0`
I have nvim-tree configured to lazy load if I press `F6` or to jump directly to the file i have open when i press `shift+F6`.
Once the plugin is loaded these key mappings work as expected. Only when the plugin is loaded initially by pressing `shift+F6`,
the `shift` is ignored and it only opens nvim-tree instead of jumping to the file that is currently open.
When I only put `<f18>` in the plugin declaration keys, `<f6>` won't load the plugin, so packer reads these as
different keys, but somehow only passes `<f6>` once the plugin was loaded.
### Steps to reproduce
1. Open neovim
2. Press `<f18>` (`shift+F6`)
### Actual behaviour
`<f6>` key is sent to nvim
### Expected behaviour
`<f18>` key is sent to nvim
### packer files
<details>
<summary>Plugin specification file(s)</summary>
plugins.lua
```lua
use {
'kyazdani42/nvim-tree.lua',
keys = { "<f6>", "<f18>" },
config = function()
require('config.nvim-tree').setup()
end,
}
config/nvim-tree.lua
local M = {}
function M.setup()
require('nvim-tree').nvim_tree.setup {}
vim.api.nvim_set_keymap("n", "<f6>", ":NvimTreeToggle<cr>")
vim.api.nvim_set_keymap("n", "<f18>", ":NvimTreeFindFile<cr>")
end
return M
nvim --version
:Features: +acl +iconv +tui See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim" fall-back for $VIM: "/usr/share/nvim"
Run :checkhealth for more info
LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Fedora Description: Fedora release 35 (Thirty Five) Release: 35 Codename: ThirtyFive
config/nvim-tree.lua
packer log file
`empty`packer compiled file
``` -- Automatically generated packer.nvim plugin loader code if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"') return end vim.api.nvim_command('packadd packer.nvim') local no_errors, error_msg = pcall(function() local time local profile_info local should_profile = false if should_profile then local hrtime = vim.loop.hrtime profile_info = {} time = function(chunk, start) if start then profile_info[chunk] = hrtime() else profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6 end end else time = function(chunk, start) end end local function save_profiles(threshold) local sorted_times = {} for chunk_name, time_taken in pairs(profile_info) do sorted_times[#sorted_times + 1] = {chunk_name, time_taken} end table.sort(sorted_times, function(a, b) return a[2] > b[2] end) local results = {} for i, elem in ipairs(sorted_times) do if not threshold or threshold and elem[2] > threshold then results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms' end end _G._packer = _G._packer or {} _G._packer.profile_output = results end time([[Luarocks path setup]], true) local package_path_str = "/home/tobi/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?.lua;/home/tobi/.cache/nvim/packer_hererocks/2.1.0-beta3/share/lua/5.1/?/init.lua;/home/tobi/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?.lua;/home/tobi/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/luarocks/rocks-5.1/?/init.lua" local install_cpath_pattern = "/home/tobi/.cache/nvim/packer_hererocks/2.1.0-beta3/lib/lua/5.1/?.so" if not string.find(package.path, package_path_str, 1, true) then package.path = package.path .. ';' .. package_path_str end if not string.find(package.cpath, install_cpath_pattern, 1, true) then package.cpath = package.cpath .. ';' .. install_cpath_pattern end time([[Luarocks path setup]], false) time([[try_loadstring definition]], true) local function try_loadstring(s, component, name) local success, result = pcall(loadstring(s), name, _G.packer_plugins[name]) if not success then vim.schedule(function() vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {}) end) end return result end time([[try_loadstring definition]], false) time([[Defining packer_plugins]], true) _G.packer_plugins = { ["Comment.nvim"] = { config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/Comment.nvim", url = "https://github.com/numToStr/Comment.nvim" }, LuaSnip = { config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19config.luasnip\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/LuaSnip", url = "https://github.com/L3MON4D3/LuaSnip" }, ["cmp-buffer"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/cmp-buffer", url = "https://github.com/hrsh7th/cmp-buffer" }, ["cmp-nvim-lsp"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp", url = "https://github.com/hrsh7th/cmp-nvim-lsp" }, ["cmp-nvim-lua"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua", url = "https://github.com/hrsh7th/cmp-nvim-lua" }, ["cmp-path"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/cmp-path", url = "https://github.com/hrsh7th/cmp-path" }, cmp_luasnip = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/cmp_luasnip", url = "https://github.com/saadparwaiz1/cmp_luasnip" }, ["crates.nvim"] = { config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18config.crates\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/crates.nvim", url = "/home/tobi/Projects/crates.nvim" }, firenvim = { config = { "\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20config.firenvim\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/firenvim", url = "https://github.com/glacambre/firenvim" }, ["gitsigns.nvim"] = { config = { "\27LJ\2\n=\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\20config.gitsigns\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/gitsigns.nvim", url = "https://github.com/lewis6991/gitsigns.nvim" }, harpoon = { config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19config.harpoon\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/harpoon", url = "https://github.com/ThePrimeagen/harpoon" }, ["impatient.nvim"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/impatient.nvim", url = "https://github.com/lewis6991/impatient.nvim" }, ["lsp-status.nvim"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/lsp-status.nvim", url = "https://github.com/nvim-lua/lsp-status.nvim" }, ["lsp_extensions.nvim"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/lsp_extensions.nvim", url = "https://github.com/nvim-lua/lsp_extensions.nvim" }, ["lualine.nvim"] = { config = { "\27LJ\2\n<\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\19config.lualine\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/lualine.nvim", url = "https://github.com/hoob3rt/lualine.nvim" }, ["markdown-preview.nvim"] = { loaded = false, needs_bufread = false, only_cond = false, path = "/home/tobi/.local/share/nvim/site/pack/packer/opt/markdown-preview.nvim", url = "https://github.com/iamcco/markdown-preview.nvim" }, ["nvim-cmp"] = { config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15config.cmp\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/nvim-cmp", url = "https://github.com/hrsh7th/nvim-cmp" }, ["nvim-dap"] = { after = { "nvim-dap-ui" }, loaded = true, only_config = true }, ["nvim-dap-ui"] = { config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18config.dap.ui\frequire\0" }, load_after = {}, loaded = true, needs_bufread = false, path = "/home/tobi/.local/share/nvim/site/pack/packer/opt/nvim-dap-ui", url = "https://github.com/rcarriga/nvim-dap-ui" }, ["nvim-lsp-installer"] = { loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/nvim-lsp-installer", url = "https://github.com/williamboman/nvim-lsp-installer" }, ["nvim-lspconfig"] = { config = { "\27LJ\2\n8\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\15config.lsp\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/nvim-lspconfig", url = "https://github.com/neovim/nvim-lspconfig" }, ["nvim-notify"] = { config = { "\27LJ\2\n;\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\18config.notify\frequire\0" }, loaded = true, path = "/home/tobi/.local/share/nvim/site/pack/packer/start/nvim-notify", url = "https://github.com/rcarriga/nvim-notify" }, ["nvim-tree.lua"] = { config = { "\27LJ\2\n>\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\21config.nvim-tree\frequire\0" }, keys = { { "", "