stevearc / stickybuf.nvim

Neovim plugin for locking a buffer to a window
MIT License
246 stars 7 forks source link

Fix telescope's mapping error #6

Closed yutkat closed 2 years ago

yutkat commented 2 years ago

I additionally found that the error occurs when I get to the latest telescope.

E5108: Error executing lua ...ack/packer/opt/telescope.nvim/lua/telescope/mappings.lua:240: Unsure of how we got this failure: 6 8
stack traceback:
        [C]: in function 'assert'
        ...ack/packer/opt/telescope.nvim/lua/telescope/mappings.lua:240: in function 'execute_keymap'
        [string ":lua"]:1: in main chunk

TelescopePrompt should be disabled by default.

stevearc commented 2 years ago

Can you provide more information about when you're seeing this error? I'm on the latest telescope and I don't get this at all.

yutkat commented 2 years ago

Sorry. I am lazy to explain it.

This happens if you do a very fast :q (within 1-2 seconds?)

https://user-images.githubusercontent.com/8683947/166866788-395e981f-9b29-4ead-a161-c85905113f7b.mp4

vim.cmd [[syntax enable]]
vim.cmd [[filetype plugin indent on]]

local install_path = vim.fn.stdpath('data')..'/site/pack/packer/opt/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
  vim.api.nvim_command('!git clone https://github.com/wbthomason/packer.nvim '..install_path)
end
vim.cmd [[packadd packer.nvim]]

local function load_plugins()
  return require('packer').startup(function()
    use {'wbthomason/packer.nvim', opt = true}
    use {'nvim-telescope/telescope.nvim', requires = { {'nvim-lua/plenary.nvim'} }}
    use {'stevearc/stickybuf.nvim'}
  end)
end
load_plugins()
stevearc commented 2 years ago

Okay, I think I understand what's happening. It's strange that this fixes it for you; I still get the error when I do a repro. I've pushed up a change that should hopefully address the problem at the source. Could you see if that works for you?

yutkat commented 2 years ago

Great! It works for me. Thanks.