LuaSnip
LuaSnip copied to clipboard
snippet is added at the end of char instead of replace it. #169
When I type so
and Enter
Expected: System.out.println();
But got: soSystem.out.println();
(my setup: https://github.com/NateCC0902/nvim/blob/main/after/plugin/lsp.lua)
Mhmm could you show the source of that snippet? Or is it provided by lsp?
According :LspInfo
Client: jdtls (id: 2, bufnr: [4]) filetypes: java autostart: true root directory: /Users/natesbiglaptop/IdeaProjects/JavaLeetcode/my-app cmd: jdtls -configuration /Users/natesbiglaptop/.cache/jdtls/config -data /Users/natesbiglaptop/.cache/jdtls/workspace
1 active client(s) not attached to this buffer:
can you replace
expand = function(args)
require 'luasnip'.lsp_expand(args.body)
end
with
expand = function(args)
print(args.body)
require 'luasnip'.lsp_expand(args.body)
end
and trigger the issue to see what snippet is coming from jdtls
? If I remember correctly there was another issue with that lsp server before.
I just did that. and i rodo the situation but there is nothing triggered (printed)?
Could you make a recording of you triggering the bug?
Could it be that jdtls is not marking the completion as a snippet?
Mhmm may be it, against that would speak that the text triggering the completion would also be removed for regular completions
https://www.youtube.com/watch?v=s_fLpgxDEgs
here is the video.
Doesn't tell me as much as I'd hoped :sweat_smile: Srry, I can't tell at all what's going wrong :/