简体   繁体   English

NeoVim-Lua-nvim-lspconfig-ccls:没有 IntelliSense、代码片段或描述弹出窗口,用于 C++

[英]NeoVim-Lua-nvim-lspconfig-ccls: NO IntelliSense, Code Snippets, or Description popup, for C++

1. Using MacOS Catalina: Setting up NVIM-LUA-nvim-lspconfig-ccls, for lua and C++: 1. 使用 MacOS Catalina:设置 NVIM-LUA-nvim-lspconfig-ccls,用于 lua 和 C++:

2. Build ccls: Following: https://github.com/MaskRay/ccls/wiki/Build 2.构建ccls:如下: https://github.com/MaskRay/ccls/wiki/Build

$ brew install ccls

Note : I am NOT clear about additional instruction by mask ray, for brew installation of ccls注意:对于 ccls 的 brew 安装,我不清楚 mask ray 的附加指令

2. compile_commands.json: 2. compile_commands.json:

[{
  "directory": "/Users/pt/Documents/Code/C++/sample",
  "command": "/Library/Developer/CommandLineTools/usr/bin/c++    -std=c++17 -g -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk -mmacosx-version-min=10.15 -o CMakeFiles/sample.dir/main.cpp.o -c /Users/pt/Documents/Code/C++/sample/main.cpp",
  "file": "/Users/pt/Documents/Code/C++/sample/main.cpp"
}]

3. language_servers.lua: 3.语言服务器.lua:

local servers = { 'ccls', 'sumneko_lua'  }
for _, lsp in pairs(servers) do
  lspconfig[lsp].setup {
    capabilities = capabilities,
  }
end

require('lspconfig')['ccls'].setup{
    on_attach = on_attach,
    flags = lsp_flags,
 }

ISSUES:问题:

  1. For C++, Simple Completions and Flags are there.对于 C++,有简单的完成和标志。 BUT, there is NO IntelliSense, Code Snippets, or Description popup .但是,没有 IntelliSense、代码片段或描述弹出窗口

What am I doing wrong?我究竟做错了什么?

If you want to have autocompletion, you must install a additional plugin as stated here .如果你想要自动完成,你必须安装一个额外的插件,如此所述。 Note, that for example coq has additionaly snippets buildin .请注意,例如coq有额外的片段buildin

To get a description popup (i guess about the current function for example), you can use another plugin like lsp_signature .要获得描述弹出窗口(例如,我猜想关于当前的 function),您可以使用另一个插件,如lsp_signature

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM