You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
both methods struggle in the presence of extra symbols:
... or by being super-eager to auto-complete:
... when there's no ambiguity:
... or eats a completion (puts emptiness/ignores) if a name matches the end of a previous folder name:
the log is here, btw: emptiness.log
UPD: LSP + clangd acts just alike.
otoh, you can complete paths right in the middle!
... would be cool [probably] if this kind of completion optionally removed the rest of the line, but ctrl + shift + delete already capable of that anyway.
The text was updated successfully, but these errors were encountered:
Holy crap. I was never aware that I could just get the includes from libclang. 🤦♂️ The funny thing is that I believe I tried this before and it never worked. I just tested this and it works well. Soooo. This makes my way of completing the includes with the popup obsolete to some degree. 🤔
That being said, let me quickly walk through how each of the methods works:
my popup method remembers all the folders from the include flags and will suggest those when completing includes in an interactive manner. What I like about it is that it will have only the folders from the include folders provided and guides the user through the folders and files to choose.
the libclang method would kinda do the same, just using the normal completion dialog. One needs to start typing every single folder or file and do it sequentially, first the folders, then eventually the file.
So, from the looks of it, I would still prefer the new method, so I will probably leave it as default. But I will extend the completion triggers so that they can be used out of the box and change the name of the setting probably.
Sounds great to extend the defaults and rephrase the setting! Though, surely, that's completely up to you whether to make the libclang method default instead or not. I merely wanted to bring the possibility up.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Just comment here to prevent this from happening.
probably related to: #705 and #706?
UPD: added some more new completion triggers
System info:
Version 3.2.2, Build 3211
Windows 10 Home, 10.0.19042 Build 19042
10, x86_64-pc-windows-msvc, posix
What happens:
More of a suggestion, than an issue.
Using
libclang
to complete#include "..."
feels more natural and correct than the original popup method.A small tweak is sufficient:
... A correct
-I
flags setup is implied, of course.Original method:
But first, notice how the popup completion behaves:
... forbids inner relative paths:
... requires fully-qualified ones, relative to the project's root
... also no text appears until a header is selected
... besides, it generates paths with backslashes
Log that illustrates the issue (with the original method):
Suggestion:
this allows typing whatever the user needs:
...
...
Verbose log was too verbose, though: suggestion.log
A minimal repro:
A repository of mine as a reference: https://github.com/Feacur/game_prototype/tree/master/__sublime_project
./folder/some_header1.h
./folder/some_header2.h
./some_tu.c
P.S.:
both methods struggle in the presence of extra symbols:
... or by being super-eager to auto-complete:
... when there's no ambiguity:
... or eats a completion (puts emptiness/ignores) if a name matches the end of a previous folder name:
the log is here, btw: emptiness.log
UPD:
LSP + clangd
acts just alike.otoh, you can complete paths right in the middle!
... would be cool [probably] if this kind of completion optionally removed the rest of the line, but
ctrl + shift + delete
already capable of that anyway.The text was updated successfully, but these errors were encountered: