๐Ÿ’พ Archived View for bbs.geminispace.org โ€บ u โ€บ stack โ€บ 3956 captured on 2023-11-04 at 16:36:30. Gemini links have been rewritten to link to archived content

View Raw

More Information

โฌ…๏ธ Previous capture (2023-09-28)

โžก๏ธ Next capture (2023-11-14)

๐Ÿšง View Differences

-=-=-=-=-=-=-

Comment by ๐Ÿš€ stack

Re: "I want to have completion for my custom C language headers,..."

In: s/vim

@jeang3nie: do you know if original vim's new Lua support is compatible with NeoVim's Lua? I've been avoiding NeoVim after my Common Lisp bindings uncovered many issues in display protocols and maintainers were saying really idiotic argumentative stuff...

๐Ÿš€ stack

2023-08-08 ยท 3 months ago

7 Later Comments โ†“

๐Ÿ Addison

YouCompleteMe can do this

๐ŸŒฒ Odintsoff

@jeang3nie Original Vim. Thinking about moving to neovim though.

2023-08-09 ยท 3 months ago

๐ŸŒฒ Odintsoff

@Addison I also tried using YCM, but no success to make it read my own header files. Maybe conflicting with CoC.

๐Ÿฆ Arkaeriit

@Addison How can one do this with YCM?

2023-08-10 ยท 3 months ago

๐Ÿ Addison

@Arkaeriit I'm assuming that @Odintsoff is asking about code-completion for things declared in headers.

I only know how to do this with CMake, so YMMV but I know that YCM has other ways of configuring this.

If in your CMakeLists.txt you enable CMAKE_EXPORT_COMPILE_COMMANDS, CMake will create a file called compile_commands.json in your build directory. If you copy that JSON file to the root of your source tree, YCM will read the flags it contains and use them for completions.

So if my CMake config contains something like

include_directories(./include)

then compile_commands.json will contain

-I./include ...

And YCM will provide completions for that header.

๐Ÿฆ Arkaeriit

@Addison Thanks for the tip. It will be a good starting point.

2023-08-11 ยท 3 months ago

๐ŸŒฒ Odintsoff

Thanks all! I will try the tips provided and give some feedback. Thanks again!

2023-08-22 ยท 2 months ago

Original Post

๐ŸŒ’ s/vim

I want to have completion for my custom C language headers, but I cannot see how to add it. I use CoC and it does help with the language headers, but not the ones in my project folder. How can I add them?

๐Ÿ’ฌ Odintsoff ยท 9 comments ยท 2023-08-07 ยท 3 months ago