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: command-line completion errors if 'Trouble' command is abbreviated #580

Open
4 tasks done
LunarLambda opened this issue Sep 24, 2024 · 4 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@LunarLambda
Copy link

Did you check docs and existing issues?

  • I have read all the trouble.nvim docs
  • I have updated the plugin to the latest version before submitting this issue
  • 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.11.0-dev-825+gd831392b1

Operating system/version

Arch Linux

Describe the bug

Typing :Trouble <tab> triggers completion as expected. Typing :Tr <tab> (i.e. the shortest unique prefix of Trouble, typing :Tr<tab> completes :Trouble), then the following error is thrown:

E5108: Error executing Lua function: ...are/nvim/lazy/trouble.nvim/lua/trouble/config/parser.lua:23: attempt to index local 'input' (a nil value)
stack traceback:
        ...are/nvim/lazy/trouble.nvim/lua/trouble/config/parser.lua:23: in function 'parse'
        ...cal/share/nvim/lazy/trouble.nvim/lua/trouble/command.lua:86: in function 'parse'
        ...cal/share/nvim/lazy/trouble.nvim/lua/trouble/command.lua:12: in function <...cal/share/nvim/lazy/trouble.nvim/lua/trouble/command.lua:10>

Steps To Reproduce

Type :Tr <tab>

Expected Behavior

Completion should work even if an abbreviated prefix of the command is used.

Repro

vim.env.LAZY_STDPATH = ".repro"
load(vim.fn.system("curl -s https://raw.githubusercontent.com/folke/lazy.nvim/main/bootstrap.lua"))()

require("lazy.minit").repro({
  spec = {
    { "folke/trouble.nvim", opts = {} },
    -- add any other plugins here
  },
})
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 25, 2024
@LunarLambda
Copy link
Author

not resolved yet

@github-actions github-actions bot removed the stale label Oct 26, 2024
Copy link
Contributor

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Nov 25, 2024
@LunarLambda
Copy link
Author

still open

@github-actions github-actions bot removed the stale label Nov 26, 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

No branches or pull requests

1 participant