Compare commits
10 Commits
a3c66044ec
...
3a86297508
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3a86297508 | ||
|
|
76f8cdce38 | ||
|
|
9de31ba54e | ||
|
|
1496db1ee6 | ||
|
|
d51d6d6fb1 | ||
|
|
12a978a9ef | ||
|
|
ca216dfe40 | ||
| 4d84e86280 | |||
| f6723d9256 | |||
| 3e83361c0a |
@@ -4,26 +4,50 @@
|
||||
"key": "cmd+=",
|
||||
"command": "-workbench.action.zoomIn"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+=",
|
||||
"command": "-workbench.action.zoomIn"
|
||||
},
|
||||
{
|
||||
"key": "cmd+=",
|
||||
"command": "editor.action.fontZoomIn"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+=",
|
||||
"command": "editor.action.fontZoomIn"
|
||||
},
|
||||
{
|
||||
"key": "cmd+-",
|
||||
"command": "editor.action.fontZoomOut"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+-",
|
||||
"command": "editor.action.fontZoomOut"
|
||||
},
|
||||
{
|
||||
"key": "cmd+-",
|
||||
"command": "-workbench.action.zoomOut"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+-",
|
||||
"command": "-workbench.action.zoomOut"
|
||||
},
|
||||
{
|
||||
"key": "cmd+0",
|
||||
"command": "editor.action.fontZoomReset"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+0",
|
||||
"command": "editor.action.fontZoomReset"
|
||||
},
|
||||
{
|
||||
"key": "cmd+0",
|
||||
"command": "-workbench.action.focusSideBar"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+0",
|
||||
"command": "-workbench.action.focusSideBar"
|
||||
},
|
||||
{
|
||||
"key": "cmd+g",
|
||||
"command": "workbench.action.gotoLine"
|
||||
@@ -32,10 +56,18 @@
|
||||
"key": "ctrl+g",
|
||||
"command": "-workbench.action.gotoLine"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+g",
|
||||
"command": "workbench.action.gotoLine"
|
||||
},
|
||||
{
|
||||
"key": "cmd+shift+a",
|
||||
"command": "editor.action.selectHighlights"
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+a",
|
||||
"command": "editor.action.selectHighlights"
|
||||
},
|
||||
{
|
||||
"key": "F7",
|
||||
"command": "editor.action.format"
|
||||
@@ -51,6 +83,17 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "ctrl+\\",
|
||||
"command": "runCommands",
|
||||
"args": {
|
||||
"commands": [
|
||||
"workbench.action.closeSidebar",
|
||||
"workbench.action.closeAuxiliaryBar",
|
||||
"workbench.action.closePanel",
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "cmd+shift+\\",
|
||||
"command": "runCommands",
|
||||
@@ -64,10 +107,27 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "ctrl+shift+\\",
|
||||
"command": "runCommands",
|
||||
"args": {
|
||||
"commands": [
|
||||
"workbench.action.closeSidebar",
|
||||
"workbench.action.closeAuxiliaryBar",
|
||||
"workbench.action.closePanel",
|
||||
"workbench.action.closeEditorsInOtherGroups",
|
||||
"workbench.action.closeOtherEditors"
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"key": "alt+cmd+backspace",
|
||||
"command": "-editor.action.removeBrackets",
|
||||
},
|
||||
{
|
||||
"key": "alt+ctrl+backspace",
|
||||
"command": "-editor.action.removeBrackets",
|
||||
},
|
||||
{
|
||||
"key": "f6",
|
||||
"command": "editor.action.organizeImports",
|
||||
@@ -84,6 +144,10 @@
|
||||
"key": "shift+cmd+m",
|
||||
"command": "-workbench.actions.view.problems",
|
||||
},
|
||||
{
|
||||
"key": "shift+ctrl+m",
|
||||
"command": "-workbench.actions.view.problems",
|
||||
},
|
||||
{
|
||||
"key": "f3",
|
||||
"command": "workbench.action.toggleLightDarkThemes"
|
||||
@@ -91,5 +155,9 @@
|
||||
{
|
||||
"key": "shift+cmd+/",
|
||||
"command": "claude-vscode.sidebar.open"
|
||||
},
|
||||
{
|
||||
"key": "shift+ctrl+/",
|
||||
"command": "claude-vscode.sidebar.open"
|
||||
}
|
||||
]
|
||||
|
||||
@@ -66,7 +66,6 @@
|
||||
"extensions.autoCheckUpdates": false,
|
||||
"extensions.autoUpdate": false,
|
||||
"update.mode": "manual",
|
||||
"window.density.editorTabHeight": "compact",
|
||||
"C_Cpp.intelliSenseEngine": "disabled",
|
||||
"C_Cpp.clang_format_style": "Visual Studio",
|
||||
"diffEditor.ignoreTrimWhitespace": false,
|
||||
@@ -200,5 +199,9 @@
|
||||
"chat.agent.enabled": false,
|
||||
"chat.disableAIFeatures": true,
|
||||
"workbench.preferredDarkColorTheme": "Visual Studio Dark",
|
||||
"workbench.preferredLightColorTheme": "Visual Studio Light"
|
||||
"workbench.preferredLightColorTheme": "Visual Studio Light",
|
||||
"workbench.colorTheme": "Visual Studio Dark",
|
||||
"clangd.path": "c:\\Users\\mta\\AppData\\Roaming\\Code\\User\\globalStorage\\llvm-vs-code-extensions.vscode-clangd\\install\\21.1.8\\clangd_21.1.8\\bin\\clangd.exe",
|
||||
"window.titleBarStyle": "custom",
|
||||
"window.customMenuBarAltFocus": false
|
||||
}
|
||||
@@ -1,18 +1,16 @@
|
||||
<!-- Customized by Max Amundsen -->
|
||||
<!-- Original: https://github.com/filmgirl/TextMate-Themes/blob/master/happydeluxe.tmTheme -->
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Massimo Custom</string>
|
||||
<string>Bedroom</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#141B2BFF</string>
|
||||
<string>#142b29FF</string>
|
||||
<key>caret</key>
|
||||
<string>#DADEE5FF</string>
|
||||
<key>foreground</key>
|
||||
@@ -22,7 +20,7 @@
|
||||
<key>lineHighlight</key>
|
||||
<string>#00000078</string>
|
||||
<key>selection</key>
|
||||
<string>#15285A</string>
|
||||
<string>#224d49</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
@@ -44,7 +42,7 @@
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#87919DFF</string>
|
||||
<string>#879c9dFF</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
@@ -1,221 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Boron</string>
|
||||
<key>website</key>
|
||||
<string>https://github.com/mjio/boron.tmtheme</string>
|
||||
<key>comment</key>
|
||||
<string>Last update: Feb 25 2013</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#151515</string>
|
||||
<key>caret</key>
|
||||
<string>#b0d0f0</string>
|
||||
<key>foreground</key>
|
||||
<string>#e8e8d3</string>
|
||||
<key>invisibles</key>
|
||||
<string>#e8e8d3</string>
|
||||
<key>selection</key>
|
||||
<string>#404040</string>
|
||||
<key>lineHighlight</key>
|
||||
<string>#010101</string>
|
||||
<key>gutterForeground</key>
|
||||
<string>#373737</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comment</string>
|
||||
<key>scope</key>
|
||||
<string>comment</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#888888</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#99ad6a</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String begin/end</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.definition.string.begin, punctuation.definition.string.end</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#556633</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Symbol</string>
|
||||
<key>scope</key>
|
||||
<string>constant.other</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#7697d6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Regexp</string>
|
||||
<key>scope</key>
|
||||
<string>string.regexp</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#dd0093</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Variable</string>
|
||||
<key>scope</key>
|
||||
<string>variable, support.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#ffb964</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Number</string>
|
||||
<key>scope</key>
|
||||
<string>constant.numeric</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#cf6a4c</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Entity</string>
|
||||
<key>scope</key>
|
||||
<string>entity</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#ffb964</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Entity Function</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#fad07a</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Keyword</string>
|
||||
<key>scope</key>
|
||||
<string>keyword.control</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8fbfdc</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Diff insertion</string>
|
||||
<key>scope</key>
|
||||
<string>diff.inserted, markup.inserted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#558f1f</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Diff deletion</string>
|
||||
<key>scope</key>
|
||||
<string>diff.deleted, markup.deleted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a1000d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Diff header</string>
|
||||
<key>scope</key>
|
||||
<string>meta.diff.header</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#FFFFFF</string>
|
||||
<key>background</key>
|
||||
<string>#4e738a</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Diff range</string>
|
||||
<key>scope</key>
|
||||
<string>meta.diff.range</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
<key>foreground</key>
|
||||
<string>#888888</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Diff changed</string>
|
||||
<key>scope</key>
|
||||
<string>markup.changed</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#967efb</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>4e4cdb00-2fb2-11e2-81c1-0800200c9a66</string>
|
||||
</dict>
|
||||
</plist>
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"bootstrapped": true,
|
||||
"in_process_packages":
|
||||
[
|
||||
],
|
||||
"installed_packages":
|
||||
[
|
||||
"Copy Filepath With Line Numbers",
|
||||
"JaiTools",
|
||||
"Package Control",
|
||||
],
|
||||
}
|
||||
@@ -2,8 +2,8 @@
|
||||
"caret_extra_bottom": 0,
|
||||
"caret_extra_top": 0,
|
||||
"caret_extra_width": 1,
|
||||
"font_size": 16,
|
||||
"color_scheme": "Packages/User/massimo_custom.tmTheme",
|
||||
"font_size": 17,
|
||||
"color_scheme": "Packages/User/Bedroom.tmTheme",
|
||||
"translate_tabs_to_spaces": true,
|
||||
"tab_size": 4,
|
||||
"word_wrap": false,
|
||||
@@ -22,7 +22,7 @@
|
||||
"draw_indent_guides": false,
|
||||
"line_numbers": true,
|
||||
"gutter": false,
|
||||
"block_caret": false,
|
||||
"block_caret": true,
|
||||
"show_definitions": false,
|
||||
"fold_buttons": false,
|
||||
"line_padding_top": -1,
|
||||
|
||||
1922
.config/Sublime Text/Packages/User/Railscasts Extended.tmTheme
Normal file
1922
.config/Sublime Text/Packages/User/Railscasts Extended.tmTheme
Normal file
File diff suppressed because it is too large
Load Diff
687
.config/Sublime Text/Packages/User/freshcut-contrast.tmTheme
Normal file
687
.config/Sublime Text/Packages/User/freshcut-contrast.tmTheme
Normal file
@@ -0,0 +1,687 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<!--
|
||||
======================================================================
|
||||
FreshCut Contrast
|
||||
======================================================================
|
||||
A Sublime Text 2 / Textmate theme.
|
||||
Copyright (c) 2014 Dayle Rees.
|
||||
Released under the MIT License <http://opensource.org/licenses/MIT>
|
||||
======================================================================
|
||||
Find more themes at : https://github.com/daylerees/colour-schemes
|
||||
======================================================================
|
||||
-->
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>FreshCut Contrast</string>
|
||||
<key>settings</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#000000</string>
|
||||
<key>caret</key>
|
||||
<string>#f8f8f0</string>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F2</string>
|
||||
<key>invisibles</key>
|
||||
<string>#3b3a32</string>
|
||||
<key>lineHighlight</key>
|
||||
<string>#151515</string>
|
||||
<key>selection</key>
|
||||
<string>#008097</string>
|
||||
<key>selectionForeground</key>
|
||||
<string>#ffffff</string>
|
||||
<key>findHighlight</key>
|
||||
<string>#ffe792</string>
|
||||
<key>findHighlightForeground</key>
|
||||
<string>#000000</string>
|
||||
<key>selectionBorder</key>
|
||||
<string>#222218</string>
|
||||
<key>activeGuide</key>
|
||||
<string>#9d550fb0</string>
|
||||
|
||||
<key>bracketsForeground</key>
|
||||
<string>#4ECDC4</string>
|
||||
<key>bracketsOptions</key>
|
||||
<string>underline</string>
|
||||
|
||||
<key>bracketContentsForeground</key>
|
||||
<string>#00A8C6</string>
|
||||
<key>bracketContentsOptions</key>
|
||||
<string>underline</string>
|
||||
|
||||
<key>tagsOptions</key>
|
||||
<string>stippled_underline</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Comment</string>
|
||||
<key>scope</key>
|
||||
<string>comment</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#737b84</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>String</string>
|
||||
<key>scope</key>
|
||||
<string>string</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e9ee00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Number</string>
|
||||
<key>scope</key>
|
||||
<string>constant.numeric</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8FBE00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Built-in constant</string>
|
||||
<key>scope</key>
|
||||
<string>constant.language</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>User-defined constant</string>
|
||||
<key>scope</key>
|
||||
<string>constant.character, constant.other</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Variable</string>
|
||||
<key>scope</key>
|
||||
<string>variable</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Keyword</string>
|
||||
<key>scope</key>
|
||||
<string>keyword</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C8D7E8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Storage</string>
|
||||
<key>scope</key>
|
||||
<string>storage</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Storage type</string>
|
||||
<key>scope</key>
|
||||
<string>storage.type</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#4ECDC4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Class name</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>underline</string>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Inherited class</string>
|
||||
<key>scope</key>
|
||||
<string>entity.other.inherited-class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>italic underline</string>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function name</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#AEE239</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function argument</string>
|
||||
<key>scope</key>
|
||||
<string>variable.parameter</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Tag name</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.tag</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#4ECDC4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Tag attribute</string>
|
||||
<key>scope</key>
|
||||
<string>entity.other.attribute-name</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Library function</string>
|
||||
<key>scope</key>
|
||||
<string>support.function</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#4ECDC4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Library constant</string>
|
||||
<key>scope</key>
|
||||
<string>support.constant</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Library class/type</string>
|
||||
<key>scope</key>
|
||||
<string>support.type, support.class</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Library variable</string>
|
||||
<key>scope</key>
|
||||
<string>support.other.variable</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Invalid</string>
|
||||
<key>scope</key>
|
||||
<string>invalid</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#00a8c6</string>
|
||||
<key>fontStyle</key>
|
||||
<string></string>
|
||||
<key>foreground</key>
|
||||
<string>#f8f8f0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Invalid deprecated</string>
|
||||
<key>scope</key>
|
||||
<string>invalid.deprecated</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>background</key>
|
||||
<string>#00a8c6</string>
|
||||
<key>foreground</key>
|
||||
<string>#f8f8f0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>JSON String</string>
|
||||
<key>scope</key>
|
||||
<string>meta.structure.dictionary.json string.quoted.double.json</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e9ee00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.header</string>
|
||||
<key>scope</key>
|
||||
<string>meta.diff, meta.diff.header</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#75715E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.deleted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.deleted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.inserted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.inserted</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#A6E22E</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>diff.changed</string>
|
||||
<key>scope</key>
|
||||
<string>markup.changed</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#E6DB74</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>constant.numeric.line-number.find-in-files - match</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8FBE00A0</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>entity.name.filename.find-in-files</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#E6DB74</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>keyword.other</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#939da8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>meta.property-value, support.constant.property-value, constant.other.color</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e9ee00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>meta.structure.dictionary.json string.quoted.double.json</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>scope</key>
|
||||
<string>meta.structure.dictionary.value.json string.quoted.double.json</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e9ee00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function argument</string>
|
||||
<key>scope</key>
|
||||
<string>meta.property-name support.type.property-name</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>normal</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function argument</string>
|
||||
<key>scope</key>
|
||||
<string>meta.property-value punctuation.separator.key-value</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F2</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function argument</string>
|
||||
<key>scope</key>
|
||||
<string>keyword.other.use, keyword.other.function.use, keyword.other.namespace, keyword.other.new, keyword.other.special-method, keyword.other.unit, keyword.other.use-as</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4ECDC4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function argument</string>
|
||||
<key>scope</key>
|
||||
<string>meta.use support.class.builtin, meta.other.inherited-class support.class.builtin</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#F8F8F2</string>
|
||||
<key>fontStyle</key>
|
||||
<string>normal</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Function argument</string>
|
||||
<key>scope</key>
|
||||
<string>variable.other</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string></string>
|
||||
<key>fontStyle</key>
|
||||
<string>normal</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Coffeescript Function argument</string>
|
||||
<key>scope</key>
|
||||
<string>variable.parameter.function.coffee</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#8FBE00</string>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<!-- Markdown support. -->
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown Titles</string>
|
||||
<key>scope</key>
|
||||
<string>entity.name.section.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#00A8C6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown Title Hash</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.definition.heading.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C8D7E8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown Raw</string>
|
||||
<key>scope</key>
|
||||
<string>markup.raw.inline.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e9ee00</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown bold stars</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.definition.bold.markdown, punctuation.definition.italic.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C8D7E8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown link title braces</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.definition.string.begin.markdown, punctuation.definition.string.end.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C8D7E8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown link braces</string>
|
||||
<key>scope</key>
|
||||
<string>punctuation.definition.metadata.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#C8D7E8</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown link</string>
|
||||
<key>scope</key>
|
||||
<string>markup.underline.link.markdown, markup.underline.link.image.markdown, meta.image.inline.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4ECDC4</string>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown bold/italic</string>
|
||||
<key>scope</key>
|
||||
<string>markup.bold.markdown, markup.italic.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#4ECDC4</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown bold/italic</string>
|
||||
<key>scope</key>
|
||||
<string>markup.italic.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>italic</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown bold/italic</string>
|
||||
<key>scope</key>
|
||||
<string>markup.bold.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>fontStyle</key>
|
||||
<string>bold</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>Markdown pre</string>
|
||||
<key>scope</key>
|
||||
<string>markup.raw.block.markdown</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#00a8c6</string>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>GitGutter deleted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.deleted.git_gutter</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#e61f44</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>GitGutter inserted</string>
|
||||
<key>scope</key>
|
||||
<string>markup.inserted.git_gutter</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#a7da1e</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>GitGutter changed</string>
|
||||
<key>scope</key>
|
||||
<string>markup.changed.git_gutter</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#f7b83d</string>
|
||||
</dict>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>name</key>
|
||||
<string>CSS Class</string>
|
||||
<key>scope</key>
|
||||
<string>entity.other.attribute-name.class.css</string>
|
||||
<key>settings</key>
|
||||
<dict>
|
||||
<key>foreground</key>
|
||||
<string>#AEE239</string>
|
||||
</dict>
|
||||
</dict>
|
||||
</array>
|
||||
<key>uuid</key>
|
||||
<string>8c4bd735-02f4-0f06-bc2d-2c8e31f71f55</string>
|
||||
</dict>
|
||||
</plist>
|
||||
5
.config/dlv/config.yml
Normal file
5
.config/dlv/config.yml
Normal file
@@ -0,0 +1,5 @@
|
||||
# Delve debugger configuration
|
||||
# https://github.com/go-delve/delve/blob/master/Documentation/cli/README.md
|
||||
|
||||
# Maximum string length to display (default: 64)
|
||||
max-string-len: 1000
|
||||
@@ -402,7 +402,7 @@ Shift-Cmd-F8 go_to_previous_build_error_in_side_pane
|
||||
|
||||
[[style]]
|
||||
|
||||
theme: basic-light
|
||||
theme: bedroom
|
||||
|
||||
[fonts]
|
||||
font: default
|
||||
|
||||
@@ -1,41 +1,41 @@
|
||||
[25] # Version number. Do not delete.
|
||||
|
||||
[colors]
|
||||
background0: 141B2BFF
|
||||
background1: 141B2BFF
|
||||
background2: 141B2BFF
|
||||
background3: 141B2BFF
|
||||
background4: 2B344AFF
|
||||
background0: 142B29FF
|
||||
background1: 142b29FF
|
||||
background2: 142b29FF
|
||||
background3: 142B29FF
|
||||
background4: 112523FF
|
||||
|
||||
# NOTE: region_scope colors only work for Jai at the moment
|
||||
region_scope_export: 141B2BFF
|
||||
region_scope_file: 1F2638FF
|
||||
region_scope_module: 111621FF
|
||||
region_scope_export: 142B29FF
|
||||
region_scope_file: 142B29FF
|
||||
region_scope_module: 142B29FF
|
||||
|
||||
region_header: 1F2638FF
|
||||
region_success: 226022FF
|
||||
region_warning: 986032FF
|
||||
region_error: 772222FF
|
||||
region_heredoc: 000000FF
|
||||
region_heredoc: 142B29FF
|
||||
|
||||
selection_active: 354770FF
|
||||
selection_inactive: 263351FF
|
||||
selection_active: 224D49FF
|
||||
selection_inactive: 222222FF
|
||||
selection_highlight: FCEDFC26
|
||||
search_result_active: 8E772EFF
|
||||
search_result_inactive: FCEDFC83
|
||||
scrollbar: 141B2BFF
|
||||
scrollbar_hover: 3C4964FF
|
||||
scrollbar_background: 2B344AFF
|
||||
cursor: 9AD3EAFF
|
||||
cursor_inactive: 87919DFF
|
||||
scrollbar: 142b29FF
|
||||
scrollbar_hover: 0F201FFF
|
||||
scrollbar_background: 112523FF
|
||||
cursor: DADEE5FF
|
||||
cursor_inactive: 879C9DFF
|
||||
paste_animation: 1C4449FF
|
||||
splitter: 141B2BFF
|
||||
splitter: 142B29FF
|
||||
splitter_hover: 1F2638FF
|
||||
ruler: FCEDFC26
|
||||
indent_guide: FCEDFC26
|
||||
letter_highlight: 85B8DEFF
|
||||
list_cursor_lite: 3C496488
|
||||
list_cursor: 3C4964FF
|
||||
list_cursor_lite: 0F201FFF
|
||||
list_cursor: 0F201FFF
|
||||
shadow_dark: 0E161C7F
|
||||
shadow_transparent: 0E161C00
|
||||
text_input_label: 3B4450FF
|
||||
@@ -43,7 +43,7 @@ char_under_cursor: 000000FF
|
||||
bracket_highlight: E8FCFE30
|
||||
|
||||
ui_default: DADEE5FF
|
||||
ui_dim: 87919DFF
|
||||
ui_dim: 879c9dFF
|
||||
ui_neutral: 4C4C4CFF
|
||||
ui_warning: F8AD34FF
|
||||
ui_warning_dim: 986032FF
|
||||
@@ -51,11 +51,11 @@ ui_error: 772222FF
|
||||
ui_error_bright: FF0000FF
|
||||
ui_success: 227722FF
|
||||
|
||||
build_panel_background: 000000FF
|
||||
build_panel_background: 142B29FF
|
||||
build_panel_scrollbar: 33CCCC19
|
||||
build_panel_scrollbar_hover: 3C4964FF
|
||||
build_panel_scrollbar_background: 2B344AFF
|
||||
build_panel_title_bar: 2B344AFF
|
||||
build_panel_scrollbar_hover: 0F201FFF
|
||||
build_panel_scrollbar_background: 112523FF
|
||||
build_panel_title_bar: 112523FF
|
||||
|
||||
code_default: DADEE5FF
|
||||
code_invalid: FF0000FF
|
||||
@@ -73,8 +73,8 @@ code_error: FF0000FF
|
||||
code_warning: E4D97DFF
|
||||
code_highlight: F9DD03FF
|
||||
|
||||
code_comment: 87919DFF
|
||||
code_multiline_comment: 87919DFF
|
||||
code_comment: 879c9dFF
|
||||
code_multiline_comment: 879c9dFF
|
||||
|
||||
code_operation: DADEE5FF
|
||||
code_punctuation: DADEE5FF
|
||||
@@ -103,7 +103,7 @@ code_header5: E0AD82FF
|
||||
code_header6: E0AD82FF
|
||||
|
||||
# Added after migration to version [18]
|
||||
active_pane_border: 2B344AFF
|
||||
active_pane_border: 1A9087FF
|
||||
inactive_pane_dim_overlay: 050505FF
|
||||
|
||||
# Added after migration to version [22]
|
||||
@@ -111,8 +111,8 @@ code_comment_highlight1: F9DD03FF
|
||||
code_comment_highlight2: FF0000FF
|
||||
code_comment_highlight3: C47616FF
|
||||
code_comment_highlight4: BBABC3FF
|
||||
cursor_line_highlight: 2B344AFF
|
||||
color_preview_title_bar: 2B344AFF
|
||||
cursor_line_highlight: 112523FF
|
||||
color_preview_title_bar: 112523FF
|
||||
code_addition: 33B333FF
|
||||
code_deletion: E64D4DFF
|
||||
region_addition: 2260224C
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
"theme": {
|
||||
"mode": "dark",
|
||||
"light": "One Light",
|
||||
"dark": "Bedroom"
|
||||
"dark": "One Dark"
|
||||
},
|
||||
|
||||
"indent_guides": {
|
||||
|
||||
@@ -10,9 +10,9 @@
|
||||
(normal-top-level-add-subdirs-to-load-path))
|
||||
|
||||
;; Core libraries
|
||||
(require 's)
|
||||
(require 'dash)
|
||||
(require 'popup)
|
||||
(require 's)
|
||||
|
||||
;; Completion framework
|
||||
(require 'vertico)
|
||||
@@ -35,9 +35,6 @@
|
||||
(require 'dumb-jump)
|
||||
(require 'eglot)
|
||||
|
||||
;; Search
|
||||
(require 'xah-find)
|
||||
|
||||
;; Git
|
||||
(require 'simple-git)
|
||||
|
||||
@@ -78,11 +75,14 @@
|
||||
;;; ============================================================================
|
||||
|
||||
;; dumb-jump as fallback for xref when LSP is not available
|
||||
(setq dumb-jump-force-searcher 'grep)
|
||||
(setq dumb-jump-force-searcher 'rg)
|
||||
(setq dumb-jump-selector 'completing-read)
|
||||
(setq xref-show-definitions-function #'xref-show-definitions-completing-read)
|
||||
(add-hook 'xref-backend-functions #'dumb-jump-xref-activate 100)
|
||||
|
||||
;; Use ripgrep for project-find-regexp (C-S-f) - much faster than grep
|
||||
(setq xref-search-program 'ripgrep)
|
||||
|
||||
;;; ============================================================================
|
||||
;;; EGLOT (LSP) CONFIGURATION
|
||||
;;; ============================================================================
|
||||
@@ -442,6 +442,38 @@ If any panel is visible, close all. If none visible, open all."
|
||||
(when matching-buffers
|
||||
(my-display-in-bottom-panel (car matching-buffers) '((window-height . 0.25)))))))))
|
||||
|
||||
;;; ============================================================================
|
||||
;;; RIGHT PANEL / OPENCODE AI PANEL
|
||||
;;; ============================================================================
|
||||
|
||||
(defvar my-right-panel-buffer "*simple-opencode*"
|
||||
"Buffer name for the right panel.")
|
||||
|
||||
(defun my-get-right-panel-window ()
|
||||
"Get existing right panel window if any."
|
||||
(seq-find (lambda (w)
|
||||
(and (window-at-side-p w 'right)
|
||||
(string= (buffer-name (window-buffer w)) my-right-panel-buffer)))
|
||||
(window-list)))
|
||||
|
||||
(defun my-display-in-right-panel (buffer alist)
|
||||
"Display BUFFER in right side panel. ALIST is passed by display-buffer."
|
||||
(let ((window (my-get-right-panel-window)))
|
||||
(if window
|
||||
(progn
|
||||
(set-window-buffer window buffer)
|
||||
window)
|
||||
(let ((new-window (display-buffer-in-side-window
|
||||
buffer
|
||||
'((side . right)
|
||||
(slot . 0)
|
||||
(window-width . 0.28)
|
||||
(window-parameters . ((no-delete-other-windows . t)
|
||||
(no-other-window . nil)))))))
|
||||
;; Preserve window on delete-other-windows
|
||||
(set-window-parameter new-window 'no-delete-other-windows t)
|
||||
new-window))))
|
||||
|
||||
;;; ============================================================================
|
||||
;;; BACKUP & AUTOSAVE SETTINGS
|
||||
;;; ============================================================================
|
||||
@@ -552,7 +584,7 @@ If any panel is visible, close all. If none visible, open all."
|
||||
(global-set-key (kbd "<end>") 'move-end-of-line)
|
||||
(global-set-key (kbd "M-p") 'backward-paragraph)
|
||||
(global-set-key (kbd "M-n") 'forward-paragraph)
|
||||
(global-set-key (kbd "C-S-g") 'goto-line)
|
||||
(global-set-key (kbd "<f8>") 'goto-line)
|
||||
(when (eq system-type 'darwin)
|
||||
(global-set-key (kbd "C-<left>") 'my-smart-home)
|
||||
(global-set-key (kbd "C-<right>") 'move-end-of-line))
|
||||
@@ -642,6 +674,11 @@ If any panel is visible, close all. If none visible, open all."
|
||||
;; --- Git ---
|
||||
(global-set-key (kbd "<f7>") 'simple-git-status)
|
||||
(global-set-key (kbd "C-<f7>") 'simple-git-file-history)
|
||||
(global-set-key (kbd "C-S-<f7>") 'simple-git-line-blame)
|
||||
|
||||
;; --- OpenCode AI ---
|
||||
(global-set-key (kbd "C-?") 'my-opencode-panel-toggle)
|
||||
(global-set-key (kbd "C-S-/") 'my-opencode-panel-toggle) ; Alternative binding
|
||||
|
||||
;; --- Misc ---
|
||||
(global-set-key (kbd "C-e") 'my-select-inside-parens)
|
||||
@@ -1440,7 +1477,7 @@ Use in `isearch-mode-end-hook'."
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
;; Your init file should contain only one such instance.
|
||||
;; If there is more than one, they won't work right.
|
||||
'(my-current-theme 'valigo)
|
||||
'(my-current-theme 'bedroom)
|
||||
'(safe-local-variable-directories '("/Users/mta/projects/cdrateline.com_2.0/")))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
|
||||
@@ -86,6 +86,28 @@
|
||||
"Return non-nil if current directory is in a Git repository."
|
||||
(simple-git--root))
|
||||
|
||||
;;; ============================================================================
|
||||
;;; Mouse Support
|
||||
;;; ============================================================================
|
||||
|
||||
(defface simple-git-highlight-face
|
||||
'((t :inherit highlight))
|
||||
"Face for mouse hover on clickable items.")
|
||||
|
||||
(defun simple-git-mouse-action (event)
|
||||
"Perform default action at mouse click EVENT."
|
||||
(interactive "e")
|
||||
(mouse-set-point event)
|
||||
(let ((cmd (lookup-key (current-local-map) (kbd "RET"))))
|
||||
(when cmd
|
||||
(call-interactively cmd))))
|
||||
|
||||
(defun simple-git-mouse-visit-file (event)
|
||||
"Visit file at mouse click EVENT."
|
||||
(interactive "e")
|
||||
(mouse-set-point event)
|
||||
(simple-git-visit-file))
|
||||
|
||||
;;; ============================================================================
|
||||
;;; Status Mode
|
||||
;;; ============================================================================
|
||||
@@ -102,14 +124,16 @@
|
||||
(define-key map (kbd "P") #'simple-git-push)
|
||||
(define-key map (kbd "F") #'simple-git-pull)
|
||||
(define-key map (kbd "b") #'simple-git-switch-branch)
|
||||
(define-key map (kbd "B") #'simple-git-branch-graph)
|
||||
(define-key map (kbd "G") #'simple-git-branch-graph)
|
||||
(define-key map (kbd "l") #'simple-git-log)
|
||||
(define-key map (kbd "d") #'simple-git-diff-file)
|
||||
(define-key map (kbd "v") #'simple-git-visit-file)
|
||||
(define-key map (kbd "m") #'simple-git-merge)
|
||||
(define-key map (kbd "q") #'quit-window)
|
||||
(define-key map (kbd "RET") #'simple-git-visit-file)
|
||||
(define-key map (kbd "RET") #'simple-git-diff-file)
|
||||
(define-key map (kbd "n") #'next-line)
|
||||
(define-key map (kbd "p") #'previous-line)
|
||||
(define-key map [mouse-1] #'simple-git-mouse-action)
|
||||
(define-key map [C-mouse-1] #'simple-git-mouse-visit-file)
|
||||
map)
|
||||
"Keymap for `simple-git-status-mode'.")
|
||||
|
||||
@@ -189,6 +213,8 @@
|
||||
"\n\n")
|
||||
;; Help
|
||||
(insert "Commands: ")
|
||||
(insert (propertize "RET" 'face 'font-lock-keyword-face) " diff ")
|
||||
(insert (propertize "v" 'face 'font-lock-keyword-face) "iew file ")
|
||||
(insert (propertize "s" 'face 'font-lock-keyword-face) "tage ")
|
||||
(insert (propertize "u" 'face 'font-lock-keyword-face) "nstage ")
|
||||
(insert (propertize "S" 'face 'font-lock-keyword-face) "tage-all ")
|
||||
@@ -197,9 +223,8 @@
|
||||
(insert (propertize "P" 'face 'font-lock-keyword-face) "ush ")
|
||||
(insert (propertize "F" 'face 'font-lock-keyword-face) "etch/pull ")
|
||||
(insert (propertize "b" 'face 'font-lock-keyword-face) "ranch ")
|
||||
(insert (propertize "B" 'face 'font-lock-keyword-face) "ranch-graph ")
|
||||
(insert (propertize "G" 'face 'font-lock-keyword-face) "raph ")
|
||||
(insert (propertize "l" 'face 'font-lock-keyword-face) "og ")
|
||||
(insert (propertize "d" 'face 'font-lock-keyword-face) "iff ")
|
||||
(insert (propertize "m" 'face 'font-lock-keyword-face) "erge ")
|
||||
(insert (propertize "r" 'face 'font-lock-keyword-face) "evert ")
|
||||
(insert (propertize "g" 'face 'font-lock-keyword-face) " refresh ")
|
||||
@@ -216,8 +241,9 @@
|
||||
'face 'simple-git-staged-face)
|
||||
(propertize (car item) 'face 'simple-git-staged-face)
|
||||
"\n")
|
||||
(put-text-property line-start (point) 'simple-git-file (car item))
|
||||
(put-text-property line-start (point) 'simple-git-staged t)))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-file (car item))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-staged t)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))
|
||||
(insert " (none)\n")))
|
||||
(insert "\n")
|
||||
;; Unstaged files
|
||||
@@ -231,9 +257,10 @@
|
||||
'face 'simple-git-unstaged-face)
|
||||
(propertize (car item) 'face 'simple-git-unstaged-face)
|
||||
"\n")
|
||||
(put-text-property line-start (point) 'simple-git-file (car item))
|
||||
(put-text-property line-start (point) 'simple-git-staged nil)
|
||||
(put-text-property line-start (point) 'simple-git-unstaged t)))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-file (car item))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-staged nil)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-unstaged t)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))
|
||||
(insert " (none)\n")))
|
||||
(insert "\n")
|
||||
;; Untracked files
|
||||
@@ -245,8 +272,9 @@
|
||||
(let ((line-start (point)))
|
||||
(insert " " (propertize file 'face 'simple-git-untracked-face)
|
||||
"\n")
|
||||
(put-text-property line-start (point) 'simple-git-file file)
|
||||
(put-text-property line-start (point) 'simple-git-untracked t)))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-file file)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-untracked t)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))
|
||||
(insert " (none)\n")))
|
||||
(goto-char (min pos (point-max))))))
|
||||
|
||||
@@ -501,9 +529,12 @@
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "RET") #'simple-git-log-show-commit)
|
||||
(define-key map (kbd "q") #'quit-window)
|
||||
(define-key map (kbd "n") #'next-line)
|
||||
(define-key map (kbd "p") #'previous-line)
|
||||
(define-key map (kbd "g") #'simple-git-log-refresh)
|
||||
(define-key map (kbd "n") #'simple-git-log-next-page)
|
||||
(define-key map (kbd "p") #'simple-git-log-prev-page)
|
||||
(define-key map (kbd "N") #'simple-git-log-last-page)
|
||||
(define-key map (kbd "P") #'simple-git-log-first-page)
|
||||
(define-key map [mouse-1] #'simple-git-mouse-action)
|
||||
map)
|
||||
"Keymap for `simple-git-log-mode'.")
|
||||
|
||||
@@ -513,7 +544,17 @@
|
||||
(setq truncate-lines t))
|
||||
|
||||
(defvar simple-git-log-count 50
|
||||
"Number of commits to show in log.")
|
||||
"Number of commits to show per page in log.")
|
||||
|
||||
(defvar-local simple-git--log-page 0
|
||||
"Current page number in log view.")
|
||||
|
||||
(defvar-local simple-git--log-total-commits nil
|
||||
"Total number of commits in log.")
|
||||
|
||||
(defun simple-git--get-total-commits ()
|
||||
"Get total number of commits in repository."
|
||||
(string-to-number (string-trim (simple-git--run "rev-list" "--count" "HEAD"))))
|
||||
|
||||
(defun simple-git-log-refresh ()
|
||||
"Refresh the log buffer."
|
||||
@@ -521,35 +562,80 @@
|
||||
(when (eq major-mode 'simple-git-log-mode)
|
||||
(let ((inhibit-read-only t)
|
||||
(pos (point))
|
||||
(default-directory (simple-git--root)))
|
||||
(erase-buffer)
|
||||
(insert (propertize "Commit History" 'face 'simple-git-header-face) "\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show commit "
|
||||
(propertize "g" 'face 'font-lock-keyword-face) " refresh "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
(let ((output (simple-git--run "log"
|
||||
(format "-n%d" simple-git-log-count)
|
||||
"--pretty=format:%h|%an|%ar|%s")))
|
||||
(dolist (line (split-string output "\n" t))
|
||||
(let* ((parts (split-string line "|"))
|
||||
(hash (nth 0 parts))
|
||||
(author (nth 1 parts))
|
||||
(date (nth 2 parts))
|
||||
(subject (nth 3 parts)))
|
||||
(insert (propertize hash 'face 'simple-git-commit-hash-face
|
||||
'simple-git-commit hash)
|
||||
" "
|
||||
(propertize (format "%-20s" (truncate-string-to-width (or author "") 20))
|
||||
'face 'simple-git-commit-author-face)
|
||||
" "
|
||||
(propertize (format "%-15s" (truncate-string-to-width (or date "") 15))
|
||||
'face 'simple-git-commit-date-face)
|
||||
" "
|
||||
(or subject "")
|
||||
"\n"))))
|
||||
(default-directory (simple-git--root))
|
||||
(skip (* simple-git--log-page simple-git-log-count)))
|
||||
;; Get total commits if not cached
|
||||
(unless simple-git--log-total-commits
|
||||
(setq simple-git--log-total-commits (simple-git--get-total-commits)))
|
||||
(let ((max-page (max 0 (1- (ceiling (/ (float simple-git--log-total-commits) simple-git-log-count))))))
|
||||
;; Cap page number
|
||||
(when (> simple-git--log-page max-page)
|
||||
(setq simple-git--log-page max-page)
|
||||
(setq skip (* simple-git--log-page simple-git-log-count)))
|
||||
(erase-buffer)
|
||||
(insert (propertize "Commit History" 'face 'simple-git-header-face)
|
||||
(format " (page %d/%d)" (1+ simple-git--log-page) (1+ max-page))
|
||||
"\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show commit "
|
||||
(propertize "n" 'face 'font-lock-keyword-face) "ext page "
|
||||
(propertize "p" 'face 'font-lock-keyword-face) "rev page "
|
||||
(propertize "N" 'face 'font-lock-keyword-face) " last "
|
||||
(propertize "P" 'face 'font-lock-keyword-face) " first "
|
||||
(propertize "g" 'face 'font-lock-keyword-face) " refresh "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
(let ((output (simple-git--run "log"
|
||||
(format "--skip=%d" skip)
|
||||
(format "-n%d" simple-git-log-count)
|
||||
"--pretty=format:%h|%an|%ar|%s")))
|
||||
(dolist (line (split-string output "\n" t))
|
||||
(let* ((parts (split-string line "|"))
|
||||
(hash (nth 0 parts))
|
||||
(author (nth 1 parts))
|
||||
(date (nth 2 parts))
|
||||
(subject (nth 3 parts))
|
||||
(line-start (point)))
|
||||
(insert (propertize hash 'face 'simple-git-commit-hash-face
|
||||
'simple-git-commit hash)
|
||||
" "
|
||||
(propertize (format "%-20s" (truncate-string-to-width (or author "") 20))
|
||||
'face 'simple-git-commit-author-face)
|
||||
" "
|
||||
(propertize (format "%-15s" (truncate-string-to-width (or date "") 15))
|
||||
'face 'simple-git-commit-date-face)
|
||||
" "
|
||||
(or subject "")
|
||||
"\n")
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))))
|
||||
(goto-char (min pos (point-max))))))
|
||||
|
||||
(defun simple-git-log-next-page ()
|
||||
"Go to next page of log."
|
||||
(interactive)
|
||||
(setq simple-git--log-page (1+ simple-git--log-page))
|
||||
(simple-git-log-refresh))
|
||||
|
||||
(defun simple-git-log-prev-page ()
|
||||
"Go to previous page of log."
|
||||
(interactive)
|
||||
(when (> simple-git--log-page 0)
|
||||
(setq simple-git--log-page (1- simple-git--log-page))
|
||||
(simple-git-log-refresh)))
|
||||
|
||||
(defun simple-git-log-first-page ()
|
||||
"Go to first page of log."
|
||||
(interactive)
|
||||
(setq simple-git--log-page 0)
|
||||
(simple-git-log-refresh))
|
||||
|
||||
(defun simple-git-log-last-page ()
|
||||
"Go to last page of log."
|
||||
(interactive)
|
||||
(unless simple-git--log-total-commits
|
||||
(setq simple-git--log-total-commits (simple-git--get-total-commits)))
|
||||
(setq simple-git--log-page (max 0 (1- (ceiling (/ (float simple-git--log-total-commits) simple-git-log-count)))))
|
||||
(simple-git-log-refresh))
|
||||
|
||||
(defun simple-git--commit-at-point ()
|
||||
"Get the commit hash at point."
|
||||
(get-text-property (line-beginning-position) 'simple-git-commit))
|
||||
@@ -565,6 +651,7 @@
|
||||
(define-key map (kbd "q") #'quit-window)
|
||||
(define-key map (kbd "n") #'next-line)
|
||||
(define-key map (kbd "p") #'previous-line)
|
||||
(define-key map [mouse-1] #'simple-git-mouse-action)
|
||||
map)
|
||||
"Keymap for `simple-git-commit-detail-mode'.")
|
||||
|
||||
@@ -623,8 +710,9 @@
|
||||
("D" 'simple-git-unstaged-face)
|
||||
(_ 'simple-git-untracked-face)))
|
||||
file "\n")
|
||||
(put-text-property line-start (point) 'simple-git-commit-file file)
|
||||
(put-text-property line-start (point) 'simple-git-commit-hash hash))))))))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-file file)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-hash hash)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))))))))
|
||||
(simple-git-commit-detail-mode)
|
||||
(goto-char (point-min)))
|
||||
(display-buffer buf))))
|
||||
@@ -728,10 +816,13 @@
|
||||
(define-key map (kbd "RET") #'simple-git-file-history-show-diff)
|
||||
(define-key map (kbd "v") #'simple-git-file-history-view-file)
|
||||
(define-key map (kbd "c") #'simple-git-file-history-show-commit)
|
||||
(define-key map (kbd "n") #'simple-git-file-history-next-page)
|
||||
(define-key map (kbd "p") #'simple-git-file-history-prev-page)
|
||||
(define-key map (kbd "N") #'simple-git-file-history-last-page)
|
||||
(define-key map (kbd "P") #'simple-git-file-history-first-page)
|
||||
(define-key map (kbd "q") #'quit-window)
|
||||
(define-key map (kbd "n") #'next-line)
|
||||
(define-key map (kbd "p") #'previous-line)
|
||||
(define-key map (kbd "g") #'simple-git-file-history-refresh)
|
||||
(define-key map [mouse-1] #'simple-git-mouse-action)
|
||||
map)
|
||||
"Keymap for `simple-git-file-history-mode'.")
|
||||
|
||||
@@ -746,6 +837,16 @@
|
||||
(defvar-local simple-git--file-history-root nil
|
||||
"The git root for file history mode.")
|
||||
|
||||
(defvar-local simple-git--file-history-page 0
|
||||
"Current page number in file history view.")
|
||||
|
||||
(defvar-local simple-git--file-history-total-commits nil
|
||||
"Total number of commits for file.")
|
||||
|
||||
(defun simple-git--get-file-total-commits (file)
|
||||
"Get total number of commits for FILE."
|
||||
(string-to-number (string-trim (simple-git--run "rev-list" "--count" "--follow" "HEAD" "--" file))))
|
||||
|
||||
(defun simple-git-file-history-refresh ()
|
||||
"Refresh the file history buffer."
|
||||
(interactive)
|
||||
@@ -753,23 +854,40 @@
|
||||
(let ((inhibit-read-only t)
|
||||
(pos (point))
|
||||
(file simple-git--file-history-file)
|
||||
(root simple-git--file-history-root))
|
||||
(erase-buffer)
|
||||
(insert (propertize "File History" 'face 'simple-git-header-face) "\n")
|
||||
(insert (propertize "File: " 'face 'simple-git-header-face)
|
||||
file "\n\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show diff "
|
||||
(propertize "v" 'face 'font-lock-keyword-face) "iew file at this point "
|
||||
(propertize "c" 'face 'font-lock-keyword-face) "ommit view "
|
||||
(propertize "g" 'face 'font-lock-keyword-face) " refresh "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
;; Get log with file names to track renames
|
||||
(let* ((default-directory root)
|
||||
(output (simple-git--run "log" "--follow" "--name-status"
|
||||
(format "-n%d" simple-git-log-count)
|
||||
"--pretty=format:%h|%an|%ar|%s"
|
||||
"--" file))
|
||||
(root simple-git--file-history-root)
|
||||
(skip (* simple-git--file-history-page simple-git-log-count)))
|
||||
;; Get total commits if not cached
|
||||
(let ((default-directory root))
|
||||
(unless simple-git--file-history-total-commits
|
||||
(setq simple-git--file-history-total-commits (simple-git--get-file-total-commits file))))
|
||||
(let ((max-page (max 0 (1- (ceiling (/ (float simple-git--file-history-total-commits) simple-git-log-count))))))
|
||||
;; Cap page number
|
||||
(when (> simple-git--file-history-page max-page)
|
||||
(setq simple-git--file-history-page max-page)
|
||||
(setq skip (* simple-git--file-history-page simple-git-log-count)))
|
||||
(erase-buffer)
|
||||
(insert (propertize "File History" 'face 'simple-git-header-face)
|
||||
(format " (page %d/%d)" (1+ simple-git--file-history-page) (1+ max-page))
|
||||
"\n")
|
||||
(insert (propertize "File: " 'face 'simple-git-header-face)
|
||||
file "\n\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show diff "
|
||||
(propertize "v" 'face 'font-lock-keyword-face) "iew file at this point "
|
||||
(propertize "c" 'face 'font-lock-keyword-face) "ommit view "
|
||||
(propertize "n" 'face 'font-lock-keyword-face) "ext page "
|
||||
(propertize "p" 'face 'font-lock-keyword-face) "rev page "
|
||||
(propertize "N" 'face 'font-lock-keyword-face) " last "
|
||||
(propertize "P" 'face 'font-lock-keyword-face) " first "
|
||||
(propertize "g" 'face 'font-lock-keyword-face) " refresh "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
;; Get log with file names to track renames
|
||||
(let* ((default-directory root)
|
||||
(output (simple-git--run "log" "--follow" "--name-status"
|
||||
(format "--skip=%d" skip)
|
||||
(format "-n%d" simple-git-log-count)
|
||||
"--pretty=format:%h|%an|%ar|%s"
|
||||
"--" file))
|
||||
(lines (split-string output "\n"))
|
||||
(current-file file))
|
||||
;; Parse output - each commit has format line, then blank, then file status
|
||||
@@ -807,9 +925,10 @@
|
||||
" "
|
||||
(or subject "")
|
||||
"\n")
|
||||
(put-text-property line-start (point) 'simple-git-commit-hash hash)
|
||||
(put-text-property line-start (point) 'simple-git-commit-file file-at-commit)))))
|
||||
(setq i (1+ i)))))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-hash hash)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-file file-at-commit)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))))
|
||||
(setq i (1+ i))))))
|
||||
(goto-char (min pos (point-max))))))
|
||||
|
||||
(defun simple-git-file-history-show-diff ()
|
||||
@@ -911,14 +1030,45 @@
|
||||
("D" 'simple-git-unstaged-face)
|
||||
(_ 'simple-git-untracked-face)))
|
||||
file "\n")
|
||||
(put-text-property line-start (point) 'simple-git-commit-file file)
|
||||
(put-text-property line-start (point) 'simple-git-commit-hash hash)))))))))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-file file)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-hash hash)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))))))))
|
||||
(with-current-buffer buf
|
||||
(simple-git-commit-detail-mode)
|
||||
(goto-char (point-min)))
|
||||
(display-buffer buf))
|
||||
(message "No commit at point"))))
|
||||
|
||||
(defun simple-git-file-history-next-page ()
|
||||
"Go to next page of file history."
|
||||
(interactive)
|
||||
(setq simple-git--file-history-page (1+ simple-git--file-history-page))
|
||||
(simple-git-file-history-refresh))
|
||||
|
||||
(defun simple-git-file-history-prev-page ()
|
||||
"Go to previous page of file history."
|
||||
(interactive)
|
||||
(when (> simple-git--file-history-page 0)
|
||||
(setq simple-git--file-history-page (1- simple-git--file-history-page))
|
||||
(simple-git-file-history-refresh)))
|
||||
|
||||
(defun simple-git-file-history-first-page ()
|
||||
"Go to first page of file history."
|
||||
(interactive)
|
||||
(setq simple-git--file-history-page 0)
|
||||
(simple-git-file-history-refresh))
|
||||
|
||||
(defun simple-git-file-history-last-page ()
|
||||
"Go to last page of file history."
|
||||
(interactive)
|
||||
(let ((default-directory simple-git--file-history-root))
|
||||
(unless simple-git--file-history-total-commits
|
||||
(setq simple-git--file-history-total-commits
|
||||
(simple-git--get-file-total-commits simple-git--file-history-file))))
|
||||
(setq simple-git--file-history-page
|
||||
(max 0 (1- (ceiling (/ (float simple-git--file-history-total-commits) simple-git-log-count)))))
|
||||
(simple-git-file-history-refresh))
|
||||
|
||||
;;;###autoload
|
||||
(defun simple-git-file-history ()
|
||||
"Show commit history for the current file."
|
||||
@@ -934,9 +1084,252 @@
|
||||
(simple-git-file-history-mode)
|
||||
(setq simple-git--file-history-file file)
|
||||
(setq simple-git--file-history-root root)
|
||||
(setq simple-git--file-history-page 0)
|
||||
(simple-git-file-history-refresh))
|
||||
(pop-to-buffer buf)))
|
||||
|
||||
;;; ============================================================================
|
||||
;;; Line Blame Mode
|
||||
;;; ============================================================================
|
||||
|
||||
(defvar simple-git-line-blame-mode-map
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "RET") #'simple-git-line-blame-show-diff)
|
||||
(define-key map (kbd "v") #'simple-git-line-blame-view-file)
|
||||
(define-key map (kbd "c") #'simple-git-line-blame-show-commit)
|
||||
(define-key map (kbd "q") #'quit-window)
|
||||
(define-key map (kbd "n") #'next-line)
|
||||
(define-key map (kbd "p") #'previous-line)
|
||||
(define-key map [mouse-1] #'simple-git-mouse-action)
|
||||
map)
|
||||
"Keymap for `simple-git-line-blame-mode'.")
|
||||
|
||||
(define-derived-mode simple-git-line-blame-mode special-mode "SimpleGit:LineBlame"
|
||||
"Major mode for viewing line blame history."
|
||||
(setq buffer-read-only t)
|
||||
(setq truncate-lines t))
|
||||
|
||||
(defvar-local simple-git--line-blame-file nil
|
||||
"The file being viewed in line blame mode.")
|
||||
|
||||
(defvar-local simple-git--line-blame-root nil
|
||||
"The git root for line blame mode.")
|
||||
|
||||
(defvar-local simple-git--line-blame-line nil
|
||||
"The line number being blamed.")
|
||||
|
||||
(defun simple-git--get-line-history (file line root)
|
||||
"Get history of commits that modified LINE in FILE.
|
||||
Returns list of (hash author date subject file-at-commit)."
|
||||
(let* ((default-directory root)
|
||||
(results '())
|
||||
(current-file file)
|
||||
(current-line line)
|
||||
(seen-hashes (make-hash-table :test 'equal))
|
||||
(iterations 0)
|
||||
(max-iterations 50))
|
||||
;; Iteratively trace the line back through history
|
||||
(while (and current-file current-line (< iterations max-iterations))
|
||||
(let* ((blame-output (simple-git--run "blame" "-L" (format "%d,%d" current-line current-line)
|
||||
"--porcelain" "-w" current-file)))
|
||||
(if (string-match "^\\([a-f0-9]+\\)" blame-output)
|
||||
(let ((hash (match-string 1 blame-output)))
|
||||
(if (or (string-prefix-p "00000000" hash)
|
||||
(gethash hash seen-hashes))
|
||||
;; Uncommitted or already seen - stop
|
||||
(setq current-file nil)
|
||||
;; New commit found
|
||||
(puthash hash t seen-hashes)
|
||||
(let* ((info (simple-git--run "show" "--no-patch"
|
||||
"--format=%h|%an|%ar|%s" hash))
|
||||
(parts (split-string (car (split-string info "\n")) "|"))
|
||||
(short-hash (nth 0 parts))
|
||||
(author (nth 1 parts))
|
||||
(date (nth 2 parts))
|
||||
(subject (nth 3 parts)))
|
||||
(push (list short-hash author date subject current-file hash) results))
|
||||
;; Find parent commit and line number
|
||||
(let* ((parent-output (simple-git--run "rev-parse" (concat hash "^")))
|
||||
(parent (string-trim parent-output)))
|
||||
(if (or (string-empty-p parent) (string-prefix-p "fatal:" parent))
|
||||
(setq current-file nil)
|
||||
;; Try to find the line in parent
|
||||
(let ((blame-parent (simple-git--run "blame" "-L" (format "%d,%d" current-line current-line)
|
||||
"--porcelain" "-w" parent "--" current-file)))
|
||||
(if (string-match "^\\([a-f0-9]+\\)" blame-parent)
|
||||
;; Line exists in parent, continue tracing
|
||||
nil
|
||||
;; Line doesn't exist in parent with same number, stop
|
||||
(setq current-file nil)))))))
|
||||
;; No blame output - stop
|
||||
(setq current-file nil)))
|
||||
(setq iterations (1+ iterations)))
|
||||
(nreverse results)))
|
||||
|
||||
(defun simple-git-line-blame-refresh ()
|
||||
"Refresh the line blame buffer."
|
||||
(let ((inhibit-read-only t)
|
||||
(file simple-git--line-blame-file)
|
||||
(root simple-git--line-blame-root)
|
||||
(line simple-git--line-blame-line))
|
||||
(erase-buffer)
|
||||
(insert (propertize "Line History (Blame)" 'face 'simple-git-header-face) "\n")
|
||||
(insert (propertize "File: " 'face 'simple-git-header-face) file "\n")
|
||||
(insert (propertize "Line: " 'face 'simple-git-header-face) (number-to-string line) "\n\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show diff "
|
||||
(propertize "v" 'face 'font-lock-keyword-face) "iew file at this point "
|
||||
(propertize "c" 'face 'font-lock-keyword-face) "ommit view "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
(let ((history (simple-git--get-line-history file line root)))
|
||||
(if history
|
||||
(dolist (entry history)
|
||||
(let* ((hash (nth 0 entry))
|
||||
(author (nth 1 entry))
|
||||
(date (nth 2 entry))
|
||||
(subject (nth 3 entry))
|
||||
(file-at-commit (nth 4 entry))
|
||||
(full-hash (nth 5 entry))
|
||||
(line-start (point)))
|
||||
(insert (propertize hash 'face 'simple-git-commit-hash-face)
|
||||
" "
|
||||
(propertize (format "%-20s" (truncate-string-to-width (or author "") 20))
|
||||
'face 'simple-git-commit-author-face)
|
||||
" "
|
||||
(propertize (format "%-15s" (truncate-string-to-width (or date "") 15))
|
||||
'face 'simple-git-commit-date-face)
|
||||
" "
|
||||
(or subject "")
|
||||
"\n")
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-hash full-hash)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-file file-at-commit)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))
|
||||
(insert " (no history found)\n")))
|
||||
(goto-char (point-min))))
|
||||
|
||||
(defun simple-git-line-blame-show-diff ()
|
||||
"Show diff for commit at point."
|
||||
(interactive)
|
||||
(let* ((hash (get-text-property (line-beginning-position) 'simple-git-commit-hash))
|
||||
(file (get-text-property (line-beginning-position) 'simple-git-commit-file))
|
||||
(root simple-git--line-blame-root)
|
||||
(return-buf (current-buffer)))
|
||||
(if (and hash file)
|
||||
(let ((buf (get-buffer-create "*simple-git-diff*")))
|
||||
(with-current-buffer buf
|
||||
(let ((inhibit-read-only t)
|
||||
(default-directory root))
|
||||
(erase-buffer)
|
||||
(call-process "git" nil t nil "show" "--format=" hash "--" file)
|
||||
(goto-char (point-min))
|
||||
(simple-git-diff-mode)
|
||||
(setq simple-git--diff-return-buffer return-buf)))
|
||||
(display-buffer buf))
|
||||
(message "No commit at point"))))
|
||||
|
||||
(defun simple-git-line-blame-view-file ()
|
||||
"View file at commit at point."
|
||||
(interactive)
|
||||
(let* ((hash (get-text-property (line-beginning-position) 'simple-git-commit-hash))
|
||||
(file (get-text-property (line-beginning-position) 'simple-git-commit-file))
|
||||
(root simple-git--line-blame-root))
|
||||
(if (and hash file)
|
||||
(let* ((buf-name (format "*simple-git:%s@%s*" (file-name-nondirectory file) (substring hash 0 7)))
|
||||
(buf (get-buffer-create buf-name)))
|
||||
(with-current-buffer buf
|
||||
(let ((inhibit-read-only t)
|
||||
(default-directory root))
|
||||
(erase-buffer)
|
||||
(call-process "git" nil t nil "show" (concat hash ":" file))
|
||||
(goto-char (point-min))
|
||||
(let ((mode (assoc-default file auto-mode-alist 'string-match)))
|
||||
(when mode (funcall mode)))
|
||||
(setq buffer-read-only t)))
|
||||
(let ((main-window (or (seq-find (lambda (w)
|
||||
(not (window-parameter w 'window-side)))
|
||||
(window-list))
|
||||
(selected-window))))
|
||||
(select-window main-window)
|
||||
(switch-to-buffer buf)))
|
||||
(message "No commit at point"))))
|
||||
|
||||
(defun simple-git-line-blame-show-commit ()
|
||||
"Show full commit details for commit at point."
|
||||
(interactive)
|
||||
(let* ((hash (get-text-property (line-beginning-position) 'simple-git-commit-hash))
|
||||
(root simple-git--line-blame-root))
|
||||
(if hash
|
||||
(let ((buf (get-buffer-create "*simple-git-commit-detail*")))
|
||||
(with-current-buffer buf
|
||||
(let ((inhibit-read-only t)
|
||||
(default-directory root))
|
||||
(erase-buffer)
|
||||
(let* ((info (simple-git--run "show" "--no-patch"
|
||||
"--format=%h%n%an%n%ar%n%s%n%b" hash))
|
||||
(lines (split-string info "\n"))
|
||||
(short-hash (nth 0 lines))
|
||||
(author (nth 1 lines))
|
||||
(date (nth 2 lines))
|
||||
(subject (nth 3 lines))
|
||||
(body (string-trim (mapconcat #'identity (nthcdr 4 lines) "\n"))))
|
||||
(insert (propertize "Commit: " 'face 'simple-git-header-face)
|
||||
(propertize short-hash 'face 'simple-git-commit-hash-face) "\n")
|
||||
(insert (propertize "Author: " 'face 'simple-git-header-face)
|
||||
(propertize author 'face 'simple-git-commit-author-face) "\n")
|
||||
(insert (propertize "Date: " 'face 'simple-git-header-face)
|
||||
(propertize date 'face 'simple-git-commit-date-face) "\n\n")
|
||||
(insert (propertize subject 'face 'bold) "\n")
|
||||
(when (not (string-empty-p body))
|
||||
(insert "\n" body "\n"))
|
||||
(insert "\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show diff "
|
||||
(propertize "v" 'face 'font-lock-keyword-face) "iew file at this point "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
(let* ((files-output (simple-git--run "show" "--name-status" "--format=" hash))
|
||||
(file-lines (split-string files-output "\n" t)))
|
||||
(insert (propertize "Changed files:\n" 'face 'simple-git-header-face))
|
||||
(dolist (file-line file-lines)
|
||||
(when (string-match "^\\([AMDRT]\\)\t\\(.+\\)$" file-line)
|
||||
(let ((status (match-string 1 file-line))
|
||||
(file (match-string 2 file-line)))
|
||||
(let ((line-start (point)))
|
||||
(insert " "
|
||||
(propertize (format "[%s] " status)
|
||||
'face (pcase status
|
||||
("A" 'simple-git-staged-face)
|
||||
("D" 'simple-git-unstaged-face)
|
||||
(_ 'simple-git-untracked-face)))
|
||||
file "\n")
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-file file)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-hash hash)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))))))))
|
||||
(with-current-buffer buf
|
||||
(simple-git-commit-detail-mode)
|
||||
(goto-char (point-min)))
|
||||
(display-buffer buf))
|
||||
(message "No commit at point"))))
|
||||
|
||||
;;;###autoload
|
||||
(defun simple-git-line-blame ()
|
||||
"Show blame history for the current line."
|
||||
(interactive)
|
||||
(unless (simple-git--in-repo-p)
|
||||
(user-error "Not in a Git repository"))
|
||||
(unless buffer-file-name
|
||||
(user-error "Buffer is not visiting a file"))
|
||||
(let* ((root (simple-git--root))
|
||||
(file (file-relative-name buffer-file-name root))
|
||||
(line (line-number-at-pos))
|
||||
(buf (get-buffer-create (format "*simple-git-blame:%s:%d*" (file-name-nondirectory file) line))))
|
||||
(with-current-buffer buf
|
||||
(simple-git-line-blame-mode)
|
||||
(setq simple-git--line-blame-file file)
|
||||
(setq simple-git--line-blame-root root)
|
||||
(setq simple-git--line-blame-line line)
|
||||
(simple-git-line-blame-refresh))
|
||||
(pop-to-buffer buf)))
|
||||
|
||||
;;; ============================================================================
|
||||
;;; Branch Graph Mode
|
||||
;;; ============================================================================
|
||||
@@ -945,9 +1338,12 @@
|
||||
(let ((map (make-sparse-keymap)))
|
||||
(define-key map (kbd "RET") #'simple-git-branch-graph-show-commit)
|
||||
(define-key map (kbd "q") #'quit-window)
|
||||
(define-key map (kbd "n") #'next-line)
|
||||
(define-key map (kbd "p") #'previous-line)
|
||||
(define-key map (kbd "g") #'simple-git-branch-graph-refresh)
|
||||
(define-key map (kbd "n") #'simple-git-branch-graph-next-page)
|
||||
(define-key map (kbd "p") #'simple-git-branch-graph-prev-page)
|
||||
(define-key map (kbd "N") #'simple-git-branch-graph-last-page)
|
||||
(define-key map (kbd "P") #'simple-git-branch-graph-first-page)
|
||||
(define-key map [mouse-1] #'simple-git-mouse-action)
|
||||
map)
|
||||
"Keymap for `simple-git-branch-graph-mode'.")
|
||||
|
||||
@@ -956,6 +1352,12 @@
|
||||
(setq buffer-read-only t)
|
||||
(setq truncate-lines t))
|
||||
|
||||
(defvar-local simple-git--graph-page 0
|
||||
"Current page number in graph view.")
|
||||
|
||||
(defvar-local simple-git--graph-total-commits nil
|
||||
"Total number of commits in graph.")
|
||||
|
||||
(defface simple-git-graph-branch-1
|
||||
'((t :foreground "#e06c75"))
|
||||
"Face for branch 1 in graph.")
|
||||
@@ -1014,24 +1416,44 @@
|
||||
(setq i (1+ i)))
|
||||
result))
|
||||
|
||||
(defun simple-git--get-all-commits-count ()
|
||||
"Get total number of commits across all branches."
|
||||
(string-to-number (string-trim (simple-git--run "rev-list" "--count" "--all"))))
|
||||
|
||||
(defun simple-git-branch-graph-refresh ()
|
||||
"Refresh the branch graph buffer."
|
||||
(interactive)
|
||||
(when (eq major-mode 'simple-git-branch-graph-mode)
|
||||
(let ((inhibit-read-only t)
|
||||
(pos (point))
|
||||
(default-directory (simple-git--root)))
|
||||
(erase-buffer)
|
||||
(insert (propertize "Branch Graph" 'face 'simple-git-header-face) "\n\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show commit "
|
||||
(propertize "g" 'face 'font-lock-keyword-face) " refresh "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
;; Get graph with commit info
|
||||
(let* ((output (simple-git--run "log" "--all" "--graph"
|
||||
(format "-n%d" simple-git-branch-graph-count)
|
||||
"--pretty=format:%h|%an|%ar|%s|%d"))
|
||||
(lines (split-string output "\n")))
|
||||
(default-directory (simple-git--root))
|
||||
(skip (* simple-git--graph-page simple-git-branch-graph-count)))
|
||||
;; Get total commits if not cached
|
||||
(unless simple-git--graph-total-commits
|
||||
(setq simple-git--graph-total-commits (simple-git--get-all-commits-count)))
|
||||
(let ((max-page (max 0 (1- (ceiling (/ (float simple-git--graph-total-commits) simple-git-branch-graph-count))))))
|
||||
;; Cap page number
|
||||
(when (> simple-git--graph-page max-page)
|
||||
(setq simple-git--graph-page max-page)
|
||||
(setq skip (* simple-git--graph-page simple-git-branch-graph-count)))
|
||||
(erase-buffer)
|
||||
(insert (propertize "Branch Graph" 'face 'simple-git-header-face)
|
||||
(format " (page %d/%d)" (1+ simple-git--graph-page) (1+ max-page))
|
||||
"\n\n")
|
||||
(insert "Commands: "
|
||||
(propertize "RET" 'face 'font-lock-keyword-face) " show commit "
|
||||
(propertize "n" 'face 'font-lock-keyword-face) "ext page "
|
||||
(propertize "p" 'face 'font-lock-keyword-face) "rev page "
|
||||
(propertize "N" 'face 'font-lock-keyword-face) " last "
|
||||
(propertize "P" 'face 'font-lock-keyword-face) " first "
|
||||
(propertize "g" 'face 'font-lock-keyword-face) " refresh "
|
||||
(propertize "q" 'face 'font-lock-keyword-face) "uit\n\n")
|
||||
;; Get graph with commit info
|
||||
(let* ((output (simple-git--run "log" "--all" "--graph"
|
||||
(format "--skip=%d" skip)
|
||||
(format "-n%d" simple-git-branch-graph-count)
|
||||
"--pretty=format:%h|%an|%ar|%s|%d"))
|
||||
(lines (split-string output "\n")))
|
||||
(dolist (line lines)
|
||||
(if (string-match "^\\([*| /\\\\]+\\)\\([a-f0-9]+\\)|\\([^|]*\\)|\\([^|]*\\)|\\([^|]*\\)|\\(.*\\)$" line)
|
||||
;; Line with commit info
|
||||
@@ -1050,12 +1472,41 @@
|
||||
(insert (propertize (truncate-string-to-width (or author "") 15)
|
||||
'face 'simple-git-commit-author-face) " ")
|
||||
(insert (or subject "") "\n")
|
||||
(put-text-property line-start (point) 'simple-git-commit-hash hash))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-hash hash)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face))
|
||||
;; Graph-only line (no commit)
|
||||
(when (string-match "^\\([*| /\\\\]+\\)$" line)
|
||||
(insert (simple-git--colorize-graph (match-string 1 line)) "\n")))))
|
||||
(insert (simple-git--colorize-graph (match-string 1 line)) "\n"))))))
|
||||
(goto-char (min pos (point-max))))))
|
||||
|
||||
(defun simple-git-branch-graph-next-page ()
|
||||
"Go to next page of graph."
|
||||
(interactive)
|
||||
(setq simple-git--graph-page (1+ simple-git--graph-page))
|
||||
(simple-git-branch-graph-refresh))
|
||||
|
||||
(defun simple-git-branch-graph-prev-page ()
|
||||
"Go to previous page of graph."
|
||||
(interactive)
|
||||
(when (> simple-git--graph-page 0)
|
||||
(setq simple-git--graph-page (1- simple-git--graph-page))
|
||||
(simple-git-branch-graph-refresh)))
|
||||
|
||||
(defun simple-git-branch-graph-first-page ()
|
||||
"Go to first page of graph."
|
||||
(interactive)
|
||||
(setq simple-git--graph-page 0)
|
||||
(simple-git-branch-graph-refresh))
|
||||
|
||||
(defun simple-git-branch-graph-last-page ()
|
||||
"Go to last page of graph."
|
||||
(interactive)
|
||||
(unless simple-git--graph-total-commits
|
||||
(setq simple-git--graph-total-commits (simple-git--get-all-commits-count)))
|
||||
(setq simple-git--graph-page
|
||||
(max 0 (1- (ceiling (/ (float simple-git--graph-total-commits) simple-git-branch-graph-count)))))
|
||||
(simple-git-branch-graph-refresh))
|
||||
|
||||
(defun simple-git-branch-graph-show-commit ()
|
||||
"Show commit details for commit at point."
|
||||
(interactive)
|
||||
@@ -1106,8 +1557,9 @@
|
||||
("D" 'simple-git-unstaged-face)
|
||||
(_ 'simple-git-untracked-face)))
|
||||
file "\n")
|
||||
(put-text-property line-start (point) 'simple-git-commit-file file)
|
||||
(put-text-property line-start (point) 'simple-git-commit-hash hash)))))))))
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-file file)
|
||||
(put-text-property line-start (1- (point)) 'simple-git-commit-hash hash)
|
||||
(put-text-property line-start (1- (point)) 'mouse-face 'simple-git-highlight-face)))))))))
|
||||
(with-current-buffer buf
|
||||
(simple-git-commit-detail-mode)
|
||||
(goto-char (point-min)))
|
||||
|
||||
@@ -1,731 +0,0 @@
|
||||
;;; xah-find.el --- find replace in pure emacs lisp. Purpose similar to grep/sed. -*- coding: utf-8; lexical-binding: t; -*-
|
||||
|
||||
;; Copyright © 2012-2021 by Xah Lee
|
||||
|
||||
;; Author: Xah Lee ( http://xahlee.info/ )
|
||||
;; Version: 5.4.20211014135145
|
||||
;; Created: 02 April 2012
|
||||
;; Package-Requires: ((emacs "24.1"))
|
||||
;; Keywords: convenience, extensions, files, tools, unix
|
||||
;; License: GPL v3
|
||||
;; Homepage: http://ergoemacs.org/emacs/elisp-xah-find-text.html
|
||||
|
||||
;; This file is not part of GNU Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
|
||||
;; Provides emacs commands for find/replace text of files in a directory, written entirely in emacs lisp.
|
||||
|
||||
;; This package provides these commands:
|
||||
|
||||
;; xah-find-text
|
||||
;; xah-find-text-regex
|
||||
;; xah-find-count
|
||||
;; xah-find-replace-text
|
||||
;; xah-find-replace-text-regex
|
||||
|
||||
;; • Pure emacs lisp. No dependencies on unix/linux grep/sed/find. Especially useful on Windows.
|
||||
|
||||
;; • Output is highlighted and clickable for jumping to occurrence.
|
||||
|
||||
;; • Using emacs regex, not bash/perl etc regex.
|
||||
|
||||
;; These commands treats find/replace string as sequence of chars, not as lines as in grep/sed, so it's easier to find or replace a text containing lots newlines, especially programming language source code.
|
||||
|
||||
;; • Reliably Find/Replace string that contains newline chars.
|
||||
|
||||
;; • Reliably Find/Replace string that contains lots Unicode chars. See http://xahlee.info/comp/unix_uniq_unicode_bug.html and http://ergoemacs.org/emacs/emacs_grep_problem.html
|
||||
|
||||
;; • Reliably Find/Replace string that contains lots escape slashes or backslashes. For example, regex in source code, Microsoft Windows' path.
|
||||
|
||||
;; The result output is also not based on lines. Instead, visual separators are used for easy reading.
|
||||
|
||||
;; For each occurrence or replacement, n chars will be printed before and after. The number of chars to show is defined by `xah-find-context-char-count-before' and `xah-find-context-char-count-after'
|
||||
|
||||
;; Each “block of text” in output is one occurrence.
|
||||
;; For example, if a line in a file has 2 occurrences, then the same line will be reported twice, as 2 “blocks”.
|
||||
;; so, the number of blocks corresponds exactly to the number of occurrences.
|
||||
|
||||
;; Keys
|
||||
;; -----------------------
|
||||
;; TAB xah-find-next-match
|
||||
;; <backtab> xah-find-previous-match
|
||||
|
||||
;; RET xah-find--jump-to-place
|
||||
;; <mouse-1> xah-find--mouse-jump-to-place
|
||||
|
||||
;; <left> xah-find-previous-match
|
||||
;; <right> xah-find-next-match
|
||||
|
||||
;; <down> xah-find-next-file
|
||||
;; <up> xah-find-previous-file
|
||||
|
||||
;; M-n xah-find-next-file
|
||||
;; M-p xah-find-previous-file
|
||||
|
||||
;; IGNORE DIRECTORIES
|
||||
|
||||
;; By default, .git dir is ignored. You can add to it by adding the following in your init:
|
||||
|
||||
;; (setq
|
||||
;; xah-find-dir-ignore-regex-list
|
||||
;; [
|
||||
;; "\\.git/"
|
||||
;; ; more regex here. regex is matched against file full path
|
||||
;; ])
|
||||
|
||||
;; USE CASE
|
||||
|
||||
;; To give a idea what file size, number of files, are practical, here's my typical use pattern:
|
||||
;; • 5 thousand HTML files match file name regex.
|
||||
;; • Each HTML file size are usually less than 200k bytes.
|
||||
;; • search string length have been up to 13 lines of text.
|
||||
|
||||
;; Homepage: http://ergoemacs.org/emacs/elisp-xah-find-text.html
|
||||
|
||||
;; Like it?
|
||||
;; Buy Xah Emacs Tutorial
|
||||
;; http://ergoemacs.org/emacs/buy_xah_emacs_tutorial.html
|
||||
;; Thank you.
|
||||
|
||||
;;; INSTALL
|
||||
|
||||
;; To install manually, place this file in the directory [~/.emacs.d/lisp/]
|
||||
|
||||
;; Then, place the following code in your emacs init file
|
||||
|
||||
;; (add-to-list 'load-path "~/.emacs.d/lisp/")
|
||||
;; (autoload 'xah-find-text "xah-find" "find replace" t)
|
||||
;; (autoload 'xah-find-text-regex "xah-find" "find replace" t)
|
||||
;; (autoload 'xah-find-replace-text "xah-find" "find replace" t)
|
||||
;; (autoload 'xah-find-replace-text-regex "xah-find" "find replace" t)
|
||||
;; (autoload 'xah-find-count "xah-find" "find replace" t)
|
||||
|
||||
;;; HISTORY
|
||||
|
||||
;; version 2.1.0, 2015-05-30 Complete rewrite.
|
||||
;; version 1.0, 2012-04-02 First version.
|
||||
|
||||
;;; CONTRIBUTOR
|
||||
;; 2015-12-09 Peter Buckley (dx-pbuckley). defcustom for result highlight color.
|
||||
|
||||
;; HHH___________________________________________________________________
|
||||
;;; Code:
|
||||
|
||||
(require 'ido)
|
||||
(require 'seq)
|
||||
|
||||
(ido-common-initialization)
|
||||
;; 2015-07-26 else, when ido-read-directory-name is called, Return key insert line return instead of submit. For some reason i dunno.
|
||||
|
||||
(defvar xah-find-context-char-count-before 100 "Number of characters to print before search string." )
|
||||
|
||||
(defvar xah-find-context-char-count-after 50 "Number of characters to print after search string." )
|
||||
|
||||
(defvar xah-find-dir-ignore-regex-list
|
||||
[
|
||||
"\\.git/"
|
||||
]
|
||||
"A list or vector of regex patterns, if match, that directory will be ignored.
|
||||
The regex match is Case Insensitive."
|
||||
)
|
||||
|
||||
(defface xah-find-file-path-highlight
|
||||
'((t :foreground "black"
|
||||
:background "pink"
|
||||
))
|
||||
"Face of file path where a text match is found."
|
||||
:group 'xah-find
|
||||
)
|
||||
|
||||
(defface xah-find-match-highlight
|
||||
'((t :foreground "black"
|
||||
:background "yellow"
|
||||
))
|
||||
"Face for matched text."
|
||||
:group 'xah-find
|
||||
)
|
||||
|
||||
(defface xah-find-replace-highlight
|
||||
'((t :foreground "black"
|
||||
:background "green"
|
||||
))
|
||||
"Face for replaced text."
|
||||
:group 'xah-find
|
||||
)
|
||||
|
||||
(defvar xah-find-file-separator
|
||||
"ff━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n"
|
||||
"A string as visual separator."
|
||||
)
|
||||
|
||||
(defvar xah-find-occur-separator
|
||||
"oo────────────────────────────────────────────────────────────\n\n"
|
||||
"A string as visual separator."
|
||||
)
|
||||
|
||||
(defvar xah-find-occur-prefix "〖" "A left-bracket string that marks matched text and navigate previous/next. This string should basically never occure in your files. If it does, jumping to the location may not work." )
|
||||
|
||||
(defvar xah-find-occur-postfix "〗" "A right-bracket string that marks matched text and navigate previous/next. See also `xah-find-occur-prefix'." )
|
||||
|
||||
(defvar xah-find-replace-prefix "『" "A left-bracket string that marks matched text and navigate previous/next. See also `xah-find-occur-prefix'." )
|
||||
|
||||
(defvar xah-find-replace-postfix "』" "A right-bracket string that marks matched text and navigate previous/next. See also `xah-find-occur-prefix'." )
|
||||
|
||||
;; more brackets at http://xahlee.info/comp/unicode_matching_brackets.html
|
||||
|
||||
(defvar xah-find-filepath-prefix "〘" "A left-bracket string used to mark file path and navigate previous/next. See also `xah-find-occur-prefix'." )
|
||||
|
||||
(defvar xah-find-filepath-postfix "〙" "A right-bracket string used to mark file path and navigate previous/next. See also `xah-find-occur-prefix'." )
|
||||
|
||||
(defvar xah-find-pos-prefix "⁅" "A string of left bracket that marks line column position of occurrence. See also `xah-find-occur-prefix'." )
|
||||
|
||||
(defvar xah-find-pos-postfix "⁆" "A string of right bracket that marks line column position of occurrence. See also `xah-find-occur-prefix'." )
|
||||
|
||||
;; HHH___________________________________________________________________
|
||||
|
||||
(defvar xah-find-file-path-regex-history '() "File path regex history list, used by `xah-find-text' and others.")
|
||||
|
||||
(defun xah-find--ignore-dir-p (Path)
|
||||
"Return true if one of `xah-find-dir-ignore-regex-list' matches PATH. Else, nil.
|
||||
version 2016-11-16 2021-10-11"
|
||||
(let ((case-fold-search t))
|
||||
(catch 'exit25001
|
||||
(mapc
|
||||
(lambda ($regex)
|
||||
(when (string-match $regex Path) (throw 'exit25001 $regex)))
|
||||
xah-find-dir-ignore-regex-list)
|
||||
nil
|
||||
)))
|
||||
|
||||
;; HHH___________________________________________________________________
|
||||
(defvar xah-find-output-mode-map nil "Keybinding for `xah-find.el output'")
|
||||
(progn
|
||||
(setq xah-find-output-mode-map (make-sparse-keymap))
|
||||
|
||||
(define-key xah-find-output-mode-map (kbd "<left>") 'xah-find-previous-match)
|
||||
(define-key xah-find-output-mode-map (kbd "<right>") 'xah-find-next-match)
|
||||
(define-key xah-find-output-mode-map (kbd "<down>") 'xah-find-next-file)
|
||||
(define-key xah-find-output-mode-map (kbd "<up>") 'xah-find-previous-file)
|
||||
|
||||
(define-key xah-find-output-mode-map (kbd "TAB") 'xah-find-next-match)
|
||||
(define-key xah-find-output-mode-map (kbd "<backtab>") 'xah-find-previous-match)
|
||||
(define-key xah-find-output-mode-map (kbd "<mouse-1>") 'xah-find--mouse-jump-to-place)
|
||||
(define-key xah-find-output-mode-map (kbd "M-n") 'xah-find-next-file)
|
||||
(define-key xah-find-output-mode-map (kbd "M-p") 'xah-find-previous-file)
|
||||
(define-key xah-find-output-mode-map (kbd "RET") 'xah-find--jump-to-place)
|
||||
)
|
||||
|
||||
(defvar xah-find-output-syntax-table nil "Syntax table for `xah-find-output-mode'.")
|
||||
|
||||
(setq xah-find-output-syntax-table
|
||||
(let ( (synTable (make-syntax-table)))
|
||||
(modify-syntax-entry ?\" "." synTable)
|
||||
;; (modify-syntax-entry ?〖 "(〗" synTable)
|
||||
;; (modify-syntax-entry ?〗 "(〖" synTable)
|
||||
synTable))
|
||||
|
||||
(setq xah-find-font-lock-keywords
|
||||
(let (
|
||||
(xMatch (format "%s\\([^%s]+\\)%s" xah-find-occur-prefix xah-find-occur-postfix xah-find-occur-postfix))
|
||||
|
||||
(xRep (format "%s\\([^%s]+\\)%s" xah-find-replace-prefix xah-find-replace-postfix xah-find-replace-postfix))
|
||||
(xfPath (format "%s\\([^%s]+\\)%s" xah-find-filepath-prefix xah-find-filepath-postfix xah-find-filepath-postfix)))
|
||||
|
||||
`(
|
||||
(,xMatch . (1 'xah-find-match-highlight))
|
||||
(,xRep . (1 'xah-find-replace-highlight))
|
||||
(,xfPath . (1 'xah-find-file-path-highlight)))))
|
||||
|
||||
(define-derived-mode xah-find-output-mode fundamental-mode "∑xah-find"
|
||||
"Major mode for reading output for xah-find commands.
|
||||
home page:
|
||||
URL `http://ergoemacs.org/emacs/elisp-xah-find-text.html'
|
||||
|
||||
\\{xah-find-output-mode-map}
|
||||
Version 2021-06-23"
|
||||
(setq font-lock-defaults '((xah-find-font-lock-keywords)))
|
||||
(set-syntax-table xah-find-output-syntax-table))
|
||||
|
||||
(defun xah-find-next-match ()
|
||||
"Put cursor to next occurrence."
|
||||
(interactive)
|
||||
(search-forward xah-find-occur-prefix nil t ))
|
||||
|
||||
(defun xah-find-previous-match ()
|
||||
"Put cursor to previous occurrence."
|
||||
(interactive)
|
||||
(search-backward xah-find-occur-postfix nil t ))
|
||||
|
||||
(defun xah-find-next-file ()
|
||||
"Put cursor to next file."
|
||||
(interactive)
|
||||
(search-forward xah-find-filepath-prefix nil t ))
|
||||
|
||||
(defun xah-find-previous-file ()
|
||||
"Put cursor to previous file."
|
||||
(interactive)
|
||||
(search-backward xah-find-filepath-postfix nil t ))
|
||||
|
||||
(defun xah-find--mouse-jump-to-place (Event)
|
||||
"Open file and put cursor at location of the occurrence.
|
||||
Version 2016-12-18"
|
||||
(interactive "e")
|
||||
(let* (
|
||||
($pos (posn-point (event-end Event)))
|
||||
($fpath (get-text-property $pos 'xah-find-fpath))
|
||||
($posJumpTo (get-text-property $pos 'xah-find-pos)))
|
||||
(when $fpath
|
||||
(progn
|
||||
(find-file-other-window $fpath)
|
||||
(when $posJumpTo (goto-char $posJumpTo))))))
|
||||
|
||||
;; (defun xah-find--jump-to-place ()
|
||||
;; "Open file and put cursor at location of the occurrence.
|
||||
;; Version 2017-04-07"
|
||||
;; (interactive)
|
||||
;; (let (($fpath (get-text-property (point) 'xah-find-fpath))
|
||||
;; ($posJumpTo (get-text-property (point) 'xah-find-pos)))
|
||||
;; (if $fpath
|
||||
;; (if (file-exists-p $fpath)
|
||||
;; (progn
|
||||
;; (find-file-other-window $fpath)
|
||||
;; (when $posJumpTo (goto-char $posJumpTo)))
|
||||
;; (error "File at 「%s」 does not exist." $fpath))
|
||||
;; (insert "\n"))))
|
||||
|
||||
(defun xah-find--jump-to-place ()
|
||||
"Open file and put cursor at location of the occurrence.
|
||||
Version 2019-03-14"
|
||||
(interactive)
|
||||
(let (($fpath (get-text-property (point) 'xah-find-fpath))
|
||||
($posJumpTo (get-text-property (point) 'xah-find-pos))
|
||||
($p0 (point))
|
||||
$p1 $p2
|
||||
)
|
||||
(if $fpath
|
||||
(if (file-exists-p $fpath)
|
||||
(progn
|
||||
(find-file-other-window $fpath)
|
||||
(when $posJumpTo (goto-char $posJumpTo)))
|
||||
(error "File at 「%s」 does not exist." $fpath))
|
||||
(progn
|
||||
(save-excursion
|
||||
(goto-char $p0)
|
||||
|
||||
;; (if (eq (char-after (line-beginning-position)) (string-to-char xah-find-filepath-prefix ))
|
||||
;; (progn )
|
||||
;; (progn ))
|
||||
|
||||
(search-forward xah-find-file-separator)
|
||||
(search-backward xah-find-filepath-prefix )
|
||||
(setq $p1 (1+ (point)))
|
||||
(search-forward xah-find-filepath-postfix)
|
||||
(setq $p2 (1- (point)))
|
||||
(setq $fpath (buffer-substring-no-properties $p1 $p2))
|
||||
|
||||
(progn
|
||||
(goto-char $p0)
|
||||
(if (search-backward xah-find-pos-prefix nil t)
|
||||
(progn
|
||||
(setq $p1 (1+ (point)))
|
||||
(search-forward xah-find-pos-postfix )
|
||||
(setq $p2 (1- (point)))
|
||||
(setq $posJumpTo (string-to-number (buffer-substring-no-properties $p1 $p2))))
|
||||
(setq $posJumpTo nil))))
|
||||
(if (file-exists-p $fpath)
|
||||
(progn
|
||||
(find-file-other-window $fpath)
|
||||
(when $posJumpTo (goto-char $posJumpTo)))
|
||||
(error "File at 「%s」 does not exist." $fpath))))))
|
||||
|
||||
;; HHH___________________________________________________________________
|
||||
(defun xah-find--backup-suffix (S)
|
||||
"Return a string of the form 「~‹S›~‹date time stamp›~」"
|
||||
(concat "~" S (format-time-string "%Y%m%dT%H%M%S") "~"))
|
||||
|
||||
(defun xah-find--current-date-time-string ()
|
||||
"Return current date-time string in this format 「2012-04-05T21:08:24-07:00」"
|
||||
(concat
|
||||
(format-time-string "%Y-%m-%dT%T")
|
||||
(funcall (lambda (x) (format "%s:%s" (substring x 0 3) (substring x 3 5))) (format-time-string "%z"))))
|
||||
|
||||
(defun xah-find--print-header (BufferObj Cmd InputDir PathRegex SearchStr &optional ReplaceStr Write-file-p BackupQ)
|
||||
"Print things"
|
||||
(princ
|
||||
(concat
|
||||
"-*- coding: utf-8; mode: xah-find-output -*-" "\n"
|
||||
"Datetime: " (xah-find--current-date-time-string) "\n"
|
||||
"Result of: " Cmd "\n"
|
||||
(format "Directory: %s\n" InputDir )
|
||||
(format "Path regex: %s\n" PathRegex )
|
||||
(format "Write to file: %s\n" Write-file-p )
|
||||
(format "Backup: %s\n" BackupQ )
|
||||
(format "Search string: %s\n" SearchStr )
|
||||
(when ReplaceStr (format "Replace string [[%s]]\n" ReplaceStr))
|
||||
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\n"
|
||||
)
|
||||
BufferObj))
|
||||
|
||||
(defun xah-find--occur-output (P1 P2 Fpath Buff &optional NoContextString-p AltColor)
|
||||
"Print result to a output buffer, with text properties (e.g. highlight and link).
|
||||
P1 P2 are region boundary. Region of current buffer are grabbed. The region typically is the searched text.
|
||||
Fpath is file path to be used as property value for clickable link.
|
||||
Buff is the buffer to insert P1 P2 region.
|
||||
NoContextString-p if true, don't add text before and after the region of interest. Else, `xah-find-context-char-count-before' number of chars are inserted before, and similar for `xah-find-context-char-count-after'.
|
||||
AltColor if true, use a different highlight color face `xah-find-replace-highlight'. Else, use `xah-find-match-highlight'.
|
||||
Version 2017-04-07 2021-08-05"
|
||||
(let* (
|
||||
($begin (max 1 (- P1 xah-find-context-char-count-before )))
|
||||
($end (min (point-max) (+ P2 xah-find-context-char-count-after )))
|
||||
($textBefore (if NoContextString-p "" (buffer-substring-no-properties $begin P1 )))
|
||||
$textMiddle
|
||||
($textAfter (if NoContextString-p "" (buffer-substring-no-properties P2 $end)))
|
||||
($face (if AltColor 'xah-find-replace-highlight 'xah-find-match-highlight))
|
||||
$bracketL $bracketR
|
||||
)
|
||||
(put-text-property P1 P2 'face $face)
|
||||
(put-text-property P1 P2 'xah-find-fpath Fpath)
|
||||
(put-text-property P1 P2 'xah-find-pos P1)
|
||||
(add-text-properties P1 P2 '(mouse-face highlight))
|
||||
(setq $textMiddle (buffer-substring P1 P2 ))
|
||||
(if AltColor
|
||||
(setq $bracketL xah-find-replace-prefix $bracketR xah-find-replace-postfix )
|
||||
(setq $bracketL xah-find-occur-prefix $bracketR xah-find-occur-postfix ))
|
||||
(with-current-buffer Buff
|
||||
(insert
|
||||
(format "%s%s%s\n" xah-find-pos-prefix P1 xah-find-pos-postfix)
|
||||
$textBefore
|
||||
$bracketL
|
||||
$textMiddle
|
||||
$bracketR
|
||||
$textAfter
|
||||
"\n"
|
||||
xah-find-occur-separator ))))
|
||||
|
||||
;; (defun xah-find--print-replace-block (P1 P2 Buff)
|
||||
;; "print "
|
||||
;; (princ (concat "❬" (buffer-substring-no-properties P1 P2 ) "❭" "\n" xah-find-occur-separator) Buff))
|
||||
|
||||
(defun xah-find--print-file-count (Filepath4287 Count8086 BuffObj32)
|
||||
"Print file path and count"
|
||||
(princ (format "%d %s%s%s\n%s"
|
||||
Count8086
|
||||
xah-find-filepath-prefix
|
||||
Filepath4287
|
||||
xah-find-filepath-postfix
|
||||
xah-find-file-separator)
|
||||
BuffObj32))
|
||||
|
||||
(defun xah-find--switch-to-output (Buffer)
|
||||
"switch to Buffer and highlight stuff"
|
||||
(let ($p3 $p4)
|
||||
(switch-to-buffer Buffer)
|
||||
(progn
|
||||
(goto-char (point-min))
|
||||
(while (search-forward xah-find-filepath-prefix nil t)
|
||||
(setq $p3 (point))
|
||||
(search-forward xah-find-filepath-postfix nil nil)
|
||||
(setq $p4 (match-beginning 0))
|
||||
(put-text-property $p3 $p4 'xah-find-fpath (buffer-substring-no-properties $p3 $p4))
|
||||
(add-text-properties $p3 $p4 '(mouse-face highlight))
|
||||
(put-text-property (line-beginning-position) (line-end-position) 'face 'xah-find-file-path-highlight)))
|
||||
|
||||
(goto-char (point-min))
|
||||
(search-forward "━" nil t) ; todo, need fix
|
||||
(search-forward xah-find-occur-prefix nil t)
|
||||
(xah-find-output-mode)
|
||||
))
|
||||
|
||||
;; HHH___________________________________________________________________
|
||||
|
||||
(defun xah-find--get-fpath-regex (&optional DefaultExt)
|
||||
"Returns a string, that is a regex to match a file extension.
|
||||
The result is based on current buffer's file extension.
|
||||
If current file doesn't have extension or current buffer isn't a file, then extension DefaultExt is used.
|
||||
DefaultExt should be a string, without dot, such as 「\"html\"」.
|
||||
If DefaultExt is nil, 「\"html\"」 is used.
|
||||
Example return value: 「ββ.htmlββ'」, where β is a backslash.
|
||||
"
|
||||
(let (
|
||||
($buff-is-file-p (buffer-file-name))
|
||||
$fname-ext
|
||||
$default-ext
|
||||
)
|
||||
(setq $default-ext (if (null DefaultExt)
|
||||
(progn "html")
|
||||
(progn DefaultExt)))
|
||||
(if $buff-is-file-p
|
||||
(progn
|
||||
(setq $fname-ext (file-name-extension (buffer-file-name)))
|
||||
(if (or (null $fname-ext) (equal $fname-ext ""))
|
||||
(progn (concat "\\." $default-ext "$"))
|
||||
(progn (concat "\\." $fname-ext "$"))))
|
||||
(progn (concat "\\." $default-ext "$")))))
|
||||
|
||||
;;;###autoload
|
||||
(defun xah-find-count (SearchStr CountExpr CountNumber InputDir PathRegex)
|
||||
"Report how many occurrences of a string, of a given dir.
|
||||
Similar to `rgrep', but written in pure elisp.
|
||||
Result is shown in buffer *xah-find output*.
|
||||
Case sensitivity is determined by `case-fold-search'. Call `toggle-case-fold-search' to change.
|
||||
`xah-find-dir-ignore-regex-list' is respected.
|
||||
\\{xah-find-output-mode-map}
|
||||
|
||||
Version 2021-10-11"
|
||||
(interactive
|
||||
(let ( $operator)
|
||||
(list
|
||||
(read-string (format "Search string (default %s): " (current-word)) nil 'query-replace-history (current-word))
|
||||
(setq $operator (ido-completing-read "Report on: " '("greater than" "greater or equal to" "equal" "not equal" "less than" "less or equal to" )))
|
||||
(read-string (format "Count %s: " $operator) "0")
|
||||
(ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH")
|
||||
(read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history))))
|
||||
(let* (($outBufName "*xah-find output*")
|
||||
$outBuffer
|
||||
($countOperator
|
||||
(cond
|
||||
((string-equal "less than" CountExpr ) '<)
|
||||
((string-equal "less or equal to" CountExpr ) '<=)
|
||||
((string-equal "greater than" CountExpr ) '>)
|
||||
((string-equal "greater or equal to" CountExpr ) '>=)
|
||||
((string-equal "equal" CountExpr ) '=)
|
||||
((string-equal "not equal" CountExpr ) '/=)
|
||||
(t (error "count expression 「%s」 is wrong!" CountExpr ))))
|
||||
($countNumber (string-to-number CountNumber)))
|
||||
(when (get-buffer $outBufName) (kill-buffer $outBufName))
|
||||
(setq $outBuffer (generate-new-buffer $outBufName))
|
||||
(xah-find--print-header $outBuffer "xah-find-count" InputDir PathRegex SearchStr )
|
||||
(mapc
|
||||
(lambda ($f)
|
||||
(let (($count 0))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents $f)
|
||||
(goto-char (point-min))
|
||||
(while (search-forward SearchStr nil t) (setq $count (1+ $count)))
|
||||
(when (funcall $countOperator $count $countNumber)
|
||||
(xah-find--print-file-count $f $count $outBuffer)))))
|
||||
(seq-filter (lambda (x) (not (xah-find--ignore-dir-p x)))
|
||||
(directory-files-recursively InputDir PathRegex)))
|
||||
(princ "Done." $outBuffer)
|
||||
(xah-find--switch-to-output $outBuffer)))
|
||||
|
||||
;;;###autoload
|
||||
(defun xah-find-text (SearchStr InputDir PathRegex FixedCaseSearchQ PrintContext-p)
|
||||
"Report files that contain string.
|
||||
By default, not case sensitive, and print surrounding text.
|
||||
If `universal-argument' is called first, prompt to ask.
|
||||
`xah-find-dir-ignore-regex-list' is respected.
|
||||
Result is shown in buffer *xah-find output*.
|
||||
\\{xah-find-output-mode-map}
|
||||
|
||||
version 2021-10-11"
|
||||
(interactive
|
||||
(let (($defaultInput (if (region-active-p) (buffer-substring-no-properties (region-beginning) (region-end)) (current-word))))
|
||||
(list
|
||||
(read-string (format "Search string (default %s): " $defaultInput) nil 'query-replace-history $defaultInput)
|
||||
(ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH")
|
||||
(read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "html") nil nil 'dired-regexp-history)
|
||||
(if current-prefix-arg (y-or-n-p "Fixed case in search?") nil )
|
||||
(if current-prefix-arg (y-or-n-p "Print surrounding Text?") t ))))
|
||||
(let* ((case-fold-search (not FixedCaseSearchQ))
|
||||
($count 0)
|
||||
($outBufName "*xah-find output*")
|
||||
$outBuffer
|
||||
)
|
||||
(setq InputDir (file-name-as-directory InputDir)) ; normalize dir path
|
||||
(when (get-buffer $outBufName) (kill-buffer $outBufName))
|
||||
(setq $outBuffer (generate-new-buffer $outBufName))
|
||||
(xah-find--print-header $outBuffer "xah-find-text" InputDir PathRegex SearchStr )
|
||||
(mapc
|
||||
(lambda ($path)
|
||||
(setq $count 0)
|
||||
(with-temp-buffer
|
||||
(insert-file-contents $path)
|
||||
(while (search-forward SearchStr nil t)
|
||||
(setq $count (1+ $count))
|
||||
(when PrintContext-p (xah-find--occur-output (match-beginning 0) (match-end 0) $path $outBuffer)))
|
||||
(when (> $count 0) (xah-find--print-file-count $path $count $outBuffer))))
|
||||
(seq-filter (lambda (x) (not (xah-find--ignore-dir-p x)))
|
||||
(directory-files-recursively InputDir PathRegex)))
|
||||
(princ "Done." $outBuffer)
|
||||
(xah-find--switch-to-output $outBuffer)))
|
||||
|
||||
(defun xah-find-count-slash (Path)
|
||||
"Count the number of slash in path.
|
||||
Useful for finding the level of a nested dir.
|
||||
Note: you should probably call `expand-file-name' on Path first to canonize path, to make sure dir name always ends in slash.
|
||||
Version 2021-10-11"
|
||||
(interactive)
|
||||
(seq-count (lambda (x) (char-equal x ?/)) Path))
|
||||
|
||||
;;;###autoload
|
||||
(defun xah-find-replace-text (SearchStr ReplaceStr InputDir PathRegex DepthMin DepthMax WriteToFileQ FixedCaseSearchQ FixedCaseReplaceQ BackupQ)
|
||||
"Find/Replace string in all files of a directory.
|
||||
Search string can span multiple lines.
|
||||
Search string is not regex.
|
||||
`xah-find-dir-ignore-regex-list' is respected.
|
||||
|
||||
Backup, if requested, backup filenames has suffix with timestamp, like this: ~xf20150531T233826~
|
||||
|
||||
Result is shown in buffer *xah-find output*.
|
||||
\\{xah-find-output-mode-map}
|
||||
|
||||
version 2021-10-11"
|
||||
(interactive
|
||||
(let (($searchStr (read-string (format "Search string (default %s): " (current-word)) nil 'query-replace-history (current-word)))
|
||||
($replaceStr (read-string "Replace string: " nil 'query-replace-history))
|
||||
($inputDir (ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH"))
|
||||
($pathRegex (read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history))
|
||||
;; ($recurseQ (yes-or-no-p "Recurse to subdirs?"))
|
||||
($depthMin (read-number "Min dir depth. Start dir has depth 0:" 0))
|
||||
($depthMax (read-number "Max dir depth. (max+1 depth subdir files are excluded):" 9))
|
||||
($writeToFileQ (y-or-n-p "Write changes to file?"))
|
||||
($fixedCaseSearchQ (y-or-n-p "Fixed case in search?"))
|
||||
($fixedCaseReplaceQ (y-or-n-p "Fixed case in replacement?"))
|
||||
($backupQ (y-or-n-p "Make backup?")))
|
||||
(list $searchStr $replaceStr $inputDir $pathRegex
|
||||
$depthMin $depthMax
|
||||
$writeToFileQ $fixedCaseSearchQ $fixedCaseReplaceQ $backupQ)))
|
||||
(let (($outBufName "*xah-find output*")
|
||||
$outBuffer
|
||||
($backupSuffix (xah-find--backup-suffix "xf"))
|
||||
($rootDepth (xah-find-count-slash (expand-file-name InputDir))))
|
||||
(when (get-buffer $outBufName) (kill-buffer $outBufName))
|
||||
(setq $outBuffer (generate-new-buffer $outBufName))
|
||||
(xah-find--print-header $outBuffer "xah-find-replace-text" InputDir PathRegex SearchStr ReplaceStr WriteToFileQ BackupQ)
|
||||
(mapc
|
||||
(lambda ($f)
|
||||
(let ((case-fold-search (not FixedCaseSearchQ))
|
||||
($count 0))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents $f)
|
||||
(while (search-forward SearchStr nil t)
|
||||
(setq $count (1+ $count))
|
||||
(replace-match ReplaceStr FixedCaseReplaceQ "literalreplace")
|
||||
(xah-find--occur-output (match-beginning 0) (point) $f $outBuffer))
|
||||
(when (> $count 0)
|
||||
(when WriteToFileQ
|
||||
(when BackupQ (copy-file $f (concat $f $backupSuffix) t))
|
||||
(write-region (point-min) (point-max) $f nil 3))
|
||||
(xah-find--print-file-count $f $count $outBuffer)))))
|
||||
(seq-filter
|
||||
(lambda (x)
|
||||
(let (($df (- (xah-find-count-slash x) $rootDepth)))
|
||||
(and (>= $df DepthMin) (<= $df DepthMax))))
|
||||
(directory-files-recursively InputDir PathRegex)))
|
||||
(princ "Done." $outBuffer)
|
||||
(xah-find--switch-to-output $outBuffer)))
|
||||
|
||||
;;;###autoload
|
||||
(defun xah-find-text-regex (SearchRegex InputDir PathRegex RecurseQ FixedCaseSearchQ PrintContextLevel)
|
||||
"Report files that contain a string pattern, similar to `rgrep'.
|
||||
Result is shown in buffer *xah-find output*.
|
||||
`xah-find-dir-ignore-regex-list' is respected.
|
||||
|
||||
\\{xah-find-output-mode-map}
|
||||
Version 2016-12-21 2021-10-11"
|
||||
(interactive
|
||||
(list
|
||||
(read-string (format "Search regex (default %s): " (current-word)) nil 'query-replace-history (current-word))
|
||||
(ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH")
|
||||
(read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history)
|
||||
(yes-or-no-p "Recurse to subdirs?")
|
||||
(y-or-n-p "Fixed case search?")
|
||||
(ido-completing-read "Print context level: " '("with context string" "just matched pattern" "none"))))
|
||||
(let (($count 0)
|
||||
($outBufName "*xah-find output*")
|
||||
$outBuffer
|
||||
)
|
||||
(setq InputDir (file-name-as-directory InputDir)) ; add ending slash
|
||||
(when (get-buffer $outBufName) (kill-buffer $outBufName))
|
||||
(setq $outBuffer (generate-new-buffer $outBufName))
|
||||
(xah-find--print-header $outBuffer "xah-find-text-regex" InputDir PathRegex SearchRegex)
|
||||
(mapc
|
||||
(lambda ($fp)
|
||||
(setq $count 0)
|
||||
(with-temp-buffer
|
||||
(insert-file-contents $fp)
|
||||
(setq case-fold-search (not FixedCaseSearchQ))
|
||||
(while (re-search-forward SearchRegex nil t)
|
||||
(setq $count (1+ $count))
|
||||
(cond
|
||||
((equal PrintContextLevel "none") nil)
|
||||
((equal PrintContextLevel "just matched pattern")
|
||||
(xah-find--occur-output (match-beginning 0) (match-end 0) $fp $outBuffer t))
|
||||
((equal PrintContextLevel "with context string")
|
||||
(xah-find--occur-output (match-beginning 0) (match-end 0) $fp $outBuffer))))
|
||||
(when (> $count 0) (xah-find--print-file-count $fp $count $outBuffer))))
|
||||
(seq-filter (lambda (x) (not (xah-find--ignore-dir-p x)))
|
||||
(if RecurseQ
|
||||
(directory-files-recursively InputDir PathRegex)
|
||||
(directory-files InputDir t PathRegex))))
|
||||
(princ "Done." $outBuffer)
|
||||
(xah-find--switch-to-output $outBuffer)))
|
||||
|
||||
;;;###autoload
|
||||
(defun xah-find-replace-text-regex (Regex ReplaceStr InputDir PathRegex WriteToFileQ FixedCaseSearchQ FixedCaseReplaceQ ShowcontexQ BackupQ)
|
||||
"Find/Replace by regex in all files of a directory.
|
||||
|
||||
`xah-find-dir-ignore-regex-list' is respected.
|
||||
|
||||
Backup, if requested, backup filenames has suffix with timestamp, like this: ~xf20150531T233826~
|
||||
|
||||
When called in lisp code:
|
||||
Regex is a regex pattern.
|
||||
ReplaceStr is replacement string.
|
||||
InputDir is input directory to search (includes all nested subdirectories).
|
||||
PathRegex is a regex to filter file paths.
|
||||
WriteToFileQ, when true, write to file, else, print a report of changes only.
|
||||
FixedCaseSearchQ sets `case-fold-search' for this operation.
|
||||
FixedCaseReplaceQ if true, then the letter-case in replacement is literal. (this is relevant only if FixedCaseSearchQ is true.)
|
||||
ShowcontexQ print characters before and after match.
|
||||
BackupQ if ture does backup.
|
||||
|
||||
Result is shown in buffer *xah-find output*.
|
||||
\\{xah-find-output-mode-map}
|
||||
|
||||
Version 2018-08-20 2021-10-11"
|
||||
(interactive
|
||||
(list
|
||||
(read-regexp "Find regex: " )
|
||||
(read-string (format "Replace string: ") nil 'query-replace-history)
|
||||
(ido-read-directory-name "Directory: " default-directory default-directory "MUSTMATCH")
|
||||
(read-from-minibuffer "File path regex: " (xah-find--get-fpath-regex "el") nil nil 'dired-regexp-history)
|
||||
(y-or-n-p "Write changes to file?")
|
||||
(y-or-n-p "Fixed case in search?")
|
||||
(y-or-n-p "Fixed case in replacement?")
|
||||
(y-or-n-p "Show context before after in output?")
|
||||
(y-or-n-p "Make backup?")))
|
||||
(let (($outBufName "*xah-find output*")
|
||||
$outBuffer
|
||||
($backupSuffix (xah-find--backup-suffix "xfr")))
|
||||
(when (get-buffer $outBufName) (kill-buffer $outBufName))
|
||||
(setq $outBuffer (generate-new-buffer $outBufName))
|
||||
(xah-find--print-header $outBuffer "xah-find-replace-text-regex" InputDir PathRegex Regex ReplaceStr WriteToFileQ BackupQ )
|
||||
(mapc
|
||||
(lambda ($fp)
|
||||
(let (($count 0))
|
||||
(with-temp-buffer
|
||||
(insert-file-contents $fp)
|
||||
(setq case-fold-search (not FixedCaseSearchQ))
|
||||
(while (re-search-forward Regex nil t)
|
||||
(setq $count (1+ $count))
|
||||
;; (xah-find--print-occur-block (match-beginning 0) (match-end 0) $outBuffer)
|
||||
(xah-find--occur-output (match-beginning 0) (match-end 0) $fp $outBuffer t)
|
||||
(replace-match ReplaceStr FixedCaseReplaceQ)
|
||||
(xah-find--occur-output (match-beginning 0) (point) $fp $outBuffer (not ShowcontexQ) t))
|
||||
(when (> $count 0)
|
||||
(xah-find--print-file-count $fp $count $outBuffer)
|
||||
(when WriteToFileQ
|
||||
(when BackupQ
|
||||
(copy-file $fp (concat $fp $backupSuffix) t))
|
||||
(write-region (point-min) (point-max) $fp nil 3))))))
|
||||
(seq-filter (lambda (x) (not (xah-find--ignore-dir-p x)))
|
||||
(directory-files-recursively InputDir PathRegex)))
|
||||
(princ "Done." $outBuffer)
|
||||
(xah-find--switch-to-output $outBuffer)))
|
||||
|
||||
(provide 'xah-find)
|
||||
|
||||
;;; xah-find.el ends here
|
||||
@@ -1,512 +0,0 @@
|
||||
;;; acme-theme.el --- A color theme based on Acme & Sam from Plan 9 -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2020 Ian Yi-En Pan
|
||||
|
||||
;; Author: Ian Y.E. Pan
|
||||
;; URL: https://github.com/ianpan870102/acme-emacs-theme
|
||||
;; Version: 1.0.0
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;; A color theme for Emacs based on Acme & Sam from Plan 9
|
||||
|
||||
;;; Credits:
|
||||
;; This theme was modified from John Louis Del Rosario's plan9-theme.el
|
||||
|
||||
;;; Code:
|
||||
|
||||
(defgroup acme-theme nil
|
||||
"Options for acme theme."
|
||||
:group 'faces)
|
||||
|
||||
(defcustom acme-theme-black-fg nil
|
||||
"If non-nil, foreground will be pure black instead of the default dark grey."
|
||||
:group 'acme-theme
|
||||
:type 'boolean)
|
||||
|
||||
(deftheme acme "A color theme based on Acme & Sam")
|
||||
|
||||
;;; Color palette
|
||||
|
||||
(let ((class '((class color) (min-colors 89)))
|
||||
(bg "#FFFFE8") ; default bg
|
||||
(bg-alt "#EFEFD8")
|
||||
(bg-dark "#E5E5D0")
|
||||
(fg (if acme-theme-black-fg "#000000" "#444444")) ; default fg
|
||||
(fg-alt "#B8B09A")
|
||||
(fg-dark "#988D6D")
|
||||
(fg-light "#CCCCB7")
|
||||
(highlight "#E8EB98")
|
||||
(highlight-alt "#E8EBC8")
|
||||
|
||||
;; Standardized palette
|
||||
(acme-cyan "#007777")
|
||||
(acme-cyan-light "#A8EFEB")
|
||||
(acme-red "#880000")
|
||||
(acme-red-light "#F8E8E8")
|
||||
(acme-yellow "#888838")
|
||||
(acme-yellow-light "#F8FCE8")
|
||||
(acme-green "#005500")
|
||||
(acme-green-alt "#006600")
|
||||
(acme-green-light "#E8FCE8")
|
||||
(acme-blue "#1054AF")
|
||||
(acme-blue-light "#E1FAFF")
|
||||
(acme-purple "#555599")
|
||||
(acme-purple-light "#FFEAFF"))
|
||||
|
||||
;;; Theme Faces
|
||||
(custom-theme-set-faces
|
||||
'acme
|
||||
|
||||
;;;; Built-in
|
||||
|
||||
;;;;; basic coloring
|
||||
`(button ((t (:underline t))))
|
||||
`(link ((t (:foreground "#0066cc":weight normal))))
|
||||
`(highlight ((t (:inherit link :underline t)))) ; link hover
|
||||
`(link-visited ((t (:foreground ,acme-purple :underline t :weight normal))))
|
||||
`(default ((t (:foreground ,fg :background ,bg))))
|
||||
`(cursor ((t (:foreground ,bg :background ,fg))))
|
||||
`(escape-glyph ((t (:foreground ,acme-cyan-light :bold nil))))
|
||||
`(fringe ((t (:foreground ,fg :background ,bg))))
|
||||
`(line-number ((t (:foreground ,fg :background ,bg-alt))))
|
||||
`(line-number-current-line ((t (:foreground ,fg :background ,bg-alt))))
|
||||
`(header-line ((t (:foreground ,fg :background ,acme-blue-light :box t))))
|
||||
`(success ((t (:foreground ,acme-green :weight normal))))
|
||||
`(warning ((t (:foreground ,acme-red :weight normal))))
|
||||
`(error ((t (:foreground ,acme-red :bold t))))
|
||||
|
||||
;;;;; compilation
|
||||
`(compilation-column-face ((t (:foreground ,acme-yellow :background ,acme-yellow-light))))
|
||||
`(compilation-column-number ((t (:foreground ,acme-yellow :background ,acme-yellow-light))))
|
||||
`(compilation-error-face ((t (:foreground ,acme-red :weight normal :underline t))))
|
||||
`(compilation-face ((t (:foreground ,fg))))
|
||||
`(compilation-info-face ((t (:foreground ,acme-blue))))
|
||||
`(compilation-info ((t (:foreground ,acme-blue :underline t))))
|
||||
`(compilation-line-face ((t (:foreground ,acme-purple))))
|
||||
`(compilation-line-number ((t (:foreground ,acme-yellow :background ,acme-yellow-light))))
|
||||
`(compilation-message-face ((t (:foreground ,acme-blue))))
|
||||
`(compilation-warning-face ((t (:foreground ,acme-yellow :weight normal :underline t))))
|
||||
`(compilation-mode-line-exit ((t (:foreground ,acme-cyan :weight normal))))
|
||||
`(compilation-mode-line-fail ((t (:foreground ,acme-red :weight normal))))
|
||||
`(compilation-mode-line-run ((t (:foreground ,acme-purple :weight normal))))
|
||||
|
||||
;;;;; grep
|
||||
`(grep-context-face ((t (:foreground ,fg-alt))))
|
||||
`(grep-error-face ((t (:foreground ,acme-red :weight normal :underline t))))
|
||||
`(grep-hit-face ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(grep-match-face ((t (:foreground ,acme-cyan :weight normal))))
|
||||
`(match ((t (:background ,acme-cyan :foreground ,acme-cyan-light))))
|
||||
|
||||
;;;;; ag
|
||||
`(ag-hit-face ((t (:foreground ,acme-green :weight normal))))
|
||||
`(ag-match-face ((t (:foreground ,acme-cyan :background ,acme-cyan-light :weight normal))))
|
||||
|
||||
;;;;; isearch
|
||||
`(isearch ((t (:foreground ,fg :weight normal :background ,acme-cyan-light))))
|
||||
`(isearch-fail ((t (:foreground ,fg :weight normal :background ,acme-red))))
|
||||
`(lazy-highlight ((t (:foreground ,fg :weight normal :background ,acme-blue-light))))
|
||||
|
||||
`(menu ((t (:foreground ,bg :background ,fg))))
|
||||
`(minibuffer-prompt ((t (:foreground ,fg :weight normal))))
|
||||
`(region ((,class (:foreground ,fg :background ,highlight :extend nil))))
|
||||
`(secondary-selection ((t (:background ,acme-green-light))))
|
||||
`(trailing-whitespace ((t (:background ,acme-red-light))))
|
||||
`(vertical-border ((t (:foreground ,acme-cyan))))
|
||||
|
||||
;;;;; font lock
|
||||
`(font-lock-builtin-face ((t (:foreground ,fg :weight normal))))
|
||||
`(font-lock-function-name-face ((t (:foreground ,fg :weight normal))))
|
||||
`(font-lock-string-face ((t (:foreground ,acme-red))))
|
||||
`(font-lock-keyword-face ((t (:foreground ,acme-blue :weight bold)))) ; if, else, for, while, return...
|
||||
`(font-lock-type-face ((t (:foreground ,fg :weight bold)))) ; int, float, string, void...
|
||||
`(font-lock-constant-face ((t (:foreground ,fg :weight bold)))) ; NULL, nullptr, true, false...
|
||||
`(font-lock-variable-name-face ((t (:foreground ,fg :weight normal))))
|
||||
`(font-lock-comment-face ((t (:foreground ,acme-green :italic nil))))
|
||||
`(font-lock-comment-delimiter-face ((t (:foreground ,acme-green :italic nil))))
|
||||
`(font-lock-doc-face ((t (:foreground ,acme-yellow :italic nil))))
|
||||
`(font-lock-negation-char-face ((t (:foreground ,acme-red :weight normal))))
|
||||
`(font-lock-preprocessor-face ((t (:foreground ,acme-red :weight normal))))
|
||||
`(font-lock-regexp-grouping-construct ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(font-lock-regexp-grouping-backslash ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(font-lock-warning-face ((t (:foreground ,acme-red :weight normal))))
|
||||
|
||||
;;;;; table
|
||||
`(table-cell ((t (:background ,bg-alt))))
|
||||
|
||||
;;;;; ledger
|
||||
`(ledger-font-directive-face ((t (:foreground ,acme-cyan))))
|
||||
`(ledger-font-periodic-xact-face ((t (:inherit ledger-font-directive-face))))
|
||||
`(ledger-font-posting-account-face ((t (:foreground ,acme-blue))))
|
||||
`(ledger-font-posting-amount-face ((t (:foreground ,acme-red))))
|
||||
`(ledger-font-posting-date-face ((t (:foreground ,acme-red :weight normal))))
|
||||
`(ledger-font-payee-uncleared-face ((t (:foreground ,acme-purple))))
|
||||
`(ledger-font-payee-cleared-face ((t (:foreground ,fg))))
|
||||
`(ledger-font-payee-pending-face ((t (:foreground ,acme-yellow))))
|
||||
`(ledger-font-xact-highlight-face ((t (:background ,bg-alt))))
|
||||
|
||||
;;;; Third-party
|
||||
|
||||
|
||||
;;;;; anzu
|
||||
`(anzu-mode-line ((t (:foreground ,acme-yellow :background ,acme-yellow-light :weight normal))))
|
||||
|
||||
;;;;; clojure-mode
|
||||
`(clojure-interop-method-face ((t (:inherit font-lock-function-name-face))))
|
||||
|
||||
;;;;; clojure-test-mode
|
||||
`(clojure-test-failure-face ((t (:foreground ,acme-red :weight normal :underline t))))
|
||||
`(clojure-test-error-face ((t (:foreground ,acme-red :weight normal :underline t))))
|
||||
`(clojure-test-success-face ((t (:foreground ,acme-green :weight normal :underline t))))
|
||||
|
||||
;;;;; diff
|
||||
`(diff-added ((,class (:foreground ,fg :background ,acme-green-light))
|
||||
(t (:foreground ,fg :background ,acme-green-light))))
|
||||
`(diff-changed ((t (:foreground ,acme-yellow))))
|
||||
`(diff-context ((t (:foreground ,fg))))
|
||||
`(diff-removed ((,class (:foreground ,fg :background ,acme-red-light))
|
||||
(t (:foreground ,fg :background ,acme-red-light))))
|
||||
`(diff-refine-added ((t :inherit diff-added :background ,acme-green-light :weight bold :underline t)))
|
||||
`(diff-refine-change ((t :inherit diff-changed :weight normal)))
|
||||
`(diff-refine-removed ((t :inherit diff-removed :background ,acme-red-light :weight bold :underline t)))
|
||||
`(diff-header ((,class (:foreground ,fg :weight normal))
|
||||
(t (:foreground ,acme-purple-light :weight normal))))
|
||||
`(diff-file-header ((,class (:foreground ,fg :background ,acme-cyan-light :weight normal))
|
||||
(t (:foreground ,fg :background ,acme-cyan-light :weight normal))))
|
||||
`(diff-hunk-header ((,class (:foreground ,acme-green :weight normal))
|
||||
(t (:foreground ,acme-green :weight normal))))
|
||||
;;;;; dired/dired+/dired-subtree
|
||||
`(dired-directory ((t (:foreground ,acme-blue :weight bold))))
|
||||
`(diredp-display-msg ((t (:foreground ,acme-blue))))
|
||||
`(diredp-compressed-file-suffix ((t (:foreground ,acme-purple))))
|
||||
`(diredp-date-time ((t (:foreground ,acme-green))))
|
||||
`(diredp-deletion ((t (:foreground ,acme-red))))
|
||||
`(diredp-deletion-file-name ((t (:foreground ,acme-red))))
|
||||
`(diredp-dir-heading ((t (:foreground ,acme-blue :background ,acme-blue-light :weight bold))))
|
||||
`(diredp-dir-priv ((t (:foreground ,acme-blue))))
|
||||
`(diredp-exec-priv ((t (:foreground ,acme-yellow))))
|
||||
`(diredp-executable-tag ((t (:foreground ,acme-yellow))))
|
||||
`(diredp-file-name ((t (:foreground ,fg))))
|
||||
`(diredp-file-suffix ((t (:foreground ,acme-yellow))))
|
||||
`(diredp-flag-mark ((t (:foreground ,acme-cyan))))
|
||||
`(diredp-flag-mark-line ((t (:foreground ,acme-cyan))))
|
||||
`(diredp-ignored-file-name ((t (:foreground ,fg-light))))
|
||||
`(diredp-link-priv ((t (:foreground ,acme-purple))))
|
||||
`(diredp-mode-line-flagged ((t (:foreground ,acme-yellow))))
|
||||
`(diredp-mode-line-marked ((t (:foreground ,acme-yellow))))
|
||||
`(diredp-no-priv ((t (:foreground ,fg))))
|
||||
`(diredp-number ((t (:foreground ,acme-blue))))
|
||||
`(diredp-other-priv ((t (:foreground ,fg))))
|
||||
`(diredp-rare-priv ((t (:foreground ,fg))))
|
||||
`(diredp-read-priv ((t (:foreground ,fg))))
|
||||
`(diredp-symlink ((t (:foreground ,fg :background ,acme-blue-light))))
|
||||
`(diredp-write-priv ((t (:foreground ,fg))))
|
||||
`(diredp-dir-name ((t (:foreground ,acme-blue :weight bold))))
|
||||
`(dired-subtree-depth-1-face ((t (:background ,bg))))
|
||||
`(dired-subtree-depth-2-face ((t (:background ,bg))))
|
||||
`(dired-subtree-depth-3-face ((t (:background ,bg))))
|
||||
|
||||
;;;;; elfeed
|
||||
`(elfeed-search-date-face ((t (:foreground ,acme-blue))))
|
||||
`(elfeed-search-title-face ((t (:foreground ,fg))))
|
||||
`(elfeed-search-unread-title-face ((t (:foreground ,fg))))
|
||||
`(elfeed-search-feed-face ((t (:foreground ,acme-green))))
|
||||
`(elfeed-search-tag-face ((t (:foreground ,acme-red))))
|
||||
`(elfeed-search-unread-count-face ((t (:foreground ,fg))))
|
||||
|
||||
;;;;; erc
|
||||
`(erc-default-face ((t (:foreground ,fg))))
|
||||
`(erc-header-line ((t (:inherit header-line))))
|
||||
`(erc-action-face ((t (:inherit erc-default-face))))
|
||||
`(erc-bold-face ((t (:inherit erc-default-face :weight normal))))
|
||||
`(erc-underline-face ((t (:underline t))))
|
||||
`(erc-error-face ((t (:inherit font-lock-warning-face))))
|
||||
`(erc-prompt-face ((t (:foreground ,acme-green :background ,acme-green-light :weight normal))))
|
||||
`(erc-timestamp-face ((t (:foreground ,acme-green :background ,acme-green-light))))
|
||||
`(erc-direct-msg-face ((t (:inherit erc-default))))
|
||||
`(erc-notice-face ((t (:foreground ,fg-light))))
|
||||
`(erc-highlight-face ((t (:background ,highlight))))
|
||||
`(erc-input-face ((t (:foreground ,fg :background ,bg-alt))))
|
||||
`(erc-current-nick-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal
|
||||
:box (:line-width 1 :style released-button)))))
|
||||
`(erc-nick-default-face ((t (:weight normal :background ,bg-alt))))
|
||||
`(erc-my-nick-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal
|
||||
:box (:line-width 1 :style released-button)))))
|
||||
`(erc-nick-msg-face ((t (:inherit erc-default))))
|
||||
`(erc-fool-face ((t (:inherit erc-default))))
|
||||
`(erc-pal-face ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(erc-dangerous-host-face ((t (:inherit font-lock-warning-face))))
|
||||
`(erc-keyword-face ((t (:foreground ,acme-yellow :weight normal))))
|
||||
|
||||
;;;;; evil
|
||||
`(evil-search-highlight-persist-highlight-face ((t (:inherit lazy-highlight))))
|
||||
|
||||
;;;;; flx
|
||||
`(flx-highlight-face ((t (:foreground ,acme-yellow :background ,acme-green-light
|
||||
:weight normal :underline t))))
|
||||
|
||||
;;;;; company
|
||||
`(company-tooltip ((t (:background ,acme-blue-light))))
|
||||
`(company-tooltip-selection ((t (:background ,acme-cyan-light))))
|
||||
`(company-tooltip-common ((t (:foreground ,acme-blue :bold t))))
|
||||
`(company-tooltip-annotation ((t (:foreground ,acme-yellow :italic t)))) ; parameter hints etc.
|
||||
`(company-scrollbar-fg ((t (:background ,acme-cyan))))
|
||||
`(company-scrollbar-bg ((t (:background ,acme-cyan-light))))
|
||||
`(company-preview-common ((t (:foreground ,fg :background ,acme-cyan-light))))
|
||||
|
||||
;;;;; highlight-symbol
|
||||
`(highlight-symbol-face ((t (:background ,bg-alt))))
|
||||
|
||||
;;;;; highlight-numbers
|
||||
`(highlight-numbers-number ((t (:foreground ,acme-blue))))
|
||||
|
||||
;;;;; highlight-operators
|
||||
`(highlight-operators-face ((t (:foreground ,fg))))
|
||||
|
||||
;;;;; hl-todo
|
||||
`(hl-todo ((t (:inverse-video t))))
|
||||
|
||||
;;;;; hl-line-mode
|
||||
`(hl-line ((,class (:background ,bg-alt))))
|
||||
|
||||
;;;;; hl-sexp
|
||||
`(hl-sexp-face ((,class (:background ,bg-alt))))
|
||||
|
||||
;;;;; ido-mode
|
||||
`(ido-first-match ((t (:foreground ,fg :weight normal))))
|
||||
`(ido-only-match ((t (:foreground ,fg :weight normal))))
|
||||
`(ido-subdir ((t (:foreground ,acme-blue))))
|
||||
`(ido-indicator ((t (:foreground ,acme-yellow))))
|
||||
|
||||
;;;;; ido-vertical
|
||||
`(ido-vertical-first-match-face ((t (:foreground ,fg :background ,acme-cyan-light :weight normal))))
|
||||
`(ido-vertical-only-match-face ((t (:foreground ,acme-red :background ,acme-red-light :weight normal))))
|
||||
`(ido-vertical-match-face ((t (:foreground ,fg :background ,acme-green-light
|
||||
:weight normal :underline t))))
|
||||
|
||||
;;;;; indent-guide
|
||||
`(indent-guide-face ((t (:foreground ,highlight))))
|
||||
|
||||
;;;;; ivy
|
||||
`(ivy-current-match ((t (:background ,acme-blue-light :underline t :extend t))))
|
||||
`(ivy-minibuffer-match-face-1 ((t (:background ,bg-alt))))
|
||||
`(ivy-minibuffer-match-face-2 ((t (:background ,acme-cyan-light))))
|
||||
`(ivy-minibuffer-match-face-3 ((t (:background ,acme-purple-light))))
|
||||
`(ivy-minibuffer-match-face-3 ((t (:background ,acme-blue-light))))
|
||||
|
||||
;;;;; js2-mode
|
||||
`(js2-warning ((t (:underline ,acme-yellow))))
|
||||
`(js2-error ((t (:foreground ,acme-red :weight normal))))
|
||||
`(js2-jsdoc-tag ((t (:foreground ,acme-purple))))
|
||||
`(js2-jsdoc-type ((t (:foreground ,acme-blue))))
|
||||
`(js2-jsdoc-value ((t (:foreground ,acme-cyan))))
|
||||
`(js2-function-param ((t (:foreground ,fg))))
|
||||
`(js2-external-variable ((t (:foreground ,acme-cyan))))
|
||||
|
||||
;;;;; linum-mode
|
||||
`(linum ((t (:foreground ,fg-light))))
|
||||
|
||||
;;;;; lsp-mode
|
||||
`(lsp-face-highlight-textual ((t (:background ,bg-dark))))
|
||||
`(lsp-face-highlight-read ((t (:background ,acme-purple-light))))
|
||||
`(lsp-face-highlight-write ((t (:background ,acme-green-light))))
|
||||
|
||||
;;;;; magit
|
||||
`(magit-section-heading ((t (:foreground ,acme-cyan :background ,acme-blue-light
|
||||
:weight normal :underline t))))
|
||||
`(magit-section-highlight ((t (:background ,bg-alt))))
|
||||
`(magit-section-heading-selection ((t (:background ,highlight))))
|
||||
`(magit-filename ((t (:foreground ,fg))))
|
||||
`(magit-hash ((t (:foreground ,acme-yellow :weight normal))))
|
||||
`(magit-tag ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(magit-refname ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(magit-head ((t (:foreground ,acme-green :weight normal))))
|
||||
`(magit-branch-local ((t (:foreground ,acme-blue :background ,acme-blue-light
|
||||
:weight normal))))
|
||||
`(magit-branch-remote ((t (:foreground ,acme-green :background ,acme-green-light
|
||||
:weight normal))))
|
||||
`(magit-branch-current ((t (:foreground ,acme-cyan :background ,acme-cyan-light
|
||||
:weight normal
|
||||
:box (:line-width 1 :color ,acme-cyan)))))
|
||||
`(magit-diff-file-heading ((t (:foreground ,fg :weight normal))))
|
||||
`(magit-diff-file-heading-highlight ((t (:background ,bg-alt))))
|
||||
`(magit-diff-file-heading-selection ((t (:foreground ,acme-red :background ,highlight))))
|
||||
`(magit-diff-hunk-heading ((t (:foreground ,acme-blue :background ,acme-blue-light :weight normal :underline t))))
|
||||
`(magit-diff-hunk-heading-highlight ((t (:background ,acme-cyan-light))))
|
||||
`(magit-diff-added ((t (:foreground ,acme-green :background ,acme-green-light))))
|
||||
`(magit-diff-removed ((t (:foreground ,acme-red :background ,acme-red-light))))
|
||||
`(magit-diff-context ((t (:foreground ,fg-dark :background nil))))
|
||||
`(magit-diff-added-highlight ((t (:foreground ,acme-green :background ,acme-green-light))))
|
||||
`(magit-diff-removed-highlight ((t (:foreground ,acme-red :background ,acme-red-light))))
|
||||
`(magit-diff-context-highlight ((t (:foreground ,fg-dark :background ,bg-alt))))
|
||||
`(magit-diffstat-added ((t (:foreground ,acme-green :background ,acme-green-light :weight normal))))
|
||||
`(magit-diffstat-removed ((t (:foreground ,acme-red :background ,acme-red-light :weight normal))))
|
||||
`(magit-log-author ((t (:foreground ,acme-blue :weight normal))))
|
||||
`(magit-log-date ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(magit-log-graph ((t (:foreground ,acme-red :weight normal))))
|
||||
`(magit-blame-heading ((t (:foreground ,fg-dark :background ,bg-alt))))
|
||||
|
||||
;;;;; paren-face
|
||||
`(parenthesis ((t (:foreground "#CCCCB7"))))
|
||||
|
||||
;;;;; project-explorer
|
||||
`(pe/file-face ((t (:foreground ,fg))))
|
||||
`(pe/directory-face ((t (:foreground ,acme-blue :weight normal))))
|
||||
|
||||
;;;;; rainbow-delimiters
|
||||
`(rainbow-delimiters-depth-1-face ((t (:foreground ,acme-green))))
|
||||
`(rainbow-delimiters-depth-2-face ((t (:foreground ,acme-blue))))
|
||||
`(rainbow-delimiters-depth-3-face ((t (:foreground ,acme-red))))
|
||||
|
||||
;;;;; show-paren
|
||||
`(show-paren-mismatch ((t (:foreground ,acme-yellow :background ,acme-red :weight normal))))
|
||||
`(show-paren-match ((t (:foreground ,fg :background ,acme-cyan-light :weight normal))))
|
||||
|
||||
;;;;; mode-line/sml-mode-line
|
||||
`(mode-line ((,class (:foreground ,fg :background ,acme-blue-light :box t))))
|
||||
`(mode-line-inactive ((t (:foreground ,fg :background ,bg-dark :box t))))
|
||||
`(mode-line-buffer-id ((t (:foreground ,fg :weight bold)))) ; associated buffer/file name
|
||||
`(sml/global ((t (:foreground ,fg))))
|
||||
`(sml/modes ((t (:foreground ,acme-green :background ,acme-green-light))))
|
||||
`(sml/filename ((t (:foreground ,acme-red))))
|
||||
`(sml/folder ((t (:foreground ,fg))))
|
||||
`(sml/prefix ((t (:foreground ,fg))))
|
||||
`(sml/read-only ((t (:foreground ,fg))))
|
||||
`(sml/modified ((t (:foreground ,acme-red :weight normal))))
|
||||
`(sml/outside-modified ((t (:background ,acme-red :foreground ,acme-red-light :weight normal))))
|
||||
`(sml/line-number ((t (:foreground ,fg :weight normal))))
|
||||
`(sml/col-number ((t (:foreground ,fg :weight normal))))
|
||||
`(sml/vc ((t (:foreground ,fg :weight normal))))
|
||||
`(sml/vc-edited ((t (:foreground ,acme-red :weight normal))))
|
||||
`(sml/git ((t (:foreground ,fg :weight normal))))
|
||||
|
||||
;;;;; sh
|
||||
`(sh-heredoc-face ((t (:foreground ,acme-purple))))
|
||||
|
||||
;;;;; web-mode
|
||||
`(web-mode-builtin-face ((t (:inherit ,font-lock-builtin-face))))
|
||||
`(web-mode-comment-face ((t (:inherit ,font-lock-comment-face))))
|
||||
`(web-mode-constant-face ((t (:inherit ,font-lock-constant-face))))
|
||||
`(web-mode-doctype-face ((t (:inherit ,font-lock-comment-face))))
|
||||
`(web-mode-folded-face ((t (:underline t))))
|
||||
`(web-mode-function-name-face ((t (:foreground ,fg :weight normal))))
|
||||
`(web-mode-html-attr-name-face ((t (:foreground ,fg))))
|
||||
`(web-mode-html-attr-value-face ((t (:inherit ,font-lock-string-face))))
|
||||
`(web-mode-html-tag-face ((t (:foreground ,acme-blue))))
|
||||
`(web-mode-keyword-face ((t (:inherit ,font-lock-keyword-face))))
|
||||
`(web-mode-preprocessor-face ((t (:inherit ,font-lock-preprocessor-face))))
|
||||
`(web-mode-string-face ((t (:inherit ,font-lock-string-face))))
|
||||
`(web-mode-type-face ((t (:inherit ,font-lock-type-face))))
|
||||
`(web-mode-variable-name-face ((t (:inherit ,font-lock-variable-name-face))))
|
||||
`(web-mode-server-background-face ((t (:background ,acme-green-light))))
|
||||
`(web-mode-server-comment-face ((t (:inherit web-mode-comment-face))))
|
||||
`(web-mode-server-string-face ((t (:foreground ,acme-red))))
|
||||
`(web-mode-symbol-face ((t (:inherit font-lock-constant-face))))
|
||||
`(web-mode-warning-face ((t (:inherit font-lock-warning-face))))
|
||||
`(web-mode-whitespaces-face ((t (:background ,acme-red-light))))
|
||||
`(web-mode-block-face ((t (:background ,acme-green-light))))
|
||||
`(web-mode-current-element-highlight-face ((t (:foreground ,fg :background ,acme-blue-light))))
|
||||
`(web-mode-json-key-face ((,class (:inherit font-lock-string-face))))
|
||||
`(web-mode-json-context-face ((,class (:inherit font-lock-string-face :bold t))))
|
||||
|
||||
;;;;; which-func-mode
|
||||
`(which-func ((t (:foreground ,acme-purple :background ,acme-purple-light))))
|
||||
|
||||
;;;;; yascroll
|
||||
`(yascroll:thumb-text-area ((t (:background ,highlight))))
|
||||
`(yascroll:thumb-fringe ((t (:background ,bg :foreground ,bg
|
||||
:box (:line-width 1 :style released-button)))))
|
||||
|
||||
;;;;; Org
|
||||
`(org-level-1 ((t (:background ,acme-blue-light :foreground ,acme-blue :weight bold :overline t))))
|
||||
`(org-level-2 ((t (:background ,acme-blue-light :foreground ,acme-cyan :weight bold :overline t))))
|
||||
`(org-level-3 ((t (:background ,acme-blue-light :foreground ,acme-blue :weight bold :overline t))))
|
||||
`(org-level-4 ((t (:background ,acme-blue-light :foreground ,acme-cyan))))
|
||||
`(org-level-5 ((t (:background ,acme-blue-light :foreground ,acme-blue))))
|
||||
`(org-level-6 ((t (:background ,acme-blue-light :foreground ,acme-cyan))))
|
||||
`(org-level-7 ((t (:background ,acme-blue-light :foreground ,acme-blue))))
|
||||
`(org-level-8 ((t (:background ,acme-blue-light :foreground ,acme-cyan))))
|
||||
`(org-document-title ((t (:height 1.2 :foreground ,acme-blue :weight bold :underline t)))) ; #TITLE
|
||||
`(org-meta-line ((t (:foreground ,acme-green))))
|
||||
`(org-document-info ((t (:foreground ,acme-cyan :weight normal))))
|
||||
`(org-document-info-keyword ((t (:foreground ,acme-cyan))))
|
||||
`(org-todo ((t (:foreground ,acme-yellow :background ,bg-alt :weight normal :box (:line-width 1 :style released-button)))))
|
||||
`(org-done ((t (:foreground ,acme-green :background ,acme-green-light :weight normal :box (:style released-button)))))
|
||||
`(org-date ((t (:foreground ,acme-purple))))
|
||||
`(org-table ((t (:foreground ,acme-purple))))
|
||||
`(org-formula ((t (:foreground ,acme-blue :background ,bg-alt))))
|
||||
`(org-code ((t (:foreground ,acme-red :background ,bg-alt))))
|
||||
`(org-verbatim ((t (:foreground ,fg :background ,bg-alt :underline t))))
|
||||
`(org-special-keyword ((t (:foreground ,acme-cyan))))
|
||||
`(org-agenda-date ((t (:foreground ,acme-cyan))))
|
||||
`(org-agenda-structure ((t (:foreground ,acme-purple))))
|
||||
`(org-block ((t (:foreground ,fg :background ,bg-alt :extend t))))
|
||||
`(org-block-background ((t (:background ,bg-alt :extend t))))
|
||||
`(org-block-begin-line ((t (:foreground ,fg-alt :background ,bg-dark :italic t :extend t))))
|
||||
`(org-block-end-line ((t (:foreground ,fg-alt :background ,bg-dark :italic t :extend t))))
|
||||
|
||||
;;;;; origami
|
||||
`(origami-fold-replacement-face ((t (:foreground ,acme-red :background ,acme-red-light
|
||||
:box (:line-width -1)))))
|
||||
|
||||
;;;;; git-gutter
|
||||
`(git-gutter:added ((t (:background ,acme-green-alt :foreground ,acme-green-alt :weight normal))))
|
||||
`(git-gutter:deleted ((t (:background ,acme-red :foreground ,acme-red :weight normal))))
|
||||
`(git-gutter:modified ((t (:background ,acme-yellow :foreground ,acme-yellow :weight normal))))
|
||||
`(git-gutter-fr:added ((t (:background ,acme-green-alt :foreground ,acme-green-alt :weight normal))))
|
||||
`(git-gutter-fr:deleted ((t (:background ,acme-red :foreground ,acme-red :weight normal))))
|
||||
`(git-gutter-fr:modified ((t (:background ,acme-yellow :foreground ,acme-yellow :weight normal))))
|
||||
|
||||
;;;;; diff-hl
|
||||
`(diff-hl-insert ((t (:background ,acme-green-alt :foreground ,acme-green-alt))))
|
||||
`(diff-hl-delete ((t (:background ,acme-red :foreground ,acme-red))))
|
||||
`(diff-hl-change ((t (:background ,acme-yellow :foreground ,acme-yellow))))
|
||||
|
||||
;;;;; mu4e, mail
|
||||
`(mu4e-header-highlight-face ((t (:background ,highlight))))
|
||||
`(mu4e-unread-face ((t (:foreground ,acme-blue :weight normal))))
|
||||
`(mu4e-flagged-face ((t (:foreground ,acme-red :background ,acme-red-light :weight normal))))
|
||||
`(mu4e-compose-separator-face ((t (:foreground ,acme-green))))
|
||||
`(mu4e-header-value-face ((t (:foreground ,fg))))
|
||||
`(message-header-name ((t (:foreground ,acme-purple :weight normal))))
|
||||
`(message-header-to ((t (:foreground ,acme-blue))))
|
||||
`(message-header-subject ((t (:foreground ,acme-blue))))
|
||||
`(message-header-other ((t (:foreground ,acme-blue))))
|
||||
`(message-cited-text ((t (:inherit font-lock-comment-face))))
|
||||
|
||||
;;;;; term-mode (vterm too)
|
||||
`(term ((,class (:foreground ,fg :background ,bg))))
|
||||
`(term-color-black ((,class (:foreground ,fg :background ,fg))))
|
||||
`(term-color-blue ((,class (:foreground ,acme-blue :background ,acme-blue))))
|
||||
`(term-color-red ((,class (:foreground ,acme-red :background ,acme-red))))
|
||||
`(term-color-green ((,class (:foreground ,acme-green :background ,acme-green))))
|
||||
`(term-color-yellow ((,class (:foreground ,acme-yellow :background ,acme-yellow))))
|
||||
`(term-color-magenta ((,class (:foreground ,acme-purple :background ,acme-purple))))
|
||||
`(term-color-cyan ((,class (:foreground ,acme-cyan :background ,acme-cyan))))
|
||||
`(term-color-white ((,class (:foreground ,fg :background ,fg))))
|
||||
|
||||
;;;;; fill-column-indicator
|
||||
`(fci-rule-color ((t (:foreground ,highlight-alt))))
|
||||
`(fill-column-indicator ((t (:foreground ,highlight-alt))))))
|
||||
|
||||
;;;###autoload
|
||||
(when (and (boundp 'custom-theme-load-path) load-file-name)
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'acme)
|
||||
(provide 'acme-theme)
|
||||
|
||||
;;; acme-theme.el ends here
|
||||
@@ -11,18 +11,18 @@
|
||||
(custom-theme-set-faces
|
||||
'bedroom
|
||||
;; Basic faces
|
||||
'(default ((t (:foreground "#DADEE5" :background "#141B2B"))))
|
||||
'(default ((t (:foreground "#DADEE5" :background "#142B29"))))
|
||||
'(cursor ((t (:background "lightgreen"))))
|
||||
'(region ((t (:background "#15285A"))))
|
||||
'(region ((t (:background "#1F4A3A"))))
|
||||
'(hl-line ((t (:background "#000000"))))
|
||||
'(highlight ((t (:background "#15285A"))))
|
||||
'(mode-line ((t (:background "#1E3050" :foreground "#DADEE5"))))
|
||||
'(mode-line-inactive ((t (:background "#182438" :foreground "#6A7A8A"))))
|
||||
'(highlight ((t (:background "#1F4A3A"))))
|
||||
'(mode-line ((t (:background "#1E4A3A" :foreground "#DADEE5"))))
|
||||
'(mode-line-inactive ((t (:background "#183524" :foreground "#6A8A7A"))))
|
||||
'(vertical-border ((t (:foreground "#505050"))))
|
||||
'(fringe ((t (:background "#141B2B"))))
|
||||
'(window-divider ((t (:foreground "#3A4255"))))
|
||||
'(window-divider-first-pixel ((t (:foreground "#141B2B"))))
|
||||
'(window-divider-last-pixel ((t (:foreground "#3A4255"))))
|
||||
'(fringe ((t (:background "#142B29"))))
|
||||
'(window-divider ((t (:foreground "#3A5542"))))
|
||||
'(window-divider-first-pixel ((t (:foreground "#142B29"))))
|
||||
'(window-divider-last-pixel ((t (:foreground "#3A5542"))))
|
||||
'(tab-line ((t (:background "#505050" :foreground "#DADEE5"))))
|
||||
'(tab-line-tab ((t (:background "#505050" :foreground "#DADEE5"))))
|
||||
'(tab-line-tab-current ((t (:background "#505050" :foreground "#DADEE5"))))
|
||||
@@ -40,12 +40,12 @@
|
||||
'(font-lock-warning-face ((t (:foreground "#FC2D07"))))
|
||||
|
||||
;; Dired
|
||||
'(dired-directory ((t (:foreground "#5FAFD7" :weight bold))))
|
||||
'(dired-directory ((t (:foreground "#5FD7AF" :weight bold))))
|
||||
'(dired-symlink ((t (:foreground "#87919D"))))
|
||||
|
||||
;; Custom/widget faces
|
||||
'(custom-group-tag ((t (:underline t :foreground "lightblue"))))
|
||||
'(custom-variable-tag ((t (:underline t :foreground "lightblue"))))
|
||||
'(custom-group-tag ((t (:underline t :foreground "lightgreen"))))
|
||||
'(custom-variable-tag ((t (:underline t :foreground "lightgreen"))))
|
||||
'(widget-field ((t (:foreground "white"))))
|
||||
'(widget-single-line-field ((t (:background "darkgray")))))
|
||||
|
||||
|
||||
208
.emacs.d/themes/classic-theme.el
Normal file
208
.emacs.d/themes/classic-theme.el
Normal file
@@ -0,0 +1,208 @@
|
||||
;;; classic-theme.el --- classic theme
|
||||
|
||||
;; Copyright (C) 2000 by Frederic Giroud
|
||||
;; Copyright (C) 2013 by Syohei YOSHIDA
|
||||
|
||||
;; Author: Syohei YOSHIDA <syohex@gmail.com>
|
||||
;; URL: https://github.com/emacs-jp/replace-colorthemes
|
||||
;; Version: 0.01
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Port of classic theme from `color-themes'
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme classic
|
||||
"classic theme")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'classic
|
||||
|
||||
'(default ((t (:background "darkslategrey" :foreground "AntiqueWhite"))))
|
||||
;; avoid ugly random fringe color
|
||||
'(fringe ((t (:background "darkslategrey"))))
|
||||
|
||||
'(mouse ((t (:foreground "Grey"))))
|
||||
'(cursor ((t (:background "Red"))))
|
||||
'(border ((t (:foreground "black"))))
|
||||
|
||||
'(gnus-cite-attribution-face ((t (:lforeground "lemon chiffon" :bold t))))
|
||||
'(gnus-cite-face-1 ((t (:foreground "LightSalmon"))))
|
||||
'(gnus-cite-face-2 ((t (:foreground "Khaki"))))
|
||||
'(gnus-cite-face-3 ((t (:foreground "Coral"))))
|
||||
'(gnus-cite-face-4 ((t (:foreground "yellow green"))))
|
||||
'(gnus-cite-face-5 ((t (:foreground "dark khaki"))))
|
||||
'(gnus-cite-face-6 ((t (:foreground "bisque"))))
|
||||
'(gnus-cite-face-7 ((t (:foreground "peru"))))
|
||||
'(gnus-cite-face-8 ((t (:foreground "light coral"))))
|
||||
'(gnus-cite-face-9 ((t (:foreground "plum"))))
|
||||
'(gnus-emphasis-bold ((t (:bold t))))
|
||||
'(gnus-emphasis-bold-italic ((t (:italic t :bold t))))
|
||||
'(gnus-emphasis-highlight-words ((t (:background "black" :foreground "yellow"))))
|
||||
'(gnus-emphasis-italic ((t (:italic t))))
|
||||
'(gnus-emphasis-underline ((t (:underline t))))
|
||||
'(gnus-emphasis-underline-bold ((t (:bold t :underline t))))
|
||||
'(gnus-emphasis-underline-bold-italic ((t (:italic t :bold t :underline t))))
|
||||
'(gnus-emphasis-underline-italic ((t (:italic t :underline t))))
|
||||
'(gnus-group-mail-1-empty-face ((t (:foreground "White"))))
|
||||
'(gnus-group-mail-1-face ((t (:bold t :foreground "White"))))
|
||||
'(gnus-group-mail-2-empty-face ((t (:foreground "light cyan"))))
|
||||
'(gnus-group-mail-2-face ((t (:bold t :foreground "light cyan"))))
|
||||
'(gnus-group-mail-3-empty-face ((t (:foreground "LightBlue"))))
|
||||
'(gnus-group-mail-3-face ((t (:bold t :foreground "LightBlue"))))
|
||||
'(gnus-group-mail-low-empty-face ((t (:foreground "Aquamarine"))))
|
||||
'(gnus-group-mail-low-face ((t (:bold t :foreground "Aquamarine"))))
|
||||
'(gnus-group-news-1-empty-face ((t (:foreground "White"))))
|
||||
'(gnus-group-news-1-face ((t (:bold t :foreground "White"))))
|
||||
'(gnus-group-news-2-empty-face ((t (:foreground "light cyan"))))
|
||||
'(gnus-group-news-2-face ((t (:bold t :foreground "light cyan"))))
|
||||
'(gnus-group-news-3-empty-face ((t (:foreground "LightBlue"))))
|
||||
'(gnus-group-news-3-face ((t (:bold t :foreground "LightBlue"))))
|
||||
'(gnus-group-news-4-empty-face ((t (:foreground "Aquamarine"))))
|
||||
'(gnus-group-news-4-face ((t (:bold t :foreground "Aquamarine"))))
|
||||
'(gnus-group-news-5-empty-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(gnus-group-news-5-face ((t (:bold t :foreground "MediumAquamarine"))))
|
||||
'(gnus-group-news-6-empty-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(gnus-group-news-6-face ((t (:bold t :foreground "MediumAquamarine"))))
|
||||
'(gnus-group-news-low-empty-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(gnus-group-news-low-face ((t (:bold t :foreground "MediumAquamarine"))))
|
||||
'(gnus-header-content-face ((t (:foreground "LightSkyBlue3"))))
|
||||
'(gnus-header-from-face ((t (:bold t :foreground "light cyan"))))
|
||||
'(gnus-header-name-face ((t (:bold t :foreground "LightBlue"))))
|
||||
'(gnus-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine"))))
|
||||
'(gnus-header-subject-face ((t (:bold t :foreground "light cyan"))))
|
||||
'(gnus-signature-face ((t (:foreground "Grey"))))
|
||||
'(gnus-splash-face ((t (:foreground "ForestGreen"))))
|
||||
'(gnus-summary-cancelled-face ((t (:background "Black" :foreground "Yellow"))))
|
||||
'(gnus-summary-high-ancient-face ((t (:bold t :foreground "MediumAquamarine"))))
|
||||
'(gnus-summary-high-read-face ((t (:bold t :foreground "Aquamarine"))))
|
||||
'(gnus-summary-high-ticked-face ((t (:bold t :foreground "LightSalmon"))))
|
||||
'(gnus-summary-high-unread-face ((t (:bold t :foreground "beige"))))
|
||||
'(gnus-summary-low-ancient-face ((t (:foreground "DimGray"))))
|
||||
'(gnus-summary-low-read-face ((t (:foreground "slate gray"))))
|
||||
'(gnus-summary-low-ticked-face ((t (:foreground "Pink"))))
|
||||
'(gnus-summary-low-unread-face ((t (:foreground "LightGray"))))
|
||||
'(gnus-summary-normal-ancient-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(gnus-summary-normal-read-face ((t (:foreground "Aquamarine"))))
|
||||
'(gnus-summary-normal-ticked-face ((t (:foreground "LightSalmon"))))
|
||||
'(gnus-summary-normal-unread-face ((t (nil))))
|
||||
'(gnus-summary-selected-face ((t (:background "DarkSlateBlue"))))
|
||||
'(message-cited-text-face ((t (:foreground "LightSalmon"))))
|
||||
'(message-header-cc-face ((t (:foreground "light cyan"))))
|
||||
'(message-header-name-face ((t (:foreground "LightBlue"))))
|
||||
'(message-header-newsgroups-face ((t (:bold t :foreground "MediumAquamarine"))))
|
||||
'(message-header-other-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(message-header-subject-face ((t (:bold t :foreground "light cyan"))))
|
||||
'(message-header-to-face ((t (:bold t :foreground "light cyan"))))
|
||||
'(message-header-xheader-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(message-separator-face ((t (:foreground "chocolate"))))
|
||||
|
||||
'(apropos-keybinding-face ((t (:underline t))))
|
||||
'(apropos-label-face ((t (:italic t))))
|
||||
'(apropos-match-face ((t (:background "Aquamarine" :foreground "SlateBlue"))))
|
||||
'(apropos-property-face ((t (:italic t :bold t :foreground "beige"))))
|
||||
'(apropos-symbol-face ((t (:underline t :foreground "DodgerBlue1"))))
|
||||
'(goto-address-mail-face ((t (:bold t :foreground "light cyan"))))
|
||||
'(goto-address-mail-mouse-face ((t (:background "Aquamarine" :foreground "SlateBlue"))))
|
||||
'(goto-address-url-face ((t (:underline t :foreground "DodgerBlue1"))))
|
||||
'(goto-address-url-mouse-face ((t (:background "PaleGreen" :foreground "DarkGreen"))))
|
||||
'(list-matching-lines-face ((t (:bold t))))
|
||||
'(view-highlight-face ((t (:background "PaleGreen" :foreground "DarkGreen"))))
|
||||
|
||||
'(bold ((t (:bold t))))
|
||||
'(bold-italic ((t (:italic t :bold t :foreground "beige"))))
|
||||
'(calendar-today-face ((t (:underline t))))
|
||||
'(cperl-array-face ((t (:foreground "Yellow"))))
|
||||
'(cperl-hash-face ((t (:foreground "White"))))
|
||||
'(cperl-nonoverridable-face ((t (:foreground "SkyBlue"))))
|
||||
'(custom-button-face ((t (:underline t :foreground "MediumSlateBlue"))))
|
||||
'(custom-documentation-face ((t (:foreground "Grey"))))
|
||||
'(custom-group-tag-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(custom-state-face ((t (:foreground "LightSalmon"))))
|
||||
'(custom-variable-tag-face ((t (:foreground "Aquamarine"))))
|
||||
'(diary-face ((t (:foreground "IndianRed"))))
|
||||
'(erc-action-face ((t (:bold t))))
|
||||
'(erc-bold-face ((t (:bold t))))
|
||||
'(erc-default-face ((t (nil))))
|
||||
'(erc-direct-msg-face ((t (:foreground "LightSalmon"))))
|
||||
'(erc-error-face ((t (:bold t :foreground "IndianRed"))))
|
||||
'(erc-input-face ((t (:foreground "Beige"))))
|
||||
'(erc-inverse-face ((t (:background "wheat" :foreground "darkslategrey"))))
|
||||
'(erc-notice-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(erc-pal-face ((t (:foreground "pale green"))))
|
||||
'(erc-prompt-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(erc-underline-face ((t (:underline t))))
|
||||
'(eshell-ls-archive-face ((t (:bold t :foreground "IndianRed"))))
|
||||
'(eshell-ls-backup-face ((t (:foreground "Grey"))))
|
||||
'(eshell-ls-clutter-face ((t (:foreground "DimGray"))))
|
||||
'(eshell-ls-directory-face ((t (:bold t :foreground "MediumSlateBlue"))))
|
||||
'(eshell-ls-executable-face ((t (:foreground "Coral"))))
|
||||
'(eshell-ls-missing-face ((t (:foreground "black"))))
|
||||
'(eshell-ls-picture-face ((t (:foreground "Violet"))))
|
||||
'(eshell-ls-product-face ((t (:foreground "LightSalmon"))))
|
||||
'(eshell-ls-readonly-face ((t (:foreground "Aquamarine"))))
|
||||
'(eshell-ls-special-face ((t (:foreground "Gold"))))
|
||||
'(eshell-ls-symlink-face ((t (:foreground "White"))))
|
||||
'(eshell-ls-unreadable-face ((t (:foreground "DimGray"))))
|
||||
'(eshell-prompt-face ((t (:foreground "MediumAquamarine"))))
|
||||
'(font-lock-builtin-face ((t (:bold t :foreground "PaleGreen"))))
|
||||
'(font-lock-comment-face ((t (:foreground "tomato3"))))
|
||||
'(font-lock-constant-face ((t (:foreground "Aquamarine"))))
|
||||
'(font-lock-doc-string-face ((t (:foreground "LightSalmon3"))))
|
||||
'(font-lock-function-name-face ((t (:foreground "SteelBlue1"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "cyan1"))))
|
||||
'(font-lock-reference-face ((t (:foreground "LightSalmon2"))))
|
||||
'(font-lock-string-face ((t (:foreground "LightSalmon3"))))
|
||||
'(font-lock-type-face ((t (:foreground "PaleGreen3"))))
|
||||
'(font-lock-variable-name-face ((t (:foreground "khaki1"))))
|
||||
'(font-lock-warning-face ((t (:bold t :foreground "IndianRed"))))
|
||||
'(font-lock-preprocessor-face ((t (:foreground "SkyBlue3"))))
|
||||
'(widget-field-face ((t (:background "DarkCyan"))))
|
||||
'(custom-group-tag-face ((t(:foreground "brown" :underline t))))
|
||||
'(custom-state-face ((t (:foreground "khaki"))))
|
||||
'(highlight ((t (:background "PaleGreen" :foreground "DarkGreen"))))
|
||||
'(highline-face ((t (:background "SeaGreen"))))
|
||||
'(holiday-face ((t (:background "DimGray"))))
|
||||
'(info-menu-5 ((t (:underline t))))
|
||||
'(info-node ((t (:underline t :bold t :foreground "DodgerBlue1"))))
|
||||
'(info-xref ((t (:underline t :foreground "DodgerBlue1"))))
|
||||
'(isearch ((t (:foreground "red" :background "CornflowerBlue"))))
|
||||
'(italic ((t (:italic t))))
|
||||
'(mode-line ((t (:background "LightSlateGray" :foreground "AntiqueWhite"))))
|
||||
'(mode-line-buffer-id ((t (:background "LightSlateGray" :foreground "DarkBlue"))))
|
||||
'(mode-line-mousable ((t (:background "LightSlateGray" :foreground "firebrick"))))
|
||||
'(mode-line-mousable-minor-mode ((t (:background "LightSlateGray" :foreground "wheat"))))
|
||||
'(region ((t (:background "dark cyan" :foreground "cyan"))))
|
||||
'(secondary-selection ((t (:background "Aquamarine" :foreground "SlateBlue"))))
|
||||
'(show-paren-match-face ((t (:background "Aquamarine" :foreground "SlateBlue"))))
|
||||
'(show-paren-mismatch-face ((t (:background "Red" :foreground "White"))))
|
||||
'(underline ((t (:underline t))))
|
||||
'(widget-field-face ((t (:foreground "LightBlue"))))
|
||||
'(widget-inactive-face ((t (:foreground "DimGray"))))
|
||||
'(widget-single-line-field-face ((t (:foreground "LightBlue"))))
|
||||
'(woman-bold-face ((t (:bold t))))
|
||||
'(woman-italic-face ((t (:foreground "beige"))))
|
||||
'(woman-unknown-face ((t (:foreground "LightSalmon")))))
|
||||
|
||||
;;;###autoload
|
||||
(when load-file-name
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'classic)
|
||||
|
||||
;;; classic-theme.el ends here
|
||||
82
.emacs.d/themes/cobalt-theme.el
Normal file
82
.emacs.d/themes/cobalt-theme.el
Normal file
@@ -0,0 +1,82 @@
|
||||
;;; cobalt-theme.el --- cobalt theme
|
||||
|
||||
;; Copyright (C) 2012 by Nick Ewing
|
||||
;; Copyright (C) 2014 by Syohei YOSHIDA
|
||||
|
||||
;; Author: Nick Ewing
|
||||
;; URL: https://github.com/emacs-jp/replace-colorthemes
|
||||
;; Version: 0.01
|
||||
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; Port of cobalt theme from `color-themes'
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme cobalt
|
||||
"cobalt theme")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'cobalt
|
||||
|
||||
'(default ((t (:background "#09223F" :foreground "#F8F8F8"))))
|
||||
'(cursor ((t (:background "#A7A7A7"))))
|
||||
'(border ((t (:foreground "black"))))
|
||||
|
||||
'(buffers-tab ((t (:background "#09223F" :foreground "white"))))
|
||||
'(font-lock-builtin-face ((t (:foreground "#40FFB9"))))
|
||||
'(font-lock-comment-face ((t (:foreground "#008AFF"))))
|
||||
'(font-lock-constant-face ((t (:foreground "#FF518C"))))
|
||||
'(font-lock-doc-face ((t (:foreground "#008AFF"))))
|
||||
'(font-lock-function-name-face ((t (:foreground "#FFDD00"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "#FA9E18"))))
|
||||
'(font-lock-preprocessor-face ((t (:foreground "#8090A2"))))
|
||||
'(font-lock-reference-face ((t (:foreground "#CCCCCC"))))
|
||||
'(font-lock-regexp-grouping-backslash ((t (:foreground "#E9C062"))))
|
||||
'(font-lock-regexp-grouping-construct ((t (:foreground "red"))))
|
||||
'(font-lock-string-face ((t (:foreground "#42D915"))))
|
||||
'(font-lock-type-face ((t (:foreground "#FFEF79"))))
|
||||
'(font-lock-variable-name-face ((t (:foreground "#CCCCCC"))))
|
||||
'(font-lock-warning-face ((t (:foreground "Pink"))))
|
||||
'(hl-line ((t (:background "#00162A"))))
|
||||
'(linum ((t (:background "#111111" :foreground "#888888"
|
||||
:underline nil))))
|
||||
'(gui-element ((t (:background "#303030" :foreground "black"))))
|
||||
'(region ((t (:background "#444444"))))
|
||||
'(highlight ((t (:background "#26425D"))))
|
||||
'(show-paren-match ((t (:background "#26425D"))))
|
||||
'(show-paren-mismatch ((t (:background "#FF0000"))))
|
||||
'(ecb-default-highlight-face ((t (:background "#26425D"))))
|
||||
'(minibuffer-prompt ((t (:foreground "#008AFF"))))
|
||||
'(mode-line ((t (:background "#111111" :foreground "#888888"))))
|
||||
'(modeline-inactive ((t (:background "#222222" :foreground "#888888"))))
|
||||
'(italic ((t (nil))))
|
||||
'(left-margin ((t (nil))))
|
||||
'(toolbar ((t (nil))))
|
||||
'(ido-subdir ((t (:foreground "#008AFF"))))
|
||||
'(ido-only-match ((t (:foreground "#42D915"))))
|
||||
'(mumamo-background-chunk-major ((t (:background nil))))
|
||||
'(mumamo-background-chunk-submode1 ((t (:background nil))))
|
||||
'(underline ((nil (:underline nil)))))
|
||||
|
||||
;;;###autoload
|
||||
(when load-file-name
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'cobalt)
|
||||
|
||||
;;; cobalt-theme.el ends here
|
||||
158
.emacs.d/themes/eclipse-theme.el
Normal file
158
.emacs.d/themes/eclipse-theme.el
Normal file
@@ -0,0 +1,158 @@
|
||||
;;; eclipse-theme.el --- Theme based on Eclipse circa 2010
|
||||
|
||||
;; Copyright (C) 2015 Oleh Krehel
|
||||
|
||||
;; Author: Oleh Krehel <ohwoeowho@gmail.com>
|
||||
;; URL: https://github.com/abo-abo/eclipse-theme
|
||||
;; Version: 0.1.0
|
||||
;; Keywords: themes
|
||||
|
||||
;; This file is not part of GNU Emacs
|
||||
|
||||
;; This file is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation; either version 3, or (at your option)
|
||||
;; any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; For a full copy of the GNU General Public License
|
||||
;; see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;;; Commentary:
|
||||
;;
|
||||
;; This theme assumes light background. To load it, use:
|
||||
;;
|
||||
;; (require 'eclipse-theme)
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme eclipse
|
||||
"Color theme from Eclipse.")
|
||||
|
||||
(let ((class '((class color) (min-colors 88) (background light)))
|
||||
(eclipse-bg "#ffffff")
|
||||
(eclipse-fg "#000000")
|
||||
(eclipse-const "#110099")
|
||||
(eclipse-comment "#3F7F5F")
|
||||
(eclipse-error "#FF0000")
|
||||
(eclipse-builtin "#7F0055")
|
||||
(eclipse-string "#2A00FF")
|
||||
(eclipse-blue-3 "#758BC6")
|
||||
(eclipse-region "#f9b593")
|
||||
(eclipse-shadow "grey50"))
|
||||
(apply 'custom-theme-set-faces 'eclipse
|
||||
(mapcar
|
||||
(lambda (x) `(,(car x) ((,class ,(cdr x)))))
|
||||
`((default :foreground ,eclipse-fg :background ,eclipse-bg)
|
||||
(cursor :background ,eclipse-fg)
|
||||
(shadow :foreground ,eclipse-shadow)
|
||||
(success :foreground ,eclipse-error)
|
||||
(error :foreground ,eclipse-error :weight bold)
|
||||
(warning :foreground "DarkOrange" :weight bold)
|
||||
(compilation-warning :underline t :inherit warning)
|
||||
(compilation-error :underline t :inherit error)
|
||||
(compilation-info :underline t :foreground ,eclipse-const)
|
||||
(highlight :background "darkseagreen2")
|
||||
(fringe :background ,eclipse-bg)
|
||||
(region :background ,eclipse-region :foreground ,eclipse-bg :extend t)
|
||||
(secondary-selection :background "#333366" :foreground "#f6f3e8")
|
||||
(whitespace-indentation :background "LightYellow" :foreground "lightgray")
|
||||
(term)
|
||||
;; (font-lock-negation-char-face :foreground "#e8e2b7")
|
||||
(font-lock-builtin-face :foreground ,eclipse-builtin :bold t)
|
||||
(font-lock-comment-face :foreground ,eclipse-comment :slant normal)
|
||||
(font-lock-comment-delimiter-face :foreground ,eclipse-comment :slant normal)
|
||||
(font-lock-constant-face :foreground ,eclipse-const)
|
||||
(font-lock-doc-face :foreground ,eclipse-string)
|
||||
(font-lock-doc-string-face :foreground ,eclipse-string)
|
||||
(font-lock-function-name-face :foreground ,eclipse-fg :bold t)
|
||||
(font-lock-keyword-face :foreground ,eclipse-builtin :weight bold)
|
||||
(font-lock-preprocessor-face :foreground ,eclipse-builtin :bold t)
|
||||
(font-lock-regexp-grouping-backslash :foreground ,eclipse-builtin)
|
||||
(font-lock-regexp-grouping-construct :foreground ,eclipse-builtin)
|
||||
(font-lock-string-face :foreground ,eclipse-string)
|
||||
(font-lock-type-face :foreground ,eclipse-fg :underline t :slant italic)
|
||||
(font-lock-variable-name-face :foreground ,eclipse-fg)
|
||||
(font-lock-warning-face :foreground ,eclipse-error)
|
||||
(font-lock-doxygen-face :foreground "SaddleBrown" :background "#f7f7f7")
|
||||
(org-code :foreground ,eclipse-builtin :weight bold)
|
||||
(org-verbatim :foreground ,eclipse-const)
|
||||
(org-level-1 :weight bold :foreground "black")
|
||||
(org-level-2 :foreground ,eclipse-builtin)
|
||||
(org-level-3 :foreground "#123555")
|
||||
(org-level-4 :slant normal :foreground "#E3258D")
|
||||
(org-level-5 :slant normal :foreground "#0077CC")
|
||||
(org-level-6 :slant italic :foreground "#EA6300")
|
||||
(org-level-7 :slant italic :foreground "#2EAE2C")
|
||||
(org-level-8 :slant italic :foreground "#FD8008")
|
||||
(org-block-begin-line :foreground ,eclipse-const)
|
||||
(org-block-end-line :foreground ,eclipse-const)
|
||||
(org-scheduled-previously :foreground ,eclipse-comment)
|
||||
(ido-subdir :weight bold)
|
||||
(mode-line :foreground "black" :background "#f9b593" :box nil)
|
||||
(mode-line-inactive :foreground "grey20" :background "grey90" :box nil)
|
||||
(minibuffer-prompt :foreground "medium blue")
|
||||
(hl-line :background "#e5e4e2" :extend t)
|
||||
;; defaults
|
||||
(mode-line-buffer-id)
|
||||
(show-paren-match :background "turquoise")
|
||||
(isearch :background "magenta3" :foreground "lightskyblue1")
|
||||
(link :foreground "RoyalBlue3" :underline t)
|
||||
;; other packages
|
||||
(helm-locate-finish :foreground ,eclipse-const)
|
||||
(aw-mode-line-face :foreground ,eclipse-string)
|
||||
(swiper-match-face-1 :background "#FEEA89")
|
||||
(swiper-match-face-2 :background "#fb7905")
|
||||
(swiper-match-face-3 :background "#F9A35A")
|
||||
(swiper-match-face-4 :background "#F15C79")
|
||||
(swiper-line-face :background "#f3d3d3")
|
||||
(hydra-face-red :foreground "#cc0000" :bold t)
|
||||
(hydra-face-blue :foreground "RoyalBlue3" :bold t)
|
||||
(powerline-active1 :background "grey22" :foreground "white" :inherit mode-line)
|
||||
(powerline-active2 :background "grey40" :foreground "white" :inherit mode-line)
|
||||
(powerline-inactive1 :background "grey22" :foreground "white" :inherit mode-line-inactive)
|
||||
(powerline-inactive2 :background "grey40" :foreground "white" :inherit mode-line-inactive)
|
||||
(diff-added :background "#ddffdd")
|
||||
(diff-removed :background "#ffdddd")
|
||||
(magit-tag :background "LemonChiffon1" :foreground "goldenrod4")
|
||||
(magit-section-heading :inherit header-line)
|
||||
(magit-section-highlight :weight bold)
|
||||
(magit-diff-context :foreground "grey20" :extend t)
|
||||
(magit-diff-context-highlight :weight bold :foreground "grey20" :extend t)
|
||||
(magit-diff-added :inherit diff-added :extend t)
|
||||
(magit-diff-added-highlight :inherit diff-added :weight bold :extend t)
|
||||
(magit-diff-removed :inherit diff-removed :extend t)
|
||||
(magit-diff-removed-highlight :inherit diff-removed :weight bold :extend t)
|
||||
(magit-diff-file-heading)
|
||||
(magit-diff-file-heading-highlight :weight bold)
|
||||
(magit-diff-file-heading-selection :foreground "red")
|
||||
(magit-diff-hunk-heading :inherit diff-hunk-header :extend t)
|
||||
(magit-diff-hunk-heading-highlight :inherit diff-hunk-header :weight bold :extend t)
|
||||
(magit-hash :foreground "firebrick")
|
||||
(magit-branch-remote :background "Grey85" :foreground "OliveDrab4" :box t)
|
||||
(magit-branch-local :background "Grey85" :foreground "LightSkyBlue4" :box t)
|
||||
(mu4e-modeline-face :foreground "white")
|
||||
(ivy-highlight-face)
|
||||
(ivy-posframe :background "#eeeeee" :foreground "#000000")
|
||||
(wgrep-face :foreground ,eclipse-comment)
|
||||
(cider-instrumented-face)))))
|
||||
|
||||
(custom-theme-set-variables
|
||||
'eclipse
|
||||
'(ansi-color-names-vector ["#242424" "#e5786d" "#95e454" "#cae682"
|
||||
"#8ac6f2" "#333366" "#ccaa8f" "#f6f3e8"]))
|
||||
|
||||
;;;###autoload
|
||||
(and load-file-name
|
||||
(boundp 'custom-theme-load-path)
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory
|
||||
(file-name-directory load-file-name))))
|
||||
|
||||
(provide 'eclipse-theme)
|
||||
|
||||
;;; eclipse-theme.el ends here
|
||||
438
.emacs.d/themes/jetbrains-darcula-theme.el
Normal file
438
.emacs.d/themes/jetbrains-darcula-theme.el
Normal file
@@ -0,0 +1,438 @@
|
||||
;;; jetbrains-darcula-theme.el --- A complete port of the default JetBrains Darcula theme -*- lexical-binding: t; -*-
|
||||
|
||||
;; Copyright (C) 2020 , Ian Y.E. Pan
|
||||
|
||||
;; Author: Ian Y.E. Pan
|
||||
;; URL: https://github.com/ianpan870102/jetbrains-darcula-emacs-theme
|
||||
;; Version: 1.0.0
|
||||
|
||||
;; This program is free software: you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; This file is not part of Emacs.
|
||||
|
||||
;;; Commentary:
|
||||
;; A complete port of the default JetBrains Darcula theme for Emacs
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme jetbrains-darcula)
|
||||
(let ((class '((class color) (min-colors 89)))
|
||||
(fg0 "#8997a6")
|
||||
(fg1 "#a9b7c6") ; default fg
|
||||
(fg2 "#cccccc")
|
||||
(fg3 "#e8e8e8")
|
||||
(fg4 "#fafafa")
|
||||
(bg0 "#111111")
|
||||
(bg1 "#2b2b2b") ; default bg
|
||||
(bg2 "#303030")
|
||||
(bg3 "#313335") ; hl-line
|
||||
(bg4 "#383c3f")
|
||||
(bg5 "#515757") ; tab-bar active tab
|
||||
(bg-hl "#214283")
|
||||
(jb-r "#ac0909")
|
||||
(jb-g "#36a546")
|
||||
(jb-y "#f1eb7f")
|
||||
(key2 "#c57825")
|
||||
(key3 "#d0d0ff")
|
||||
(accent "#ffffff")
|
||||
(mode-line-bg "#3c3f41")
|
||||
(mode-line-bg-dark "#2c2f31")
|
||||
(line-num "#606366")
|
||||
(builtin "#c57825")
|
||||
(keyword "#c57825")
|
||||
(const "#9676ac")
|
||||
(comment "#8e9292")
|
||||
(doc "#5e8759")
|
||||
(func "#ffc66d")
|
||||
(str "#5e8759")
|
||||
(type "#c57825")
|
||||
(var "#9676ac")
|
||||
(warning "#990000")
|
||||
|
||||
;; standardized palette
|
||||
(jb-yellow "#ffc66d")
|
||||
(jb-bluegreen "#318495")
|
||||
(jb-magenta "#9676ac")
|
||||
(jb-orange "#c57825")
|
||||
(jb-red "#8c0909")
|
||||
(jb-blue "#7ca8c6")
|
||||
(jb-green "#5e8759"))
|
||||
|
||||
|
||||
(custom-theme-set-faces
|
||||
'jetbrains-darcula
|
||||
`(default ((,class (:background ,bg1 :foreground ,fg1))))
|
||||
|
||||
`(font-lock-builtin-face ((,class (:foreground ,builtin))))
|
||||
`(font-lock-comment-face ((,class (:foreground ,comment :italic t))))
|
||||
`(font-lock-negation-char-face ((,class (:foreground ,const))))
|
||||
`(font-lock-reference-face ((,class (:foreground ,const))))
|
||||
`(font-lock-constant-face ((,class (:foreground ,const))))
|
||||
`(font-lock-doc-face ((,class (:foreground ,doc))))
|
||||
`(font-lock-function-name-face ((,class (:foreground ,func :bold nil))))
|
||||
`(font-lock-keyword-face ((,class (:bold nil :foreground ,keyword))))
|
||||
`(font-lock-string-face ((,class (:foreground ,str))))
|
||||
`(font-lock-type-face ((,class (:foreground ,type ))))
|
||||
`(font-lock-variable-name-face ((,class (:foreground ,var))))
|
||||
`(font-lock-warning-face ((,class (:foreground ,jb-red :background ,bg2))))
|
||||
|
||||
`(region ((,class (:background ,bg-hl :extend nil))))
|
||||
`(secondary-selection ((,class (:inherit region))))
|
||||
`(highlight ((,class (:foreground ,bg3 :background ,fg3))))
|
||||
`(hl-line ((,class (:background ,bg3))))
|
||||
`(fringe ((,class (:background ,bg1 :foreground ,fg4))))
|
||||
`(cursor ((,class (:background "white"))))
|
||||
`(show-paren-match-face ((,class (:background ,warning))))
|
||||
`(show-paren-match ((t (:foreground "yellow" :background ,bg4 :bold t))))
|
||||
`(show-paren-mismatch ((t (:background ,warning))))
|
||||
`(isearch ((t (:foreground ,accent :background ,jb-green))))
|
||||
`(isearch-fail ((t (:foreground ,accent :background ,jb-red))))
|
||||
`(lazy-highlight ((t (:foreground ,accent :background ,jb-y))))
|
||||
`(vertical-border ((,class (:foreground ,bg3))))
|
||||
`(minibuffer-prompt ((,class (:foreground ,fg2 :weight normal))))
|
||||
`(default-italic ((,class (:italic t))))
|
||||
`(link ((,class (:foreground ,jb-blue :underline t))))
|
||||
`(error ((,class (:foreground ,jb-orange))))
|
||||
`(warning ((,class (:foreground ,jb-magenta))))
|
||||
`(success ((,class (:foreground ,jb-bluegreen))))
|
||||
`(dired-directory ((t (:inherit (font-lock-keyword-face)))))
|
||||
`(line-number ((,class (:foreground ,line-num :background ,bg3))))
|
||||
`(line-number-current-line ((,class (:foreground ,fg1 :background ,bg3))))
|
||||
|
||||
`(mode-line ((,class (:bold nil :foreground ,fg4 :background ,mode-line-bg))))
|
||||
`(mode-line-inactive ((,class (:bold nil :foreground ,fg1 :background ,mode-line-bg-dark))))
|
||||
`(mode-line-buffer-id ((,class (:bold nil :foreground ,accent :background nil))))
|
||||
`(mode-line-highlight ((,class (:foreground ,keyword :box nil :weight normal))))
|
||||
`(mode-line-emphasis ((,class (:foreground ,fg1))))
|
||||
|
||||
`(company-tooltip ((t (:foreground ,fg2 :background ,bg4))))
|
||||
`(company-preview-common ((t (:foreground unspecified :background ,bg4))))
|
||||
`(company-scrollbar-bg ((t (:background ,bg4))))
|
||||
`(company-scrollbar-fg ((t (:background ,bg0))))
|
||||
`(company-tooltip-common ((t (:foreground "#926297" :bold t))))
|
||||
`(company-tooltip-selection ((t (:background ,bg-hl))))
|
||||
`(company-tooltip-annotation ((t (:foreground ,doc)))) ; parameter hints etc.
|
||||
|
||||
`(org-document-title ((,class (:foreground ,jb-orange :height 1.2 :bold t))))
|
||||
`(org-level-1 ((,class (:bold nil :foreground ,jb-orange :height 1.1))))
|
||||
`(org-level-2 ((,class (:bold nil :foreground ,jb-magenta))))
|
||||
`(org-level-3 ((,class (:bold nil :foreground ,jb-green))))
|
||||
`(org-level-4 ((,class (:bold nil :foreground ,jb-bluegreen))))
|
||||
`(org-code ((,class (:foreground ,fg2))))
|
||||
`(org-hide ((,class (:foreground ,fg4))))
|
||||
`(org-date ((,class (:underline t :foreground ,jb-green) )))
|
||||
`(org-footnote ((,class (:underline t :foreground ,fg4))))
|
||||
`(org-link ((,class (:underline t :foreground ,type ))))
|
||||
`(org-special-keyword ((,class (:foreground ,jb-green))))
|
||||
`(org-block ((,class (:foreground ,fg2 :background ,bg0 :extend t))))
|
||||
`(org-quote ((,class (:inherit org-block :slant italic))))
|
||||
`(org-verse ((,class (:inherit org-block :slant italic))))
|
||||
`(org-todo ((,class (:box (:line-width 1 :color ,fg3) :foreground ,keyword :bold nil))))
|
||||
`(org-done ((,class (:box (:line-width 1 :color ,bg3) :bold nil :foreground ,bg4))))
|
||||
`(org-warning ((,class (:underline t :foreground ,warning))))
|
||||
`(org-agenda-structure ((,class (:weight normal :foreground ,fg3 :box (:color ,fg4) :background ,bg3))))
|
||||
`(org-agenda-date ((,class (:foreground ,var :height 1.1 ))))
|
||||
`(org-agenda-date-weekend ((,class (:weight normal :foreground ,fg4))))
|
||||
`(org-agenda-date-today ((,class (:weight normal :foreground ,keyword :height 1.2))))
|
||||
`(org-agenda-done ((,class (:foreground ,bg4))))
|
||||
`(org-scheduled ((,class (:foreground ,type))))
|
||||
`(org-scheduled-today ((,class (:foreground ,func :weight normal :height 1.2))))
|
||||
`(org-ellipsis ((,class (:foreground ,builtin))))
|
||||
`(org-verbatim ((,class (:foreground ,fg4))))
|
||||
`(org-document-info-keyword ((,class (:foreground ,jb-green))))
|
||||
`(org-sexp-date ((,class (:foreground ,fg4))))
|
||||
|
||||
`(font-latex-bold-face ((,class (:foreground ,type))))
|
||||
`(font-latex-italic-face ((,class (:foreground ,key3 :italic t))))
|
||||
`(font-latex-string-face ((,class (:foreground ,str))))
|
||||
`(font-latex-match-reference-keywords ((,class (:foreground ,const))))
|
||||
`(font-latex-match-variable-keywords ((,class (:foreground ,var))))
|
||||
|
||||
`(ido-only-match ((,class (:foreground ,keyword))))
|
||||
`(ido-subdir ((,class (:weight normal :foreground ,fg0))))
|
||||
`(ido-first-match ((,class (:foreground ,keyword :bold nil))))
|
||||
|
||||
`(gnus-header-content ((,class (:foreground ,keyword))))
|
||||
`(gnus-header-from ((,class (:foreground ,var))))
|
||||
`(gnus-header-name ((,class (:foreground ,type))))
|
||||
`(gnus-header-subject ((,class (:foreground ,func :bold nil))))
|
||||
|
||||
`(mu4e-view-url-number-face ((,class (:foreground ,type))))
|
||||
`(mu4e-cited-1-face ((,class (:foreground ,fg2))))
|
||||
`(mu4e-cited-7-face ((,class (:foreground ,fg3))))
|
||||
`(mu4e-header-marks-face ((,class (:foreground ,type))))
|
||||
|
||||
`(ffap ((,class (:foreground ,fg4))))
|
||||
|
||||
`(js2-private-function-call ((,class (:foreground ,const))))
|
||||
`(js2-jsdoc-html-tag-delimiter ((,class (:foreground ,str))))
|
||||
`(js2-jsdoc-html-tag-name ((,class (:foreground ,key2))))
|
||||
`(js2-external-variable ((,class (:foreground ,type ))))
|
||||
`(js2-function-param ((,class (:foreground ,const))))
|
||||
`(js2-jsdoc-value ((,class (:foreground ,str))))
|
||||
`(js2-private-member ((,class (:foreground ,fg3))))
|
||||
`(js2-warning ((t (:underline ,warning))))
|
||||
`(js2-error ((t (:foreground ,warning :weight normal))))
|
||||
`(js2-jsdoc-tag ((t (:foreground ,var))))
|
||||
`(js2-jsdoc-type ((t (:foreground ,var))))
|
||||
`(js2-instance-member ((t (:foreground ,var))))
|
||||
`(js2-object-property ((t (:foreground ,func))))
|
||||
`(js2-magic-paren ((t (:foreground ,const))))
|
||||
`(js2-function-call ((t (:foreground ,const))))
|
||||
`(js2-keywords ((t (:foreground ,keyword))))
|
||||
`(js3-warning-face ((,class (:underline ,keyword))))
|
||||
`(js3-error-face ((,class (:underline ,warning))))
|
||||
`(js3-external-variable-face ((,class (:foreground ,var))))
|
||||
`(js3-function-param-face ((,class (:foreground ,key3))))
|
||||
`(js3-jsdoc-tag-face ((,class (:foreground ,keyword))))
|
||||
`(js3-instance-member-face ((,class (:foreground ,const))))
|
||||
|
||||
`(ac-completion-face ((,class (:underline t :foreground ,keyword))))
|
||||
`(info-quoted-name ((,class (:foreground ,builtin))))
|
||||
`(info-string ((,class (:foreground ,str))))
|
||||
`(icompletep-determined ((,class :foreground ,builtin)))
|
||||
|
||||
`(slime-repl-inputed-output-face ((,class (:foreground ,type))))
|
||||
`(trailing-whitespace ((,class :foreground nil :background ,warning)))
|
||||
|
||||
`(undo-tree-visualizer-current-face ((,class :foreground ,builtin)))
|
||||
`(undo-tree-visualizer-default-face ((,class :foreground ,fg2)))
|
||||
`(undo-tree-visualizer-unmodified-face ((,class :foreground ,var)))
|
||||
`(undo-tree-visualizer-register-face ((,class :foreground ,type)))
|
||||
|
||||
`(rainbow-delimiters-depth-1-face ((,class :foreground "gold")))
|
||||
`(rainbow-delimiters-depth-2-face ((,class :foreground "orchid")))
|
||||
`(rainbow-delimiters-depth-3-face ((,class :foreground "LightSkyBlue")))
|
||||
`(rainbow-delimiters-depth-4-face ((,class :foreground "gold")))
|
||||
`(rainbow-delimiters-depth-5-face ((,class :foreground "orchid")))
|
||||
`(rainbow-delimiters-depth-6-face ((,class :foreground "LightSkyBlue")))
|
||||
`(rainbow-delimiters-depth-7-face ((,class :foreground "gold")))
|
||||
`(rainbow-delimiters-depth-8-face ((,class :foreground "orchid")))
|
||||
`(rainbow-delimiters-depth-9-face ((,class :foreground "LightSkyBlue")))
|
||||
`(rainbow-delimiters-unmatched-face ((,class :foreground ,warning)))
|
||||
|
||||
;;;;; New magit faces (adpated from sanityinc-tomorrow themes)
|
||||
`(magit-item-highlight ((,class :background ,bg3)))
|
||||
`(magit-hunk-heading ((,class (:background ,bg3))))
|
||||
`(magit-hunk-heading-highlight ((,class (:background ,bg3))))
|
||||
`(magit-bisect-bad ((t (:foreground ,jb-red))))
|
||||
`(magit-bisect-good ((t (:foreground ,jb-green))))
|
||||
`(magit-bisect-skip ((t (:foreground ,jb-orange))))
|
||||
`(magit-blame-date ((t (:foreground ,jb-red))))
|
||||
`(magit-blame-heading ((t (:foreground ,jb-orange :background ,bg3 :extend t))))
|
||||
`(magit-branch ((,class (:foreground ,jb-blue :weight normal))))
|
||||
`(magit-branch-current ((t (:foreground ,jb-blue))))
|
||||
`(magit-branch-local ((t (:foreground ,jb-bluegreen))))
|
||||
`(magit-branch-remote ((t (:foreground ,jb-green))))
|
||||
`(magit-cherry-equivalent ((t (:foreground ,jb-magenta))))
|
||||
`(magit-cherry-unmatched ((t (:foreground ,jb-bluegreen))))
|
||||
`(magit-diff-context-highlight ((,class (:background ,bg3 :foreground ,fg3))))
|
||||
`(magit-diffstat-added ((t (:foreground ,jb-green))))
|
||||
`(magit-diffstat-removed ((t (:foreground ,jb-orange))))
|
||||
`(magit-dimmed ((t (:foreground ,comment))))
|
||||
`(magit-filename ((t (:foreground ,jb-magenta))))
|
||||
`(magit-hash ((t (:foreground ,comment))))
|
||||
`(magit-header-line ((t (:inherit nil))))
|
||||
`(magit-log-author ((t (:foreground ,jb-orange))))
|
||||
`(magit-log-date ((t (:foreground ,jb-blue))))
|
||||
`(magit-log-graph ((t (:foreground ,comment))))
|
||||
`(magit-mode-line-process ((t (:foreground ,jb-orange))))
|
||||
`(magit-mode-line-process-error ((t (:foreground ,jb-red))))
|
||||
`(magit-process-ok ((t (:inherit success))))
|
||||
`(magit-process-ng ((t (:inherit error))))
|
||||
`(magit-reflog-amend ((t (:foreground ,jb-magenta))))
|
||||
`(magit-reflog-checkout ((t (:foreground ,jb-blue))))
|
||||
`(magit-reflog-cherry-pick ((t (:foreground ,jb-green))))
|
||||
`(magit-reflog-commit ((t (:foreground ,jb-green))))
|
||||
`(magit-reflog-merge ((t (:foreground ,jb-green))))
|
||||
`(magit-reflog-other ((t (:foreground ,jb-bluegreen))))
|
||||
`(magit-reflog-rebase ((t (:foreground ,jb-magenta))))
|
||||
`(magit-reflog-remote ((t (:foreground ,jb-bluegreen))))
|
||||
`(magit-reflog-reset ((t (:inherit error))))
|
||||
`(magit-refname ((t (:foreground ,comment))))
|
||||
`(magit-section-heading ((t (:foreground ,jb-magenta))))
|
||||
`(magit-section-heading-selection ((t (:foreground ,jb-orange :extend t))))
|
||||
`(magit-section-highlight ((t (:background ,bg3 :extend t))))
|
||||
`(magit-sequence-drop ((t (:foreground ,jb-red))))
|
||||
`(magit-sequence-head ((t (:foreground ,jb-blue))))
|
||||
`(magit-sequence-part ((t (:foreground ,jb-orange))))
|
||||
`(magit-sequence-stop ((t (:foreground ,jb-green))))
|
||||
`(magit-signature-bad ((t (:inherit error))))
|
||||
`(magit-signature-error ((t (:inherit error))))
|
||||
`(magit-signature-expijb-red ((t (:foreground ,jb-orange))))
|
||||
`(magit-signature-good ((t (:inherit success))))
|
||||
`(magit-signature-revoked ((t (:foreground ,jb-magenta))))
|
||||
`(magit-signature-untrusted ((t (:foreground ,jb-bluegreen))))
|
||||
`(magit-tag ((t (:foreground ,jb-yellow))))
|
||||
|
||||
`(term ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(term-color-black ((,class (:foreground ,fg1 :background ,bg3))))
|
||||
`(term-color-blue ((,class (:foreground ,jb-blue :background ,func))))
|
||||
`(term-color-red ((,class (:foreground ,jb-red :background ,bg3))))
|
||||
`(term-color-green ((,class (:foreground ,jb-green :background ,bg3))))
|
||||
`(term-color-yellow ((,class (:foreground ,jb-yellow :background ,var))))
|
||||
`(term-color-magenta ((,class (:foreground ,jb-orange :background ,builtin))))
|
||||
`(term-color-cyan ((,class (:foreground ,jb-bluegreen :background ,str))))
|
||||
`(term-color-white ((,class (:foreground ,fg2 :background ,fg2))))
|
||||
|
||||
`(helm-header ((,class (:foreground ,fg2 :background ,bg1 :underline nil :box nil))))
|
||||
`(helm-source-header ((,class (:foreground ,keyword :background ,bg1 :underline nil :weight normal))))
|
||||
`(helm-selection ((,class (:background ,bg2 :underline nil))))
|
||||
`(helm-selection-line ((,class (:background ,bg2))))
|
||||
`(helm-visible-mark ((,class (:foreground ,bg1 :background ,bg3))))
|
||||
`(helm-candidate-number ((,class (:foreground ,bg1 :background ,fg1))))
|
||||
`(helm-separator ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-time-zone-current ((,class (:foreground ,builtin :background ,bg1))))
|
||||
`(helm-time-zone-home ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-buffer-not-saved ((,class (:foreground ,type :background ,bg1))))
|
||||
`(helm-buffer-process ((,class (:foreground ,builtin :background ,bg1))))
|
||||
`(helm-buffer-saved-out ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-buffer-size ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-ff-directory ((,class (:foreground ,func :background ,bg1 :weight normal))))
|
||||
`(helm-ff-file ((,class (:foreground ,fg1 :background ,bg1 :weight normal))))
|
||||
`(helm-ff-executable ((,class (:foreground ,key2 :background ,bg1 :weight normal))))
|
||||
`(helm-ff-invalid-symlink ((,class (:foreground ,key3 :background ,bg1 :weight normal))))
|
||||
`(helm-ff-symlink ((,class (:foreground ,keyword :background ,bg1 :weight normal))))
|
||||
`(helm-ff-prefix ((,class (:foreground ,bg1 :background ,keyword :weight normal))))
|
||||
`(helm-grep-cmd-line ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-file ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-finish ((,class (:foreground ,fg2 :background ,bg1))))
|
||||
`(helm-grep-lineno ((,class (:foreground ,fg1 :background ,bg1))))
|
||||
`(helm-grep-match ((,class (:foreground nil :background nil :inherit helm-match))))
|
||||
`(helm-grep-running ((,class (:foreground ,func :background ,bg1))))
|
||||
`(helm-moccur-buffer ((,class (:foreground ,func :background ,bg1))))
|
||||
`(helm-source-go-package-godoc-description ((,class (:foreground ,str))))
|
||||
`(helm-bookmark-w3m ((,class (:foreground ,type))))
|
||||
|
||||
`(web-mode-html-tag-bracket-face ((,class (:foreground ,jb-yellow))))
|
||||
`(web-mode-html-tag-face ((,class (:foreground ,jb-yellow))))
|
||||
`(web-mode-html-attr-name-face ((,class (:foreground ,var))))
|
||||
`(web-mode-html-attr-value-face ((,class (:foreground ,str))))
|
||||
`(web-mode-builtin-face ((,class (:inherit ,font-lock-builtin-face))))
|
||||
`(web-mode-comment-face ((,class (:inherit ,font-lock-comment-face))))
|
||||
`(web-mode-constant-face ((,class (:inherit ,font-lock-constant-face))))
|
||||
`(web-mode-keyword-face ((,class (:inherit ,font-lock-keyword-face))))
|
||||
`(web-mode-doctype-face ((,class (:inherit ,font-lock-doc-face))))
|
||||
`(web-mode-function-name-face ((,class (:inherit ,font-lock-function-name-face))))
|
||||
`(web-mode-string-face ((,class (:inherit ,font-lock-string-face))))
|
||||
`(web-mode-type-face ((,class (:inherit ,font-lock-type-face))))
|
||||
`(web-mode-warning-face ((,class (:inherit ,font-lock-warning-face))))
|
||||
|
||||
`(ediff-fine-diff-Ancestor ((t (:background "#885555"))))
|
||||
`(ediff-fine-diff-A ((t (:background "#885555"))))
|
||||
`(ediff-fine-diff-B ((t (:background "#558855"))))
|
||||
`(ediff-fine-diff-C ((t (:background "#555588"))))
|
||||
`(ediff-current-diff-Ancestor ((t (:background "#663333"))))
|
||||
`(ediff-current-diff-A ((t (:background "#663333"))))
|
||||
`(ediff-current-diff-B ((t (:background "#336633"))))
|
||||
`(ediff-current-diff-C ((t (:background "#333366"))))
|
||||
`(ediff-even-diff-Ancestor ((t (:background ,bg3))))
|
||||
`(ediff-even-diff-A ((t (:background ,bg3))))
|
||||
`(ediff-even-diff-B ((t (:background ,bg3))))
|
||||
`(ediff-even-diff-C ((t (:background ,bg3))))
|
||||
`(ediff-odd-diff-Ancestor ((t (:background ,bg3))))
|
||||
`(ediff-odd-diff-A ((t (:background ,bg3))))
|
||||
`(ediff-odd-diff-B ((t (:background ,bg3))))
|
||||
`(ediff-odd-diff-C ((t (:background ,bg3))))
|
||||
|
||||
`(jde-java-font-lock-package-face ((t (:foreground ,var))))
|
||||
`(jde-java-font-lock-public-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-private-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-constant-face ((t (:foreground ,const))))
|
||||
`(jde-java-font-lock-modifier-face ((t (:foreground ,key3))))
|
||||
`(jde-jave-font-lock-protected-face ((t (:foreground ,keyword))))
|
||||
`(jde-java-font-lock-number-face ((t (:foreground ,var))))
|
||||
|
||||
`(centaur-tabs-default ((t (:background ,bg1 :foreground ,fg1))))
|
||||
`(centaur-tabs-selected ((t (:background ,bg1 :foreground ,fg3 :box nil))))
|
||||
`(centaur-tabs-unselected ((t (:background ,bg2 :foreground ,fg0 :box nil))))
|
||||
`(centaur-tabs-selected-modified ((t (:background ,bg2 :foreground ,accent :box nil))))
|
||||
`(centaur-tabs-unselected-modified ((t (:background ,bg2 :foreground ,fg4 :box nil))))
|
||||
`(centaur-tabs-active-bar-face ((t (:background ,accent :box nil))))
|
||||
`(centaur-tabs-modified-marker-selected ((t (:inherit 'centaur-tabs-selected-modified :foreground ,accent :box nil))))
|
||||
`(centaur-tabs-modified-marker-unselected ((t (:inherit 'centaur-tabs-unselected-modified :foreground ,accent :box nil))))
|
||||
|
||||
`(solaire-default-face ((t (:inherit default :background ,bg2))))
|
||||
`(solaire-minibuffer-face ((t (:inherit default :background ,bg2))))
|
||||
`(solaire-hl-line-face ((t (:inherit hl-line :background ,bg3))))
|
||||
`(solaire-org-hide-face ((t (:inherit org-hide :background ,bg2))))
|
||||
|
||||
`(ivy-confirm-face ((t (:inherit minibuffer-prompt :foreground ,keyword))))
|
||||
`(ivy-current-match ((t (:background ,bg-hl :extend t))))
|
||||
`(ivy-highlight-face ((t (:inherit font-lock-builtin-face))))
|
||||
`(ivy-match-required-face ((t (:inherit minibuffer-prompt :foreground ,warning))))
|
||||
`(ivy-minibuffer-match-face-1 ((t (:inherit isearch))))
|
||||
`(ivy-minibuffer-match-face-2 ((t (:inherit ivy-minibuffer-match-face-1))))
|
||||
`(ivy-minibuffer-match-face-3 ((t (:inherit ivy-minibuffer-match-face-2))))
|
||||
`(ivy-minibuffer-match-face-4 ((t (:inherit ivy-minibuffer-match-face-2))))
|
||||
`(ivy-minibuffer-match-highlight ((t (:inherit ivy-current-match))))
|
||||
`(ivy-modified-buffer ((t (:inherit default :foreground ,var))))
|
||||
`(ivy-virtual ((t (:inherit default :foreground ,doc))))
|
||||
`(ivy-posframe ((t (:background "#252526"))))
|
||||
|
||||
`(counsel-key-binding ((t (:foreground ,var))))
|
||||
|
||||
`(swiper-match-face-1 ((t (:inherit ivy-minibuffer-match-face-1))))
|
||||
`(swiper-match-face-2 ((t (:inherit ivy-minibuffer-match-face-2))))
|
||||
`(swiper-match-face-3 ((t (:inherit ivy-minibuffer-match-face-3))))
|
||||
`(swiper-match-face-4 ((t (:inherit ivy-minibuffer-match-face-4))))
|
||||
`(swiper-line-face ((t (:foreground ,fg0 :background ,bg4 :extend t))))
|
||||
|
||||
`(git-gutter:added ((t (:background ,jb-g :foreground ,jb-g :weight normal))))
|
||||
`(git-gutter:deleted ((t (:background ,jb-r :foreground ,jb-r :weight normal))))
|
||||
`(git-gutter:modified ((t (:background ,jb-y :foreground ,jb-y :weight normal))))
|
||||
`(git-gutter-fr:added ((t (:background ,jb-g :foreground ,jb-g :weight normal))))
|
||||
`(git-gutter-fr:deleted ((t (:background ,jb-r :foreground ,jb-r :weight normal))))
|
||||
`(git-gutter-fr:modified ((t (:background ,jb-y :foreground ,jb-y :weight normal))))
|
||||
|
||||
`(diff-hl-insert ((t (:background ,jb-g :foreground ,jb-g))))
|
||||
`(diff-hl-delete ((t (:background ,jb-r :foreground ,jb-r))))
|
||||
`(diff-hl-change ((t (:background ,jb-y :foreground ,jb-y))))
|
||||
|
||||
`(neo-dir-link-face ((t (:foreground "#cccccc" :family "Sans Serif"))))
|
||||
`(neo-header-face ((t (:foreground "#cccccc" :family "Sans Serif"))))
|
||||
`(neo-banner-face ((t (:foreground "#cccccc" :family "Sans Serif"))))
|
||||
`(neo-root-dir-face ((t (:foreground "#cccccc" :family "Sans Serif"))))
|
||||
`(neo-file-link-face ((t (:foreground "#aaaaaa" :family "Sans Serif"))))
|
||||
`(neo-expand-btn-face ((t (:foreground "#aaaaaa"))))
|
||||
|
||||
`(sml/global ((t (:foreground ,fg1 :weight normal))))
|
||||
`(sml/filename ((t (:foreground ,fg1 :weight normal))))
|
||||
`(sml/prefix ((t (:foreground ,fg1 :weight normal))))
|
||||
`(sml/read-only ((t (:foreground ,fg1 :weight normal))))
|
||||
`(sml/modes ((t (:foreground ,fg1 :weight normal))))
|
||||
`(sml/modified ((t (:foreground ,fg3 :weight normal))))
|
||||
|
||||
;; tab-bar-mode
|
||||
`(tab-bar ((t (:background ,bg3))))
|
||||
`(tab-bar-tab ((t (:foreground ,fg2 :background ,bg5 :box (:color ,bg4)))))
|
||||
`(tab-bar-tab-inactive ((t (:foreground ,fg1 :background ,bg2 :box (:color ,bg4)))))
|
||||
|
||||
`(evil-ex-substitute-matches ((t (:foreground ,warning :weight normal :strike-through t))))
|
||||
`(evil-ex-substitute-replacement ((t (:foreground ,jb-bluegreen :weight normal))))
|
||||
|
||||
`(hl-todo ((t (:inverse-video t))))
|
||||
`(highlight-numbers-number ((t (:foreground ,jb-blue))))
|
||||
`(highlight-operators-face ((t (:inherit default))))
|
||||
`(highlight-symbol-face ((t (:background "#354a32"))))))
|
||||
|
||||
;;;###autoload
|
||||
(when (and (boundp 'custom-theme-load-path) load-file-name)
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'jetbrains-darcula)
|
||||
(provide 'jetbrains-darcula-theme)
|
||||
|
||||
;;; jetbrains-darcula-theme.el ends here
|
||||
114
.emacs.d/themes/odersky-theme.el
Normal file
114
.emacs.d/themes/odersky-theme.el
Normal file
@@ -0,0 +1,114 @@
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; ---------------------------
|
||||
;;
|
||||
;; Oderskey: A dark color theme
|
||||
;;
|
||||
;; ----------------------------
|
||||
|
||||
(unless (>= emacs-major-version 24)
|
||||
(error "requires Emacs 24 or later."))
|
||||
|
||||
(deftheme odersky "A dark color theme for Emacs")
|
||||
|
||||
(let ((*background* "#1E2326")
|
||||
(*vborder* "#FF7E00")
|
||||
(*gutter* "#3E3E3E")
|
||||
(*comments* "#999999")
|
||||
(*constant* "#F38630")
|
||||
(*current-line* "#151515")
|
||||
(*cursor-underscore* "#FFFAAA")
|
||||
(*keywords* "#A7DBD8")
|
||||
(*line-number* "#1E2326")
|
||||
(*method-declaration* "#FFD2A7")
|
||||
(*mode-line-bg* "#505C63")
|
||||
(*mode-line-fg* "#E0E4CC")
|
||||
(*mode-inactive-bg* "#2E3336")
|
||||
(*mode-inactive-fg* "#F8F8F2")
|
||||
(*normal* "#DEDEDE")
|
||||
(*number* "#2EBF7E")
|
||||
(*operators* "#69D2E7")
|
||||
(*warning* "#FA6900")
|
||||
(*regexp* "#FA6900")
|
||||
(*string* "#E0E4CC")
|
||||
(*variable* "#FA6900")
|
||||
(*visual-selection* "#505C63"))
|
||||
|
||||
(custom-theme-set-faces
|
||||
'odersky
|
||||
|
||||
`(bold ((t (:bold t))))
|
||||
`(button ((t (:foreground, *keywords* :underline t))))
|
||||
`(default ((t (:background, *background* :foreground, *normal*))))
|
||||
`(header-line ((t (:background, *mode-line-bg* :foreground, *normal*)))) ;; info header
|
||||
`(highlight ((t (:background, *current-line*))))
|
||||
`(highlight-face ((t (:background, *current-line*))))
|
||||
`(hl-line ((t (:background, *current-line* :underline t))))
|
||||
`(info-xref ((t (:foreground, *keywords* :underline t))))
|
||||
`(region ((t (:background, *visual-selection*))))
|
||||
`(underline ((nil (:underline t))))
|
||||
|
||||
;; font-lock
|
||||
`(font-lock-builtin-face ((t (:foreground, *operators*))))
|
||||
`(font-lock-comment-delimiter-face ((t (:foreground, *comments*))))
|
||||
`(font-lock-comment-face ((t (:foreground, *comments*))))
|
||||
`(font-lock-constant-face ((t (:foreground, *constant*))))
|
||||
`(font-lock-doc-face ((t (:foreground, *string*))))
|
||||
`(font-lock-doc-string-face ((t (:foreground, *string*))))
|
||||
`(font-lock-function-name-face ((t (:foreground, *method-declaration*))))
|
||||
`(font-lock-keyword-face ((t (:foreground, *keywords*))))
|
||||
`(font-lock-negation-char-face ((t (:foreground, *warning*))))
|
||||
`(font-lock-number-face ((t (:foreground, *number*))))
|
||||
`(font-lock-preprocessor-face ((t (:foreground, *keywords*))))
|
||||
`(font-lock-reference-face ((t (:foreground, *constant*))))
|
||||
`(font-lock-regexp-grouping-backslash ((t (:foreground, *regexp*))))
|
||||
`(font-lock-regexp-grouping-construct ((t (:foreground, *regexp*))))
|
||||
`(font-lock-string-face ((t (:foreground, *string*))))
|
||||
`(font-lock-type-face ((t (:foreground, *operators*))))
|
||||
`(font-lock-variable-name-face ((t (:foreground, *variable*))))
|
||||
`(font-lock-warning-face ((t (:foreground, *warning*))))
|
||||
|
||||
;; GUI
|
||||
`(fringe ((t (:background, *gutter*))))
|
||||
`(linum ((t (:background, *line-number*))))
|
||||
`(minibuffer-prompt ((t (:foreground, *variable*))))
|
||||
`(mode-line ((t (:background, *mode-line-bg* :foreground, *mode-line-fg*))))
|
||||
`(mode-line-inactive ((t (:background, *mode-inactive-bg* :foreground, *mode-inactive-fg*))))
|
||||
`(cursor ((t (:background, *cursor-underscore*))))
|
||||
`(text-cursor ((t (:background, *cursor-underscore*))))
|
||||
`(vertical-border ((t (:foreground, *vborder*)))) ;; between splits
|
||||
|
||||
;; show-paren
|
||||
`(show-paren-mismatch ((t (:background, *warning* :foreground, *normal* :weight bold))))
|
||||
`(show-paren-match ((t (:background, *keywords* :foreground, *normal* :weight bold))))
|
||||
|
||||
;; search
|
||||
`(isearch ((t (:background, *regexp* :foreground, *visual-selection*))))
|
||||
`(isearch-fail ((t (:background, *warning*))))
|
||||
`(lazy-highlight ((t (:background, *operators* :foreground, *visual-selection*))))
|
||||
|
||||
))
|
||||
|
||||
;;;###autoload
|
||||
(when (and (boundp 'custom-theme-load-path) load-file-name)
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name))))
|
||||
|
||||
(provide-theme 'odersky)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
|
||||
|
||||
94
.emacs.d/themes/wilson-theme.el
Normal file
94
.emacs.d/themes/wilson-theme.el
Normal file
@@ -0,0 +1,94 @@
|
||||
;; This program is free software; you can redistribute it and/or modify
|
||||
;; it under the terms of the GNU General Public License as published by
|
||||
;; the Free Software Foundation, either version 3 of the License, or
|
||||
;; (at your option) any later version.
|
||||
|
||||
;; This program is distributed in the hope that it will be useful,
|
||||
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
;; GNU General Public License for more details.
|
||||
|
||||
;; You should have received a copy of the GNU General Public License
|
||||
;; along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
;; ------------------------------------------------------
|
||||
;;
|
||||
;; Wilson: A theme based upon a dirty spitfire
|
||||
;;
|
||||
;; -------------------------------------------------------
|
||||
|
||||
(unless (>= emacs-major-version 24)
|
||||
(error "requires Emacs 24 or later."))
|
||||
|
||||
(deftheme wilson
|
||||
"A theme based upon a dirty spitfire")
|
||||
|
||||
(let ((wilson-oilstained-eggshell "#6C6B59")
|
||||
(wilson-flying-boots "#44443C")
|
||||
(wilson-darker-flying-boots "#222222")
|
||||
(wilson-spring-grass "#9BA657")
|
||||
(wilson-stained-white "#BEBFB7")
|
||||
(wilson-darker-stained-white "#A9AAA3")
|
||||
(wilson-gray "#84857E")
|
||||
(wilson-darker-gray "gray30")
|
||||
(wilson-dark-gray "gray25")
|
||||
(wilson-light-gray "gray20")
|
||||
(wilson-lighter-gray "gray12")
|
||||
(wilson-stained-orange "#B97E56")
|
||||
(wilson-darker-stained-orange "#A56F4B")
|
||||
(wilson-stained-yellow "#CFB980")
|
||||
(wilson-darker-stained-yellow "#B9A572"))
|
||||
(custom-theme-set-faces
|
||||
'wilson
|
||||
|
||||
;; ----------------- Frame stuff --------------------
|
||||
`(default ((t (:background ,wilson-darker-flying-boots :foreground ,wilson-stained-white))))
|
||||
`(cursor ((t (:background ,wilson-stained-white))))
|
||||
`(hl-line ((t (:background ,wilson-flying-boots))))
|
||||
`(modeline ((t (:background ,wilson-stained-yellow :foreground ,wilson-flying-boots))))
|
||||
`(mode-line-inactive ((t (:box nil :background ,wilson-light-gray :foreground ,wilson-stained-yellow))))
|
||||
`(mode-line ((t (:box nil :foreground ,wilson-flying-boots :background ,wilson-stained-yellow))))
|
||||
`(fringe ((t (:background ,wilson-darker-flying-boots))))
|
||||
;; Dir-ed search prompt
|
||||
`(minibuffer-prompt ((default (:foreground ,wilson-stained-orange))))
|
||||
`(linum ((t (:background, wilson-darker-flying-boots :foreground, wilson-stained-white))))
|
||||
;; Highlight region color
|
||||
`(region ((t (:foreground ,wilson-darker-stained-white :background ,wilson-flying-boots))))
|
||||
|
||||
;; ---------------- Code Highlighting ---------------
|
||||
;; Builtin
|
||||
`(font-lock-builtin-face ((t (:foreground ,wilson-darker-stained-yellow))))
|
||||
;; Constants
|
||||
`(font-lock-constant-face ((t (:foreground ,wilson-stained-orange))))
|
||||
;; Comments
|
||||
`(font-lock-comment-face ((t (:foreground ,wilson-oilstained-eggshell))))
|
||||
;; Function names
|
||||
`(font-lock-function-name-face ((t (:foreground ,wilson-stained-yellow))))
|
||||
;; Keywords
|
||||
`(font-lock-keyword-face ((t (:foreground ,wilson-spring-grass))))
|
||||
;; Strings
|
||||
`(font-lock-string-face ((t (:foreground ,wilson-gray))))
|
||||
;; Variables
|
||||
`(font-lock-variable-name-face ((t (:foreground ,wilson-stained-yellow))))
|
||||
`(font-lock-type-face ((t (:foreground ,wilson-darker-stained-orange))))
|
||||
`(font-lock-warning-face ((t (:foreground ,wilson-darker-stained-orange :bold t))))
|
||||
|
||||
;; ---------------- Package Specific Stuff -----------
|
||||
;; Powerline
|
||||
`(powerline-active1 ((t (:background ,wilson-dark-gray :foreground ,wilson-stained-orange))))
|
||||
`(powerline-active2 ((t (:background ,wilson-lighter-gray :foreground ,wilson-darker-stained-white))))
|
||||
`(powerline-inactive1 ((t (:background ,wilson-darker-gray :foreground ,wilson-stained-white))))
|
||||
`(powerline-inactive2 ((t (:background ,wilson-dark-gray :foreground ,wilson-darker-stained-white))))))
|
||||
|
||||
;;;###autoload
|
||||
(when load-file-name
|
||||
(add-to-list 'custom-theme-load-path
|
||||
(file-name-as-directory (file-name-directory load-file-name)))
|
||||
(when (not window-system)
|
||||
(custom-set-faces '(default ((t (:background nil)))))))
|
||||
|
||||
(provide-theme 'wilson)
|
||||
|
||||
;; Local Variables:
|
||||
;; no-byte-compile: t
|
||||
;; End:
|
||||
37
.emacs.d/themes/witness-nostalgia-theme.el
Normal file
37
.emacs.d/themes/witness-nostalgia-theme.el
Normal file
@@ -0,0 +1,37 @@
|
||||
;;; witness-nostalgia-theme.el --- Witness color theme -*- lexical-binding: t; -*-
|
||||
|
||||
;;; Commentary:
|
||||
;; A dark teal color theme.
|
||||
|
||||
;;; Code:
|
||||
|
||||
(deftheme witness-nostalgia
|
||||
"Witness nostalgia color theme - gray with green and yellow accents.")
|
||||
|
||||
(custom-theme-set-faces
|
||||
'witness-nostalgia
|
||||
;; Basic faces
|
||||
'(default ((t (:foreground "#d3b58d" :background "#292929"))))
|
||||
'(cursor ((t (:background "lightgreen"))))
|
||||
'(region ((t (:background "blue"))))
|
||||
'(highlight ((t (:foreground "navyblue" :background "darkseagreen2"))))
|
||||
'(mode-line ((t (:inverse-video t))))
|
||||
|
||||
;; Font lock faces
|
||||
'(font-lock-builtin-face ((t (:foreground "lightgreen"))))
|
||||
'(font-lock-comment-face ((t (:foreground "#FFFF00"))))
|
||||
'(font-lock-string-face ((t (:foreground "#BEBEBE"))))
|
||||
'(font-lock-keyword-face ((t (:foreground "white"))))
|
||||
'(font-lock-function-name-face ((t (:foreground "white"))))
|
||||
'(font-lock-variable-name-face ((t (:foreground "#c8d4ec"))))
|
||||
'(font-lock-warning-face ((t (:foreground "#504038"))))
|
||||
|
||||
;; Custom/widget faces
|
||||
'(custom-group-tag ((t (:underline t :foreground "lightblue"))))
|
||||
'(custom-variable-tag ((t (:underline t :foreground "lightblue"))))
|
||||
'(widget-field ((t (:foreground "white"))))
|
||||
'(widget-single-line-field ((t (:background "darkgray")))))
|
||||
|
||||
(provide-theme 'witness-nostalgia)
|
||||
|
||||
;;; witness-theme.el ends here
|
||||
194
sync.sh
194
sync.sh
@@ -1,194 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
HOME_DIR="$HOME"
|
||||
|
||||
get_tracked_files() {
|
||||
find "$DOTFILES_DIR" -type f \
|
||||
-not -path "*/.git/*" \
|
||||
-not -name "README.md" \
|
||||
-not -name "sync.sh" | sort
|
||||
}
|
||||
|
||||
usage() {
|
||||
echo "Usage: $0 [push|pull|list]"
|
||||
echo ""
|
||||
echo "Commands:"
|
||||
echo " push Copy dotfiles from this repo to home directory"
|
||||
echo " pull Copy dotfiles from home directory to this repo"
|
||||
echo " list Show all tracked dotfiles"
|
||||
echo ""
|
||||
exit 1
|
||||
}
|
||||
|
||||
ensure_dir() {
|
||||
local dir="$1"
|
||||
if [[ ! -d "$dir" ]]; then
|
||||
echo "Creating directory: $dir"
|
||||
mkdir -p "$dir"
|
||||
fi
|
||||
}
|
||||
|
||||
get_system_path() {
|
||||
local rel_path="$1"
|
||||
|
||||
# Special case mappings for specific files
|
||||
case "$rel_path" in
|
||||
.config/Code/User/*)
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# Map .config/Code/User/* to ~/Library/Application Support/Code/User/*
|
||||
local vscode_path="${rel_path#.config/Code/User/}"
|
||||
echo "/Users/${USER}/Library/Application Support/Code/User/${vscode_path}"
|
||||
else
|
||||
echo "$HOME_DIR/$rel_path"
|
||||
fi
|
||||
;;
|
||||
.config/focus-editor/*)
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# Map .config/focus-editor/* to ~/Library/Application Support/dev.focus-editor/*
|
||||
local focus_path="${rel_path#.config/focus-editor/}"
|
||||
echo "/Users/${USER}/Library/Application Support/dev.focus-editor/${focus_path}"
|
||||
else
|
||||
echo "$HOME_DIR/$rel_path"
|
||||
fi
|
||||
;;
|
||||
.config/Sublime\ Text/Packages/User/*|.config/Sublime\ Text/Packages/user/*)
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# Map .config/Sublime Text/Packages/User/* to ~/Library/Application Support/Sublime Text/Packages/User/*
|
||||
local sublime_path="${rel_path#.config/Sublime\ Text/Packages/User/}"
|
||||
[[ -z "$sublime_path" ]] && sublime_path="${rel_path#.config/Sublime\ Text/Packages/user/}"
|
||||
echo "/Users/${USER}/Library/Application Support/Sublime Text/Packages/User/${sublime_path}"
|
||||
else
|
||||
echo "$HOME_DIR/$rel_path"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "$HOME_DIR/$rel_path"
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
copy_file() {
|
||||
local src="$1"
|
||||
local dest="$2"
|
||||
local action="$3"
|
||||
|
||||
if [[ -f "$src" ]]; then
|
||||
ensure_dir "$(dirname "$dest")"
|
||||
# echo "$action: $src -> $dest"
|
||||
cp "$src" "$dest"
|
||||
else
|
||||
echo "Warning: Source file does not exist: $src"
|
||||
fi
|
||||
}
|
||||
|
||||
sync_emacs_dir() {
|
||||
local src_base="$1"
|
||||
local dest_base="$2"
|
||||
local action="$3"
|
||||
|
||||
# Files to sync
|
||||
local files=("custom.el" "init.el")
|
||||
# Directories to sync (cleared first)
|
||||
local dirs=("lisp" "themes")
|
||||
|
||||
# Sync individual files
|
||||
for file in "${files[@]}"; do
|
||||
local src="$src_base/$file"
|
||||
local dest="$dest_base/$file"
|
||||
if [[ -f "$src" ]]; then
|
||||
ensure_dir "$dest_base"
|
||||
cp "$src" "$dest"
|
||||
fi
|
||||
done
|
||||
|
||||
# Sync directories (clear destination first)
|
||||
for dir in "${dirs[@]}"; do
|
||||
local src_dir="$src_base/$dir"
|
||||
local dest_dir="$dest_base/$dir"
|
||||
if [[ -d "$src_dir" ]]; then
|
||||
# Clear destination directory
|
||||
if [[ -d "$dest_dir" ]]; then
|
||||
rm -rf "$dest_dir"
|
||||
fi
|
||||
# Copy directory
|
||||
cp -r "$src_dir" "$dest_dir"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
push_dotfiles() {
|
||||
echo "Pushing dotfiles from repo to home directory..."
|
||||
|
||||
# Handle .emacs.d specially (clear folders before syncing)
|
||||
if [[ -d "$DOTFILES_DIR/.emacs.d" ]]; then
|
||||
sync_emacs_dir "$DOTFILES_DIR/.emacs.d" "$HOME_DIR/.emacs.d" "Push"
|
||||
fi
|
||||
|
||||
local count=0
|
||||
while IFS= read -r src_file; do
|
||||
rel_path="${src_file#$DOTFILES_DIR/}"
|
||||
# Skip .emacs.d files (handled above)
|
||||
if [[ "$rel_path" == .emacs.d/* ]]; then
|
||||
continue
|
||||
fi
|
||||
dest_file="$(get_system_path "$rel_path")"
|
||||
copy_file "$src_file" "$dest_file" "Push"
|
||||
((count++))
|
||||
done < <(get_tracked_files)
|
||||
|
||||
echo "Push completed! ($count files processed)"
|
||||
}
|
||||
|
||||
pull_dotfiles() {
|
||||
echo "Pulling dotfiles from home directory to repo..."
|
||||
|
||||
# Handle .emacs.d specially (clear folders before syncing)
|
||||
if [[ -d "$HOME_DIR/.emacs.d" ]]; then
|
||||
sync_emacs_dir "$HOME_DIR/.emacs.d" "$DOTFILES_DIR/.emacs.d" "Pull"
|
||||
fi
|
||||
|
||||
local count=0
|
||||
while IFS= read -r dest_file; do
|
||||
rel_path="${dest_file#$DOTFILES_DIR/}"
|
||||
# Skip .emacs.d files (handled above)
|
||||
if [[ "$rel_path" == .emacs.d/* ]]; then
|
||||
continue
|
||||
fi
|
||||
src_file="$(get_system_path "$rel_path")"
|
||||
copy_file "$src_file" "$dest_file" "Pull"
|
||||
((count++))
|
||||
done < <(get_tracked_files)
|
||||
|
||||
echo "Pull completed! ($count files processed)"
|
||||
}
|
||||
|
||||
if [[ $# -eq 0 ]]; then
|
||||
usage
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
push)
|
||||
push_dotfiles
|
||||
;;
|
||||
pull)
|
||||
pull_dotfiles
|
||||
;;
|
||||
list)
|
||||
echo "Tracked dotfiles:"
|
||||
while IFS= read -r file; do
|
||||
rel_path="${file#$DOTFILES_DIR/}"
|
||||
echo " ~/$rel_path"
|
||||
done < <(get_tracked_files)
|
||||
;;
|
||||
-h|--help|help)
|
||||
usage
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown command '$1'"
|
||||
echo ""
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
BIN
win32/ctrl2cap.exe
Normal file
BIN
win32/ctrl2cap.exe
Normal file
Binary file not shown.
1
win32/test.txt
Normal file
1
win32/test.txt
Normal file
@@ -0,0 +1 @@
|
||||
github lol
|
||||
Reference in New Issue
Block a user