sourcer icon indicating copy to clipboard operation
sourcer copied to clipboard

lsp-format insert unknown character

Open wingyplus opened this issue 6 years ago • 3 comments

I use sourcer with emacs lsp-mode and replacing elixir_ls that come from elixir-ls organization with sourcer. After I write this source:

% hello_module.erl
-module(hello_module).
-export([hello/0]).

hello() ->
    X = "hello",
    io:format("~s~n", [X]).

And then I invoke lsp-format-buffer to format source. Sourcer edit my source with extra character:

wingyplus avatar Jan 09 '20 16:01 wingyplus

Weird, I don't know where those characters could come from... I will look at this.

vladdu avatar Jan 09 '20 17:01 vladdu

I can't see anything in the code that would add those characters, so my guess is that it's from the communication from the emacs client, somehow.

If you delete those characters and reformat, does it happen again? If you create a new file and enter the text and reformat, do you get the same result?

vladdu avatar Jan 09 '20 20:01 vladdu

@vladdu As I try, it always happens after I cleared those character and called format again.

wingyplus avatar Jan 10 '20 09:01 wingyplus