Changeset View
Standalone View
clang-tools-extra/clangd/ConfigFragment.h
Show First 20 Lines • Show All 260 Lines • ▼ Show 20 Lines | struct Fragment { | ||||
/// Describes code completion preferences. | /// Describes code completion preferences. | ||||
struct CompletionBlock { | struct CompletionBlock { | ||||
/// Whether code completion should include suggestions from scopes that are | /// Whether code completion should include suggestions from scopes that are | ||||
/// not visible. The required scope prefix will be inserted. | /// not visible. The required scope prefix will be inserted. | ||||
llvm::Optional<Located<bool>> AllScopes; | llvm::Optional<Located<bool>> AllScopes; | ||||
}; | }; | ||||
CompletionBlock Completion; | CompletionBlock Completion; | ||||
/// Describes hover preferences. | |||||
struct HoverBlock { | |||||
sammccall: One question is whether the setting should control hover specifically, or whether it covers "in… | |||||
In the future, the AKA type can also be displayed in the signature help, but I don't know the best place for this option.(for now, it should be fine to put this setting in hover) lh123: In the future, the AKA type can also be displayed in the signature help, but I don't know the… | |||||
Not Done ReplyInline Actionswe've got a Style section actually, which might be more suitable for extensibility but I am also afraid of pushing ourselves into a corner by putting too much meaning into a boolean flag. maybe we should just go with a command line flag until we figure out what to do here (as it's less invasive)? kadircet: we've got a `Style` section actually, which might be more suitable for extensibility but I am… | |||||
Not Done ReplyInline ActionsI thought about style but the idea is that reflects coding style of the project, where this is really more of a user preference. I'm a little skeptical whether we'll want this in sig help/completion (vs just being smarter about whether to desugar) Command line flag is tempting but annoying to wire up. My favorite is probably what we have here sammccall: I thought about style but the idea is that reflects coding style of the project, where this is… | |||||
/// Whether hover show a.k.a type. | |||||
llvm::Optional<Located<bool>> AKAPrint; | |||||
I'd call this ShowAKA (verb before its object; "show" is a little less jargony) sammccall: I'd call this ShowAKA
(verb before its object; "show" is a little less jargony) | |||||
}; | |||||
HoverBlock Hover; | |||||
}; | }; | ||||
} // namespace config | } // namespace config | ||||
} // namespace clangd | } // namespace clangd | ||||
} // namespace clang | } // namespace clang | ||||
#endif | #endif |
One question is whether the setting should control hover specifically, or whether it covers "in places we print types" more generally. But it doesn't seem likely we'll make this configurable for diagnostics, and I don't have other examples. Most of our settings are per-feature. So I think this is right as it is.