Comments (13)
The diagnostic format is defined [source code] [severity] message
in https://github.com/neoclide/coc.nvim/blob/3c462c6486725f7e3a82900e75c671d5d31bf093/src/diagnostic/manager.ts#L306. coc needs to add diagnostic format support.
from coc-clangd.
btw, we might also consider moving the full
diagnostic info to the command line and only show diagnostic message in the floating window.
I also think it would be better if diag(floating window) hasn't moved with the cursor, it could pop-up once the user enters diag range and stay there until user exits it.
from coc-clangd.
I also think it would be better if diag(floating window) hasn't moved with the cursor, it could pop-up once the user enters diag range and stay there until user exits it.
Yeah, I don't know if this is easy/hard to do.
I do find myself wishing it was pinned to column zero instead of anchored at the cursor, because it tends to truncate or wrap.
from coc-clangd.
I also think it would be better if diag(floating window) hasn't moved with the cursor
If you are using Neovim, add "diagnostic.virtualText": true
to coc-settings.json
, the diagnostic message will pinned with virtual text at the end of line.
from coc-clangd.
Thanks for the pointer. I think that's the one for preview window, and this one is for floating windows:
https://github.com/neoclide/coc.nvim/blob/3c462c6486725f7e3a82900e75c671d5d31bf093/src/diagnostic/manager.ts#L458
(Some of the concerns apply to both, but space is much less of a concern in the preview window for instance)
If you are using Neovim, add "diagnostic.virtualText": true to coc-settings.json, the diagnostic message will pinned with virtual text at the end of line.
This is nice - I tried it out, but one of our goals is to support a bunch of internal users who are using a particular version of vim (fairly recent: 8.1.2269).
from coc-clangd.
So while customizability (and highlighting) is nice, playing with this makes me more convinced that the defaults can be improved first. Does this seem more readable
from coc-clangd.
@kadircet points out that floating windows use a different color per severity, as well as the gutter marker, and the Error:
is mostly noise:
from coc-clangd.
from coc-clangd.
Changed on coc by adding diagnostic.format
, without change the default style. User can define format they want, eg drop the source
part.
from coc-clangd.
Thanks for doing that!
Having it customizable means ~all power-users will be happy, but IME most non-power-users won't work out how to change it even if it bothers them.
How do you feel about changing the default style? I think either "%message\n[%source%code]" or "%message" would be a clearer default, with more info available to those who want it.
from coc-clangd.
I don't like to change default style. Current style [source code] [E] message
in most case is ok, for example:
[pylint E0104] [E] Return outside function
[json 515] [E] Colon expected
[tsserver 6133] [I] 'a' is declared but its value is never read.
The code part is needed and useful for users. On clangd side, the noisy is because too-long-error-code. We can overwrite the default diagnostic.format
in coc-clangd
, I make it default %message [%source]
.
from coc-clangd.
@fannheyward overwrite default configuration by extension doesn't seem to be a good idea, the user install an extension and the behavior unexpected changed.
from coc-clangd.
@chemzqm the overwrite configurations has been removed.
from coc-clangd.
Related Issues (20)
- stdint.h Library error HOT 1
- Question: navigate to conflicting item/item causing error? HOT 4
- clangd don't start on windows HOT 1
- Unable to locate C/C++ header files (stdio.h, etc.) HOT 1
- coc-clangd still use c++03 to diagnose HOT 1
- some error flag but the code can running HOT 1
- How do I remove the automatically added parameter label in parentheses? HOT 1
- An issue of including libraries HOT 9
- Duplicate references HOT 2
- Command CocCommand clangd.install fails with error 'Failed to install clangd language server' HOT 5
- 这个插件如何在补全头文件比如#include<iostream>时,光标在>的右边,否则每次都多跳过这个符号一次 HOT 1
- [coc.nvim] Connection to server got closed. Server will not be restarted. HOT 4
- 'iostream' file not found (clang pp_file_not_found) HOT 1
- Connection to server got closed HOT 1
- coc-clangd没有输入头文件的情况下也能补全 HOT 4
- Header file not found, even though autocompletion works and include path is added correctly HOT 5
- MinGW issue HOT 1
- MinGW issue
- It can support like [c-mantic] feature? HOT 1
- Env include path not working in header files HOT 1
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 coc-clangd.