Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: change arguments in keymap table (#2111) #2125

Merged
merged 2 commits into from
Aug 13, 2022
Merged

docs: change arguments in keymap table (#2111) #2125

merged 2 commits into from
Aug 13, 2022

Conversation

zubrailx
Copy link
Contributor

Description

Change arguments in the table to set mapping.

Fixes # (issue)
#2111

Type of change

  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list relevant details about your configuration

  • Test A
    Running configuration with mapping:
["<esc>"] = { actions.close, type = "action", opts = { silent = true, nowait = true } }, 

Fine.

  • Test B
    Running configuration with mapping:
 ["<esc>"] = { action = actions.close, opts = { silent = true, nowait = true } }

Error.

Configuration:

vim.cmd [[set runtimepath=$VIMRUNTIME]]
vim.cmd [[set packpath=/tmp/nvim/site]]
local package_root = '/tmp/nvim/site/pack'
local install_path = package_root .. '/packer/start/packer.nvim'
local function load_plugins()
  require('packer').startup {
    {
      'wbthomason/packer.nvim',
      {
        'nvim-telescope/telescope.nvim',
        requires = {
          'nvim-lua/plenary.nvim',
          { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
        },
      },
      -- ADD PLUGINS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
    },
    config = {
      package_root = package_root,
      compile_path = install_path .. '/plugin/packer_compiled.lua',
      display = { non_interactive = true },
    },
  }
end

_G.load_config = function()
  local telescope = require("telescope")
  local actions = require("telescope.actions")
  telescope.setup({
    defaults = {
      mappings = {
        i = {
        },
        n = {
              ["<esc>"] = { actions.close, type = "action", opts = { silent = true, nowait = true } }, 
        }
      }
    },
  })
  require('telescope').load_extension('fzf')
  -- ADD INIT.LUA SETTINGS THAT ARE _NECESSARY_ FOR REPRODUCING THE ISSUE
end
if vim.fn.isdirectory(install_path) == 0 then
  print("Installing Telescope and dependencies.")
  vim.fn.system { 'git', 'clone', '--depth=1', 'https://github.com/wbthomason/packer.nvim', install_path }
end
load_plugins()
require('packer').sync()
vim.cmd [[autocmd User PackerComplete ++once echo "Ready!" | lua load_config()]]
  • Neovim version (nvim --version):
NVIM v0.7.2
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
  • Operating system and version:
Gentoo Base System release 2.8 x86_64

Checklist:

  • My code follows the style guidelines of this project (stylua)
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation (lua annotations)

@Conni2461 Conni2461 merged commit 36d4571 into nvim-telescope:master Aug 13, 2022
@Conni2461
Copy link
Member

thanks :) i only generated vimdocs

Conni2461 pushed a commit that referenced this pull request Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants