Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to resolve import "vscode/monaco" from "packages\examples\main\src\common.ts" #498

Closed
amoalys opened this issue Jun 5, 2023 · 9 comments

Comments

@amoalys
Copy link

amoalys commented Jun 5, 2023

1685951841255

@kaisalmen
Copy link
Collaborator

@amoalys do you mind providing some context, including what you did before you took this screenshot. Thanks.

@amoalys
Copy link
Author

amoalys commented Jun 5, 2023

first: I run git clone https://github.com/TypeFox/monaco-languageclient.git,
second: cd monaco-languageclient,then,npm i,
third: npm i
four:npm run dev
end:it can't workwell so i took this screenshot,need some help
,

@amoalys
Copy link
Author

amoalys commented Jun 5, 2023

i click the first link , then it does't work

@kaisalmen
Copy link
Collaborator

Did you run npm run build after npm i?

@amoalys
Copy link
Author

amoalys commented Jun 5, 2023

sorry,I didn't do this, now it can work well, thanks! I still have a question,How can I use monaco-languageclient in a (Vue3+Vite+monaco-editor) project? Do you have a example in Vue client example?

@kaisalmen
Copy link
Collaborator

@amoalys we have an enhancement issue: Add a Vue example, but nothing readily available.

@amoalys
Copy link
Author

amoalys commented Jun 6, 2023

I created a project using Vue that integrates monaco editor and registers C language. Then, I also launched an LSP service to provide C language with intelligent prompts, code completion, and other functions. Now, I can get a good experience in a separate C file. However, I hope that clicking can jump from a variable in one C file to another file defined for that variable. How can I achieve this? Just like a WebIDE.

@kaisalmen
Copy link
Collaborator

You have to extend your own languageclient to achieve this. This is out of the scope of this library.
Of course, you can take a look at a complex client like this: https://github.com/redhat-developer/vscode-java/tree/master/src an get some inspiration, but maybe there are simpler examples. @CGNonofr do you have any good recommendations for this?

It could be a good idea to extend the README with a new chapter like further reading/resources as similar questions came up in the past.

I think the issue itself is resolved. I will close it.

@amoalys
Copy link
Author

amoalys commented Jun 6, 2023

OK,Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants