This PKGBUILD build trunk version of clangd, and may apply some non-standard patches
Applying patches controls via enviroment variables (e.g. CLANGD_DEFAULT_PATCH_STATE=y makepkg -si
):
Select branch to build
CLANGD_BRANCH
:
- 'main' - trunk (default value)
- 'release/17.x' - work old flags for clang-tidy, like AnalyzeTemporaryDtors
- 'release/15.x' - current system version, but with patches (optional)
Toggle all below patches
CLANGD_DEFAULT_PATCH_STATE
:
- 'n' - disable all patches
- 'y' - apply all patches
Show Doxygen comments in hover (D134130)
CLANGD_DOXYGEN
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Resolve forwarded parameters in hover (D130265)
CLANGD_RESOLVEFWDPARAMS
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Implement textDocument/codeLens (D91930)
It's also required patched vscode-clangd
extension - https://github.com/lightmelodies/vscode-clangd/commit/46266b4adb106b5080f5c771099c777806a16adc
CLANGD_CODELENS
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Contextual postfix completions (D125224)
Demo: https://asciinema.org/a/rxyoicX44ya2jLDpdbNj3rVcC
CLANGD_POSTFIXCOMPLETION
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Extract Function: add hoisting support (D138499)
CLANGD_EXTRACTFUNC
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Add inlay hints for structure paddings
CLANGD_INLAYHINTSPADS
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Add hex formats in size
and offset
fileds on hover, when values more than 10
CLANGD_HOVERINHEX
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Show mask for bit fields on hover
Demo: Screen 1, Screen 2
CLANGD_HOVERBITFIELDSMASK
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Show offset of virtual methods
Limitations: supports only Itanium and MS abi
CLANGD_HOVERVIRTOFF
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Show layout hover info everyhere
CLANGD_HOVERLAYOUTEVERYHERE
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Hide definition from hover info for functions and variables
CLANGD_HOVERNODEFS
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Show argument names for function pointer struct (PR: 69011)
CLANGD_HOVERPTRFN
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Resolve the dependent type from its single instantiation (PR: 71279)
CLANGD_RESOLVEDEPTYPE
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Increase minimal limit for BlockEnd inlay-hints to 10 lines (default is 2)
This disabled show BlockEnd inlay-hints for small functions (less than 10 lines)
CLANGD_INLAYHINTSBLOCKEND
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Resolve includes in non-self-contained headers
Limitations: AST for source must be loaded before open incomplete header
CLANGD_RESOLVEINCHEADERS
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Add way to remove files from CDB via LSP
No need in many cases. Useful only in multi project workspaces with patched client
CLANGD_LSPREMOVEFROMCDB
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Show total record paddings in hover
CLANGD_HOVERRECORDPAD
:
- 'n' - do not apply this patch
- 'y' - apply this patch
Pinned Comments
sr.team commented on 2023-04-23 08:58 (UTC) (edited on 2023-12-06 16:01 (UTC) by sr.team)
This PKGBUILD build trunk version of clangd, and may apply some non-standard patches
Applying patches controls via enviroment variables (e.g.
CLANGD_DEFAULT_PATCH_STATE=y makepkg -si
):Select branch to build
CLANGD_BRANCH
:- 'main' - trunk (default value)
- 'release/17.x' - work old flags for clang-tidy, like
AnalyzeTemporaryDtors
- 'release/15.x' - current system version, but with patches (optional)
Toggle all below patches
CLANGD_DEFAULT_PATCH_STATE
:- 'n' - disable all patches
- 'y' - apply all patches
Show Doxygen comments in hover (D134130)
CLANGD_DOXYGEN
:- 'n' - do not apply this patch
- 'y' - apply this patch
Resolve forwarded parameters in hover (D130265)
CLANGD_RESOLVEFWDPARAMS
:- 'n' - do not apply this patch
- 'y' - apply this patch
Implement textDocument/codeLens (D91930)
It's also required patched
vscode-clangd
extension - https://github.com/lightmelodies/vscode-clangd/commit/46266b4adb106b5080f5c771099c777806a16adcCLANGD_CODELENS
:- 'n' - do not apply this patch
- 'y' - apply this patch
Contextual postfix completions (D125224)
Demo: https://asciinema.org/a/rxyoicX44ya2jLDpdbNj3rVcC
CLANGD_POSTFIXCOMPLETION
:- 'n' - do not apply this patch
- 'y' - apply this patch
Extract Function: add hoisting support (D138499)
CLANGD_EXTRACTFUNC
:- 'n' - do not apply this patch
- 'y' - apply this patch
Add inlay hints for structure paddings
CLANGD_INLAYHINTSPADS
:- 'n' - do not apply this patch
- 'y' - apply this patch
Add hex formats in
size
andoffset
fileds on hover, when values more than 10CLANGD_HOVERINHEX
:- 'n' - do not apply this patch
- 'y' - apply this patch
Show mask for bit fields on hover
Demo: Screen 1, Screen 2
CLANGD_HOVERBITFIELDSMASK
:- 'n' - do not apply this patch
- 'y' - apply this patch
Show offset of virtual methods
Limitations: supports only Itanium and MS abi
CLANGD_HOVERVIRTOFF
:- 'n' - do not apply this patch
- 'y' - apply this patch
Show layout hover info everyhere
CLANGD_HOVERLAYOUTEVERYHERE
:- 'n' - do not apply this patch
- 'y' - apply this patch
Hide definition from hover info for functions and variables
CLANGD_HOVERNODEFS
:- 'n' - do not apply this patch
- 'y' - apply this patch
Show argument names for function pointer struct (PR: 69011)
CLANGD_HOVERPTRFN
:- 'n' - do not apply this patch
- 'y' - apply this patch
Resolve the dependent type from its single instantiation (PR: 71279)
CLANGD_RESOLVEDEPTYPE
:- 'n' - do not apply this patch
- 'y' - apply this patch
Increase minimal limit for BlockEnd inlay-hints to 10 lines (default is 2)
This disabled show BlockEnd inlay-hints for small functions (less than 10 lines)
CLANGD_INLAYHINTSBLOCKEND
:- 'n' - do not apply this patch
- 'y' - apply this patch
Resolve includes in non-self-contained headers
Limitations: AST for source must be loaded before open incomplete header
CLANGD_RESOLVEINCHEADERS
:- 'n' - do not apply this patch
- 'y' - apply this patch
Add way to remove files from CDB via LSP
No need in many cases. Useful only in multi project workspaces with patched client
CLANGD_LSPREMOVEFROMCDB
:- 'n' - do not apply this patch
- 'y' - apply this patch
Show total record paddings in hover
CLANGD_HOVERRECORDPAD
:- 'n' - do not apply this patch
- 'y' - apply this patch