Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v1.1 semantic highlight feature, introduced in specification 3.16.0 #788

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
503ac95
First attempt to include the semantic highlight feature, introduced i…
jlahoda Dec 25, 2020
013b655
Removing unnecessary include.
jlahoda Dec 26, 2020
a4de46b
name types for (trace|read)ability
FelipeLema Apr 12, 2021
ca51f9e
use tuple for lexicographical comparison
FelipeLema Apr 12, 2021
554833a
handle TODOs, imprve readbility
FelipeLema Apr 12, 2021
c986030
fix type
FelipeLema Apr 12, 2021
661870a
fix compilation
FelipeLema Apr 12, 2021
84a00f6
textDocument/semanticTokens/range
FelipeLema May 3, 2021
700c1ff
fix debug build
FelipeLema May 3, 2021
16d7ef6
use symbols that "intersect", rather than "begin" within range
FelipeLema May 10, 2021
ab53802
use SemanticTokensWithId internally
FelipeLema May 28, 2021
e702d33
indent fix
FelipeLema May 28, 2021
de89bae
use different container per gh review
FelipeLema Jun 16, 2021
1ff4931
comply with github review comments
FelipeLema Jun 16, 2021
79c0bee
omit copyright year per review
FelipeLema Jun 17, 2021
c9f36a3
remove $ccls/publishSemanticHighlight
FelipeLema Jun 18, 2021
5e2ea98
remove absctractions per github review
FelipeLema Jun 18, 2021
000fd75
remove another unnecessary abstraction per gh review
FelipeLema Jun 18, 2021
03324a1
correct usage of "empty (list) of params"
FelipeLema Jun 22, 2021
b07d39b
remove `using` per github review
FelipeLema Jun 23, 2021
20ef17c
clang-format file
FelipeLema Jun 23, 2021
dc9ba78
remove surrounding braces on single-if-statements
FelipeLema Jun 23, 2021
b27b1a6
fix build (no more `using ID`)
FelipeLema Aug 16, 2021
7c1d53b
improve log messages: add info
FelipeLema Aug 16, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove another unnecessary abstraction per gh review
  • Loading branch information
FelipeLema committed Jun 18, 2021
commit 000fd75af4a2af1d1d5cf71ef9a7d0293fc799ac
2 changes: 1 addition & 1 deletion src/messages/textDocument_semanticToken.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ void MessageHandler::textDocument_semanticTokensRange(
SymbolKind parent_kind = SymbolKind::Unknown;
SymbolKind kind = SymbolKind::Unknown;
uint8_t storage = SC_None;
DB::UsrIndex idx;
decltype(db->func_usr)::key_type idx;
// This switch statement also filters out symbols that are not highlighted.
switch (sym.kind) {
case Kind::Func: {
Expand Down
4 changes: 1 addition & 3 deletions src/query.hh
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,8 @@ using Lid2file_id = std::unordered_map<int, int>;
struct DB {
std::vector<QueryFile> files;
llvm::StringMap<int> name2file_id;
//! Underlying type used for indexes-of-Usr
using UsrIndex=int;
//! Usr → index
llvm::DenseMap<Usr, UsrIndex, DenseMapInfoForUsr> func_usr, type_usr, var_usr;
llvm::DenseMap<Usr, int, DenseMapInfoForUsr> func_usr, type_usr, var_usr;
llvm::SmallVector<QueryFunc, 0> funcs;
llvm::SmallVector<QueryType, 0> types;
llvm::SmallVector<QueryVar, 0> vars;
Expand Down