Файли
openidea/languages/cpp.toml
T
Bert Verhelstтаbertyhell 5a0bd7d1fc feat(editor): rainbow brackets for generics and markup tags, with kind switches and 2–5 colours (#3832)
Rainbow brackets get per-kind switches (round, square, curly, and angle brackets and tags) and a palette length of 2–5 colours; defaults are unchanged. Angle brackets are coloured only inside syntax nodes a language definition names under [rainbow-brackets] (type argument/parameter lists for TypeScript/TSX, Java, Rust and C++; tags for HTML, XML, Vue, Svelte and JSX), so comparisons and shifts stay uncoloured. A kind switched off keeps the other brackets' depths. Colour schemes gain --syn-bracket-4/5; indent guides and sticky lines follow the palette length.

Closes #3769

Co-authored-by: bertyhell <[email protected]>
2026-11-17 03:41:02 +08:00

33 рядки
1.0 KiB
TOML
Неформатований Анотація Історія

Цей файл містить неоднозначні символи Юнікоду
Цей файл містить символи Юнікоду, які можна сплутати з іншими символами. Якщо ви вважаєте, що це зроблено навмисно, можете сміливо ігнорувати це попередження. Щоб показати їх, скористайтеся кнопкою Escape.
id = "cpp"
name = "C++"
extensions = ["cpp", "cc", "cxx", "c++", "hpp", "hh", "hxx", "h++", "ipp", "tpp", "inl", "ixx", "cppm"]
line-comment = "//"
block-comment = ["/*", "*/"]
indent = { tab-size = 4, insert-spaces = true }
ui-mode = "C++"
tree-sitter = "cpp"
scratch-template = '''
#include <iostream>
int main() {
$END$
return 0;
}
'''
# Rainbow brackets › angle: editor syntax nodes whose `<` `>` pair up (never comparisons).
[rainbow-brackets]
angle = ["TemplateArgumentList", "TemplateParameterList"]
[[language-servers]]
name = "clangd"
command = "clangd"
args = ["--background-index", "--header-insertion=never"]
root-markers = ["compile_commands.json", "compile_flags.txt", ".clangd", "CMakeLists.txt", "meson.build", "Makefile"]
install-hint = "Install clangd (LLVM): brew install llvm, apt install clangd, or https://clangd.llvm.org/installation"
[debugger]
adapter = "lldb-dap"
command = "lldb-dap"
install-hint = "Install LLVM's lldb-dap (brew install llvm), or on macOS use the one found by xcrun -f lldb-dap"