I'm using a LSP plugin to call a command from the server, and currently it is logging the data using echom
.
My current code is like this:
function! PtypeCallback(result)
echom json_encode(a:result)
endfunction
It was working, but for functions with larger types, The JSON string is truncated. Also I want to keep it for some time, preferably launching it in a preview window.
How can I open the preview-window using a custom created buffer which contains the typ
parameter from the JSON I'm receiving in a:result
parameter?
:h pedit
to open the preview window with some custom file name.:exe 'pedit +call\ setline(1,text)' tempname()
)