[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-04 Thread Johan Vikström via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jvikstrom marked 2 inline comments as done. Closed by commit rL365111: [clangd] Emit publishSemanticHighlighting in LSP if enabled (authored by jvikstrom, committed by ). Herald added a project: LLVM. Herald added a subscrib

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-04 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added a comment. This revision is now accepted and ready to land. thanks, looks good. Comment at: clang-tools-extra/clangd/ClangdLSPServer.h:59 + void onHighlightingsReady(PathRef File, + std::vector Highlightings)

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207783. jvikstrom marked 7 inline comments as done. jvikstrom added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files: clang-tool

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. mostly good, a few more nits. Comment at: clang-tools-extra/clangd/Protocol.h:1187 +}; + +bool operator==(const SemanticHighlightingInformation &Lhs, nit: remove the blank line to be consistent with the existing style in this file. ==

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom marked an inline comment as done. jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:138 + for (const auto &Line : TokenLines) { +llvm::SmallVector LineHighlights; +llvm::raw_svector_ostream OS(LineHighlights); --

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207758. jvikstrom marked 8 inline comments as done. jvikstrom added a comment. Not sending TextMate scopes over LSP if semantic highlighting is not enabled. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:409 }}, +{"semanticHighlighting", + llvm::json::Object{{"scopes", getTextMateScopeLookupTable()}}}, The proposal says `If the client decla

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-03 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207714. jvikstrom added a comment. Removed unused headers Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files: clang-tools-extra/clangd/ClangdLSPServer.cpp clan

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207563. jvikstrom added a comment. Removed from hiding under hidden flag . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files: clang-tools-extra/clangd/ClangdLSP

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.cpp:144 + write32be(Token.R.start.character, OS); + write16be(Token.R.end.character - Token.R.start.character, OS); + write16be(static_cast(Token.Kind), OS);

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-02 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207537. jvikstrom marked 8 inline comments as done. jvikstrom added a comment. Address comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files: clang-tools-

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-02 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:333 + ClangdServerOpts.SemanticHighlighting = + Params.capabilities.SemanticHighlighting; if (Params.rootUri && *Params.rootUri) I'd put the logic here rather than in

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-07-01 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207241. jvikstrom marked 13 inline comments as done. jvikstrom added a comment. Addressed comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ https://reviews.llvm.org/D63919 Files: clang-too

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-06-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:332 + ClangdServerOpts.SemanticHighlighting = + Params.capabilities.SemanticHighlighting; I'm a bit nervous -- we will turn on this feature when the client states that

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-06-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom updated this revision to Diff 207031. jvikstrom marked an inline comment as done. jvikstrom added a comment. Added SemanticHighlightingInformation and SemantigHighlightingParams. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63919/new/ ht

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-06-28 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clang-tools-extra/clangd/SemanticHighlighting.h:31 +// Contains all highlightings in a single line. +struct LineHighlighting { + LineHighlighting(unsigned int Line = 0, The structures defined here are similar to the stru

[PATCH] D63919: [clangd] Emit publishSemanticHighlighting in LSP if enabled

2019-06-28 Thread Johan Vikström via Phabricator via cfe-commits
jvikstrom created this revision. jvikstrom added reviewers: hokein, kadircet. Herald added subscribers: cfe-commits, arphaman, jkorous, MaskRay, ilya-biryukov. Herald added a project: clang. Emit publishSemanticHighlighting in LSP if enabled Repository: rG LLVM Github Monorepo https://review