go-langserver icon indicating copy to clipboard operation
go-langserver copied to clipboard

Integrating go-langserver with monaco-editor single instance for intellisense

Open nasir-rabbani opened this issue 5 years ago • 2 comments

I am trying to create a web based editor using Monaco Editor. I was able to make the go-langserver and monaco-language-client talk to each other but on typing or hitting CTRL + SPACE i am getting the below error from go-langserver

go Server: 2020/08/06 16:53:51 jsonrpc2 handler: notification "textDocument/didChange" handling error: Open inmemory://model/1: unable to read out-of-workspace resource from virtual file system

Anyone who has successfully managed to achieve this please share your approach.

@keegancsmith @chrismwendt @slimsag

nasir-rabbani avatar Aug 10 '20 08:08 nasir-rabbani

I am assuming your web based editor created the URI inmemory://model/1. Rather pass in filenames that look like file paths. Go-langserver is likely choking on that. I believe in vscode they have a concept around translating paths for consumption in LSP.

keegancsmith avatar Aug 12 '20 00:08 keegancsmith

Hi,

@nasir-rabbani I know its very old, but were you able to solve it? At least can you give me a pointer on what to change in monaco-language-client to get started?

Thanks, Pawan

pawansingh00 avatar Nov 06 '21 13:11 pawansingh00