将 ALE 与 clangd 结合使用进行 linting 和自动完成

发布于 2025-01-11 16:04:02 字数 440 浏览 8 评论 0原文

我目前正在使用 ALE 和 clangd 作为 linter,但当我尝试使用它进行自动完成时,我遇到了问题。只要我在 .vimrc 文件中设置 let g:ale_cpp_clangd_options = "-stdlib=libc++ -std=c++17" ,linter 就可以正常工作。只要我没有对与 clangd 的 ALE 相关的 .vimrc 文件进行任何更改(ale_cpp_clangd_options = 形式的选项),自动完成功能也可以正常工作。但是,使用 clangd 选项设置此 ALE(或者看似任何具有 clangd 选项的 ALE)会禁用自动完成。我已经阅读了 ALE 和 clangd 手册页,但是,除非我错过了某些内容,否则没有任何内容可以帮助解决我所看到的问题。是否可以将 ALE 与 clangd 一起使用来进行 linting 和自动完成?或者这些功能不能很好地结合在一起?

I'm currently using ALE with clangd as a linter, but I'm running into an issue when I try to use it for autocompletion as well. The linter works fine as long as I set let g:ale_cpp_clangd_options = "-stdlib=libc++ -std=c++17" in my .vimrc file. Autocompletion also works fine as long as I don't have any changes to my .vimrc file relating to ALE with clangd (options of the form ale_cpp_clangd_options =). However, setting this ALE with clangd option (or, seemingly, any ALE with clangd option) disables autocompletion. I've read the ALE and clangd man pages but, unless I've missed something, there wasn't anything that helped with the issue I'm seeing. Is it possible to use ALE with clangd for both linting and autocompletion? Or do these features just not play well together?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文