-
Notifications
You must be signed in to change notification settings - Fork 0
VSCode
Andrei Montchik edited this page Apr 29, 2024
·
22 revisions
- Download deb archive
- Install:
sudo dpkg -i code_xxx.deb
- Create or replace the
~/.config/Code/User/settings.jsonfile contents with the following:
{
"workbench.colorTheme": "Visual Studio Light",
"workbench.colorCustomizations": {
"editor.lineHighlightBackground": "#F3EFEE"
},
"editor.rulers": [],
"editor.hover.delay": 2000,
"editor.fontFamily": "Consolas, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontWeight": "400",
"editor.fontSize": 14,
"editor.formatOnSave": true,
"rust-analyzer.rustfmt.extraArgs": [
"+nightly"
],
"git.enableSmartCommit": true,
"git.confirmSync": false,
"terminal.integrated.fontWeight": "normal",
}
- Restart VSCode.
- Install the
rust-analyzerextension to support Rust. - Install the CODELLDB plugin for debugging.
- Enable imports formatting:
- Switch to the nightly rust:
rustup default nightly - Create or replace the
rustfmt.tomlfile in the root project directory with the following:imports_granularity = "One" group_imports = "One" use_field_init_shorthand = true # Maximum line length max_width=105 - Add the following to the Global
~/.config/Code/User/settings.json."rust-analyzer.rustfmt.extraArgs": ["+nightly"] - Restart VSCode.
- Switch to the nightly rust:
Create Launch configuration to run application that uses the library. Example:
{
"type": "lldb",
"request": "launch",
"name": "Debug Test Validator",
"program": "solana-test-validator",
"args": [
"--geyser-plugin-config",
"/home/andrei/.config/solana/plugin_config.localnet.json"
],
"cwd": "/home/andrei/work/playground",
"sourceLanguages": [
"rust"
],
}
- Install the
C/C++ Extension Packfrom Microsoft - Enable the C++20 support:a dd
"-std=c++20",to the build task intasks.json - C++ source formatting:
- save curly brackets on the same line and set number of symbols in the line to 130: Settings -> search for
C_CPP.clang_format_fallbackStyleand save with{ BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 130 }
- save curly brackets on the same line and set number of symbols in the line to 130: Settings -> search for
- install the
Markdown Preview Github Stylingplugin