Sort autocompletion tags also based on their presence in included files
This patch extends the current sorting of the tags which looks this way:
- sort local vars first (with highest line number first),
- followed by tags from current file,
- followed by workspace tags,
- followed by global tags
by two new entries so it looks this way:
- sort local vars first (with highest line number first),
- followed by tags from current file,
- NEW: followed by tags from header,
- NEW: followed by tags from other included files,
- followed by workspace tags,
- followed by global tags
Sorting tags from included files seems to be a natural heuristic as users
explicitly included these and want their symbols to be present in the
current file. As a special case, symbols from the header of the current
source file (included file with the same base name as the current file)
are listed in front of symbols from other included files as headers
tend to be tightly coupled with corresponding source files in C/C++.