Misc: setup, fish, auto, helix, starship, system

- Setup: add Fedora guides, Signal, Dynamic Desktop, and Flatseal
- Shells: fix $() on older fish versions and unalias batcat on Fedora
- Auto:
    - Detect git dependency
    - Add .clang-format for C/C++ family
    - Add full-setup script
- Helix: update to 24.03, add text width, rulers, and fix reflow
- Rust: fix fish env
- Starship: fix config path
- System: rename mac fnmode scripts and update sshd_config
This commit is contained in:
2024-02-04 15:35:36 -08:00
parent 2df4e7a091
commit 9736e73c8e
18 changed files with 534 additions and 18 deletions

View File

@@ -21,7 +21,7 @@ fi
rm -rf helix-git
git clone --single-branch https://github.com/helix-editor/helix helix-git
cd helix-git
git checkout 84e24b33dcda16d1d64805f34dcc02d82d0de8f1
git checkout 2cadec0b1182332338a5a1cc3062776f834d8835
cargo install -f --locked --path helix-term
mkdir -p ~/.config/helix
rm -rf runtime/grammars/sources
@@ -38,14 +38,14 @@ cat > ~/.config/helix/config.toml << 'EOF'
theme = "monokai_pro_spectrum"
[keys.normal]
space.z = ":reflow 100"
space.z = ":reflow"
space.i = ":toggle lsp.display-inlay-hints"
space.u = ":update"
[editor]
line-number = "relative"
bufferline = "multiple"
rulers = [101]
rulers = [81, 101]
[editor.lsp]
display-messages = true
@@ -66,6 +66,7 @@ cat > ~/.config/helix/languages.toml << 'EOF'
name = 'rust'
indent = { tab-width = 4, unit = "\t" }
shebangs = ["rust-script"]
text-width = 100
[language-server.rust-analyzer.config]
checkOnSave = { command = "clippy" }
@@ -73,25 +74,31 @@ checkOnSave = { command = "clippy" }
[[language]]
name = "c"
indent = { tab-width = 4, unit = "\t" }
text-width = 100
[[language]]
name = "cpp"
indent = { tab-width = 4, unit = "\t" }
text-width = 100
[[language]]
name = 'java'
indent = { tab-width = 4, unit = "\t" }
text-width = 100
[[language]]
name = "bash"
indent = { tab-width = 4, unit = "\t" }
text-width = 100
[[language]]
name = "toml"
indent = { tab-width = 4, unit = "\t" }
text-width = 100
[[language]]
name = "markdown"
text-width = 80
indent = { tab-width = 4, unit = "\t" }
language-servers = [ "ltex-ls" ]
file-types = ["md"]

View File

@@ -14,7 +14,7 @@ use std::{
const ENV: &str = r#". "$HOME/.cargo/env""#;
// until the release of https://github.com/rust-lang/rustup/pull/3506/files
const ENV_FISH: &str = r#"export PATH="$HOME/.cargo/bin:$PATH""#;
const ENV_FISH: &str = r#"set -x PATH "$HOME/.cargo/bin" $PATH"#;
fn main() -> anyhow::Result<()> {
let home = dirs::home_dir().context("can't find home directory")?;

View File

@@ -11,7 +11,7 @@ cargo install starship --locked
echo 'eval "$(starship init bash)"' >> ~/.bashrc
mkdir -p ~/.config/fish
echo 'starship init fish | source' >> ~/.config/fish/config.fish
cat >> ~/.config << 'EOF'
cat >> ~/.config/starship.toml << 'EOF'
[status]
map_symbol = true
format = '[$symbol$common_meaning$signal_name$maybe_int]($style) '