Comments (17)
does nuxt.js
support the new URL(..., import.meta.url)
syntax?
from monaco-languageclient.
does
nuxt.js
support thenew URL(..., import.meta.url)
syntax?
I don't think so... I tried using @codingame/esbuild-import-meta-url-plugin
but it still doesn't work.
from monaco-languageclient.
Hi @Mw3y does this repo and the examples work successful in your environment? My other suggestion is to reduce complexity: First start without a framework and just do a simple hello world with HTML/JS and see that it works. Then try to wrap it in vue compoent, then try nuxt...
We want to add a vue verify example (see #416), but nobody volunteered for it, yet. 🙂
from monaco-languageclient.
Hey @kaisalmen,
Using a normal vite + vue environment works well! I managed to get the editor running, sadly without any color highlighting (I don't know why). The issue is with nuxt.js specifically, but it's not that important for now... My ultimate goal is to add c++, java and python language servers to an app with code exercises for students.
Concerning the vue example, I could make it but I need to understand the library a bit more before 😅.
from monaco-languageclient.
Hey @Mw3y if you are interested take a look at the Angular example:
https://github.com/TypeFox/monaco-languageclient/blob/main/verify/angular/src/app/app.component.ts
In all verification examples we use the json client and server. The vite example with HTML+JS is probably the easiest:
https://github.com/TypeFox/monaco-languageclient/tree/main/verify/vite
and could also be a template for a vue example.
from monaco-languageclient.
Thanks!
from monaco-languageclient.
Hey @kaisalmen,
I've managed to make a web worker running a jedi language server for python. It has a method which takes a language server request object and sends a response.
I'm having trouble into connecting it to the monaco wrapper. How make a 'bridge' between the worker and the wrapper without a websocket?
I tried using vscode-languageclient/browser
without success...
from monaco-languageclient.
@Mw3y you can load the worker and then just configure it like this:
https://github.com/TypeFox/monaco-languageclient/blob/main/packages/examples/src/langium/langium-dsl/config/extendedConfig.ts#L81-L84
These are the two worker config options:
https://github.com/TypeFox/monaco-languageclient/blob/main/packages/wrapper/src/commonTypes.ts#L42-L54
The bridging to the language server worker is part of vscode-languageclient
. The wiring is done here: https://github.com/TypeFox/monaco-languageclient/blob/main/packages/wrapper/src/languageClientWrapper.ts#L170-L177
from monaco-languageclient.
Hey @kaisalmen,
I'm still having some trouble making it work... I'm now trying to use your build of pyright for the web.
I don't really now what would be the problem. Still no completion from the language server and no syntax highlighting.
Here's my code: https://haste.androz2091.fr/setevanomi.xml
NB: I used https://github.com/mitmedialab/monaco-workspace-import-error a lot to try to understand what's happening.
from monaco-languageclient.
@Mw3y try to import import '@codingame/monaco-vscode-python-default-extension';
. That is the need for syntax higlighting.
If the languageclient still does not show any code completion you have to see what the reader and writer does (add log statements there).
Apart from that I don't see anything being wrong with your config.
from monaco-languageclient.
Thanks! Can't believe I forgot that...
from monaco-languageclient.
Hey @kaisalmen,
I'm now trying to use the clangd web assembly build but I'm having this error:
which comes from
clangd.FS.writeFile('/workspace/main.cpp', '')
clangd.FS.writeFile(
`/workspace/.clangd`,
JSON.stringify({ CompileFlags: { Add: flags } })
)
I don't really know how to fix it...
I used the code provided at https://github.com/TypeFox/clangd-in-browser
Here's the code:
- worker: https://haste.androz2091.fr/ubagajenil.typescript
- vue component: https://haste.androz2091.fr/otigumiyil.xml
from monaco-languageclient.
Hi @Mw3y I don't know. Does the directory exists? Have you considered asking the maintainer of https://github.com/Guyutongxue/clangd-in-browser ?
We forked the project to perform the upgrade to the latest major version the libraries from this repo.
from monaco-languageclient.
Alright, I'll contact him. I don't really know how the vscode filesystem works. I'll dig deeper. Thanks!
from monaco-languageclient.
I don't know how clangd-in-browser works, but note that VSCode implemented the WASI api (including filesystem backed on the virtual VSCode filesystem) in the extension host via an experimental extension (https://www.npmjs.com/package/@vscode/wasm-wasi / https://marketplace.visualstudio.com/items?itemName=ms-vscode.wasm-wasi-core)
from monaco-languageclient.
Thank you for your suggestion but the issue was that the folder I was trying to use was not created by default.
More details here: Guyutongxue/clangd-in-browser#7 (comment)
from monaco-languageclient.
@Mw3y good news and thanks for reporting back. I think this issue is now resolved. If you agree, please close it.
from monaco-languageclient.
Related Issues (20)
- Language client based on `@typefox/pyright-browser` unable to resolve 'local' workspace imports HOT 6
- Update the Example Code in `README.md` of `wrapper-react` and `wrapper` HOT 2
- Allow to configure more than one languageclient HOT 1
- Large bundle size HOT 8
- wrapper.dispose() does not get rid of extension HOT 4
- MonacoEditorReactComp throws "You cannot update the code resources as neither editor or diff editor is available." HOT 1
- MonacoEditorReactComp not updating onTextChanged callback
- this._configurationService.onDidChangeConfiguration is not a function HOT 3
- feature: Support for the Debug Adapter Protocol HOT 7
- resolve vscode error in browser env HOT 1
- Typescript incorrect type highlighting HOT 28
- MonacoEditorReactComp not fires onTextChanged callback if you change code resource HOT 4
- init error HOT 1
- Module not found: Can't resolve 'monaco-languageclient/vscode/services' HOT 6
- Auto completion with PHP doesn't work as expected HOT 7
- onDidChangeConfiguration is not a function error in both `wrapper-react` and standard use. HOT 4
- nextjs + electronjs HOT 4
- Empty file exploler in sidebar HOT 3
- auto-complete doesn't work HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from monaco-languageclient.