Skip to content
This repository has been archived by the owner on Aug 11, 2024. It is now read-only.

Organize imports function of code action is giving Error. #59

Closed
AryanPandeyy opened this issue Jan 9, 2022 · 4 comments · Fixed by #109 · May be fixed by #61
Closed

Organize imports function of code action is giving Error. #59

AryanPandeyy opened this issue Jan 9, 2022 · 4 comments · Fixed by #109 · May be fixed by #61
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@AryanPandeyy
Copy link

Description

I'm using nvim-jdtls for java development and I need import functionality of lspsaga but when I use it displays a error.
2022-01-09-211138_1366x768_scrot

Expected Behavior

Like in the above image a class is created in different file so it should import that class in the current file using statement import.
Actual Behavior

Shows a error attached above.

Environment
  • nvim --version output: 0.6.1
  • Operating system: Arch Linux
  • lspsaga commit:
@AryanPandeyy AryanPandeyy added the bug Something isn't working label Jan 9, 2022
@kkharji
Copy link
Owner

kkharji commented Jan 9, 2022

This doesn't happen with neovim code action handler or does it?

@AryanPandeyy
Copy link
Author

When I do this with key mapping of jdtls it will work. But when trying with lspsaga it doesn't.
For Example:-
github

In above video first I try to do with lspsaga which gives me an error.
But when I do with my key mapping for nvim-jdtls it works.

@kkharji kkharji added good first issue Good for newcomers help wanted Extra attention is needed labels Jan 12, 2022
@kkharji
Copy link
Owner

kkharji commented Jan 19, 2022

@AryanPandeyy does #61 fixes your issue?

@AryanPandeyy
Copy link
Author

Sadly no, I'm still getting error.
Error executing vim.schedule lua callback: .../site/pack/packer/start/lspsaga.nvim/lua/lspsaga/api.lua:24: attemp t to index local 'enriched_ctx' (a nil value) stack traceback: .../site/pack/packer/start/lspsaga.nvim/lua/lspsaga/api.lua:24: in function 'execute' .../site/pack/packer/start/lspsaga.nvim/lua/lspsaga/api.lua:45: in function 'handler' /usr/share/nvim/runtime/lua/vim/lsp.lua:964: in function 'cb' vim.lua:285: in function <vim.lua:285>

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
2 participants