Comments (5)
Would be good to see what message the server sent which led to this.
Messages can get split up into chunks and this function recurses until it's consumed every chunk in a message. maxfuncdepth
has a default of 100 and if a huge message, say a message with many diagnostics, get's split into >100 chunks this could happen.
Hopefully that is what is happening here - do you know if this file is likely to have a lot of diagnostics?
I will refactor to get rid of the recursion and see if that resolves it. If not there might be some other bug where we misread the message length or something like that.
from vim-lsc.
As a temporary workaround you could try set maxfuncdepth=200
and see if it buys enough headroom - that would also let us know if there is a broken end condition or if refactoring away from recursion is all we need.
from vim-lsc.
if you run dartanalyzer on the file, you only see 2 warnings, however, when I tee the output from the server, I see about 4000 publishDiagnostics messages.
I think the issue might be that this folder has 2K source files (all independent of each other). So quite likely the issue is that analyzer is processing all the files in the folder. :(
I was curious about whether we avoided this issue in the ycm pluggin, but no, we also set the directory as an analysis root like you do in lsc. While looking there I noticed that we did set the opened source file as a priority-file in ycmd, are you also doing that also in lsc?
from vim-lsc.
LSP doesn't have a notion of priority files so we don't do that in this client - but in the dart_language_server we always set open files as priority files
There are probably some optimizations we could make in dart_language_server that could help here. I wonder if we should swallow diagnostics for files that aren't open. At least this client doesn't care about them but maybe other clients do? Filed natebosch/dart_lsp#15 to track.
In any case we probably don't want to set maxfuncdepth
that high so I'll try to get in the refactoring to change to a loop ASAP.
from vim-lsc.
Update to the latest and this should be resolved. I couldn't quite hit the problem with the default maxfuncdepth
but by setting it artificially low I could repro. Switched to a loop and we shouldn't see this problem again.
from vim-lsc.
Related Issues (20)
- pyright and Viewing Source Code Definition HOT 1
- perl LS?
- Error Unknown function lsc#cursor#insertEnter is thrown whenever entering in INSERT mode HOT 1
- Errors wit python-language-server
- Make vim-lsc work with ltex-ls HOT 6
- call hierarchy support? HOT 1
- support filtering trigger characters HOT 1
- LSClientRename renames wrong locations when it's across files HOT 1
- gopls: is there a way to specify settings? buildFlags or env? HOT 1
- Add support for CompletionItem additionalTextEdits
- Underline instead of highlight? HOT 1
- :wqa causes waiting for language server exit HOT 4
- javascriptreact filetype not running lsc HOT 2
- Do we have virtual text support for lsp diagnostics?
- Unable to get tailwindcss-language-server to work HOT 1
- No highlighting using a non-default colour scheme HOT 2
- Add a separate highlight group for deprecated diagnostics and unnecessary code
- Deno lsp not working HOT 1
- Completion preview/popup extra information filetype highlight?
- Support code sections within structured text documents (Markdown, etc)
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 vim-lsc.