Video - Rust Tip - Customize Mutable Colors in VSCode
In the settings.json
add the following:
"editor.semanticTokenColorCustomizations": {
//! For youtube video: https://www.youtube.com/watch?v=U-5_bumwH9w&list=PL7r-PXl6ZPcCIOFaL7nVHXZvBmHNhrh_Q | |
/// Guard pattern with let-else | |
/// e.g., "my_key: 123" | |
pub fn key_num_guard_1(item: &str) -> Result<(&str, i32), &'static str> { | |
let Some((key, val)) = item.split_once(':') else { | |
return Err("Invalid item"); | |
}; | |
let Ok(val) = val.trim().parse::<i32>() else { | |
return Err("Invalid item"); |
{ | |
"pair_lgt": { | |
"prefix": "<", | |
"body": [ | |
"<$1>" | |
], | |
"description": "<> pair" | |
}, | |
"pair_bars": { | |
"prefix": "|", |
// Place your settings in this file to overwrite the default settings | |
{ | |
"http.proxySupport": "off", // by default we use tabs | |
"files.associations": { | |
"*.pcss": "scss", | |
"*.tmpl": "html", | |
"*.hmd": "markdown", | |
"*.sketchscript": "javascript", | |
"*.hmt": "markdown" | |
}, |
{ | |
"editor.codeActionsOnSave": { | |
"source.organizeImports": true | |
}, | |
"workbench.activityBar.visible": false, | |
// "editor.glyphMargin": false, | |
"editor.suggest.showIcons": false, | |
"editor.lightbulb.enabled": false, | |
// "editor.hover.enabled": false, | |
// "typescript.suggestionActions.enabled": false, |
#![allow(unused)] // silence unused warnings while exploring (to comment out) | |
use std::{error::Error, time::Duration}; | |
use tokio::time::sleep; | |
use redis::{ | |
from_redis_value, | |
streams::{StreamRangeReply, StreamReadOptions, StreamReadReply}, | |
AsyncCommands, Client, | |
}; |
#![allow(unused)] // silence unused warnings while exploring (to comment out) | |
use sqlx::postgres::{PgPoolOptions, PgRow}; | |
use sqlx::{FromRow, Row}; | |
// Youtube episode: https://youtu.be/VuVOyUbFSI0 | |
// region: Section | |
// Start postgresql server docker image: |
#![allow(unused)] // silence unused warnings while exploring (to comment out) | |
use std::{error::Error, str}; | |
use s3::bucket::Bucket; | |
use s3::creds::Credentials; | |
use s3::region::Region; | |
use s3::BucketConfiguration; | |
// Youtube Walkthrough - https://youtu.be/uQKBW8ZgYB8 |
Video - Rust Tip - Customize Mutable Colors in VSCode
In the settings.json
add the following:
"editor.semanticTokenColorCustomizations": {
// test | |
var math = { | |
base: 0, | |
add: add | |
}; | |
function add(a, b) { | |
return this.base + a + b; | |
} |
// Place your key bindings in this file to overwrite the defaults | |
[ | |
// ------ Terminal --------- // | |
{ | |
"key": "ctrl+alt+l", | |
"command": "workbench.action.terminal.focusNext" | |
}, | |
{ | |
"key": "ctrl+alt+k", | |
"command": "workbench.action.terminal.focusPrevious" |