0

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?

tom_kp
  • 21
  • 4

1 Answers1

0

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.

Mime
  • 1,142
  • 1
  • 9
  • 20
  • Thank you @Mime (1) I already have nvim-lspconfig. (2) Now, I set it up with clangd. It works out of the box. It seems, it was developed by Clang-LLVM team. (3) As you advised, trying to set up lsp_signature, but it is not working... Any idea? – tom_kp Sep 08 '22 at 22:16