[all-commits] [llvm/llvm-project] fed9af: [clangd] Publish config file errors over LSP

Sam McCall via All-commits all-commits at lists.llvm.org
Mon Dec 7 02:07:55 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fed9af29c2b5f289744254390c7372e8871e45e5
      https://github.com/llvm/llvm-project/commit/fed9af29c2b5f289744254390c7372e8871e45e5
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2020-12-07 (Mon, 07 Dec 2020)

  Changed paths:
    M clang-tools-extra/clangd/ClangdServer.cpp
    M clang-tools-extra/clangd/ClangdServer.h
    M clang-tools-extra/clangd/ConfigProvider.h
    M clang-tools-extra/clangd/ConfigYAML.cpp
    M clang-tools-extra/clangd/Diagnostics.cpp
    M clang-tools-extra/clangd/Diagnostics.h
    A clang-tools-extra/clangd/test/config.test
    M clang-tools-extra/clangd/unittests/ConfigProviderTests.cpp
    M clang-tools-extra/clangd/unittests/ConfigTesting.h
    M clang-tools-extra/clangd/unittests/ConfigYAMLTests.cpp

  Log Message:
  -----------
  [clangd] Publish config file errors over LSP

We don't act as a language server for these files (e.g. don't get open/close
notifications for them), but just blindly publish diagnostics for them.

This works reasonably well in coc.nvim and vscode: they show up in the
workspace diagnostic list and when you open the file.
The only update after the file is reparsed, not as you type which is a bit
janky, but seems a lot better than nothing.

Fixes https://github.com/clangd/clangd/issues/614

Differential Revision: https://reviews.llvm.org/D92704




More information about the All-commits mailing list