Showing content from https://github.com/microsoft/vscode-cpptools/issues/3174 below:
Code formatting does not work in the latest version of libtinfo · Issue #3174 · microsoft/vscode-cpptools · GitHub
Type: LanguageService
Describe the bug
- OS and Version: Kubuntu 18.10
- VS Code Version: 1.31.1
- C/C++ Extension Version: 0.21.0
- Other extensions you installed (and if the issue persists after disabling them): vscjava.vscode-java-debug, dbaeumer.vscode-eslint, redhat.java, james-yu.latex-workshop, felixfbecker.php-debug, felixfbecker.php-pack, felixfbecker.php-intellisense, ms-python.python, redhat.vscode-yaml
- A clear and concise description of what the bug is.
The code formatting does not work unless libtinfo5 package is installed. It shows a notification "Formatting failed" with the prompt to check the output window. The current package is libtinfo6 which comes installed in Kubuntu 18.10 as default and the package manager identifies libtinfo5 as the legacy version.
To Reproduce
- Install the Microsoft C/C++ extension in VS Code installed on a fresh Kubuntu 18.10 installation.
- Run the 'Format Document' command in the 'Command Palette' (or press Ctrl + Shift + I which is the default keybinding)
- Open the output window (Ctrl + J) and choose C/C++ in the drop down list.
- See error (error shown in the output window given below)
Expected behavior
The code will be formatted with proper indentation, spacing, etc.
Screenshots
Additional context
From the output window:
Formatting failed:
/home/user/.vscode/extensions/ms-vscode.cpptools-0.21.0/bin/../LLVM/bin/clang-format -style={ BasedOnStyle: LLVM, UseTab: Never, IndentWidth: 2, TabWidth: 2, BreakBeforeBraces: Allman, AllowShortIfStatementsOnASingleLine: false, IndentCaseLabels: false, ColumnLimit: 0 } -fallback-style=LLVM -sort-includes=0 -assume-filename=/home/user/program.c
/home/user/.vscode/extensions/ms-vscode.cpptools-0.21.0/bin/../LLVM/bin/clang-format: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
-->I believe that giving the Microsoft C/C++ extension support for libtinfo6 will solve the problem.
avahe-kellenberger, DianaNites, g-chernikov, Bigsby, qt1 and 4 more
RetroSearch is an open source project built by @garambo
| Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4