-
Notifications
You must be signed in to change notification settings - Fork 0
VSCode
Andrei Montchik edited this page Jan 24, 2025
·
22 revisions
- Linux:
- Download deb archive
- Install:
sudo dpkg -i code_xxx.deb
- MacOS:
- Download: https://code.visualstudio.com/
- Extract from the downloaded archive and move to the Applications folder.
- 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"
],
}