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

QuickFixCmdPost Conflict Resulting in Error E776 #2955

Open
hmgle opened this issue Feb 27, 2024 · 0 comments · May be fixed by #2958
Open

QuickFixCmdPost Conflict Resulting in Error E776 #2955

hmgle opened this issue Feb 27, 2024 · 0 comments · May be fixed by #2958
Labels
bug Something isn't working

Comments

@hmgle
Copy link

hmgle commented Feb 27, 2024

Description

I have noticed that the code in telescope.nvim may lead to a problem:

  vim.api.nvim_exec_autocmds("QuickFixCmdPost", {})

If the user's configuration or other plugins (e.g., go.nvim) define similar code like this:

au QuickFixCmdPost    l* nested lwindow

When editing a file starting with the letter "l" and triggering the actions.smart_send_to_qflist function, an error "Error detected while processing QuickFixCmdPost Autocommands for 'l*': E776: No location list" occurs.

Neovim version

NVIM v0.9.5
Build type: Release
LuaJIT 2.1.0-beta3

Operating system and version

Arch Linux / macOS 10.15.7

Telescope version / branch / rev

2e1e382

checkhealth telescope

telescope: require("telescope.health").check()

Checking for required plugins ~
- OK plenary installed.
- OK nvim-treesitter installed.

Checking external dependencies ~
- OK rg: found ripgrep 13.0.0
- OK fd: found fd 8.4.0

===== Installed extensions ===== ~

Telescope Extension: `fzf` ~
- OK lib working as expected
- OK file_sorter correctly configured
- OK generic_sorter correctly configured

Telescope Extension: `yank_history` ~
- No healthcheck provided

Steps to reproduce

  1. Open a Go file starting with the letter "l".
  2. Move the cursor to any variable or function.
  3. Trigger the Telescope lsp_references include_current_line=true command using gr or other shortcuts.
  4. Use q or other shortcuts to trigger actions.smart_send_to_qflist + actions.open_qflist on the popped-up window.

Expected behavior

No response

Actual behavior

Error detected while processing QuickFixCmdPost Autocommands for "l*":
E776: No location list
Press ENTER or type command to continue

Minimal config

local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
  vim.fn.system({
    "git",
    "clone",
    "--filter=blob:none",
    "https://github.com/folke/lazy.nvim.git",
    "--branch=stable",
    lazypath,
  })
end

require("lazy").setup({
    {
        'nvim-telescope/telescope.nvim',
        config = function()
            require('config.telescope')
        end,
        enabled = true,
    },
    {
        'ray-x/go.nvim',
        config = function()
            require('go').setup()
        end
    },
})

require('telescope').setup{
  defaults = {
    mappings = {
      i = {
        ["<C-h>"] = "which_key"
      }
    }
  },
  pickers = {
  },
  extensions = {
  }
}
@hmgle hmgle added the bug Something isn't working label Feb 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant