简体   繁体   中英

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++:

2. Build ccls: Following: 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

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:

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. BUT, there is NO IntelliSense, Code Snippets, or Description popup .

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 .

To get a description popup (i guess about the current function for example), you can use another plugin like lsp_signature .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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