Giter VIP home page Giter VIP logo

Comments (4)

drbeco avatar drbeco commented on June 15, 2024

from coc.nvim.

drbeco avatar drbeco commented on June 15, 2024

Solutions without quickfix:

  • Using bear -- make to create a compile_commands.json database into the root of the project (that doesn't use cmake) solves some problems. Now COC can see (almost) all errors using clangd that gcc also see. CONS add another file and changes project workflow. The errors.err file is not used, and that is not a good solution here.

  • Another solution, adding a ~/.config/clangd/config.yaml general file with some arguments mitigates the problem. CONS it is a general file, and many projects use different arguments.

from coc.nvim.

fannheyward avatar fannheyward commented on June 15, 2024

coc.nvim displayed the errors from language server, for example clangd, LS reports the error with location and coc.nvim displayed them with signcolumn and highlighting.

Here, clangd reported L37 error, didn't report L57 as an error, coc.nvim only displayed L37 error.

For your solutions:

  1. compile_commands.json is needed by clangd to work: https://clangd.llvm.org/installation#project-setup
  2. clangd supports project configuration .clangd: https://clangd.llvm.org/config#files

from coc.nvim.

fannheyward avatar fannheyward commented on June 15, 2024

coc.nvim is an LSP client, this means what coc.nvim can do is depended on language server, the client requests from server for completion/diagnostics/formatting etc, handles what server responses and applies to vim buffer.

Back to your question, what you want is: make coc.nvim displays errors from clangd and errors.err both. Have no idea how to archive this, and it's not coc.nvim's mission target/task.

from coc.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.