Header completion in clang always apppends endings to the results, i.e. / for folders and " (or >) for files. But a language-neutral client (like many vim lsp plugins) does not know a subsequent completion is expected, while the auto-inserted / prevents the user from triggering one by manually typing a /. And "/> might collide with auto pair insertion in some clients.
#include "f" ^ completion triggered here => folder/ <- client is not aware that another completion is expected => file.h" <- '"' collides with the ending '"' inserted by the client
This commit adds an option to suppress the endings, and adds / as a completion trigger in clangd, which makes header completion more similar to object member completion. The downside is that clangd will not be able to distinguish folders from files when setting the completion item kinds.
i think instead of regex, it would be better to just perform a linear search to make sure line looks something like this(up to the Offset):
IIRC, regex had a bad performance and we would like to trigger as quickly as possible. @sammccall might've more context about this one.