Compare commits

..
3 Commits
Author SHA1 Message Date
atdunbg 88c9035c43 update dotfiles 2026-07-19 20:39:54 +08:00
atdunbg aef001a855 update dotfiles 2026-07-19 19:36:54 +08:00
atdunbg b4010fe910 update dotfiles 2026-07-08 23:01:50 +08:00
45 changed files with 1952 additions and 868 deletions
+3
View File
@@ -4,6 +4,9 @@
*.backup.* *.backup.*
*.backup[0-9]* *.backup[0-9]*
# 日志文件
*.log
# fcitx5 运行时缓存 # fcitx5 运行时缓存
fcitx5/conf/cached_layouts fcitx5/conf/cached_layouts
+100 -94
View File
@@ -1,60 +1,63 @@
@media -moz-pref("userChrome.theme-material") { @media -moz-pref("userChrome.theme-material") {
:root { :root {
--md-sys-color-primary: #1976d2; --md-sys-color-primary: #0d6680;
--md-sys-color-surface-tint: #1976d2; --md-sys-color-surface-tint: #0d6680;
--md-sys-color-on-primary: #ffffff; --md-sys-color-on-primary: #ffffff;
--md-sys-color-primary-container: #e3f2fd; --md-sys-color-primary-container: #baeaff;
--md-sys-color-on-primary-container: #181c20; --md-sys-color-on-primary-container: #001f29;
--md-sys-color-secondary: #42a5f5; --md-sys-color-secondary: #4c616b;
--md-sys-color-on-secondary: #ffffff; --md-sys-color-on-secondary: #ffffff;
--md-sys-color-secondary-container: #e6e8ee; --md-sys-color-secondary-container: #cfe6f1;
--md-sys-color-on-secondary-container: #181c20; --md-sys-color-on-secondary-container: #071e26;
--md-sys-color-tertiary: #42a5f5; --md-sys-color-tertiary: #5c5b7e;
--md-sys-color-on-tertiary: #ffffff; --md-sys-color-on-tertiary: #ffffff;
--md-sys-color-tertiary-container: #e6e8ee; --md-sys-color-tertiary-container: #e2dfff;
--md-sys-color-on-tertiary-container: #181c20; --md-sys-color-on-tertiary-container: #181837;
--md-sys-color-error: #b3261e; --md-sys-color-error: #ba1a1a;
--md-sys-color-on-error: #ffffff; --md-sys-color-on-error: #ffffff;
--md-sys-color-error-container: #f9dedc; --md-sys-color-error-container: #ffdad6;
--md-sys-color-on-error-container: #410e0b; --md-sys-color-on-error-container: #410002;
--md-sys-color-background: #f7f9ff; --md-sys-color-background: #f5fafd;
--md-sys-color-on-background: #181c20; --md-sys-color-on-background: #171c1f;
--md-sys-color-surface: #f7f9ff; --md-sys-color-surface: #f5fafd;
--md-sys-color-on-surface: #181c20; --md-sys-color-on-surface: #171c1f;
--md-sys-color-surface-variant: #dee3eb; --md-sys-color-surface-variant: #dce4e8;
--md-sys-color-on-surface-variant: #42474e; --md-sys-color-on-surface-variant: #40484c;
--md-sys-color-outline: #72777f; --md-sys-color-outline: #70787d;
--md-sys-color-outline-variant: #dee3eb; --md-sys-color-outline-variant: #c0c8cc;
--md-sys-color-shadow: #000000; --md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000; --md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #101418; --md-sys-color-inverse-surface: #2c3134;
--md-sys-color-inverse-on-surface: #e0e2e8; --md-sys-color-inverse-on-surface: #edf1f5;
--md-sys-color-inverse-primary: #42a5f5; --md-sys-color-inverse-primary: #89d0ee;
--md-sys-color-primary-fixed: #e3f2fd; --md-sys-color-primary-fixed: #baeaff;
--md-sys-color-on-primary-fixed: #ffffff; --md-sys-color-on-primary-fixed: #001f29;
--md-sys-color-primary-fixed-dim: #1976d2; --md-sys-color-primary-fixed-dim: #89d0ee;
--md-sys-color-on-primary-fixed-variant: #ffffff; --md-sys-color-on-primary-fixed-variant: #004d62;
--md-sys-color-secondary-fixed: #42a5f5; --md-sys-color-secondary-fixed: #cfe6f1;
--md-sys-color-on-secondary-fixed: #ffffff; --md-sys-color-on-secondary-fixed: #071e26;
--md-sys-color-secondary-fixed-dim: #42a5f5; --md-sys-color-secondary-fixed-dim: #b4cad5;
--md-sys-color-on-secondary-fixed-variant: #ffffff; --md-sys-color-on-secondary-fixed-variant: #354a53;
--md-sys-color-tertiary-fixed: #42a5f5; --md-sys-color-tertiary-fixed: #e2dfff;
--md-sys-color-on-tertiary-fixed: #ffffff; --md-sys-color-on-tertiary-fixed: #181837;
--md-sys-color-tertiary-fixed-dim: #42a5f5; --md-sys-color-tertiary-fixed-dim: #c4c3ea;
--md-sys-color-on-tertiary-fixed-variant: #ffffff; --md-sys-color-on-tertiary-fixed-variant: #444465;
--md-sys-color-surface-dim: #eceef4; --md-sys-color-surface-dim: #d6dbde;
--md-sys-color-surface-bright: #f7f9ff; --md-sys-color-surface-bright: #f5fafd;
--md-sys-color-surface-container-lowest: #f7f9ff; --md-sys-color-surface-container-lowest: #ffffff;
--md-sys-color-surface-container-low: #f7f9ff; --md-sys-color-surface-container-low: #f0f4f7;
--md-sys-color-surface-container: #f7f9ff; --md-sys-color-surface-container: #f5fafd;
--md-sys-color-surface-container-high: #f7f9ff; --md-sys-color-surface-container-high: #f5fafd;
--md-sys-color-surface-container-highest: #f7f9ff; --md-sys-color-surface-container-highest: #f5fafd;
--m3-radius: 12px; --m3-radius: 12px;
--m3-radius-sm: 10px; --m3-radius-sm: 10px;
--m3-elev-0: none; --m3-elev-0: none;
--m3-elev-1: 0 1px 2px rgba(0,0,0,.08), 0 1px 3px rgba(0,0,0,.06); --m3-elev-1: 0 1px 2px color-mix(in srgb, var(--md-sys-color-shadow) 8%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 6%, transparent);
--m3-elev-2: 0 2px 6px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06); --m3-elev-2: 0 2px 6px color-mix(in srgb, var(--md-sys-color-shadow) 10%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 6%, transparent);
--m3-elev-3: 0 11px 7px color-mix(in srgb, var(--md-sys-color-shadow) 19%, transparent), 0 13px 25px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent);
--m3-elev-4: 0 14px 12px color-mix(in srgb, var(--md-sys-color-shadow) 17%, transparent), 0 20px 40px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent);
--m3-elev-5: 0 17px 17px color-mix(in srgb, var(--md-sys-color-shadow) 15%, transparent), 0 27px 55px color-mix(in srgb, var(--md-sys-color-shadow) 30%, transparent);
--tab-height: 34px; --tab-height: 34px;
--urlbar-height: 38px; --urlbar-height: 38px;
@@ -68,58 +71,61 @@
@media (prefers-color-scheme: dark) { @media (prefers-color-scheme: dark) {
:root { :root {
--md-sys-color-primary: #42a5f5; --md-sys-color-primary: #89d0ee;
--md-sys-color-surface-tint: #42a5f5; --md-sys-color-surface-tint: #89d0ee;
--md-sys-color-on-primary: #000000; --md-sys-color-on-primary: #003545;
--md-sys-color-primary-container: #0d47a1; --md-sys-color-primary-container: #004d62;
--md-sys-color-on-primary-container: #e0e2e8; --md-sys-color-on-primary-container: #baeaff;
--md-sys-color-secondary: #8ab4f8; --md-sys-color-secondary: #b4cad5;
--md-sys-color-on-secondary: #000000; --md-sys-color-on-secondary: #1e333c;
--md-sys-color-secondary-container: #272a2f; --md-sys-color-secondary-container: #354a53;
--md-sys-color-on-secondary-container: #e0e2e8; --md-sys-color-on-secondary-container: #cfe6f1;
--md-sys-color-tertiary: #8ab4f8; --md-sys-color-tertiary: #c4c3ea;
--md-sys-color-on-tertiary: #000000; --md-sys-color-on-tertiary: #2d2d4d;
--md-sys-color-tertiary-container: #272a2f; --md-sys-color-tertiary-container: #444465;
--md-sys-color-on-tertiary-container: #e0e2e8; --md-sys-color-on-tertiary-container: #e2dfff;
--md-sys-color-error: #f2b8b5; --md-sys-color-error: #ffb4ab;
--md-sys-color-on-error: #601410; --md-sys-color-on-error: #690005;
--md-sys-color-error-container: #8c1d18; --md-sys-color-error-container: #93000a;
--md-sys-color-on-error-container: #f9dedc; --md-sys-color-on-error-container: #ffdad6;
--md-sys-color-background: #101418; --md-sys-color-background: #0f1417;
--md-sys-color-on-background: #e0e2e8; --md-sys-color-on-background: #dee3e6;
--md-sys-color-surface: #101418; --md-sys-color-surface: #0f1417;
--md-sys-color-on-surface: #e0e2e8; --md-sys-color-on-surface: #dee3e6;
--md-sys-color-surface-variant: #42474e; --md-sys-color-surface-variant: #40484c;
--md-sys-color-on-surface-variant: #c2c7cf; --md-sys-color-on-surface-variant: #c0c8cc;
--md-sys-color-outline: #8c9199; --md-sys-color-outline: #8a9296;
--md-sys-color-outline-variant: #42474e; --md-sys-color-outline-variant: #40484c;
--md-sys-color-shadow: #000000; --md-sys-color-shadow: #000000;
--md-sys-color-scrim: #000000; --md-sys-color-scrim: #000000;
--md-sys-color-inverse-surface: #f7f9ff; --md-sys-color-inverse-surface: #dee3e6;
--md-sys-color-inverse-on-surface: #181c20; --md-sys-color-inverse-on-surface: #2c3134;
--md-sys-color-inverse-primary: #1976d2; --md-sys-color-inverse-primary: #0d6680;
--md-sys-color-primary-fixed: #0d47a1; --md-sys-color-primary-fixed: #baeaff;
--md-sys-color-on-primary-fixed: #000000; --md-sys-color-on-primary-fixed: #001f29;
--md-sys-color-primary-fixed-dim: #42a5f5; --md-sys-color-primary-fixed-dim: #89d0ee;
--md-sys-color-on-primary-fixed-variant: #000000; --md-sys-color-on-primary-fixed-variant: #004d62;
--md-sys-color-secondary-fixed: #8ab4f8; --md-sys-color-secondary-fixed: #cfe6f1;
--md-sys-color-on-secondary-fixed: #000000; --md-sys-color-on-secondary-fixed: #071e26;
--md-sys-color-secondary-fixed-dim: #8ab4f8; --md-sys-color-secondary-fixed-dim: #b4cad5;
--md-sys-color-on-secondary-fixed-variant: #000000; --md-sys-color-on-secondary-fixed-variant: #354a53;
--md-sys-color-tertiary-fixed: #8ab4f8; --md-sys-color-tertiary-fixed: #e2dfff;
--md-sys-color-on-tertiary-fixed: #000000; --md-sys-color-on-tertiary-fixed: #181837;
--md-sys-color-tertiary-fixed-dim: #8ab4f8; --md-sys-color-tertiary-fixed-dim: #c4c3ea;
--md-sys-color-on-tertiary-fixed-variant: #000000; --md-sys-color-on-tertiary-fixed-variant: #444465;
--md-sys-color-surface-dim: #101418; --md-sys-color-surface-dim: #0f1417;
--md-sys-color-surface-bright: #32353a; --md-sys-color-surface-bright: #353a3d;
--md-sys-color-surface-container-lowest: #101418; --md-sys-color-surface-container-lowest: #0a0f11;
--md-sys-color-surface-container-low: #101418; --md-sys-color-surface-container-low: #171c1f;
--md-sys-color-surface-container: #1d2024; --md-sys-color-surface-container: #1b2023;
--md-sys-color-surface-container-high: #272a2f; --md-sys-color-surface-container-high: #252b2d;
--md-sys-color-surface-container-highest: #32353a; --md-sys-color-surface-container-highest: #303638;
--m3-elev-1: 0 1px 2px rgba(0,0,0,.50), 0 1px 3px rgba(0,0,0,.35); --m3-elev-1: 0 1px 2px color-mix(in srgb, var(--md-sys-color-shadow) 50%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 35%, transparent);
--m3-elev-2: 0 4px 10px rgba(0,0,0,.55), 0 1px 3px rgba(0,0,0,.35); --m3-elev-2: 0 4px 10px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent), 0 1px 3px color-mix(in srgb, var(--md-sys-color-shadow) 35%, transparent);
--m3-elev-3: 0 11px 7px color-mix(in srgb, var(--md-sys-color-shadow) 45%, transparent), 0 13px 25px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent);
--m3-elev-4: 0 14px 12px color-mix(in srgb, var(--md-sys-color-shadow) 42%, transparent), 0 20px 40px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent);
--m3-elev-5: 0 17px 17px color-mix(in srgb, var(--md-sys-color-shadow) 40%, transparent), 0 27px 55px color-mix(in srgb, var(--md-sys-color-shadow) 55%, transparent);
--state-hover: color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent); --state-hover: color-mix(in srgb, var(--md-sys-color-on-surface) 6%, transparent);
--state-press: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent); --state-press: color-mix(in srgb, var(--md-sys-color-on-surface) 10%, transparent);
+230 -23
View File
@@ -4,11 +4,14 @@
"customThemeFile": "", "customThemeFile": "",
"registryThemeVariants": {}, "registryThemeVariants": {},
"matugenScheme": "scheme-tonal-spot", "matugenScheme": "scheme-tonal-spot",
"matugenContrast": 0,
"runUserMatugenTemplates": true, "runUserMatugenTemplates": true,
"matugenTargetMonitor": "", "matugenTargetMonitor": "",
"popupTransparency": 1, "popupTransparency": 1,
"dockTransparency": 1, "dockTransparency": 1,
"widgetBackgroundColor": "sch", "widgetBackgroundColor": "sch",
"widgetBackgroundCustomColor": "#6750A4",
"widgetBackgroundCustomStrength": 0.5,
"widgetColorMode": "default", "widgetColorMode": "default",
"controlCenterTileColorMode": "primary", "controlCenterTileColorMode": "primary",
"buttonColorMode": "primary", "buttonColorMode": "primary",
@@ -17,12 +20,19 @@
"niriLayoutRadiusOverride": -1, "niriLayoutRadiusOverride": -1,
"niriLayoutBorderSize": -1, "niriLayoutBorderSize": -1,
"hyprlandLayoutGapsOverride": -1, "hyprlandLayoutGapsOverride": -1,
"hyprlandLayoutGapsOutOverride": -1,
"hyprlandLayoutRadiusOverride": -1, "hyprlandLayoutRadiusOverride": -1,
"hyprlandLayoutBorderSize": -1, "hyprlandLayoutBorderSize": -1,
"hyprlandResizeOnBorder": false,
"mangoLayoutGapsOverride": -1, "mangoLayoutGapsOverride": -1,
"mangoLayoutGapsOutOverride": -1,
"mangoLayoutRadiusOverride": -1, "mangoLayoutRadiusOverride": -1,
"mangoLayoutBorderSize": -1, "mangoLayoutBorderSize": -1,
"use24HourClock": true, "mangoTrackpadNaturalScrolling": true,
"firstDayOfWeek": -1,
"showWeekNumber": false,
"calendarBackend": "auto",
"clockFormat": "24h",
"showSeconds": false, "showSeconds": false,
"padHours12Hour": false, "padHours12Hour": false,
"useFahrenheit": false, "useFahrenheit": false,
@@ -36,15 +46,29 @@
"modalAnimationSpeed": 1, "modalAnimationSpeed": 1,
"modalCustomAnimationDuration": 150, "modalCustomAnimationDuration": 150,
"enableRippleEffects": true, "enableRippleEffects": true,
"animationVariant": 0,
"motionEffect": 0,
"m3ElevationEnabled": true,
"m3ElevationIntensity": 12,
"m3ElevationOpacity": 30,
"m3ElevationColorMode": "default",
"m3ElevationLightDirection": "top",
"m3ElevationCustomColor": "#000000",
"modalElevationEnabled": true,
"popoutElevationEnabled": true,
"barElevationEnabled": false,
"blurEnabled": false, "blurEnabled": false,
"blurForegroundLayers": true, "blurForegroundLayers": true,
"blurLayerOutlineOpacity": 0.12, "blurLayerOutlineOpacity": 0.12,
"blurBorderEnabled": true,
"blurBorderColor": "outline", "blurBorderColor": "outline",
"blurBorderCustomColor": "#ffffff", "blurBorderCustomColor": "#ffffff",
"blurBorderOpacity": 0.35, "blurBorderOpacity": 0.35,
"wallpaperFillMode": "Fill", "wallpaperFillMode": "Fill",
"blurredWallpaperLayer": false, "blurredWallpaperLayer": false,
"blurWallpaperOnOverview": true, "blurWallpaperOnOverview": true,
"wallpaperBackgroundColorMode": "black",
"wallpaperBackgroundCustomColor": "#000000",
"showLauncherButton": true, "showLauncherButton": true,
"showWorkspaceSwitcher": true, "showWorkspaceSwitcher": true,
"showFocusedWindow": true, "showFocusedWindow": true,
@@ -64,6 +88,12 @@
"showClock": true, "showClock": true,
"showNotificationButton": true, "showNotificationButton": true,
"showBattery": true, "showBattery": true,
"showBatteryPercent": true,
"showBatteryPercentOnlyOnBattery": false,
"showBatteryTime": false,
"showBatteryTimeOnlyOnBattery": false,
"batteryPillStyle": false,
"batteryPillPercentSign": false,
"showControlCenterButton": true, "showControlCenterButton": true,
"showCapsLockIndicator": true, "showCapsLockIndicator": true,
"controlCenterShowNetworkIcon": true, "controlCenterShowNetworkIcon": true,
@@ -78,6 +108,8 @@
"controlCenterShowBatteryIcon": false, "controlCenterShowBatteryIcon": false,
"controlCenterShowPrinterIcon": false, "controlCenterShowPrinterIcon": false,
"controlCenterShowScreenSharingIcon": true, "controlCenterShowScreenSharingIcon": true,
"controlCenterShowIdleInhibitorIcon": false,
"controlCenterShowDoNotDisturbIcon": false,
"showPrivacyButton": true, "showPrivacyButton": true,
"privacyShowMicIcon": false, "privacyShowMicIcon": false,
"privacyShowCameraIcon": false, "privacyShowCameraIcon": false,
@@ -143,29 +175,58 @@
"maxWorkspaceIcons": 1, "maxWorkspaceIcons": 1,
"workspaceAppIconSizeOffset": 0, "workspaceAppIconSizeOffset": 0,
"groupWorkspaceApps": true, "groupWorkspaceApps": true,
"groupActiveWorkspaceApps": false,
"workspaceFollowFocus": false, "workspaceFollowFocus": false,
"showOccupiedWorkspacesOnly": false, "showOccupiedWorkspacesOnly": false,
"reverseScrolling": false, "reverseScrolling": false,
"dwlShowAllTags": false, "dwlShowAllTags": false,
"workspaceActiveAppHighlightEnabled": false,
"workspaceColorMode": "default", "workspaceColorMode": "default",
"workspaceFocusedCustomColor": "#6750A4",
"workspaceOccupiedColorMode": "none", "workspaceOccupiedColorMode": "none",
"workspaceOccupiedCustomColor": "#625B71",
"workspaceUnfocusedColorMode": "default", "workspaceUnfocusedColorMode": "default",
"workspaceUnfocusedCustomColor": "#49454E",
"workspaceUrgentColorMode": "default", "workspaceUrgentColorMode": "default",
"workspaceUrgentCustomColor": "#B3261E",
"workspaceFocusedBorderEnabled": false, "workspaceFocusedBorderEnabled": false,
"workspaceFocusedBorderColor": "primary", "workspaceFocusedBorderColor": "primary",
"workspaceFocusedBorderCustomColor": "#6750A4",
"workspaceFocusedBorderThickness": 2, "workspaceFocusedBorderThickness": 2,
"workspaceUnfocusedMonitorSeparateAppearance": false,
"workspaceUnfocusedMonitorColorMode": "default",
"workspaceUnfocusedMonitorFocusedCustomColor": "#6750A4",
"workspaceUnfocusedMonitorOccupiedColorMode": "none",
"workspaceUnfocusedMonitorOccupiedCustomColor": "#625B71",
"workspaceUnfocusedMonitorUnfocusedColorMode": "default",
"workspaceUnfocusedMonitorUnfocusedCustomColor": "#49454E",
"workspaceUnfocusedMonitorUrgentColorMode": "default",
"workspaceUnfocusedMonitorUrgentCustomColor": "#B3261E",
"workspaceUnfocusedMonitorBorderEnabled": false,
"workspaceUnfocusedMonitorBorderColor": "primary",
"workspaceUnfocusedMonitorBorderCustomColor": "#6750A4",
"workspaceUnfocusedMonitorBorderThickness": 2,
"workspaceNameIcons": {}, "workspaceNameIcons": {},
"waveProgressEnabled": true, "waveProgressEnabled": true,
"scrollTitleEnabled": true, "scrollTitleEnabled": true,
"mediaAdaptiveWidthEnabled": true,
"audioVisualizerEnabled": true, "audioVisualizerEnabled": true,
"mediaUseAlbumArtAccent": false,
"audioScrollMode": "volume", "audioScrollMode": "volume",
"audioWheelScrollAmount": 5, "audioWheelScrollAmount": 5,
"audioDeviceScrollVolumeEnabled": false,
"mediaExcludePlayers": [],
"clockCompactMode": false, "clockCompactMode": false,
"focusedWindowCompactMode": false, "focusedWindowCompactMode": false,
"focusedWindowSize": 1,
"focusedWindowShowIcon": true,
"runningAppsCompactMode": true, "runningAppsCompactMode": true,
"barMaxVisibleApps": 0, "barMaxVisibleApps": 0,
"barMaxVisibleRunningApps": 0, "barMaxVisibleRunningApps": 0,
"barShowOverflowBadge": true, "barShowOverflowBadge": true,
"trayAutoOverflow": true,
"trayPopupSingleLine": true,
"trayMaxVisibleItems": 0,
"appsDockHideIndicators": false, "appsDockHideIndicators": false,
"appsDockColorizeActive": false, "appsDockColorizeActive": false,
"appsDockActiveColorMode": "primary", "appsDockActiveColorMode": "primary",
@@ -173,6 +234,7 @@
"appsDockEnlargePercentage": 125, "appsDockEnlargePercentage": 125,
"appsDockIconSizePercentage": 100, "appsDockIconSizePercentage": 100,
"keyboardLayoutNameCompactMode": false, "keyboardLayoutNameCompactMode": false,
"keyboardLayoutNameShowIcon": false,
"runningAppsCurrentWorkspace": true, "runningAppsCurrentWorkspace": true,
"runningAppsGroupByApp": false, "runningAppsGroupByApp": false,
"runningAppsCurrentMonitor": false, "runningAppsCurrentMonitor": false,
@@ -208,17 +270,24 @@
"lockDateFormat": "", "lockDateFormat": "",
"greeterRememberLastSession": true, "greeterRememberLastSession": true,
"greeterRememberLastUser": true, "greeterRememberLastUser": true,
"greeterAutoLogin": false,
"greeterEnableFprint": false, "greeterEnableFprint": false,
"greeterEnableU2f": false, "greeterEnableU2f": false,
"greeterWallpaperPath": "", "greeterWallpaperPath": "",
"greeterLockDateFormat": "",
"greeterFontFamily": "",
"greeterWallpaperFillMode": "",
"greeterPamExternallyManaged": false,
"greeterSyncPending": false,
"greeterSyncBaseline": {},
"mediaSize": 1, "mediaSize": 1,
"appLauncherViewMode": "list", "appLauncherViewMode": "list",
"spotlightModalViewMode": "list", "spotlightModalViewMode": "list",
"browserPickerViewMode": "list", "browserPickerViewMode": "list",
"browserUsageHistory": { "browserUsageHistory": {
"firefox": { "firefox": {
"count": 7, "count": 9,
"lastUsed": 1782706566185, "lastUsed": 1784131326254,
"name": "Firefox" "name": "Firefox"
} }
}, },
@@ -227,21 +296,56 @@
"sortAppsAlphabetically": false, "sortAppsAlphabetically": false,
"appLauncherGridColumns": 4, "appLauncherGridColumns": 4,
"spotlightCloseNiriOverview": true, "spotlightCloseNiriOverview": true,
"rememberLastQuery": false,
"rememberLastMode": true,
"spotlightSectionViewModes": { "spotlightSectionViewModes": {
"apps": "list" "apps": "list"
}, },
"appDrawerSectionViewModes": {}, "appDrawerSectionViewModes": {},
"niriOverviewOverlayEnabled": true, "niriOverviewOverlayEnabled": true,
"niriOverviewLauncherStyle": "full",
"dankLauncherV2Size": "compact", "dankLauncherV2Size": "compact",
"dankLauncherV2ShowSourceBadges": true,
"dankLauncherV2BorderEnabled": false, "dankLauncherV2BorderEnabled": false,
"dankLauncherV2BorderThickness": 2, "dankLauncherV2BorderThickness": 2,
"dankLauncherV2BorderColor": "primary", "dankLauncherV2BorderColor": "primary",
"dankLauncherV2ShowFooter": true, "dankLauncherV2ShowFooter": true,
"dankLauncherV2UnloadOnClose": true, "dankLauncherV2UnloadOnClose": true,
"dankLauncherV2IncludeFilesInAll": false,
"dankLauncherV2IncludeFoldersInAll": false,
"launcherUseOverlayLayer": false,
"launcherStyle": "full",
"spotlightBarShowModeChips": false,
"keybindsFloatingWindow": false,
"useAutoLocation": true, "useAutoLocation": true,
"weatherEnabled": true, "weatherEnabled": true,
"networkPreference": "auto", "dashTabs": [
"iconTheme": "System Default", {
"id": "overview",
"enabled": true
},
{
"id": "media",
"enabled": true
},
{
"id": "wallpaper",
"enabled": true
},
{
"id": "weather",
"enabled": true
},
{
"id": "settings",
"enabled": true
}
],
"networkPreference": "wifi",
"iconThemeDark": "Adwaita",
"iconThemeLight": "System Default",
"iconThemePerMode": false,
"lastAppliedIconTheme": "Adwaita",
"cursorSettings": { "cursorSettings": {
"theme": "breeze_cursors", "theme": "breeze_cursors",
"size": 24, "size": 24,
@@ -269,28 +373,50 @@
"monoFontFamily": "Maple Mono NF CN", "monoFontFamily": "Maple Mono NF CN",
"fontWeight": 400, "fontWeight": 400,
"fontScale": 1, "fontScale": 1,
"textRenderType": 0,
"textRenderQuality": 0,
"notepadUseMonospace": true, "notepadUseMonospace": true,
"notepadFontFamily": "", "notepadFontFamily": "",
"notepadFontSize": 14, "notepadFontSize": 14,
"notificationSummaryFontSize": 0,
"notificationBodyFontSize": 0,
"notepadShowLineNumbers": false, "notepadShowLineNumbers": false,
"notepadAutoSave": false,
"notepadSlideoutSide": "right",
"notepadDefaultMode": "slideout",
"notepadTransparencyOverride": -1, "notepadTransparencyOverride": -1,
"notepadLastCustomTransparency": 0.7, "notepadLastCustomTransparency": 0.7,
"notepadUseCompositorGap": false,
"notepadEdgeGap": 0,
"soundsEnabled": true, "soundsEnabled": true,
"useSystemSoundTheme": true, "useSystemSoundTheme": true,
"soundLogin": false,
"soundNewNotification": true, "soundNewNotification": true,
"soundVolumeChanged": true, "soundVolumeChanged": true,
"soundPluggedIn": true, "soundPluggedIn": true,
"muteSoundsWhenMediaPlaying": true,
"acMonitorTimeout": 1200, "acMonitorTimeout": 1200,
"acLockTimeout": 900, "acLockTimeout": 900,
"acSuspendTimeout": 3600, "acSuspendTimeout": 3600,
"acSuspendBehavior": 0, "acSuspendBehavior": 0,
"acProfileName": "1", "acProfileName": "1",
"acPostLockMonitorTimeout": 0,
"batteryMonitorTimeout": 0, "batteryMonitorTimeout": 0,
"batteryLockTimeout": 0, "batteryLockTimeout": 0,
"batterySuspendTimeout": 0, "batterySuspendTimeout": 0,
"batterySuspendBehavior": 0, "batterySuspendBehavior": 0,
"batteryProfileName": "", "batteryProfileName": "",
"batteryPostLockMonitorTimeout": 0,
"batteryChargeLimit": 100, "batteryChargeLimit": 100,
"batteryNotifyChargeLimit": false,
"batteryCriticalThreshold": 10,
"batteryNotifyCritical": true,
"batteryLowThreshold": 20,
"batteryNotifyLow": false,
"batteryChargeLimitNotificationType": 0,
"batteryLowNotificationType": 0,
"batteryCriticalNotificationType": 1,
"batteryAutoPowerSaver": false,
"lockBeforeSuspend": true, "lockBeforeSuspend": true,
"loginctlLockIntegration": true, "loginctlLockIntegration": true,
"fadeToLockEnabled": true, "fadeToLockEnabled": true,
@@ -300,7 +426,11 @@
"launchPrefix": "", "launchPrefix": "",
"brightnessDevicePins": {}, "brightnessDevicePins": {},
"wifiNetworkPins": {}, "wifiNetworkPins": {},
"bluetoothDevicePins": {}, "bluetoothDevicePins": {
"preferredDevice": [
"08:F0:B6:12:DE:C2"
]
},
"audioInputDevicePins": {}, "audioInputDevicePins": {},
"audioOutputDevicePins": {}, "audioOutputDevicePins": {},
"gtkThemingEnabled": false, "gtkThemingEnabled": false,
@@ -322,6 +452,7 @@
"matugenTemplatePywalfox": true, "matugenTemplatePywalfox": true,
"matugenTemplateZenBrowser": true, "matugenTemplateZenBrowser": true,
"matugenTemplateVesktop": true, "matugenTemplateVesktop": true,
"matugenTemplateVencord": true,
"matugenTemplateEquibop": true, "matugenTemplateEquibop": true,
"matugenTemplateGhostty": true, "matugenTemplateGhostty": true,
"matugenTemplateKitty": true, "matugenTemplateKitty": true,
@@ -334,11 +465,24 @@
"matugenTemplateVscode": true, "matugenTemplateVscode": true,
"matugenTemplateEmacs": true, "matugenTemplateEmacs": true,
"matugenTemplateZed": true, "matugenTemplateZed": true,
"matugenTemplateNeovimSettings": {
"dark": {
"baseTheme": "github_dark",
"harmony": 0.5
},
"light": {
"baseTheme": "github_light",
"harmony": 0.5
}
},
"matugenTemplateNeovimSetBackground": true,
"showDock": true, "showDock": true,
"dockAutoHide": false, "dockAutoHide": false,
"dockSmartAutoHide": true, "dockSmartAutoHide": true,
"dockUseOverlayLayer": false,
"dockGroupByApp": false, "dockGroupByApp": false,
"dockOpenOnOverview": true, "dockRestoreSpecialWorkspaceOnClick": false,
"dockOpenOnOverview": false,
"dockPosition": 1, "dockPosition": 1,
"dockSpacing": 4, "dockSpacing": 4,
"dockBottomGap": 0, "dockBottomGap": 0,
@@ -360,9 +504,13 @@
"dockMaxVisibleApps": 0, "dockMaxVisibleApps": 0,
"dockMaxVisibleRunningApps": 0, "dockMaxVisibleRunningApps": 0,
"dockShowOverflowBadge": true, "dockShowOverflowBadge": true,
"dockShowTrash": false,
"dockTrashFileManager": "default",
"dockTrashCustomCommand": "",
"notificationOverlayEnabled": false, "notificationOverlayEnabled": false,
"notificationPopupShadowEnabled": true, "notificationPopupShadowEnabled": true,
"notificationPopupPrivacyMode": false, "notificationPopupPrivacyMode": false,
"notificationForegroundLayers": true,
"modalDarkenBackground": true, "modalDarkenBackground": true,
"lockScreenShowPowerActions": true, "lockScreenShowPowerActions": true,
"lockScreenShowSystemIcons": true, "lockScreenShowSystemIcons": true,
@@ -377,14 +525,26 @@
"maxFprintTries": 15, "maxFprintTries": 15,
"enableU2f": false, "enableU2f": false,
"u2fMode": "or", "u2fMode": "or",
"lockScreenActiveMonitor": "all", "lockPamPath": "",
"lockPamInlineFprint": false,
"lockPamInlineU2f": false,
"lockPamExternallyManaged": false,
"lockU2fPamPath": "",
"lockScreenInactiveColor": "#000000", "lockScreenInactiveColor": "#000000",
"lockScreenNotificationMode": 0, "lockScreenNotificationMode": 0,
"lockScreenVideoEnabled": false,
"lockScreenVideoPath": "",
"lockScreenVideoCycling": false,
"lockScreenWallpaperPath": "",
"lockScreenWallpaperFillMode": "",
"lockScreenFontFamily": "",
"hideBrightnessSlider": false, "hideBrightnessSlider": false,
"notificationTimeoutLow": 5000, "notificationTimeoutLow": 5000,
"notificationTimeoutNormal": 5000, "notificationTimeoutNormal": 5000,
"notificationTimeoutCritical": 0, "notificationTimeoutCritical": 0,
"notificationCompactMode": false, "notificationCompactMode": false,
"notificationShowTimeoutBar": false,
"notificationDedupeEnabled": true,
"notificationPopupPosition": 0, "notificationPopupPosition": 0,
"notificationAnimationSpeed": 1, "notificationAnimationSpeed": 1,
"notificationCustomAnimationDuration": 400, "notificationCustomAnimationDuration": 400,
@@ -395,6 +555,7 @@
"notificationHistorySaveNormal": true, "notificationHistorySaveNormal": true,
"notificationHistorySaveCritical": true, "notificationHistorySaveCritical": true,
"notificationRules": [], "notificationRules": [],
"notificationFocusedMonitor": false,
"osdAlwaysShowValue": false, "osdAlwaysShowValue": false,
"osdPosition": 4, "osdPosition": 4,
"osdVolumeEnabled": true, "osdVolumeEnabled": true,
@@ -425,11 +586,20 @@
"customPowerActionReboot": "", "customPowerActionReboot": "",
"customPowerActionPowerOff": "", "customPowerActionPowerOff": "",
"updaterHideWidget": false, "updaterHideWidget": false,
"updaterCheckOnStart": false,
"updaterUseCustomCommand": false, "updaterUseCustomCommand": false,
"updaterCustomCommand": "", "updaterCustomCommand": "",
"updaterTerminalAdditionalParams": "", "updaterTerminalAdditionalParams": "",
"updaterIntervalSeconds": 1800,
"updaterIncludeFlatpak": true,
"updaterAllowAUR": true,
"updaterIgnoredPackages": [],
"displayNameMode": "system", "displayNameMode": "system",
"screenPreferences": {}, "screenPreferences": {
"wallpaper": [
"all"
]
},
"showOnLastDisplay": {}, "showOnLastDisplay": {},
"niriOutputSettings": {}, "niriOutputSettings": {},
"hyprlandOutputSettings": {}, "hyprlandOutputSettings": {},
@@ -438,6 +608,7 @@
"displayProfileAutoSelect": false, "displayProfileAutoSelect": false,
"displayShowDisconnected": false, "displayShowDisconnected": false,
"displaySnapToEdge": true, "displaySnapToEdge": true,
"connectedFrameBarStyleBackups": {},
"barConfigs": [ "barConfigs": [
{ {
"id": "default", "id": "default",
@@ -474,7 +645,11 @@
} }
], ],
"centerWidgets": [ "centerWidgets": [
"music", {
"id": "music",
"enabled": true,
"mediaSize": 1
},
{ {
"id": "weather", "id": "weather",
"enabled": true "enabled": true
@@ -489,10 +664,6 @@
"id": "clipboard", "id": "clipboard",
"enabled": true "enabled": true
}, },
{
"id": "battery",
"enabled": true
},
{ {
"id": "controlCenterButton", "id": "controlCenterButton",
"enabled": true "enabled": true
@@ -502,15 +673,23 @@
"enabled": true, "enabled": true,
"clockCompactMode": false "clockCompactMode": false
}, },
{
"id": "battery",
"enabled": true,
"showBatteryTime": false,
"showBatteryTimeOnlyOnBattery": false,
"batteryPillStyle": true,
"batteryPillPercentSign": true
},
{ {
"id": "powerMenuButton", "id": "powerMenuButton",
"enabled": true "enabled": true
} }
], ],
"spacing": 4, "spacing": 0,
"innerPadding": -2, "innerPadding": 0,
"bottomGap": 0, "bottomGap": -4,
"transparency": 1, "transparency": 0,
"widgetTransparency": 1, "widgetTransparency": 1,
"squareCorners": false, "squareCorners": false,
"noBackground": false, "noBackground": false,
@@ -519,14 +698,14 @@
"removeWidgetPadding": false, "removeWidgetPadding": false,
"widgetPadding": 8, "widgetPadding": 8,
"gothCornersEnabled": false, "gothCornersEnabled": false,
"gothCornerRadiusOverride": false, "gothCornerRadiusOverride": true,
"gothCornerRadiusValue": 12, "gothCornerRadiusValue": 43,
"borderEnabled": false, "borderEnabled": false,
"borderColor": "surfaceText", "borderColor": "surfaceText",
"borderOpacity": 1, "borderOpacity": 1,
"borderThickness": 1, "borderThickness": 1,
"widgetOutlineEnabled": false, "widgetOutlineEnabled": false,
"widgetOutlineColor": "primary", "widgetOutlineColor": "surfaceText",
"widgetOutlineOpacity": 1, "widgetOutlineOpacity": 1,
"widgetOutlineThickness": 1, "widgetOutlineThickness": 1,
"fontScale": 1, "fontScale": 1,
@@ -546,7 +725,8 @@
"shadowOpacity": 60, "shadowOpacity": 60,
"shadowColorMode": "text", "shadowColorMode": "text",
"shadowCustomColor": "#000000", "shadowCustomColor": "#000000",
"clickThrough": false "clickThrough": false,
"barInsetPadding": 4
} }
], ],
"desktopClockEnabled": false, "desktopClockEnabled": false,
@@ -625,8 +805,35 @@
"trigger": "?" "trigger": "?"
} }
}, },
"clipboardClickToPaste": false,
"clipboardEnterToPaste": false, "clipboardEnterToPaste": false,
"clipboardRememberTypeFilter": false,
"clipboardTypeFilter": "all",
"clipboardVisibleEntryActions": [
"pin",
"edit",
"delete"
],
"launcherPluginVisibility": {}, "launcherPluginVisibility": {},
"launcherPluginOrder": [], "launcherPluginOrder": [],
"configVersion": 5 "frameEnabled": false,
"frameThickness": 16,
"frameRounding": 23,
"frameColor": "",
"frameOpacity": 1,
"frameScreenPreferences": [
"all"
],
"frameBarSize": 40,
"frameShowOnOverview": false,
"frameBlurEnabled": true,
"frameCloseGaps": true,
"frameLauncherEmergeSide": "bottom",
"frameLauncherArcExtender": false,
"frameLauncherEdgeHover": false,
"frameMode": "connected",
"barInsetPaddingShared": -1,
"barInsetPaddingSyncAll": false,
"frameBarInsetPadding": -1,
"configVersion": 12
} }
+12
View File
@@ -0,0 +1,12 @@
# 转换引擎
Engine=OpenCC
# 启用的输入法
EnabledIM=
# 简转繁的 OpenCC 配置
OpenCCS2TProfile=default
# 繁转简的 OpenCC 配置
OpenCCT2SProfile=default
[Hotkey]
0=Control+Shift+F
+153
View File
@@ -0,0 +1,153 @@
# 双拼方案
ShuangpinProfile=Ziranma
# 显示当前双拼模式
ShowShuangpinMode=True
# 每页候选词
PageSize=7
# 显示英文候选词
SpellEnabled=True
# 显示符号候选词
SymbolsEnabled=True
# 显示拆字候选词
ChaiziEnabled=True
# 启用 Unicode CJK 拓展区 B 之后的更多字符
ExtBEnabled=True
# 输入 h(横)s(竖)p(撇),n(捺),z(折) 时显示笔画候选词
StrokeCandidateEnabled=True
# 启用云拼音
CloudPinyinEnabled=False
# 云拼音候选词顺序
CloudPinyinIndex=2
# 加载云拼音的时候显示动画
CloudPinyinAnimation=True
# 总是显示云拼音的占位符
KeepCloudPinyinPlaceHolder=False
# 预编辑模式
PreeditMode="Composing pinyin"
# 将嵌入预编辑文本的光标固定在开头
PreeditCursorPositionAtBeginning=True
# 在预编辑中显示完整拼音
PinyinInPreedit=False
# 启用预测
Prediction=False
# 为下次输入预测保留当前输入的文本
KeepCurrentContext=True
# 预测数量
PredictionSize=49
# 预测时退格键的行为
BackspaceBehaviorOnPrediction="Backspace when not using on-screen keyboard"
# 切换输入法时的行为
SwitchInputMethodBehavior="Commit current preedit"
# 选择第二个候选词
SecondCandidate=
# 选择第三个候选词
ThirdCandidate=
# 使用数字键盘选词
UseKeypadAsSelection=False
# 选词末字
ChooseLastCharFromPhrase=bracketright
# 使用退格键取消选词
BackSpaceToUnselect=True
# 句子数量
Number of sentence=2
# 词组候选词数
WordCandidateLimit=15
# 输入长于...时提示长词 (设置为 0 时禁用)
LongWordLengthLimit=4
# 快速输入的触发键
QuickPhraseKey=semicolon
# 使用 V 来触发快速输入
VAsQuickphrase=True
# FirstRun
FirstRun=False
[ForgetWord]
0=Control+7
[PrevPage]
0=minus
1=Up
2=KP_Up
3=Page_Up
[NextPage]
0=equal
1=Down
2=KP_Down
3=Next
[PrevCandidate]
0=Shift+Tab
[NextCandidate]
0=Tab
[CurrentCandidate]
0=space
1=KP_Space
[CommitRawInput]
0=Return
1=KP_Enter
2=Control+Return
3=Control+KP_Enter
4=Shift+Return
5=Shift+KP_Enter
6=Control+Shift+Return
7=Control+Shift+KP_Enter
[ChooseCharFromPhrase]
0=bracketleft
[FilterByStroke]
0=grave
[QuickPhraseTriggerRegex]
0=.(/|@)$
1="^(www|bbs|forum|mail|bbs)\\."
2=^(http|https|ftp|telnet|mailto):
[Fuzzy]
# ue -> ve
VE_UE=True
# 常见错误
NG_GN=True
# 小写时匹配字母
LowerCaseMatchLetter=True
# 内模糊音节 (xian -> xi'an)
Inner=True
# 短拼音的内模糊音节 (qie -> qi'e)
InnerShort=True
# 匹配不完整的元音 (e -> en, eng, ei)
PartialFinal=True
# 输入长度大于 4 时进行部分双拼匹配
PartialSp=False
# u <-> v
V_U=False
# an <-> ang
AN_ANG=False
# en <-> eng
EN_ENG=False
# ian <-> iang
IAN_IANG=False
# in <-> ing
IN_ING=False
# u <-> ou
U_OU=False
# uan <-> uang
UAN_UANG=False
# c <-> ch
C_CH=False
# f <-> h
F_H=False
# l <-> n
L_N=False
# l <-> r
L_R=False
# s <-> sh
S_SH=False
# z <-> zh
Z_ZH=False
# 纠错布局
Correction=None
+10
View File
@@ -0,0 +1,10 @@
# 字母或者数字之后输入半角标点
HalfWidthPuncAfterLetterOrNumber=True
# 同时输入成对标点 (例如引号)
TypePairedPunctuationsTogether=False
# Enabled
Enabled=True
[Hotkey]
0=Control+period
+19 -19
View File
@@ -1,13 +1,13 @@
[Hotkey] [Hotkey]
# Enumerate when holding modifier of Toggle key # 按住切换键的修饰键时进行轮换切换
EnumerateWithTriggerKeys=True EnumerateWithTriggerKeys=True
# Enumerate Input Method Forward # 向前切换输入法
EnumerateForwardKeys= EnumerateForwardKeys=
# Enumerate Input Method Backward # 向后切换输入法
EnumerateBackwardKeys= EnumerateBackwardKeys=
# Skip first input method while enumerating # 轮换输入法时跳过第一个输入法
EnumerateSkipFirst=False EnumerateSkipFirst=False
# Time limit in milliseconds for triggering modifier key shortcuts # 触发修饰键快捷键的时限 (毫秒)
ModifierOnlyKeyTimeout=250 ModifierOnlyKeyTimeout=250
[Hotkey/TriggerKeys] [Hotkey/TriggerKeys]
@@ -46,27 +46,27 @@ ModifierOnlyKeyTimeout=250
0=Control+Alt+P 0=Control+Alt+P
[Behavior] [Behavior]
# Activate input method by default # 默认激活输入法
ActiveByDefault=False ActiveByDefault=False
# Reset state on Focus In # 重新聚焦时重置状态
resetStateWhenFocusIn=No resetStateWhenFocusIn=No
# Share Input State # 共享输入状态
ShareInputState=No ShareInputState=No
# Show preedit in application # 在程序中显示预编辑文本
PreeditEnabledByDefault=True PreeditEnabledByDefault=True
# Show Input Method Information when switch input method # 切换输入法时显示输入法信息
ShowInputMethodInformation=True ShowInputMethodInformation=True
# Show Input Method Information when changing focus # 在焦点更改时显示输入法信息
showInputMethodInformationWhenFocusIn=False showInputMethodInformationWhenFocusIn=False
# Show compact input method information # 显示紧凑的输入法信息
CompactInputMethodInformation=True CompactInputMethodInformation=True
# Show first input method information # 显示第一个输入法的信息
ShowFirstInputMethodInformation=True ShowFirstInputMethodInformation=True
# Default Candidates per page # 缺省每页候选词
DefaultPageSize=5 DefaultPageSize=5
# Override XKB Option # 覆盖 XKB 选项
OverrideXkbOption=False OverrideXkbOption=False
# Custom XKB Option # 自定义 XKB 选项
CustomXkbOption= CustomXkbOption=
# Force Enabled Addons # Force Enabled Addons
EnabledAddons= EnabledAddons=
@@ -74,10 +74,10 @@ EnabledAddons=
DisabledAddons= DisabledAddons=
# Preload input method to be used by default # Preload input method to be used by default
PreloadInputMethod=True PreloadInputMethod=True
# Allow input method in the password field # 允许在密码框中使用输入法
AllowInputMethodForPassword=False AllowInputMethodForPassword=False
# Show preedit text when typing password # 输入密码时显示预编辑文本
ShowPreeditForPassword=False ShowPreeditForPassword=False
# Interval of saving user data in minutes # 保存用户数据的时间间隔(以分钟为单位)
AutoSavePeriod=30 AutoSavePeriod=30
+2 -2
View File
@@ -4,7 +4,7 @@ Name=Default
# Layout # Layout
Default Layout=us Default Layout=us
# Default Input Method # Default Input Method
DefaultIM=rime DefaultIM=pinyin
[Groups/0/Items/0] [Groups/0/Items/0]
# Name # Name
@@ -14,7 +14,7 @@ Layout=
[Groups/0/Items/1] [Groups/0/Items/1]
# Name # Name
Name=rime Name=pinyin
# Layout # Layout
Layout= Layout=
+15 -15
View File
@@ -6,36 +6,36 @@
/* via thairanaru on GitHub: */ /* via thairanaru on GitHub: */
/* Destructive colors are basically error colors */ /* Destructive colors are basically error colors */
@define-color destructive_bg_color #f2b8b5; @define-color destructive_bg_color #ffb4ab;
@define-color destructive_fg_color #601410; @define-color destructive_fg_color #690005;
/* Follow material spec */ /* Follow material spec */
@define-color error_bg_color #f2b8b5; @define-color error_bg_color #ffb4ab;
@define-color error_fg_color #601410; @define-color error_fg_color #690005;
/* Follow material spec (also I think looks nicer) */ /* Follow material spec (also I think looks nicer) */
@define-color accent_fg_color #000000; @define-color accent_fg_color #003257;
@define-color accent_bg_color #42a5f5; @define-color accent_bg_color #9fcafc;
/* Use surface instead of background */ /* Use surface instead of background */
@define-color window_bg_color #101418; @define-color window_bg_color #101418;
@define-color window_fg_color #e0e2e8; @define-color window_fg_color #e1e2e8;
/* Make it more similar to Adwaita */ /* Make it more similar to Adwaita */
@define-color view_bg_color #101418; @define-color view_bg_color #101418;
@define-color view_fg_color #e0e2e8; @define-color view_fg_color #e1e2e8;
@define-color headerbar_bg_color #101418; @define-color headerbar_bg_color #101418;
@define-color headerbar_fg_color #e0e2e8; @define-color headerbar_fg_color #e1e2e8;
@define-color sidebar_bg_color #1d2024; @define-color sidebar_bg_color #1d2024;
@define-color sidebar_fg_color #e0e2e8; @define-color sidebar_fg_color #e1e2e8;
/* There is only like one application I know that uses this, and there isn't a good way to get /* There is only like one application I know that uses this, and there isn't a good way to get
a color between surface and surface container so I think just giving this surface is a good enough fallback*/ a color between surface and surface container so I think just giving this surface is a good enough fallback*/
@define-color secondary_sidebar_bg_color #101418; @define-color secondary_sidebar_bg_color #101418;
@define-color secondary_sidebar_fg_color #e0e2e8; @define-color secondary_sidebar_fg_color #e1e2e8;
@define-color card_bg_color #1d2024; @define-color card_bg_color #1d2024;
@define-color card_fg_color #e0e2e8; @define-color card_fg_color #e1e2e8;
@define-color overview_bg_color #1d2024; @define-color overview_bg_color #1d2024;
@define-color overview_fg_color #e0e2e8; @define-color overview_fg_color #e1e2e8;
@define-color popover_bg_color #1d2024; @define-color popover_bg_color #1d2024;
@define-color popover_fg_color #e0e2e8; @define-color popover_fg_color #e1e2e8;
@define-color dialog_bg_color #101418; @define-color dialog_bg_color #101418;
@define-color dialog_fg_color #e0e2e8; @define-color dialog_fg_color #e1e2e8;
/* Backdrop/unfocused states - prevents white flash on window unfocus */ /* Backdrop/unfocused states - prevents white flash on window unfocus */
@define-color headerbar_backdrop_color @window_bg_color; @define-color headerbar_backdrop_color @window_bg_color;
+15 -15
View File
@@ -6,36 +6,36 @@
/* via thairanaru on GitHub: */ /* via thairanaru on GitHub: */
/* Destructive colors are basically error colors */ /* Destructive colors are basically error colors */
@define-color destructive_bg_color #f2b8b5; @define-color destructive_bg_color #ffb4ab;
@define-color destructive_fg_color #601410; @define-color destructive_fg_color #690005;
/* Follow material spec */ /* Follow material spec */
@define-color error_bg_color #f2b8b5; @define-color error_bg_color #ffb4ab;
@define-color error_fg_color #601410; @define-color error_fg_color #690005;
/* Follow material spec (also I think looks nicer) */ /* Follow material spec (also I think looks nicer) */
@define-color accent_fg_color #000000; @define-color accent_fg_color #003257;
@define-color accent_bg_color #42a5f5; @define-color accent_bg_color #9fcafc;
/* Use surface instead of background */ /* Use surface instead of background */
@define-color window_bg_color #101418; @define-color window_bg_color #101418;
@define-color window_fg_color #e0e2e8; @define-color window_fg_color #e1e2e8;
/* Make it more similar to Adwaita */ /* Make it more similar to Adwaita */
@define-color view_bg_color #101418; @define-color view_bg_color #101418;
@define-color view_fg_color #e0e2e8; @define-color view_fg_color #e1e2e8;
@define-color headerbar_bg_color #101418; @define-color headerbar_bg_color #101418;
@define-color headerbar_fg_color #e0e2e8; @define-color headerbar_fg_color #e1e2e8;
@define-color sidebar_bg_color #1d2024; @define-color sidebar_bg_color #1d2024;
@define-color sidebar_fg_color #e0e2e8; @define-color sidebar_fg_color #e1e2e8;
/* There is only like one application I know that uses this, and there isn't a good way to get /* There is only like one application I know that uses this, and there isn't a good way to get
a color between surface and surface container so I think just giving this surface is a good enough fallback*/ a color between surface and surface container so I think just giving this surface is a good enough fallback*/
@define-color secondary_sidebar_bg_color #101418; @define-color secondary_sidebar_bg_color #101418;
@define-color secondary_sidebar_fg_color #e0e2e8; @define-color secondary_sidebar_fg_color #e1e2e8;
@define-color card_bg_color #1d2024; @define-color card_bg_color #1d2024;
@define-color card_fg_color #e0e2e8; @define-color card_fg_color #e1e2e8;
@define-color overview_bg_color #1d2024; @define-color overview_bg_color #1d2024;
@define-color overview_fg_color #e0e2e8; @define-color overview_fg_color #e1e2e8;
@define-color popover_bg_color #1d2024; @define-color popover_bg_color #1d2024;
@define-color popover_fg_color #e0e2e8; @define-color popover_fg_color #e1e2e8;
@define-color dialog_bg_color #101418; @define-color dialog_bg_color #101418;
@define-color dialog_fg_color #e0e2e8; @define-color dialog_fg_color #e1e2e8;
/* Backdrop/unfocused states - prevents white flash on window unfocus */ /* Backdrop/unfocused states - prevents white flash on window unfocus */
@define-color headerbar_backdrop_color @window_bg_color; @define-color headerbar_backdrop_color @window_bg_color;
+6 -6
View File
@@ -5,16 +5,16 @@ tab_bar_align left
tab_bar_min_tabs 2 tab_bar_min_tabs 2
tab_bar_margin_width 0.0 tab_bar_margin_width 0.0
tab_bar_margin_height 2.5 1.5 tab_bar_margin_height 2.5 1.5
tab_bar_margin_color #101418 tab_bar_margin_color #0f1417
tab_bar_background #101418 tab_bar_background #0f1417
active_tab_foreground #000000 active_tab_foreground #003545
active_tab_background #42a5f5 active_tab_background #89d0ee
active_tab_font_style bold active_tab_font_style bold
inactive_tab_foreground #c2c7cf inactive_tab_foreground #c0c8cc
inactive_tab_background #101418 inactive_tab_background #0f1417
inactive_tab_font_style normal inactive_tab_font_style normal
tab_activity_symbol " ● " tab_activity_symbol " ● "
+23 -23
View File
@@ -1,25 +1,25 @@
cursor #e0e2e8 cursor #dee3e6
cursor_text_color #c2c7cf cursor_text_color #c0c8cc
foreground #e0e2e8 foreground #dee3e6
background #101418 background #0f1417
selection_foreground #000000 selection_foreground #1e333c
selection_background #8ab4f8 selection_background #b4cad5
url_color #42a5f5 url_color #89d0ee
color0 #101418 color0 #0f1417
color1 #ff3270 color1 #ff72a0
color2 #42f558 color2 #77ee84
color3 #fff332 color3 #fff672
color4 #1c8de8 color4 #6ebfe2
color5 #003e71 color5 #18546e
color6 #42a5f5 color6 #89d0ee
color7 #e8f4ff color7 #eaf5f9
color8 #8d979f color8 #8f979a
color9 #ff739e color9 #ff9fbe
color10 #7cff8d color10 #a5ffaf
color11 #fff77c color11 #fff9a5
color12 #60b8ff color12 #a3e3ff
color13 #7cc4ff color13 #b3e8ff
color14 #abd9ff color14 #cef0ff
color15 #f5faff color15 #f8fdff
+3 -3
View File
@@ -2,14 +2,15 @@
font_size 12.0 font_size 12.0
# Window Configuration # Window Configuration
window_padding_width 12 window_padding_width 0
background_opacity 1.0 background_opacity 0.85
background_blur 32 background_blur 32
hide_window_decorations yes hide_window_decorations yes
# Cursor Configuration # Cursor Configuration
cursor_shape block cursor_shape block
cursor_blink_interval 1 cursor_blink_interval 1
cursor_trail 3
# Scrollback # Scrollback
scrollback_lines 3000 scrollback_lines 3000
@@ -36,7 +37,6 @@ shell_integration enabled
include dank-tabs.conf include dank-tabs.conf
include dank-theme.conf include dank-theme.conf
# BEGIN_KITTY_FONTS # BEGIN_KITTY_FONTS
font_family family="Maple Mono NF CN" font_family family="Maple Mono NF CN"
bold_font auto bold_font auto
+49 -24
View File
@@ -8,7 +8,7 @@ config-notification {
// Outputs from existing configuration // Outputs from existing configuration
output "eDP-1" { output "eDP-1" {
mode "2560x1600@165.004" mode "2560x1600@180"
scale 1.5 scale 1.5
transform "normal" transform "normal"
position x=0 y=0 position x=0 y=0
@@ -196,6 +196,12 @@ overview {
// This line starts waybar, a commonly used bar for Wayland compositors. // This line starts waybar, a commonly used bar for Wayland compositors.
environment { environment {
XDG_CURRENT_DESKTOP "niri" XDG_CURRENT_DESKTOP "niri"
// 输入法环境变量(解决 Linux QQ 等应用无法输入中文)
GTK_IM_MODULE "fcitx5"
QT_IM_MODULE "fcitx5"
XMODIFIERS "@im=fcitx5"
SDL_IM_MODULE "fcitx5"
GLFW_IM_MODULE "ibus"
} }
hotkey-overlay { hotkey-overlay {
skip-at-startup skip-at-startup
@@ -203,35 +209,54 @@ hotkey-overlay {
prefer-no-csd prefer-no-csd
screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png" screenshot-path "~/Pictures/Screenshots/Screenshot from %Y-%m-%d %H-%M-%S.png"
animations { animations {
// macOS 风格动画配置:流畅、自然、无震荡
// 工作区切换:轻微弹性,更自然
workspace-switch { workspace-switch {
spring damping-ratio=0.80 stiffness=523 epsilon=0.0001 spring damping-ratio=0.95 stiffness=850 epsilon=0.0001
} }
// 窗口打开:柔和适中
window-open { window-open {
duration-ms 150
curve "ease-out-expo"
}
window-close {
duration-ms 150
curve "ease-out-quad"
}
horizontal-view-movement {
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
}
window-movement {
spring damping-ratio=0.75 stiffness=323 epsilon=0.0001
}
window-resize {
spring damping-ratio=0.85 stiffness=423 epsilon=0.0001
}
config-notification-open-close {
spring damping-ratio=0.65 stiffness=923 epsilon=0.001
}
screenshot-ui-open {
duration-ms 200 duration-ms 200
curve "ease-out-quad" curve "ease-out-cubic"
} }
// 窗口关闭:柔和适中
window-close {
duration-ms 180
curve "ease-out-cubic"
}
// 水平视图移动:平滑的弹簧效果
horizontal-view-movement {
spring damping-ratio=1.0 stiffness=600 epsilon=0.0001
}
// 窗口移动:平滑自然
window-movement {
spring damping-ratio=1.0 stiffness=600 epsilon=0.0001
}
// 窗口调整大小:跟随手势,物理感
window-resize {
spring damping-ratio=1.0 stiffness=600 epsilon=0.0001
}
// 配置通知:快速弹出
config-notification-open-close {
spring damping-ratio=1.0 stiffness=1000 epsilon=0.001
}
// 截图界面
screenshot-ui-open {
duration-ms 250
curve "ease-out-cubic"
}
// 概览界面:快速响应
overview-open-close { overview-open-close {
spring damping-ratio=0.85 stiffness=800 epsilon=0.0001 spring damping-ratio=1.0 stiffness=700 epsilon=0.0001
} }
} }
// Window rules let you adjust behavior for individual windows. // Window rules let you adjust behavior for individual windows.
+5 -5
View File
@@ -1,10 +1,10 @@
// ! DO NOT EDIT ! // ! DO NOT EDIT !
// ! AUTO-GENERATED BY DMS ! // ! AUTO-GENERATED BY DMS !
// ! CHANGES WILL BE OVERWRITTEN ! // ! CHANGES WILL BE OVERWRITTEN !
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
recent-windows { recent-windows {
highlight { highlight {
corner-radius 12 corner-radius 12
} }
} }
+12 -12
View File
@@ -5,15 +5,15 @@ layout {
background-color "transparent" background-color "transparent"
focus-ring { focus-ring {
active-color "#42a5f5" active-color "#89d0ee"
inactive-color "#8c9199" inactive-color "#8a9296"
urgent-color "#f2b8b5" urgent-color "#ffb4ab"
} }
border { border {
active-color "#42a5f5" active-color "#89d0ee"
inactive-color "#8c9199" inactive-color "#8a9296"
urgent-color "#f2b8b5" urgent-color "#ffb4ab"
} }
shadow { shadow {
@@ -21,19 +21,19 @@ layout {
} }
tab-indicator { tab-indicator {
active-color "#42a5f5" active-color "#89d0ee"
inactive-color "#8c9199" inactive-color "#8a9296"
urgent-color "#f2b8b5" urgent-color "#ffb4ab"
} }
insert-hint { insert-hint {
color "#42a5f580" color "#89d0ee80"
} }
} }
recent-windows { recent-windows {
highlight { highlight {
active-color "#0d47a1" active-color "#004d62"
urgent-color "#f2b8b5" urgent-color "#ffb4ab"
} }
} }
+8 -7
View File
@@ -1,9 +1,9 @@
// ! DO NOT EDIT ! // ! DO NOT EDIT !
// ! AUTO-GENERATED BY DMS ! // ! AUTO-GENERATED BY DMS !
// ! CHANGES WILL BE OVERWRITTEN ! // ! CHANGES WILL BE OVERWRITTEN !
// ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE ! // ! PLACE YOUR CUSTOM CONFIGURATION ELSEWHERE !
layout { layout {
gaps 4 gaps 4
border { border {
@@ -13,10 +13,11 @@
focus-ring { focus-ring {
width 2 width 2
} }
} }
window-rule {
window-rule {
geometry-corner-radius 12 geometry-corner-radius 12
clip-to-geometry true clip-to-geometry true
tiled-state true tiled-state true
draw-border-with-background false draw-border-with-background false
} }
+6 -73
View File
@@ -1,73 +1,6 @@
-- ============================================================================ -- =============================================================================
-- Neovim 入口配置 -- init.lua — Neovim 入口文件
-- ============================================================================ -- =============================================================================
require("config.options")
-- Leader 键 require("config.keymaps")
vim.g.mapleader = " " require("config.lazy")
-- ---------------------------------------------------------------------------
-- 编辑器选项
-- ---------------------------------------------------------------------------
local opt = vim.opt
opt.number = true -- 行号
opt.relativenumber = true -- 相对行号
opt.tabstop = 4 -- Tab 宽度
opt.shiftwidth = 4 -- 缩进宽度
opt.expandtab = true -- Tab 转空格
opt.smartindent = true -- 智能缩进
opt.wrap = false -- 不自动换行
opt.cursorline = true -- 高亮当前行
opt.signcolumn = "yes" -- 始终显示符号列
opt.updatetime = 250 -- 快速更新
opt.timeoutlen = 300 -- 快捷键超时
opt.splitright = true -- 垂直分屏在右侧
opt.splitbelow = true -- 水平分屏在下方
opt.undofile = true -- 持久化撤销
opt.ignorecase = true -- 搜索忽略大小写
opt.smartcase = true -- 智能大小写
opt.wildmenu = true -- 命令行补全增强
opt.wildmode = "longest:full,full"
opt.pumheight = 10 -- 补全菜单最大高度
opt.clipboard = "unnamedplus" -- 系统剪贴板
opt.termguicolors = true -- 真彩色支持
opt.foldlevel = 99 -- 默认展开所有折叠
-- 全局浮动窗口圆角边框(与 blink.cmp 补全菜单一致)
vim.o.winborder = "rounded"
-- ---------------------------------------------------------------------------
-- 基础键位
-- ---------------------------------------------------------------------------
local keymap = vim.keymap.set
-- 编辑器操作
keymap("n", "<leader>w", "<cmd>w<cr>", { desc = "保存" })
keymap("n", "<leader>q", "<cmd>q<cr>", { desc = "退出" })
keymap("n", "<leader>/", "<cmd>noh<cr>", { desc = "清除搜索高亮" })
-- 窗口导航
keymap("n", "<C-h>", "<C-w>h", { desc = "跳到左边窗口" })
keymap("n", "<C-j>", "<C-w>j", { desc = "跳到下面窗口" })
keymap("n", "<C-k>", "<C-w>k", { desc = "跳到上面窗口" })
keymap("n", "<C-l>", "<C-w>l", { desc = "跳到右边窗口" })
-- ---------------------------------------------------------------------------
-- lazy.nvim 插件管理器
-- ---------------------------------------------------------------------------
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system({
"git", "clone", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = { { import = "plugins" } },
defaults = { lazy = true },
install = { colorscheme = { "default" } },
checker = { enabled = false },
})
+29 -7
View File
@@ -1,25 +1,47 @@
{ {
"Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" },
"blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" },
"bufdelete.nvim": { "branch": "master", "commit": "f6bcea78afb3060b198125256f897040538bcb81" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"cmake-tools.nvim": { "branch": "master", "commit": "22859d754b5de738cfe9945e0910729f63deefd0" }, "cmake-tools.nvim": { "branch": "master", "commit": "22859d754b5de738cfe9945e0910729f63deefd0" },
"conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" }, "conform.nvim": { "branch": "master", "commit": "619363c30309d29ffa631e67c8183f2a72caa373" },
"dashboard-nvim": { "branch": "master", "commit": "f787e3462c2ee2b6117b17c1aa4ddf66cb6f57fe" },
"diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" }, "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
"gitsigns.nvim": { "branch": "main", "commit": "2038c666bd9d8a0b7349a0b6ee00dc83104b9ecf" }, "dressing.nvim": { "branch": "master", "commit": "2d7c2db2507fa3c4956142ee607431ddb2828639" },
"flash.nvim": { "branch": "main", "commit": "b6346946d10d07998efee029fb0f7a593806d0cd" },
"gitsigns.nvim": { "branch": "main", "commit": "31d6fb2d618bca1482b9f274751ead5f03461408" },
"indent-blankline.nvim": { "branch": "master", "commit": "d28a3f70721c79e3c5f6693057ae929f3d9c0a03" },
"lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" }, "lazy.nvim": { "branch": "main", "commit": "306a05526ada86a7b30af95c5cc81ffba93fef97" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "50bf3871b539896bd0650b882f6e6b467cc1c1eb" }, "lazygit.nvim": { "branch": "main", "commit": "a04ad0dbc725134edbee3a5eea29290976695357" },
"lualine.nvim": { "branch": "master", "commit": "221ce6b2d999187044529f49da6554a92f740a96" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "a4068c3ebd4cb335b25239e5ea35c22ee6007962" },
"mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" }, "mason-nvim-dap.nvim": { "branch": "main", "commit": "9a10e096703966335bd5c46c8c875d5b0690dade" },
"mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" }, "mason.nvim": { "branch": "main", "commit": "2a6940af80375532e5e9e7c1f2fc6319a1b7a69d" },
"noice.nvim": { "branch": "main", "commit": "7bfd942445fb63089b59f97ca487d605e715f155" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" }, "nvim-autopairs": { "branch": "master", "commit": "7b9923abad60b903ece7c52940e1321d39eccc79" },
"nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" }, "nvim-dap": { "branch": "master", "commit": "9e848e09a697ee95302a3ef2dd43fd6eb709e570" },
"nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, "nvim-dap-ui": { "branch": "master", "commit": "cc9dd33aade7f20bae414d0cba163bc60d4d4b43" },
"nvim-lspconfig": { "branch": "master", "commit": "3371bf298c1f56efc26771ee961f461176958fb5" }, "nvim-dap-virtual-text": { "branch": "master", "commit": "fbdb48c2ed45f4a8293d0d483f7730d24467ccb6" },
"nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-lspconfig": { "branch": "master", "commit": "b386c50cd7816f8c8a2b13b298a218af1f5a75c6" },
"nvim-nio": { "branch": "master", "commit": "edcc181a875301dd21840189aa2f2f9ad69fc172" },
"nvim-notify": { "branch": "master", "commit": "8701bece920b38ea289b457f902e2ad184131a5d" },
"nvim-surround": { "branch": "main", "commit": "2e93e154de9ff326def6480a4358bfc149d5da2c" },
"nvim-tree.lua": { "branch": "master", "commit": "4213bd6eabac38b16dd6615002b6243b23cf3bf6" },
"nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" },
"nvim-web-devicons": { "branch": "master", "commit": "dfbfaa967a6f7ec50789bead7ef87e336c1fa63c" }, "nvim-ufo": { "branch": "main", "commit": "ab3eb124062422d276fae49e0dd63b3ad1062cfc" },
"nvim-web-devicons": { "branch": "master", "commit": "0ca28b61a04fe7426cefbdd52c2647ef0e335b5f" },
"oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" }, "oil.nvim": { "branch": "master", "commit": "b73018b75affd13fa38e2fc94ef753b465f770d7" },
"persistent-breakpoints.nvim": { "branch": "main", "commit": "d1656221836207787b8a7969cc2dc72668c4742a" },
"plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" },
"rustaceanvim": { "branch": "main", "commit": "88575b98bb9937fb9983ddec5e532b67e75ce677" }, "promise-async": { "branch": "main", "commit": "119e8961014c9bfaf1487bf3c2a393d254f337e2" },
"rainbow-delimiters.nvim": { "branch": "master", "commit": "a798325b7f36acc62741d1029930a7b96d4dd4bf" },
"rustaceanvim": { "branch": "main", "commit": "614a3e30e6e94c5aee204fe5d5b6a50cdaac4be6" },
"telescope-fzf-native.nvim": { "branch": "main", "commit": "b25b749b9db64d375d782094e2b9dce53ad53a40" },
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
"telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
"toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" },
"tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" }, "tokyonight.nvim": { "branch": "main", "commit": "cdc07ac78467a233fd62c493de29a17e0cf2b2b6" },
"vim-illuminate": { "branch": "master", "commit": "91313e598ca62e110bc71535c49069b66b9883c9" },
"which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" }
} }
+146
View File
@@ -0,0 +1,146 @@
-- =============================================================================
-- keymaps.lua — 基础键位映射
-- =============================================================================
local keymap = vim.keymap.set
-- Leader 键
vim.g.mapleader = " "
vim.g.maplocalleader = " "
-- 编辑器操作
keymap("n", "<leader>w", "<cmd>w<cr>", { desc = "保存" })
-- 关闭当前 buffer / 窗口(VSCode 风格)
keymap("n", "<leader>q", function()
local bt = vim.bo.buftype
local ft = vim.bo.filetype
-- 统计文件 buffer 数量
local file_bufs = 0
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_buf_is_loaded(bufnr) then
local b = vim.bo[bufnr]
if b.buftype == "" and b.filetype ~= "" and b.filetype ~= "NvimTree" and b.filetype ~= "dashboard" then
file_bufs = file_bufs + 1
end
end
end
-- dashboard:无文件直接退出
if ft == "dashboard" then
vim.cmd("qa")
return
end
-- nvim-tree:有文件关闭树,无文件退出
if ft == "NvimTree" then
if file_bufs == 0 then
vim.cmd("qa")
else
vim.cmd("NvimTreeClose")
end
return
end
-- quickfixcclose
if bt == "quickfix" then
vim.cmd("cclose")
return
end
-- 其他特殊 buffer:关闭窗口(失败则退出)
if bt ~= "" then
local ok = pcall(vim.cmd, "close")
if not ok then
vim.cmd("qa")
end
return
end
-- 普通文件:根据数量决定退出或关闭
if file_bufs <= 1 then
vim.cmd("qa")
else
vim.cmd("Bdelete")
end
end, { desc = "关闭当前 buffer/窗口" })
keymap("n", "<leader>/", "<cmd>noh<cr>", { desc = "清除搜索高亮" })
-- 窗口导航
keymap("n", "<C-h>", "<C-w>h", { desc = "跳到左边窗口" })
keymap("n", "<C-j>", "<C-w>j", { desc = "跳到下面窗口" })
keymap("n", "<C-k>", "<C-w>k", { desc = "跳到上面窗口" })
keymap("n", "<C-l>", "<C-w>l", { desc = "跳到右边窗口" })
-- 窗口操作
keymap("n", "<leader>sv", "<cmd>vsplit<cr>", { desc = "垂直分屏" })
keymap("n", "<leader>sh", "<cmd>split<cr>", { desc = "水平分屏" })
keymap("n", "<leader>sc", "<cmd>close<cr>", { desc = "关闭窗口" })
-- Buffer 导航
keymap("n", "<S-h>", "<cmd>bprevious<cr>", { desc = "下一个 buffer" })
keymap("n", "<S-l>", "<cmd>bnext<cr>", { desc = "上一个 buffer" })
-- Buffer 操作
keymap("n", "<leader>bc", "<cmd>Bdelete<cr>", { desc = "关闭当前 buffer" })
keymap("n", "<leader>bs", "<cmd>wall<cr>", { desc = "保存全部" })
keymap("n", "<leader>bo", function()
local current = vim.api.nvim_get_current_buf()
local special_ft = { NvimTree = true, dashboard = true, [""] = true }
-- 检查是否有未保存的文件 buffer
local unsaved = {}
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_buf_is_loaded(bufnr) then
local ft = vim.bo[bufnr].filetype
local bt = vim.bo[bufnr].buftype
-- 只统计普通文件 buffer
if bt == "" and not special_ft[ft] and bufnr ~= current then
if vim.bo[bufnr].modified then
table.insert(unsaved, bufnr)
end
end
end
end
local function close_others(force)
for _, bufnr in ipairs(vim.api.nvim_list_bufs()) do
if vim.api.nvim_buf_is_loaded(bufnr) and bufnr ~= current then
local ft = vim.bo[bufnr].filetype
local bt = vim.bo[bufnr].buftype
-- 只关闭普通文件 buffer,保留 nvim-tree/dashboard 等
if bt == "" and not special_ft[ft] then
vim.api.nvim_buf_delete(bufnr, { force = force })
end
end
end
end
if #unsaved > 0 then
vim.ui.select({ "保存全部", "强制关闭(不保存)", "取消" }, { prompt = "" .. #unsaved .. " 个未保存的 buffer" }, function(choice)
if not choice then return end
if choice == "保存全部" then
for _, bufnr in ipairs(unsaved) do
vim.api.nvim_buf_call(bufnr, function()
vim.cmd("write")
end)
end
close_others(false)
elseif choice == "强制关闭(不保存)" then
close_others(true)
end
end)
else
close_others(false)
end
end, { desc = "关闭其他 buffer" })
-- 文件树
keymap("n", "<leader>e", "<cmd>NvimTreeToggle<cr>", { desc = "文件树" })
-- 终端
keymap("n", "<c-`>", "<cmd>ToggleTerm<cr>", { desc = "终端" })
keymap("t", "<c-`>", "<cmd>ToggleTerm<cr>", { desc = "终端" })
+56
View File
@@ -0,0 +1,56 @@
-- =============================================================================
-- lazy.lua — 插件管理器初始化
-- =============================================================================
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.uv.fs_stat(lazypath) then
vim.fn.system({
"git", "clone", "--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
spec = {
{ import = "plugins" },
},
-- 默认延迟加载插件
defaults = {
lazy = true,
},
-- 安装时尝试加载的主题
install = {
colorscheme = { "tokyonight", "habamax" },
},
-- 关闭自动检查更新(手动 :Lazy check
checker = {
enabled = false,
notify = false,
},
-- 统一 UI 圆角边框
ui = {
border = "rounded",
},
-- 禁用内置插件提升启动速度
performance = {
rtp = {
disabled_plugins = {
"gzip",
"matchit",
"matchparen",
"netrwPlugin",
"tarPlugin",
"tohtml",
"tutor",
"zipPlugin",
},
},
},
})
+88
View File
@@ -0,0 +1,88 @@
-- =============================================================================
-- options.lua — 编辑器基础选项
-- =============================================================================
local opt = vim.opt
-- ─────────────────────────────────────────────
-- 行号
-- ─────────────────────────────────────────────
opt.number = true -- 当前行绝对行号
opt.relativenumber = true -- 相对行号
-- ─────────────────────────────────────────────
-- 缩进
-- ─────────────────────────────────────────────
opt.tabstop = 4 -- Tab 宽度
opt.shiftwidth = 4 -- 缩进宽度
opt.expandtab = true -- Tab 转空格
opt.autoindent = true -- 新行继承上一行缩进
opt.smartindent = true -- 智能缩进
-- ─────────────────────────────────────────────
-- 搜索
-- ─────────────────────────────────────────────
opt.ignorecase = true -- 搜索忽略大小写
opt.smartcase = true -- 含大写字母时区分大小写
opt.hlsearch = true -- 高亮搜索匹配
opt.incsearch = true -- 实时预览搜索
-- ─────────────────────────────────────────────
-- 显示 & 界面
-- ─────────────────────────────────────────────
opt.termguicolors = true -- 真彩色
opt.cursorline = true -- 高亮当前行
opt.signcolumn = "yes" -- 始终显示符号列
opt.wrap = false -- 不自动换行
opt.scrolloff = 8 -- 光标距上下边缘保持 8 行
opt.sidescrolloff = 8 -- 光标距左右边缘保持 8 列
opt.showmode = false -- 隐藏模式提示(状态栏会显示)
opt.pumheight = 10 -- 补全菜单最大高度
opt.winborder = "rounded" -- 全局浮动窗口圆角
-- ─────────────────────────────────────────────
-- 分割窗口
-- ─────────────────────────────────────────────
opt.splitright = true -- 垂直分割在右侧
opt.splitbelow = true -- 水平分割在下方
-- ─────────────────────────────────────────────
-- 文件 & 编码
-- ─────────────────────────────────────────────
opt.encoding = "utf-8" -- 文件编码
opt.fileencoding = "utf-8"
opt.swapfile = false -- 关闭交换文件
opt.backup = false -- 关闭备份文件
opt.undofile = true -- 持久化撤销
-- ─────────────────────────────────────────────
-- 鼠标 & 剪贴板
-- ─────────────────────────────────────────────
opt.mouse = "a" -- 所有模式启用鼠标
opt.clipboard = "unnamedplus" -- 系统剪贴板
-- ─────────────────────────────────────────────
-- 性能
-- ─────────────────────────────────────────────
opt.updatetime = 250 -- LSP 悬浮提示触发延迟
opt.timeoutlen = 300 -- 快捷键序列超时
opt.wildmenu = true -- 命令行补全增强
opt.wildmode = "longest:full,full"
-- ─────────────────────────────────────────────
-- 补全
-- ─────────────────────────────────────────────
opt.completeopt = { "menuone", "noselect" } -- blink.cmp 推荐配置
-- ─────────────────────────────────────────────
-- 折叠(为 nvim-ufo 准备)
-- ─────────────────────────────────────────────
opt.foldlevel = 99
opt.foldlevelstart = 99 -- 启动时展开所有折叠
opt.foldenable = true -- 启用折叠
-- ─────────────────────────────────────────────
-- 其他
-- ─────────────────────────────────────────────
opt.conceallevel = 0 -- 不隐藏特殊字符
opt.isfname:append("@-@") -- 文件名识别 @ 符号
+6 -4
View File
@@ -1,11 +1,13 @@
-- ============================================================================ -- =============================================================================
-- 自动括号补全 (nvim-autopairs) -- autopairs.lua — 自动括号补全
-- ============================================================================ -- =============================================================================
return { return {
{ {
"windwp/nvim-autopairs", "windwp/nvim-autopairs",
event = "InsertEnter", event = "InsertEnter",
opts = {}, opts = {
check_ts = true, -- Treesitter 感知,避免在字符串/注释里自动配对
},
}, },
} }
+3 -4
View File
@@ -1,7 +1,6 @@
-- ============================================================================ -- =============================================================================
-- CMake 工具 (cmake-tools.nvim) -- cmake-tools.lua — CMake 工具
-- CMake 项目全流程:生成、构建、运行、调试 -- =============================================================================
-- ============================================================================
return { return {
{ {
+15 -12
View File
@@ -1,7 +1,6 @@
-- ============================================================================ -- =============================================================================
-- 主题 (tokyonight) -- colorscheme.lua — 主题
-- 透明背景,与终端透明效果融合 -- =============================================================================
-- ============================================================================
return { return {
{ {
@@ -15,27 +14,31 @@ return {
sidebars = "transparent", sidebars = "transparent",
floats = "transparent", floats = "transparent",
}, },
on_highlights = function(hl, c)
-- bufferline 标签栏背景透明
hl.BufferLineFill = { bg = "NONE" }
hl.BufferLineBackGround = { bg = "NONE", fg = c.fg_gutter }
hl.BufferLineBackGroundVisible = { bg = "NONE", fg = c.fg }
hl.BufferLineBackGroundSelected = { bg = c.bg_highlight, fg = c.fg, bold = true }
hl.BufferLineSeparator = { fg = c.fg_gutter }
hl.BufferLineSeparatorSelected = { fg = c.blue }
end,
}, },
config = function(_, opts) config = function(_, opts)
require("tokyonight").setup(opts) require("tokyonight").setup(opts)
vim.cmd.colorscheme("tokyonight") vim.cmd.colorscheme("tokyonight")
-- inlay hints 去掉背景,融入透明主题 -- inlay hints 去掉背景
vim.api.nvim_create_autocmd("ColorScheme", { vim.api.nvim_create_autocmd("ColorScheme", {
pattern = "tokyonight", pattern = "tokyonight",
callback = function() callback = function()
vim.api.nvim_set_hl(0, "LspInlayHint", { vim.api.nvim_set_hl(0, "LspInlayHint", {
bg = "NONE", bg = "NONE", fg = "#565f89", italic = true,
fg = "#565f89",
italic = true,
}) })
end, end,
}) })
-- 立即生效一次
vim.api.nvim_set_hl(0, "LspInlayHint", { vim.api.nvim_set_hl(0, "LspInlayHint", {
bg = "NONE", bg = "NONE", fg = "#565f89", italic = true,
fg = "#565f89",
italic = true,
}) })
end, end,
}, },
+6 -7
View File
@@ -1,12 +1,12 @@
-- ============================================================================ -- =============================================================================
-- 智能补全 (blink.cmp) -- completion.lua — 智能补全
-- ============================================================================ -- =============================================================================
return { return {
{ {
"saghen/blink.cmp", "saghen/blink.cmp",
version = "*", version = "*",
event = { "InsertEnter", "CmdlineEnter" }, event = "InsertEnter",
opts = { opts = {
keymap = { keymap = {
preset = "super-tab", preset = "super-tab",
@@ -14,8 +14,8 @@ return {
["<C-k>"] = { "select_prev" }, ["<C-k>"] = { "select_prev" },
["<C-u>"] = { "scroll_documentation_up" }, ["<C-u>"] = { "scroll_documentation_up" },
["<C-n>"] = { "scroll_documentation_down" }, ["<C-n>"] = { "scroll_documentation_down" },
-- 命令行模式:Enter 确认补全而非执行命令 -- Tab 接受补全,回车仅用于确认输入(避免 nvim-tree 文件操作误触发)
["<CR>"] = { "accept", "fallback" }, ["<Tab>"] = { "accept", "fallback" },
}, },
appearance = { appearance = {
use_nvim_cmp_as_default = true, use_nvim_cmp_as_default = true,
@@ -37,7 +37,6 @@ return {
completion = { completion = {
menu = { menu = {
border = "rounded", border = "rounded",
-- scrollbar = false,
draw = { draw = {
columns = { columns = {
{ "label", "label_description", gap = 1 }, { "label", "label_description", gap = 1 },
+14 -5
View File
@@ -1,7 +1,6 @@
-- ============================================================================ -- =============================================================================
-- 自动格式化 (conform.nvim) -- conform.lua — 自动格式化
-- 保存时自动格式化,手动 <leader>cf 触发 -- =============================================================================
-- ============================================================================
return { return {
{ {
@@ -9,7 +8,7 @@ return {
event = { "BufWritePre" }, event = { "BufWritePre" },
cmd = { "ConformInfo" }, cmd = { "ConformInfo" },
keys = { keys = {
{ "<leader>cf", function() require("conform").format({ async = true }) end, desc = "格式化" }, { "<leader>lf", function() require("conform").format({ async = true, lsp_fallback = true }) end, desc = "格式化" },
}, },
opts = { opts = {
format_on_save = { format_on_save = {
@@ -21,6 +20,16 @@ return {
lua = { "stylua" }, lua = { "stylua" },
c = { "clang-format" }, c = { "clang-format" },
cpp = { "clang-format" }, cpp = { "clang-format" },
python = { "black", "isort" },
javascript = { "prettier" },
typescript = { "prettier" },
json = { "prettier" },
yaml = { "prettier" },
markdown = { "prettier" },
html = { "prettier" },
css = { "prettier" },
go = { "gofmt", "goimports" },
sh = { "shfmt" },
}, },
formatters = { formatters = {
["clang-format"] = { ["clang-format"] = {
+12 -17
View File
@@ -1,6 +1,6 @@
-- ============================================================================ -- =============================================================================
-- DAP 调试器 -- dap.lua — DAP 调试器
-- ============================================================================ -- =============================================================================
return { return {
{ {
@@ -9,18 +9,17 @@ return {
"rcarriga/nvim-dap-ui", "rcarriga/nvim-dap-ui",
"nvim-neotest/nvim-nio", "nvim-neotest/nvim-nio",
"williamboman/mason.nvim", "williamboman/mason.nvim",
{ "theHamsta/nvim-dap-virtual-text", opts = {} },
{ "Weissle/persistent-breakpoints.nvim", opts = { load_breakpoints_event = { "BufReadPost" } } },
}, },
config = function() config = function()
local dap = require("dap") local dap = require("dap")
local dapui = require("dapui") local dapui = require("dapui")
-- 断点图标 -- 断点图标
vim.fn.sign_define("DapBreakpoint", vim.fn.sign_define("DapBreakpoint", { text = "", texthl = "DapBreakpoint", linehl = "", numhl = "" })
{ text = "", texthl = "DapBreakpoint", linehl = "", numhl = "" }) vim.fn.sign_define("DapBreakpointCondition", { text = "", texthl = "DapBreakpointCondition", linehl = "", numhl = "" })
vim.fn.sign_define("DapBreakpointCondition", vim.fn.sign_define("DapStopped", { text = "", texthl = "DapStopped", linehl = "CursorLine", numhl = "" })
{ text = "", texthl = "DapBreakpointCondition", linehl = "", numhl = "" })
vim.fn.sign_define("DapStopped",
{ text = "", texthl = "DapStopped", linehl = "CursorLine", numhl = "" })
-- dap-ui 布局 -- dap-ui 布局
dapui.setup({ dapui.setup({
@@ -52,7 +51,7 @@ return {
dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end dap.listeners.before.event_terminated.dapui_config = function() dapui.close() end
dap.listeners.before.event_exited.dapui_config = function() dapui.close() end dap.listeners.before.event_exited.dapui_config = function() dapui.close() end
-- codelldb 适配器Mason 安装路径) -- codelldb 适配器
dap.adapters.codelldb = { dap.adapters.codelldb = {
type = "server", type = "server",
port = "${port}", port = "${port}",
@@ -62,7 +61,7 @@ return {
}, },
} }
-- C/C++ 调试配置(非 CMake 项目,CMake 项目用 <leader>rd -- C/C++ 调试配置
dap.configurations.c = { dap.configurations.c = {
{ {
name = "Launch", name = "Launch",
@@ -81,14 +80,10 @@ return {
}, },
-- Mason DAP 自动安装 -- Mason DAP 自动安装
-- lazy = false: defaults = { lazy = true } 会使此插件无触发器而永不加载,
-- 导致 ensure_installed 不执行、codelldb 不安装
{ {
"jay-babu/mason-nvim-dap.nvim", "jay-babu/mason-nvim-dap.nvim",
dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" }, dependencies = { "williamboman/mason.nvim", "mfussenegger/nvim-dap" },
lazy = false, event = "BufReadPost",
opts = { opts = { ensure_installed = { "codelldb" } },
ensure_installed = { "codelldb" },
},
}, },
} }
+4 -7
View File
@@ -1,16 +1,13 @@
-- ============================================================================ -- =============================================================================
-- 图标支持 (nvim-web-devicons) -- devicons.lua — 文件图标
-- 为 oil、telescope、状态栏等提供文件类型图标 -- =============================================================================
-- ============================================================================
return { return {
{ {
"nvim-tree/nvim-web-devicons", "nvim-tree/nvim-web-devicons",
lazy = true, lazy = true,
opts = { opts = {
override = { color_icons = true,
rs = { icon = "󱘗", color = "#dea584", name = "Rust" },
},
}, },
}, },
} }
-35
View File
@@ -1,35 +0,0 @@
-- ============================================================================
-- Git diff 视图 (diffview)
-- 仓库级 diff 总览 + 提交历史对比,补充 gitsigns 的行内能力
-- ============================================================================
return {
{
"sindrets/diffview.nvim",
cmd = "DiffviewOpen",
keys = {
-- 只保留 3 个核心键位:打开/关闭 diff 视图、查看历史
{ "<leader>go", "<cmd>DiffviewOpen<cr>", desc = "查看改动" },
{ "<leader>gq", "<cmd>DiffviewClose<cr>", desc = "关闭 diff" },
{ "<leader>gl", "<cmd>DiffviewFileHistory %<cr>", desc = "文件历史" },
},
opts = {
file_panel = {
listing_style = "tree",
tree_options = {
flatten_dirs = true,
folder_statuses = "only_folded",
},
},
keymaps = {
view = {
-- 覆盖全局 <leader>q:在 diffview 里关闭整个 diffview,而非单个窗口
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
},
file_panel = {
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
},
},
},
},
}
+110
View File
@@ -0,0 +1,110 @@
-- =============================================================================
-- editor.lua — 编辑器增强插件
-- =============================================================================
return {
-- Comment.nvim: 注释快捷键 gcc / gc
{
"numToStr/Comment.nvim",
event = { "BufReadPre", "BufNewFile" },
opts = {},
},
-- nvim-surround: 环绕操作 ysiw" / cs"' / ds"
{
"kylechui/nvim-surround",
event = { "BufReadPre", "BufNewFile" },
version = "*",
opts = {},
},
-- vim-illuminate: 高亮光标下相同单词
{
"RRethy/vim-illuminate",
event = { "BufReadPre", "BufNewFile" },
opts = {
delay = 200,
large_file_cutoff = 2000,
},
config = function(_, opts)
require("illuminate").configure(opts)
end,
},
-- toggleterm.nvim: 集成终端
{
"akinsho/toggleterm.nvim",
version = "*",
keys = {
{ "<C-`>", "<cmd>ToggleTerm<cr>", mode = { "n", "t" }, desc = "终端" },
{ "<leader>tg", "<cmd>ToggleTerm direction=float<cr>", desc = "浮动终端" },
{ "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>", desc = "水平终端" },
{ "<leader>tv", "<cmd>ToggleTerm direction=vertical<cr>", desc = "垂直终端" },
},
opts = {
size = function(term)
if term.direction == "horizontal" then
return vim.o.lines * 0.3
elseif term.direction == "vertical" then
return vim.o.columns * 0.4
end
end,
direction = "horizontal",
float_opts = { border = "curved", winblend = 0 },
shell = vim.o.shell,
},
},
-- flash.nvim: 快速跳转
{
"folke/flash.nvim",
event = "VeryLazy",
opts = {},
},
-- indent-blankline: 缩进参考线
{
"lukas-reineke/indent-blankline.nvim",
event = { "BufReadPost", "BufNewFile" },
main = "ibl",
opts = {
indent = { char = "" },
scope = { enabled = true },
},
},
-- nvim-ufo: 代码折叠
{
"kevinhwang91/nvim-ufo",
dependencies = { "kevinhwang91/promise-async" },
event = { "BufReadPost", "BufNewFile" },
config = function()
vim.o.foldmethod = "expr"
vim.o.foldexpr = "v:lua.vim.treesitter.foldexpr()"
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
require('ufo').setup({
provider_selector = function(bufnr, filetype, buftype)
return { "treesitter", "indent" }
end,
})
vim.keymap.set('n', 'zM', require('ufo').closeAllFolds, { desc = "关闭所有折叠" })
vim.keymap.set('n', 'zR', require('ufo').openAllFolds, { desc = "展开所有折叠" })
end,
},
-- rainbow-delimiters: 彩虹括号
{
"HiPhish/rainbow-delimiters.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
config = function()
local rainbow_delimiters = require("rainbow-delimiters")
vim.g.rainbow_delimiters = {
strategy = { [''] = rainbow_delimiters.strategy.global },
query = { [''] = 'rainbow-delimiters' },
}
end,
},
}
+64
View File
@@ -0,0 +1,64 @@
-- =============================================================================
-- filetree.lua — 文件树
-- =============================================================================
return {
{
"nvim-tree/nvim-tree.lua",
version = "*",
lazy = false,
keys = {
{ "<leader>e", "<cmd>NvimTreeToggle<CR>", desc = "侧边文件树" },
},
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
-- 禁用 netrw
vim.g.loaded_netrw = 1
vim.g.loaded_netrwPlugin = 1
require("nvim-tree").setup({
sort_by = "case_sensitive",
view = {
width = 30,
side = "left",
relativenumber = false,
adaptive_size = false,
},
renderer = {
group_empty = true,
icons = {
show = {
file = true,
folder = true,
folder_arrow = true,
git = false,
},
glyphs = {
folder = {
arrow_closed = "",
arrow_open = "",
},
},
},
},
filters = {
dotfiles = false,
custom = { "^.git$" },
},
git = {
enable = false,
ignore = false,
},
actions = {
open_file = {
quit_on_open = false,
window_picker = { enable = true },
},
},
on_attach = function(bufnr)
require("nvim-tree.api").config.mappings.default_on_attach(bufnr)
end,
})
end,
},
}
@@ -1,9 +1,10 @@
-- ============================================================================ -- =============================================================================
-- Git 集成 (gitsigns) -- git.lua — Git 集成
-- 行内 diff 标记 + hunk 操作 -- =============================================================================
-- ============================================================================
return { return {
-- gitsigns: 行内 diff 标记
{ {
"lewis6991/gitsigns.nvim", "lewis6991/gitsigns.nvim",
event = "BufReadPre", event = "BufReadPre",
@@ -42,10 +43,47 @@ return {
}, },
config = function(_, opts) config = function(_, opts)
require("gitsigns").setup(opts) require("gitsigns").setup(opts)
-- 自定义颜色
vim.api.nvim_set_hl(0, "GitSignsAdd", { fg = "#4CAF50" }) vim.api.nvim_set_hl(0, "GitSignsAdd", { fg = "#4CAF50" })
vim.api.nvim_set_hl(0, "GitSignsChange", { fg = "#2196F3" }) vim.api.nvim_set_hl(0, "GitSignsChange", { fg = "#2196F3" })
vim.api.nvim_set_hl(0, "GitSignsDelete", { fg = "#F44336" }) vim.api.nvim_set_hl(0, "GitSignsDelete", { fg = "#F44336" })
end, end,
}, },
-- diffview: Git diff 视图
{
"sindrets/diffview.nvim",
cmd = "DiffviewOpen",
keys = {
{ "<leader>go", "<cmd>DiffviewOpen<cr>", desc = "查看改动" },
{ "<leader>gq", "<cmd>DiffviewClose<cr>", desc = "关闭 diff" },
{ "<leader>gl", "<cmd>DiffviewFileHistory %<cr>", desc = "文件历史" },
},
opts = {
file_panel = {
listing_style = "tree",
tree_options = {
flatten_dirs = true,
folder_statuses = "only_folded",
},
},
keymaps = {
view = {
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
},
file_panel = {
{ "n", "<leader>q", "<cmd>DiffviewClose<cr>", { desc = "关闭 diffview" } },
},
},
},
},
-- lazygit: Git TUI
{
"kdheepak/lazygit.nvim",
cmd = { "LazyGit", "LazyGitCurrentFile" },
keys = {
{ "<leader>gg", ":LazyGit<CR>", desc = "LazyGit" },
},
dependencies = { "nvim-lua/plenary.nvim" },
},
} }
+27 -20
View File
@@ -20,6 +20,7 @@ return {
"bashls", -- Bash "bashls", -- Bash
"clangd", -- C/C++ "clangd", -- C/C++
"neocmake", -- CMake "neocmake", -- CMake
-- rust_analyzer 由 rustup 管理,不通过 Mason
}, },
}, },
}, },
@@ -34,6 +35,8 @@ return {
"saghen/blink.cmp", "saghen/blink.cmp",
}, },
config = function() config = function()
local caps = require("blink.cmp").get_lsp_capabilities()
-- LSP 附加时自动开启 inlay hints -- LSP 附加时自动开启 inlay hints
vim.api.nvim_create_autocmd("LspAttach", { vim.api.nvim_create_autocmd("LspAttach", {
callback = function(args) callback = function(args)
@@ -54,47 +57,51 @@ return {
end, end,
}) })
local caps = require("blink.cmp").get_lsp_capabilities()
-- Lua -- Lua
vim.lsp.config("lua_ls", { vim.lsp.config['lua_ls'] = {
cmd = { "lua-language-server" }, cmd = { 'lua-language-server' },
filetypes = { 'lua' },
root_markers = { '.luarc.json', '.luarc.jsonc', '.git', 'init.lua' },
capabilities = caps, capabilities = caps,
settings = { settings = {
Lua = { Lua = {
runtime = { version = "Lua5.5" }, runtime = { version = "LuaJIT" },
workspace = { checkThirdParty = false }, workspace = { checkThirdParty = false },
diagnostics = { globals = { "vim" } }, diagnostics = { globals = { "vim" } },
}, },
}, },
}) }
-- Bash -- Bash
vim.lsp.config("bashls", { vim.lsp.config['bashls'] = {
cmd = { "bash-language-server", "start" }, cmd = { 'bash-language-server', 'start' },
filetypes = { 'sh', 'bash' },
root_markers = { '.git' },
capabilities = caps, capabilities = caps,
}) }
-- C/C++ (clangd) -- C/C++ (clangd)
vim.lsp.config("clangd", { vim.lsp.config['clangd'] = {
cmd = { "clangd" }, cmd = { 'clangd' },
filetypes = { 'c', 'cpp', 'objc', 'objcpp' },
root_markers = { '.clangd', 'compile_commands.json', '.git' },
capabilities = caps, capabilities = caps,
}) }
-- CMake -- CMake
vim.lsp.config("neocmake", { vim.lsp.config['neocmake'] = {
cmd = { "neocmakelsp", "stdio" }, cmd = { 'neocmakelsp', 'stdio' },
filetypes = { "cmake" }, filetypes = { 'cmake' },
root_dir = vim.fs.root(0, { ".git", "CMakeLists.txt" }), root_markers = { 'CMakeLists.txt', '.git' },
single_file_support = true, capabilities = caps,
init_options = { init_options = {
format = { enable = true }, format = { enable = true },
lint = { enable = true }, lint = { enable = true },
}, },
}) }
-- 启用所有 LSPRust 由 rustaceanvim 管理,不在此启用 -- 启用所有 LSPRust 由 rustaceanvim 管理)
vim.lsp.enable({ "lua_ls", "bashls", "clangd", "neocmake" }) vim.lsp.enable({ 'lua_ls', 'bashls', 'clangd', 'neocmake' })
end, end,
}, },
} }
+3 -4
View File
@@ -1,7 +1,6 @@
-- ============================================================================ -- =============================================================================
-- 文件浏览器 (oil.nvim) -- oil.lua — 文件浏览器
-- 缓冲区编辑模式,像编辑文本一样管理文件 -- =============================================================================
-- ============================================================================
return { return {
{ {
+5 -5
View File
@@ -1,7 +1,6 @@
-- ============================================================================ -- =============================================================================
-- 统一构建/运行/调试键位 -- runner.lua — 统一构建/运行/调试分发器
-- 所有语言共用同一组键位,由 runner.lua 自动分发 -- =============================================================================
-- ============================================================================
return { return {
{ {
@@ -12,7 +11,8 @@ return {
{ "<F10>", function() require("dap").step_over() end, desc = "单步跳过" }, { "<F10>", function() require("dap").step_over() end, desc = "单步跳过" },
{ "<F11>", function() require("dap").step_into() end, desc = "单步进入" }, { "<F11>", function() require("dap").step_into() end, desc = "单步进入" },
{ "<F12>", function() require("dap").step_out() end, desc = "单步跳出" }, { "<F12>", function() require("dap").step_out() end, desc = "单步跳出" },
{ "<leader>b", function() require("dap").toggle_breakpoint() end, desc = "断点" }, -- 断点键位(避免与 buffer 分组冲突)
{ "<leader>db", function() require("dap").toggle_breakpoint() end, desc = "断点" },
{ "<leader>du", function() require("dapui").toggle() end, desc = "调试界面" }, { "<leader>du", function() require("dapui").toggle() end, desc = "调试界面" },
-- 统一构建/运行/调试/测试 -- 统一构建/运行/调试/测试
+7 -30
View File
@@ -1,35 +1,12 @@
-- ============================================================================ -- =============================================================================
-- Rust 工具 (rustaceanvim) -- rustaceanvim.lua — Rust 开发增强
-- Rust 全流程:LSP、调试、运行、测试、宏展开 -- =============================================================================
-- ============================================================================ -- rustaceanvim 自动管理 rust-analyzer,提供调试、测试等功能
-- 依赖:rustup 安装的 rust-analyzer(不要用 Mason 安装,避免冲突)
-- 安装:rustup component add rust-analyzer
return { return {
{
"mrcjkb/rustaceanvim", "mrcjkb/rustaceanvim",
version = "^6",
lazy = false,
ft = { "rust" }, ft = { "rust" },
config = function() version = "^6",
vim.g.rustaceanvim = {
-- LSP 配置
server = {
default_settings = {
["rust-analyzer"] = {
cargo = { allFeatures = true },
check = { command = "clippy" },
},
},
},
-- DAP 适配器(复用 Mason 安装的 codelldb
dap = {
adapter = function()
local codelldb_path = vim.fn.stdpath("data") .. "/mason/bin/codelldb"
local library_path = vim.fn.stdpath("data")
.. "/mason/packages/codelldb/extension/lldb/lib/liblldb.so"
return require("rustaceanvim.config").get_codelldb_adapter(codelldb_path, library_path)
end,
},
}
end,
},
} }
+14 -8
View File
@@ -1,6 +1,6 @@
-- ============================================================================ -- =============================================================================
-- 模糊搜索 (telescope) -- telescope.lua — 模糊搜索
-- ============================================================================ -- =============================================================================
return { return {
{ {
@@ -9,6 +9,11 @@ return {
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",
"nvim-telescope/telescope-ui-select.nvim", "nvim-telescope/telescope-ui-select.nvim",
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
cond = function() return vim.fn.executable("make") == 1 end,
},
}, },
cmd = "Telescope", cmd = "Telescope",
keys = { keys = {
@@ -18,21 +23,22 @@ return {
{ "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "帮助文档" }, { "<leader>fh", "<cmd>Telescope help_tags<cr>", desc = "帮助文档" },
{ "<leader>fk", "<cmd>Telescope keymaps<cr>", desc = "查找键位" }, { "<leader>fk", "<cmd>Telescope keymaps<cr>", desc = "查找键位" },
{ "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "最近文件" }, { "<leader>fr", "<cmd>Telescope oldfiles<cr>", desc = "最近文件" },
{ "<leader>fc", "<cmd>Telescope current_buffer_fuzzy_find<cr>", desc = "当前文件搜索" },
{ "<leader>fd", "<cmd>Telescope diagnostics<cr>", desc = "诊断信息" },
}, },
-- 启动即加载:ui-select 扩展需要全局接管 vim.ui.select
-- 懒加载会导致未触发 :Telescope 时(如 <leader>rr)回退到原生 UI
lazy = false,
opts = { opts = {
defaults = { defaults = {
prompt_prefix = " > ", prompt_prefix = " > ",
selection_caret = " > ", selection_caret = " > ",
layout_strategy = "flex", layout_strategy = "flex",
file_ignore_patterns = {
"node_modules", ".git/", "dist/", "build/", "%.lock",
},
}, },
}, },
config = function(_, opts) config = function(_, opts)
local telescope = require("telescope") local telescope = require("telescope")
-- extensions 需要 require telescope.themes,必须在 config 里构造
opts.extensions = { opts.extensions = {
["ui-select"] = { ["ui-select"] = {
require("telescope.themes").get_dropdown({}), require("telescope.themes").get_dropdown({}),
@@ -40,8 +46,8 @@ return {
} }
telescope.setup(opts) telescope.setup(opts)
-- 用 pcall 保护,避免 ui-select 扩展未安装时崩溃
pcall(telescope.load_extension, "ui-select") pcall(telescope.load_extension, "ui-select")
pcall(telescope.load_extension, "fzf")
end, end,
}, },
} }
+7 -17
View File
@@ -1,6 +1,6 @@
-- ============================================================================ -- =============================================================================
-- 语法高亮 (Tree-sitter) -- treesitter.lua — 语法高亮与折叠
-- ============================================================================ -- =============================================================================
return { return {
{ {
@@ -9,23 +9,13 @@ return {
build = ":TSUpdate", build = ":TSUpdate",
opts = { opts = {
ensure_installed = { ensure_installed = {
"lua", -- Lua "lua", "bash", "rust", "c", "cpp", "cmake",
"bash", -- Bash "python", "java", "go", "json", "toml",
"rust", -- Rust "markdown", "regex", "vim",
"c", -- C
"cpp", -- C++
"cmake", -- CMake
"python", -- Python
"java", -- Java
"go", -- Go
"json", -- JSON
"toml", -- TOML
"markdown", -- Markdown
"regex", -- 正则
"vim", -- Vimscript
}, },
highlight = { enable = true }, highlight = { enable = true },
indent = { enable = true }, indent = { enable = true },
fold = { enable = true }, -- nvim-ufo 依赖
}, },
}, },
} }
+177
View File
@@ -0,0 +1,177 @@
-- =============================================================================
-- ui.lua — UI 美化套件
-- =============================================================================
return {
-- bufferline: 顶部标签栏
{
"akinsho/bufferline.nvim",
version = "*",
event = "BufAdd",
dependencies = {
"nvim-tree/nvim-web-devicons",
"famiu/bufdelete.nvim",
},
config = function()
require("bufferline").setup({
options = {
mode = "buffers",
style_preset = require("bufferline").style_preset.default,
themable = true,
numbers = "none",
close_command = "Bdelete!",
right_mouse_command = "Bdelete!",
indicator = { style = "icon", icon = "" },
buffer_close_icon = "󰅖",
modified_icon = "",
close_icon = "",
left_trunc_marker = "",
right_trunc_marker = "",
max_name_length = 18,
max_prefix_length = 15,
truncate_names = true,
tab_size = 18,
diagnostics = "nvim_lsp",
diagnostics_update_in_insert = false,
offsets = {
{ filetype = "oil", text = "文件浏览器", highlight = "Directory", text_align = "left" },
{ filetype = "NvimTree", text = "文件树", highlight = "Directory", text_align = "left" },
},
color_icons = true,
show_buffer_icons = true,
show_buffer_close_icons = true,
show_close_icon = false,
show_tab_indicators = true,
persist_buffer_sort = true,
separator_style = "thin",
enforce_regular_tabs = false,
always_show_bufferline = true,
hover = { enabled = true, delay = 200, reveal = { "close" } },
-- 隐藏非文件 bufferquickfix/终端/help 等),避免 cmake 输出污染标签栏
custom_filter = function(bufnr)
return vim.bo[bufnr].buftype == ""
end,
},
})
end,
},
-- lualine: 底部状态栏
{
"nvim-lualine/lualine.nvim",
event = "BufAdd",
dependencies = { "nvim-tree/nvim-web-devicons" },
opts = {
options = {
component_separators = "|",
section_separators = "",
globalstatus = true,
theme = "tokyonight",
},
sections = {
lualine_a = { "mode" },
lualine_b = { "branch", "diff", "diagnostics" },
lualine_c = { { "filename", path = 1 } },
lualine_x = { "encoding", "fileformat", "filetype" },
lualine_y = { "progress" },
lualine_z = { "location" },
},
},
},
-- noice.nvim: 命令行美化
{
"folke/noice.nvim",
event = "VeryLazy",
opts = {
cmdline = {
view = "cmdline_popup",
format = {
search_down = { icon = "" },
search_up = { icon = "" },
},
},
messages = {
enabled = true,
view = "notify",
view_error = "notify",
view_warn = "notify",
},
popupmenu = { enabled = true, backend = "nui" },
presets = {
bottom_search = false,
command_palette = true,
long_message_to_split = true,
inc_rename = true,
lsp_doc_border = true,
},
-- 禁用 vim.ui.input 的补全,避免 nvim-tree 文件操作时回车误触发补全
input = {
enabled = false,
},
},
dependencies = { "MunifTanjim/nui.nvim", "rcarriga/nvim-notify" },
},
-- nvim-notify: 通知美化
{
"rcarriga/nvim-notify",
event = "BufAdd",
opts = {
timeout = 3000,
max_width = 50,
render = "compact",
stages = "fade",
},
config = function(_, opts)
local notify = require("notify")
notify.setup(opts)
vim.notify = notify
end,
},
-- dressing.nvim: 输入框美化
{
"stevearc/dressing.nvim",
event = "VeryLazy",
opts = {},
},
-- dashboard-nvim: 启动首页
{
"nvimdev/dashboard-nvim",
lazy = false,
dependencies = { "nvim-tree/nvim-web-devicons" },
config = function()
require("dashboard").setup({
theme = "doom",
config = {
header = {
"",
" ███╗ ██╗███████╗ ██████╗ ██╗ ██╗██╗ ██╗██╗███╗ ███╗",
" ████╗ ██║██╔════╝██╔═══██╗██║ ██║██║ ██║██║████╗ ████║",
" ██╔██╗ ██║█████╗ ██║ ██║██║ ██║██║ ██║██║██╔████╔██║",
" ██║╚██╗██║██╔════╝██║ ██║╚██╗ ██╔╝╚██╗ ██╔╝██║██║╚██╔╝██║",
" ██║ ╚████║███████╗╚██████╔╝ ╚████╔╝ ╚████╔╝ ██║██║ ╚═╝ ██║",
" ╚═╝ ╚═══╝╚══════╝ ╚═════╝ ╚═══╝ ╚═══╝ ╚═╝╚═╝ ╚═╝",
"",
},
center = {
{ icon = " ", key = "f", desc = "f 查找文件", action = "Telescope find_files" },
{ icon = " ", key = "r", desc = "r 最近文件", action = "Telescope oldfiles" },
{ icon = " ", key = "g", desc = "g 全局搜索", action = "Telescope live_grep" },
{ icon = " ", key = "l", desc = "l 插件管理", action = "Lazy" },
{ icon = " ", key = "m", desc = "m LSP 管理", action = "Mason" },
{ icon = " ", key = "q", desc = "q 退出", action = "qa" },
},
footer = { " type :help for help · :q to exit" },
vertical_center = true, -- 官方垂直居中选项
},
})
end,
},
-- 通用依赖
{ "nvim-lua/plenary.nvim", lazy = true },
{ "MunifTanjim/nui.nvim", lazy = true },
}
+54 -7
View File
@@ -1,16 +1,63 @@
-- ============================================================================ -- =============================================================================
-- 键位提示 (which-key) -- whichkey.lua — 键位提示
-- ============================================================================ -- =============================================================================
return { return {
{ {
"folke/which-key.nvim", "folke/which-key.nvim",
enabled = false,
event = "VeryLazy", event = "VeryLazy",
opts = { opts = {
delay = 300, preset = "modern",
icons = { breadcrumb = ">", separator = "->", group = "+" }, delay = 200,
spec = { { "z", hidden = true } }, icons = {
breadcrumb = "»",
separator = "",
group = "+",
}, },
win = {
border = "rounded",
padding = { 1, 1 },
wo = { winblend = 0 },
},
plugins = {
spelling = { enabled = true, suggestions = 20 },
presets = {
operators = false,
motions = false,
text_objects = false,
windows = false,
nav = false,
z = true,
g = true,
},
},
},
config = function(_, opts)
local wk = require("which-key")
wk.setup(opts)
-- 键位分组提示
wk.add({
{ "<leader>e", group = "文件树" },
{ "<leader>f", group = "搜索" },
{ "<leader>g", group = "Git" },
{ "<leader>h", group = "Hunk 操作" },
{ "<leader>l", group = "LSP" },
{ "<leader>r", group = "运行/调试" },
{ "<leader>c", group = "CMake/C++" },
{ "<leader>b", group = "标签操作" },
{ "<leader>bc", desc = "关闭标签" },
{ "<leader>bo", desc = "关闭其他标签" },
{ "<leader>d", group = "调试操作" },
{ "<leader>db", desc = "切换断点" },
{ "<leader>du", desc = "调试界面" },
{ "<leader>dd", desc = "行诊断" },
{ "<leader>W", group = "窗口操作" },
{ "<leader>e", group = "文件浏览" },
{ "z", group = "折叠" },
{ "zM", desc = "关闭所有折叠" },
{ "zR", desc = "展开所有折叠" },
})
end,
}, },
} }
+61 -23
View File
@@ -1,7 +1,6 @@
-- ============================================================================ -- =============================================================================
-- 统一构建/运行/调试分发器 -- runner.lua — 统一构建/运行/调试分发器
-- 根据项目类型自动选择正确的工具 -- =============================================================================
-- ============================================================================
local M = {} local M = {}
@@ -19,38 +18,77 @@ function M.detect()
return "unknown" return "unknown"
end end
--- 构建 -- 存储终端实例
local terminals = {}
--- 在底部终端运行命令(保留颜色,复用已有终端)
---@param cmd string 要运行的命令
---@param title string 窗口标题
local function run_in_terminal(cmd, title)
local Terminal = require("toggleterm.terminal").Terminal
-- 检查是否已有同名终端
if terminals[title] and vim.api.nvim_buf_is_valid(terminals[title].bufnr) then
-- 复用已有终端,先关闭再重新打开(会执行新命令)
terminals[title]:close()
terminals[title] = nil
end
-- 创建新终端
local term = Terminal:new({
cmd = cmd,
direction = "horizontal",
close_on_exit = false,
on_open = function(t)
pcall(vim.api.nvim_buf_set_name, t.bufnr, title)
end,
on_exit = function(t, _, exit_code)
vim.schedule(function()
-- 退出终端模式
vim.api.nvim_buf_call(t.bufnr, function()
vim.cmd("stopinsert")
end)
-- 显示结果
if exit_code == 0 then
vim.notify(title .. " 成功", vim.log.levels.INFO)
else
vim.notify(title .. " 失败 (退出码: " .. exit_code .. ")", vim.log.levels.WARN)
end
end)
end,
})
terminals[title] = term
term:toggle()
end
--- 构建(使用底部终端)
function M.build() function M.build()
local project = M.detect() local project = M.detect()
if project == "rust" then if project == "rust" then
vim.cmd("RustLsp runnables") run_in_terminal("cargo build", "Cargo Build")
elseif project == "cmake" then elseif project == "cmake" then
vim.cmd("CMakeBuild") vim.cmd("CMakeBuild")
elseif project == "go" then elseif project == "go" then
local result = vim.fn.system("go build ./...") run_in_terminal("go build ./...", "Go Build")
if vim.v.shell_error == 0 then
vim.notify("go build 成功", vim.log.levels.INFO)
else
vim.notify("go build 失败:\n" .. result, vim.log.levels.ERROR)
end
else else
vim.notify("未识别的项目类型,无法自动构建", vim.log.levels.WARN) vim.notify("未识别的项目类型,无法自动构建", vim.log.levels.WARN)
end end
end end
--- 运行 --- 运行(使用底部终端)
function M.run() function M.run()
local project = M.detect() local project = M.detect()
if project == "rust" then if project == "rust" then
vim.cmd("RustLsp runnables") run_in_terminal("cargo run", "Cargo Run")
elseif project == "cmake" then elseif project == "cmake" then
vim.cmd("CMakeRun") vim.cmd("CMakeRun")
elseif project == "go" then elseif project == "go" then
vim.cmd("terminal go run .") run_in_terminal("go run .", "Go Run")
elseif project == "python" then elseif project == "python" then
vim.cmd("terminal python " .. vim.fn.expand("%")) run_in_terminal("python " .. vim.fn.expand("%"), "Python Run")
else else
vim.notify("未识别的项目类型,无法自动运行", vim.log.levels.WARN) vim.notify("未识别的项目类型,无法自动运行", vim.log.levels.WARN)
end end
@@ -61,31 +99,31 @@ function M.debug()
local project = M.detect() local project = M.detect()
if project == "rust" then if project == "rust" then
vim.cmd("RustLsp debuggables") require("dap").continue()
elseif project == "cmake" then elseif project == "cmake" then
vim.cmd("CMakeDebug") vim.cmd("CMakeDebug")
else else
-- 通用 DAP 启动
require("dap").continue() require("dap").continue()
end end
end end
--- 测试 --- 测试(使用底部终端)
function M.test() function M.test()
local project = M.detect() local project = M.detect()
if project == "rust" then if project == "rust" then
vim.cmd("RustLsp testables") run_in_terminal("cargo test", "Cargo Test")
elseif project == "cmake" then elseif project == "cmake" then
vim.cmd("CMakeBuild") vim.cmd("CMakeBuild")
vim.cmd("terminal ctest --test-dir build") run_in_terminal("ctest --test-dir build", "CTest")
elseif project == "go" then elseif project == "go" then
vim.cmd("terminal go test ./...") run_in_terminal("go test ./...", "Go Test")
elseif project == "python" then elseif project == "python" then
vim.cmd("terminal pytest") run_in_terminal("pytest", "Pytest")
else else
vim.notify("未识别的项目类型,无法自动测试", vim.log.levels.WARN) vim.notify("未识别的项目类型,无法自动测试", vim.log.levels.WARN)
end end
end end
return M return M
Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB