Package Details: clangd-opt-git 21.r9912.g2f08927fd5f4-1

Git Clone URL: https://aur.archlinux.org/clangd-opt-git.git (read-only, click to copy)
Package Base: clangd-opt-git
Description: Trunk version of standalone clangd binary, with custom patches (look AUR page or PKGBUILD comments)
Upstream URL: https://llvm.org/
Licenses: Apache-2.0 WITH LLVM-exception
Conflicts: clangd-opt
Provides: clangd-opt
Replaces: clangd-opt
Submitter: sr.team
Maintainer: sr.team
Last Packager: sr.team
Votes: 2
Popularity: 0.000497
First Submitted: 2024-03-15 10:25 (UTC)
Last Updated: 2025-04-26 18:16 (UTC)

Pinned Comments

sr.team commented on 2024-03-15 10:25 (UTC) (edited on 2025-04-26 18:17 (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)

List of patches and environment variables to enable them

Toggle all below patches

CLANGD_DEFAULT_PATCH_STATE:

  • 'n' - disable all patches
  • 'y' - apply all patches

Apply user patches from ~/.config/clangd. Patches must have extension *.patch

NOTE: This variable ignores the CLANGD_DEFAULT_PATCH_STATE variable

CLANGD_USER_PATCHES:

  • 'n' - do not use user patches
  • 'y' - apply user patches (default)

For each of the following patches, set the corresponding environment variable to:

  • 'n' - do not apply this patch
  • 'y' - apply this patch

Show Doxygen comments in hover (D134130)

CLANGD_DOXYGEN


Resolve forwarded parameters in hover (D130265)

CLANGD_RESOLVEFWDPARAMS


Implement textDocument/codeLens (D91930)

It's also required patched vscode-clangd extension - vscode-clangd/46266b4adb106b5080f5c771099c777806a16adc

CLANGD_CODELENS


Contextual postfix completions (D125224)

Demo: asciinema.org/a/rxyoicX44ya2jLDpdbNj3rVcC

CLANGD_POSTFIXCOMPLETION


Extract Function: add hoisting support (D138499)

CLANGD_EXTRACTFUNC


Add inlay hints for structure paddings

CLANGD_INLAYHINTSPADS


Add hex formats in size and offset fields on hover, when values more than 10

CLANGD_HOVERINHEX


Show mask for bit fields on hover

Demo: Screen 1, Screen 2

CLANGD_HOVERBITFIELDSMASK


Show offset of virtual methods

Limitations: supports only Itanium and MS abi

CLANGD_HOVERVIRTOFF


Show layout hover info everyhere

CLANGD_HOVERLAYOUTEVERYHERE


Hide definition from hover info for functions and variables

CLANGD_HOVERNODEFS


Resolve the dependent type from its single instantiation (PR: 71279)

CLANGD_RESOLVEDEPTYPE


Resolve includes in non-self-contained headers

Limitations: AST for source must be loaded before open incomplete header

CLANGD_RESOLVEINCHEADERS


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


Show total record paddings in hover

CLANGD_HOVERRECORDPAD


Add tweak for implementing abstract class (D94942)

CLANGD_IMPL_ABSTRACT_CLASS


Hover information: Show fields indexes in layout: Offset: 8 bytes (index 1)

CLANGD_HOVERFIELDIDX


Inlay hints: Ignore evident types in deduced types

CLANGD_INLAYHINTSIGNOREEVIDENT


Implement simple folding of preprocessor branches (PR: 80592)

CLANGD_PREPROCESSOR_FOLDING

Latest Comments

« First ‹ Previous 1 2 3 Next › Last »

phush0 commented on 2025-01-06 08:59 (UTC)

Resolve includes in non-self-contained headers do not apply and need to be rebased

aliu commented on 2025-01-02 03:24 (UTC)

Thanks!

sr.team commented on 2025-01-02 03:17 (UTC)

@aliu, thanks! You're right - the pseudo-parser is not needed for this patch to work! I restored the rebased version of this patch.

aliu commented on 2025-01-01 22:37 (UTC) (edited on 2025-01-01 22:40 (UTC) by aliu)

@sr_team The commit that removed clang-pseudo moved DirectiveTree(.h/.cpp) to llvm-project/clang-tools-extra/clangd/support/DirectiveTree(.h/.cpp) .

sr.team commented on 2025-01-01 19:30 (UTC)

@aliu this patch is depended on DirectiveTree class from pseudo-parser, what removed after drop the pseudo-parser. If deleted DirectiveTree can work without the pseudo-parser - give me please commit hash, where this class is present in clangd, and I try to rebase it

aliu commented on 2025-01-01 19:18 (UTC)

Not really, though. It built in October when I rebased the DirectiveTree patches against the current DirectiveTree files and removed occurences of "pseudo::".

sr.team commented on 2025-01-01 16:59 (UTC)

@aliu, yes, I see. But this patch looks like need more changes to remove the pseudo-parser dependency

aliu commented on 2025-01-01 16:55 (UTC) (edited on 2025-01-01 16:57 (UTC) by aliu)

Hey there, happy new year! Did you see my comment about the preprocessor folding patch?

Edit: Nevermind, I saw that you added it back in November. Thanks for maintaining this! Hopefully these patches can be in the official clangd in 2025.

aliu commented on 2024-10-05 03:07 (UTC)

I'm new to this, but isn't the preprocessor folding patch retainable if we simply removed the pseudo:: namespace from the new function? The relevant header file was copied to support while clang-pseudo was removed.

sr.team commented on 2024-08-08 00:40 (UTC)

@aliu It appears that this issue occurred while resolving a merge conflict. Thank you for bringing it to my attention!