How to change VSCode's clang-format extension's indent to 4? - visual-studio-code

clang-format command line allows defining indentation width, e.g.
clang-format -style="{IndentWidth: 4}" myfile.cpp
I installed clang-format extension to VSCode on Ubuntu linux, I do not see indent configuration at the extension configuration.
Is there a way to make the extension to take the indent of 4?

Related

How to determine the rust-analyzer version used by VSCode?

How can I find out which version of rust-analyzer is used by the extension with the same name in VSCode?
Displaying the rust-analyzer version is possible via a palette command in VSCode:
Open command palette Ctrl/⌘+Shift+P
Type / select: rust-analyzer: Show RA Version
Under Linux, the extension installs the rust-analyzer binary into ${HOME}/.vscode/extensions. Therefore, the reported version by the command should be in line with the output of
${HOME}/.vscode/extensions/rust-lang.rust-analyzer-*/server/rust-analyzer --version
(unless rust-analyzer.server.path is configured manually.)

VS Code Integrated Terminal Not Displaying Special Characters

My VS Code integrated terminal doesn't recognize the git branch symbols, or the forward arrow character, shown in the first screenshot, which displays correctly in iTerm windows and IntelliJ's integrated terminal.
These characters are coming from iTerm, using the terminal setup steps I went through here: https://medium.com/#Clovis_app/configuration-of-a-beautiful-efficient-terminal-and-prompt-on-osx-in-7-minutes-827c29391961
What I want to see in VS Code integrated terminal:
What I currently see in VS Code integrated terminal:
I did come across a solution to add this to my VS Code settings.json, but this setting has since been deprecated as it has been integrated as the default setting in newer vs updates.
"terminal.integrated.experimentalTextureCachingStrategy": "dynamic"
It's not a pressing issue, but personalizing the VS Code terminal with more git info and aesthetics would be really nice using special characters.
Install a powerline/nerdfont font to your system if you haven't already, and then specify that font in the terminal.integrated.fontFamily setting in your settings.json file.
Quoting from the VS Code docs:
Powerline fonts are special patched fonts that contain additional characters that can be used in the terminal. VS Code's terminal renders some of the Powerline symbols without needing to configure a font, but if more glyphs are desired, configure a Powerline font with the font family setting. Powerline fonts typically end in " for Powerline", the following setting is an example of how to configure a DejaVu Sans Mono that has been patched:
"editor.fontFamily": "'DejaVu Sans Mono for Powerline'"
Nerd Fonts work the same and typically have a " NF" suffix, the following is an example of how to configure Hack's nerd fonts variant:
"terminal.integrated.fontFamily": "'Hack NF'"

setting character variants ss01, ss02, ... in vscode settings does not work in vscode terminal

I am using fira code font and I am setting "editor.fontLigatures": "'ss01','ss03','ss04','ss07', ..." in vscode. The character variants are working fine inside the editor but It is not working in terminal. So how to make vscode to show character variants in terminal?
OS: Linux (Elementary OS)
Ligatures are not supported in the terminal yet: See (and upvote) Support ligatures in terminal.
Also, the setting editor.fontLigatures will only affect the editors, not the terminal.

Download script for Vim extension in VSCode

I'm using the Vim extension in VSCode. In C++, I can indent blocks of code with the >i{ and >a{ commands. This can't be done in Python, as it uses indentation instead of brackets to delimite blocks of code. However, I found that it can be achieved by downloading this script for Vim. The site says it has to be unpacked "in the vim runtime directory". Where is this directory in the case of the Vim extension?

how to disable jupyter editor in vscode

like the title mentioned, how to disable jupyter editor in vscode?
every time,I want to new a file just for text or markdown,I do not like to appear a choice between two, but just default for the inner editor applied by vscode. and how can I configure this.
for right now,I never need to use jupyter notebook.
It seems to be appeared unexpected after vscode update or installed some python package.
This can be disabled by python.dataScience.useNotebookEditor if you are using the Python extension.
Source: https://github.com/microsoft/vscode/issues/103526
Update:
You also need the Jupyter extension along with Python extension for VS Code. The setting key has been renamed from python.dataScience.useNotebookEditor to jupyter.useNotebookEditor^update
With the July/August 2021 introduction of the new Native Notebook Support in VS Code, the answers involving your settings.json are now obsolete. Now the Notebook editor will be used to open .*ipynb files even if you've never installed the Python or Jupyter extensions.
However, you can open a *.ipynb file in the regular text editor by right-clicking on the file in the VS Code File Explorer, doing "Open With", and then selecting the "Text Editor".