github.com/yoshino-nya/dotfiles
# ~/.bashrc
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[ -f "$HOME/.secrets" ] && . "$HOME/.secrets"
alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '
eval "$(starship init bash)"
export PATH="$HOME/.npm-global/bin:$HOME/.cargo/bin:$PATH"
# fnm
eval "$(fnm env --use-on-cd)"
echo \
"ArchLinux PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.
Install the latest PowerShell for new features and improvements! https://aka.ms/PSArchLinux
Ciallo~(∠・ω< )⌒☆"{
// 布局
"workbench.activityBar.location": "top",
"window.commandCenter": false,
"workbench.panel.showLabels": false,
"editor.minimap.enabled": false,
"workbench.sideBar.location": "right",
"window.menuBarVisibility": "toggle",
// 编辑器
"editor.fontFamily": "SF Mono,Noto Sans Mono,JetBrainsMono Nerd Font Mono",
"editor.fontLigatures": true,
"editor.fontSize": 16,
"editor.mouseWheelZoom": true,
// 集成终端
"terminal.integrated.fontLigatures.enabled": true,
"terminal.integrated.fontFamily": "SF Mono,Noto Sans Mono,JetBrainsMono,monospace",
"terminal.integrated.fontSize": 16,
"chat.commandCenter.enabled": false,
"terminal.integrated.stickyScroll.enabled": false,
"explorer.compactFolders": false,
"workbench.iconTheme": "vscode-icons",
"editor.stickyScroll.enabled": false,
"python.defaultInterpreterPath": "/sbin/python3.14",
"security.workspace.trust.untrustedFiles": "open",
"workbench.layoutControl.enabled": false,
"editor.unicodeHighlight.ambiguousCharacters": false,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"prettier.singleQuote": true,
"prettier.tabWidth": 4,
"[vue]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"github.copilot.enable": {
"*": false,
"plaintext": false,
"markdown": false,
"scminput": false,
},
"terminal.integrated.enableMultiLinePasteWarning": "never",
"[markdown]": {
"editor.quickSuggestions": {
"comments": "on",
"strings": "on",
"other": "on",
},
},
"editor.semanticHighlighting.enabled": true,
"js/ts.updateImportsOnFileMove.enabled": "never",
"chat.disableAIFeatures": true,
"claudeCode.preferredLocation": "panel",
"git.openRepositoryInParentFolders": "never",
"containers.containerClient": "com.microsoft.visualstudio.containers.docker",
"containers.orchestratorClient": "com.microsoft.visualstudio.orchestrators.dockercompose",
"terminal.integrated.cursorStyle": "line",
"terminal.integrated.cursorWidth": 2,
"[css]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"[scss]": {
"editor.defaultFormatter": "vscode.css-language-features"
},
"stylelint.validate": [
"css",
"postcss",
"astro",
"scss",
"html"
],
"[astro]": {
"editor.defaultFormatter": "astro-build.astro-vscode"
},
"[html]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"[cpp]": {
"editor.wordBasedSuggestions": "off",
"editor.semanticHighlighting.enabled": true,
"editor.stickyScroll.defaultModel": "foldingProviderModel",
"editor.suggest.insertMode": "replace"
},
"C_Cpp.default.cppStandard": "c++23",
"code-runner.runInTerminal": true,
"code-runner.executorMap": {
"javascript": "node",
"java": "cd $dir && javac $fileName && java $fileNameWithoutExt",
"c": "cd $dir && gcc $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"zig": "zig run",
"cpp": "cd $dir && mkdir -p bin && g++ $fileName -std=c++23 -Wall -Wextra -o bin/$fileNameWithoutExt && bin/$fileNameWithoutExt",
"objective-c": "cd $dir && gcc -framework Cocoa $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"php": "php",
"python": "python -u",
"perl": "perl",
"perl6": "perl6",
"ruby": "ruby",
"go": "go run",
"lua": "lua",
"groovy": "groovy",
"powershell": "powershell -ExecutionPolicy ByPass -File",
"bat": "cmd /c",
"shellscript": "bash",
"fsharp": "fsi",
"csharp": "scriptcs",
"vbscript": "cscript //Nologo",
"typescript": "ts-node",
"coffeescript": "coffee",
"scala": "scala",
"swift": "swift",
"julia": "julia",
"crystal": "crystal",
"ocaml": "ocaml",
"r": "Rscript",
"applescript": "osascript",
"clojure": "lein exec",
"haxe": "haxe --cwd $dirWithoutTrailingSlash --run $fileNameWithoutExt",
"rust": "cd $dir && rustc $fileName && $dir$fileNameWithoutExt",
"racket": "racket",
"scheme": "csi -script",
"ahk": "autohotkey",
"autoit": "autoit3",
"dart": "dart",
"pascal": "cd $dir && fpc $fileName && $dir$fileNameWithoutExt",
"d": "cd $dir && dmd $fileName && $dir$fileNameWithoutExt",
"haskell": "runghc",
"nim": "nim compile --verbosity:0 --hints:off --run",
"lisp": "sbcl --script",
"kit": "kitc --run",
"v": "v run",
"sass": "sass --style expanded",
"scss": "scss --style expanded",
"less": "cd $dir && lessc $fileName $fileNameWithoutExt.css",
"FortranFreeForm": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran-modern": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran_fixed-form": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"fortran": "cd $dir && gfortran $fileName -o $fileNameWithoutExt && $dir$fileNameWithoutExt",
"sml": "cd $dir && sml $fileName",
"mojo": "mojo run",
"erlang": "escript",
"spwn": "spwn build",
"pkl": "cd $dir && pkl eval -f yaml $fileName -o $fileNameWithoutExt.yaml",
"gleam": "gleam run -m $fileNameWithoutExt"
},
"C_Cpp.intelliSenseEngine": "disabled",
// "clangd.path": "clangd", // 直接使用环境变量
"clangd.arguments": [
// "--all-scopes-completion", // 全局补全(补全建议会给出在当前作用域不可见的索引,插入后自动补充作用域标识符),例如在main()中直接写cout,即使没有`#include <iostream>`,也会给出`std::cout`的建议,配合"--header-insertion=iwyu",还可自动插入缺失的头文件
"--background-index", // 后台分析并保存索引文件
"--clang-tidy", // 启用 Clang-Tidy 以提供「静态检查」,下面设置 clang tidy 规则
"--clang-tidy-checks=performance-*, bugprone-*, misc-*, google-*, modernize-*, readability-*, portability-*",
"--compile-commands-dir=${workspaceFolder}/build/", // 编译数据库(例如 compile_commands.json 文件)的目录位置
"--completion-parse=auto", // 当 clangd 准备就绪时,用它来分析建议
"--completion-style=bundled", // 建议风格:打包(重载函数只会给出一个建议);还可以设置为 detailed
// "--query-driver=/usr/bin/clang++", // MacOS 上需要设定 clang 编译器的路径,homebrew 安装的clang 是 /usr/local/opt/llvm/bin/clang++
// 启用配置文件(YAML格式)项目配置文件是在项目文件夹里的“.clangd”,用户配置文件是“clangd/config.yaml”,该文件来自:Windows: %USERPROFILE%\AppData\Local || MacOS: ~/Library/Preferences/ || Others: $XDG_CONFIG_HOME, usually ~/.config
// "--enable-config",
"--fallback-style=Webkit", // 默认格式化风格: 在没找到 .clang-format 文件时采用,可用的有 LLVM, Google, Chromium, Mozilla, Webkit, Microsoft, GNU
"--function-arg-placeholders=false", // 补全函数时,将会给参数提供占位符,键入后按 Tab 可以切换到下一占位符,乃至函数末
// "--header-insertion-decorators", // 输入建议中,已包含头文件的项与还未包含头文件的项会以圆点加以区分
"--header-insertion=iwyu", // 插入建议时自动引入头文件 iwyu [never,iwyu]
// "--include-cleaner-stdlib", // 为标准库头文件启用清理功能(不成熟!!!)
// "--log=verbose", // 让 Clangd 生成更详细的日志
"--pch-storage=memory", // pch 优化的位置(Memory 或 Disk,前者会增加内存开销,但会提升性能)
// "--pretty", // 输出的 JSON 文件更美观
"--ranking-model=decision_forest", // 建议的排序方案:hueristics (启发式), decision_forest (决策树)
// "--query-driver=C:\\Users\\11850\\scoop\\apps\\msys2\\2023-07-18\\mingw64\\bin\\g++*", // windows下的mingw位置
"-j=12" // 同时开启的任务数量
],
// Clangd 找不到编译数据库(例如 compile_flags.json 文件)时采用的设置,缺陷是不能直接索引同一项目的不同文件,只能分析系统头文件、当前文件和include的文件
"clangd.fallbackFlags": [
"-std=c++23",
// "-I\"C:/winlibs-x86_64-posix-seh-gcc-14.2.0-mingw-w64ucrt-12.0.0-r2/mingw64/include\"",
// "--target=x86_64-w64-windows-gnu" // 默认使用window gcc(MinGW),如果你是linux,就改成"--target=x86_64-pc-linux-gnu"
],
"clangd.onConfigChanged": "restart", // 重启 clangd 时重载配置,具体方法: F1 + Fn 打开命令面板,然后搜索“clangd: restart”
// "clangd.serverCompletionRanking": true, // 借助网上的信息排序建议
"clangd.detectExtensionConflicts": true, // 当其它拓展与 clangd 冲突时警告并建议禁用
"[jsonc]": {
"editor.defaultFormatter": "vscode.json-language-features"
},
}font_size 12
# BEGIN_KITTY_FONTS
font_family family="NotoMono Nerd Font"
bold_font auto
italic_font auto
bold_italic_font auto
# END_KITTY_FONTS
dynamic_background_opacity yes
background_opacity 0.75" ~/.vimrc
set tabstop=4
set number
syntax on