0

I am using company with lsp-java, but I think this is a company problem. I have some code like

  void quz(int bar, int longNamedVariable) {
    foo(bar, longNamedVariable);
  }

I packaged all the parameters into a container object, so now the function signature is quz(Data data). When I got to update the call to foo, I put the point before bar and type data.get. At this point, I get getBar() and getLongNamedVariable() as completion options. When I press RET to access getBar(), it overwrites the remaining text on the line, so I end up with

  void quz(Data data) {
    foo(data.getBar(),Variable);
  }

where part of the following argument is overwritten. I can't imagine that this is the intended behavior and it is certainly disruptive. Any ideas what is causing it and what I can do to get it to work correctly?

In case it is not clear, "work correctly" means that after completion, I have

  void quz(Data data) {
    foo(data.getBar(), longNamedVariable);
  }
1
  • Sounds like you might want to file an issue with lsp-mode
    – Dmitry
    Oct 14, 2022 at 21:06

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.