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

feat(diagnostic): add showRelatedInformation #5090

Merged

Conversation

hexh250786313
Copy link
Contributor

@hexh250786313 hexh250786313 commented Jul 18, 2024

See: #5086

alt text alt text

Copy link

codecov bot commented Jul 18, 2024

Codecov Report

Attention: Patch coverage is 56.52174% with 10 lines in your changes missing coverage. Please review.

Project coverage is 98.47%. Comparing base (33d0a52) to head (51d54c1).

Files Patch % Lines
src/diagnostic/buffer.ts 43.75% 8 Missing and 1 partial ⚠️
src/language-client/client.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5090      +/-   ##
==========================================
- Coverage   98.51%   98.47%   -0.05%     
==========================================
  Files         273      273              
  Lines       26091    26088       -3     
  Branches     5391     5389       -2     
==========================================
- Hits        25704    25690      -14     
- Misses        229      238       +9     
- Partials      158      160       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@fannheyward
Copy link
Member

screenshot please, for better understanding.

@hexh250786313
Copy link
Contributor Author

@fannheyward Screenshots added.

@fannheyward
Copy link
Member

Shall we remove the separateRelatedInformationAsDiagnostics? This new configuration controls to display related in floating window, I'd prefer to remove the old configuration, which only separates them but doesn't shows in relation.

@hexh250786313
Copy link
Contributor Author

@fannheyward Removing the separateRelatedInformationAsDiagnostics feature is ok, the separated diagnostic doesn't really provide much useful information:

image

If we need to find the related diagnostic, we can just use :CocCommand workspace.diagnosticRelated.

Moreover, for some reason, the separateRelatedInformationAsDiagnostics only works for customized language services configured by coc-settings.json, not for some of plug-in language servers (e.g. coc-tsserver). See: #5078

I will make a commit for it shortly.

@fannheyward
Copy link
Member

the separated diagnostic doesn't really provide much useful informatio

Yes, this is what I said not showing in relation.

src/language-client/client.ts Outdated Show resolved Hide resolved
@fannheyward fannheyward merged commit bf68721 into neoclide:master Jul 22, 2024
3 of 4 checks passed
fannheyward added a commit that referenced this pull request Aug 1, 2024
39cd270 feat(lsit): add CocListMoved autocmd (#5098)
7cdd636 chore(packages): dependencies (#5097)
bf68721 feat(diagnostic): add `showRelatedInformation` (#5090)
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

Successfully merging this pull request may close these issues.

2 participants