Sublime Forum

Autocomplete C

#1

Hi i’m setting up sublime to become my definitive c IDE.
My last problem is that Sublime doesn’t autocomplete.
For example it suggest me printf, but it doesn’t suggest scanf fscanf fopen and similar.
I don’ know what to do, i serarched for plugin but nothing work.
Someone can help me please?
Sorry my english, i’m Italian.
Thanks for reading.

0 Likes

#2

EasyClangcomple is quite a nice package, still needs improvements but it is a really promising.one

0 Likes

#3

I installed i , but it doesn’t work.

0 Likes

#4

You can also try LSP together with clangd. Don’t forget to have a compilation database.

1 Like

#5

LSP works quite well, even with complicated setups using ninja, cmake or automake…
All you need to do is compile clangd (here there are some binaries) to ensure you generate a compile_commands.json using proper cmake flags or just calling make with bear (on Linux, at least).

PS: send a PM if you need Italian support :wink:

0 Likes

#6

EasyClangComplete will need clang (http://releases.llvm.org/download.html). By default it looks in PATH, but you can specify a path to the binary. For some reason (on Windows) I need to set use_libclang = false for it to work at all. I haven’t tried to figure out why yet, because I have 130000 files in one big tree and include paths that go all over the place so it might well be that I don’t configure it correctly for this project.

0 Likes