-
-
Notifications
You must be signed in to change notification settings - Fork 390
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
When using Volar in Neovim, it failed, with some failure logs #862
Comments
I'm not sure if memory usage is too high in large projects causing your problem (#531), can you try setting |
It is still useless to try to settings log result:
|
Sorry my mistake, Check the logs, seems your already using single language server (equal to low power mode in vscode), and log message show
I'm not sure if neovim can set the upper limit of the language server's memory, you can refer to https://stackoverflow.com/questions/38558989/node-js-heap-out-of-memory. |
Yes, the project is very large. When I execute the command {
"compilerOptions": {
//"target": "esnext", // define to your liking
"baseUrl": "./",
"paths": {
"@/*": ["src/*"],
"base": ["baseConfig"],
"public": ["public"]
}
},
"exclude": ["node_modules"] // Optional
} Looks like a memory problem, but don't know how to set it up. |
Can you try if it crashes if you open the project in VS Code with the VS Code Volar extension installed? Since you're using Neovim you either have your own bespoke config or you're using nvim-lspconfig, and in either case there could be some mix of language server launch settings that cause the crash. VS Code extension should be more stable since Johnson (maintainer) created it, whereas when I PR'ed the volar config to nvim-lspconfig I was eyeballing a lot. |
EDIT: I explained it after only reading the first answer to the stackoverflow issue, but the second one is kinda much more straightforward. Try https://stackoverflow.com/a/53443394
You can also try Johnson's suggestion from above. cmd = {'node', '/path/to/your/globally/installed/volar/executable', '--stdio', '--max-old-space-size=4096'} The So in your dotfiles in the end it'll be like EDIT2: As noted below, |
I edit my dotfiles under this line cmd = { 'node', '/usr/local/lib/node_modules/@volar/server/out/index.js', '--stdio', '--max_old_space_size=4096' } It's still wrong, log message:
|
@lqfxz520 just to confirm the reason. Can this problem fix by reduce project files? |
@lqfxz520 Does changing |
the command under line is invalid. cmd = { 'node', '/usr/local/lib/node_modules/@volar/server/out/index.js', '--stdio', '--max_old_space_size=4096' } I reconfigured the memory cmd = { 'node', '--max-old-space-size=6144', '/usr/local/lib/node_modules/@volar/server/out/index.js', '--stdio' } and log message:
Obviously, 6GB is still not enough. smaller value not change the crash situation
And then I delete some files, It works. I execute the command |
Since this issue is caused by the project size being too large, I can't check if this is a volar bug without a repo case, this issue will be close. |
I used Volar in two projects, one not running and the other running.
The difference between a project that does not run and a project that does run is larger.
Please let me know if you need me to provide other information. I don't know what kind of information is helpful to you
The text was updated successfully, but these errors were encountered: