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

bug v3: trouble.open runs error in telescope #393

Closed
3 tasks done
ShiChenCong opened this issue Mar 29, 2024 · 10 comments · Fixed by #437
Closed
3 tasks done

bug v3: trouble.open runs error in telescope #393

ShiChenCong opened this issue Mar 29, 2024 · 10 comments · Fixed by #437
Labels

Comments

@ShiChenCong
Copy link

Did you check docs and existing issues?

  • I have read all the trouble.nvim docs
  • I have searched the existing issues of trouble.nvim
  • I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)

NVIM v0.10.0-dev-2663+gc1c6c1ee1

Operating system/version

14.2.1 (23C71)

Describe the bug

image

Steps To Reproduce

  1. telescope config
local telescope = require("telescope")

telescope.setup({
  defaults = {
    mappings = {
      i = { ["<c-t>"] = trouble.open },
      n = { ["<c-t>"] = trouble.open },
    },
  },
})
  1. trouble config
require('trouble').setup({
})
  1. select multiple file,cause the error
image

Expected Behavior

not show error

Repro

No response

@folke
Copy link
Owner

folke commented Mar 29, 2024

My bad, the code example was wrong. Just updated the docs.
Should be sources instead of source

local trouble = require("trouble.sources.telescope")

local telescope = require("telescope")

telescope.setup({
  defaults = {
    mappings = {
      i = { ["<c-t>"] = trouble.open },
      n = { ["<c-t>"] = trouble.open },
    },
  },
})

@folke folke closed this as completed Mar 29, 2024
@ShiChenCong
Copy link
Author

ShiChenCong commented Mar 29, 2024

I had already used sources before commit this issue

local trouble = require("trouble.sources.telescope")

same error

@folke folke reopened this Mar 29, 2024
@folke
Copy link
Owner

folke commented Mar 29, 2024

Are you sure that trouble variable is the one pointing to require("trouble.sources.telescope") and not to require("trouble")?

@folke
Copy link
Owner

folke commented Mar 29, 2024

What is the full traceback from your screenshot?

@ShiChenCong
Copy link
Author

  1. select multiple file in telescope window
  2. press <a-q> which is executing trouble.open
  3. show the error

@folke
Copy link
Owner

folke commented Mar 29, 2024

Still works for me.
What is the full stacktrace?

@folke
Copy link
Owner

folke commented Mar 29, 2024

Are you using the latest trouble version?

@folke
Copy link
Owner

folke commented Mar 29, 2024

Was able to reproduce. Should be fixed now!

@folke folke closed this as completed Mar 29, 2024
@ShiChenCong
Copy link
Author

I have just created the minimal reproduce repo 😂
After update, It works perfectly, Thank you for the work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants