kickstart.nvim icon indicating copy to clipboard operation
kickstart.nvim copied to clipboard

No autocompletion for C files

Open mbert opened this issue 2 years ago • 8 comments

I am running nvim installed from homebrew on a Mac. Installed your init.lua file, saw how stuff initialised, restarted nvim, opened a C file. The screen looks like in your video ("Effective Neovim: Instant IDE"). However there is no autocomplete, and shortcuts like gr do not work. When opening ~/.config/nvim/init.lua in nvim, autocomplete works like in the video.

Are there any particularities I need to consider on a Mac? I have removed the files installed by init.lua several times and rerun the bootstrap process, no change.

mbert avatar Jan 01 '23 17:01 mbert

Same issue here on arch linux

emanuxd11 avatar Jan 01 '23 18:01 emanuxd11

Thank you, hence it's not only on MacOS. Changed the title accordingly.

mbert avatar Jan 01 '23 18:01 mbert

Did you install the c lsp? What does :LspInfo show? You can install lsp servers easily with :Mason

prscoelho avatar Jan 01 '23 22:01 prscoelho

Did you install the c lsp?

I only installed the init.lua file (as there was nothing else mentioned in the documentation).

What does :LspInfo show?

Screenshot 2023-01-01 at 23 20 39

It looks like starting any other language server manually (e.g. :LspStart java_language_server when editing a Java file) does not have any effect. But maybe I am doing this wrong. From what i can see in init.lua it looks like the code is meant to be fairly generic, i.e. should not be limited to lua files. I am a complete newbie with this and still picking up snippets to try out.

mbert avatar Jan 01 '23 22:01 mbert

In the init.lua you can uncomment this line to install and enable clangd, I think that's the lsp you're looking for. Alternatively, you can run :Mason and it will list all the available lsps. You can use the interface that shows up to install anything on that list, pressing g? while in this interface will show a help list.

As for tree-sitter syntax highlighting, c is already included in the ensure_installed list, but for other languages that aren't you would add those there.

prscoelho avatar Jan 01 '23 23:01 prscoelho

Thank you, that was missing. Having played around with them a bit, it looks like most of the language servers require additional software to be installed? At least not all of them seem to be set up by just adding a single line?

mbert avatar Jan 02 '23 00:01 mbert

I'm struggling as well... complete vim LSP/IDE noob - I'd never even heard of LSP before today. Same as @mbert, my :LspInfo showed nothing, but I've since installed phpactor to my project root and then installed that via :Mason. :LspInfo now shows

image

But I still don't get any autocompletion jazziness when I start typing. What else should I check / might I be missing?

Thank you!

downhiller avatar Jan 03 '23 14:01 downhiller

Is it because I don't have node/npm installed? Are they requirements for Mason to work? If so the github page for mason doesn't seem to mention that, but I'm very aware that the pertinent lines here say "ERROR", rather than "WARNING"L:

image

downhiller avatar Jan 03 '23 14:01 downhiller

I'm going to close now -- let me know if you can't get this to work in the latest version of kickstart (using new package manager and set up)

tjdevries avatar Feb 17 '23 21:02 tjdevries