Compare commits

...

No commits in common. "76670a567bed75deca1710d85e988f58d01fb5ce" and "3702760f68dadfb6a102eb350a50363f88656726" have entirely different histories.

212 changed files with 177 additions and 10537 deletions

1
.gitattributes vendored
View file

@ -1 +0,0 @@
script-resources/markdown2htmldoc/themes-out/**/* linguist-generated

6
.github/pull.yml vendored
View file

@ -1,6 +0,0 @@
version: '1'
rules:
- base: master
upstream: dmitmel:master
mergeMethod: merge
mergeUnstable: true

24
.github/workflows/sync.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Update submodules
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Pull & update submodules recursively
run: |
git submodule update --init --recursive
git submodule update --recursive --remote
- name: Commit & push changes
run: |
git config --global user.name GitHub
git config --global user.email actions@github.com
git commit -am "[dmitmel] Update submodule" | true
git push

4
.gitignore vendored
View file

@ -1,4 +0,0 @@
*.pyc
node_modules/
.venv
*.md.html

3
.gitmodules vendored Normal file
View file

@ -0,0 +1,3 @@
[submodule "dmitmel-dotfiles"]
path = dmitmel-dotfiles
url = https://github.com/dmitmel/dotfiles

21
LICENSE
View file

@ -1,21 +0,0 @@
MIT License
Copyright (c) 2018-2021 Dmytro Meleshko
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View file

@ -1,21 +0,0 @@
# dotfiles
My dotfiles (configurations and settings) for shells, text editors and other terminal programs, plus
a collection of scripts. Written for and work on various UNIX-like OSes, primarily for:
- Arch Linux,
- Linux Mint,
- server Ubuntu,
- macOS with GNU coreutils (i.e. BSDs are not supported),
- Android with Termux.
And also a legendary project that has survived for thousands of years of development.
## Disclaimer
### **This is my personal project! No warranty is provided for running these as a superuser, I am in no way responsible for deletion of `/` with `rm -rf`, and _absolutely no support is provided_ whatsoever unless I explicitly say so personally!**
**It is also recommended for users of this repository to read the scripts they are running. I didn't
write the comments just for myself!**
**Automatic installers are deliberately not provided.**

View file

@ -1,426 +0,0 @@
#!/usr/bin/env python3
import json
import os
from abc import abstractmethod
from typing import Dict, Iterator, List, Protocol, TextIO
__dir__ = os.path.dirname(__file__)
class Color:
def __init__(self, r: int, g: int, b: int) -> None:
if not (0 <= r <= 0xff):
raise Exception("r component out of range")
if not (0 <= g <= 0xff):
raise Exception("g component out of range")
if not (0 <= b <= 0xff):
raise Exception("b component out of range")
self.r = r
self.g = g
self.b = b
@classmethod
def from_hex(cls, s: str) -> "Color":
if len(s) != 6:
raise Exception("hex color string must be 6 characters long")
return Color(int(s[0:2], 16), int(s[2:4], 16), int(s[4:6], 16))
@property
def css_hex(self) -> str:
return "#{:02x}{:02x}{:02x}".format(self.r, self.g, self.b)
@property
def hex(self) -> str:
return "{:02x}{:02x}{:02x}".format(self.r, self.g, self.b)
def __getitem__(self, index: int) -> int:
if index == 0:
return self.r
elif index == 1:
return self.g
elif index == 2:
return self.b
else:
raise IndexError("color component index out of range")
def __iter__(self) -> Iterator[int]:
yield self.r
yield self.g
yield self.b
BASE16_TO_ANSI_MAPPING: List[int] = [
0x0, 0x8, 0xB, 0xA, 0xD, 0xE, 0xC, 0x5, # 0x0
0x3, 0x8, 0xB, 0xA, 0xD, 0xE, 0xC, 0x7, # 0x8
0x9, 0xF, 0x1, 0x2, 0x4, 0x6, # 0x10
] # yapf: disable
ANSI_TO_BASE16_MAPPING: List[int] = [BASE16_TO_ANSI_MAPPING.index(i) for i in range(16)]
class Theme(Protocol):
base16_name: str
is_dark: bool
base16_colors: List[Color]
@property
def name(self) -> str:
return "base16-{}".format(self.base16_name)
@property
def bg(self) -> Color:
return self.base16_colors[0x0]
@property
def fg(self) -> Color:
return self.base16_colors[0x5]
@property
def cursor_bg(self) -> Color:
return self.fg
@property
def cursor_fg(self) -> Color:
return self.bg
@property
def selection_bg(self) -> Color:
return self.base16_colors[0x2]
@property
def selection_fg(self) -> Color:
return self.fg
@property
def ansi_colors(self) -> List[Color]:
return [self.base16_colors[i] for i in BASE16_TO_ANSI_MAPPING]
@property
def link_color(self) -> Color:
return self.ansi_colors[0xC]
@property
def css_variables(self) -> Dict[str, Color]:
d = {
"bg": self.bg,
"fg": self.fg,
"selection-bg": self.selection_bg,
"selection-fg": self.selection_fg,
"cursor-bg": self.cursor_bg,
"cursor-fg": self.cursor_fg,
}
for index, color in enumerate(self.base16_colors):
d["base-{:02X}".format(index)] = color
return d
class MyTheme(Theme):
base16_name = "eighties"
is_dark = True
base16_colors = [
Color.from_hex("2d2d2d"), # 0
Color.from_hex("393939"), # 1
Color.from_hex("515151"), # 2
Color.from_hex("747369"), # 3
Color.from_hex("a09f93"), # 4
Color.from_hex("d3d0c8"), # 5
Color.from_hex("e8e6df"), # 6
Color.from_hex("f2f0ec"), # 7
Color.from_hex("f2777a"), # 8
Color.from_hex("f99157"), # 9
Color.from_hex("ffcc66"), # a
Color.from_hex("99cc99"), # b
Color.from_hex("66cccc"), # c
Color.from_hex("6699cc"), # d
Color.from_hex("cc99cc"), # e
Color.from_hex("d27b53"), # f
]
class ThemeGenerator(Protocol):
@abstractmethod
def file_name(self) -> str:
raise NotImplementedError()
@abstractmethod
def generate(self, theme: Theme, output: TextIO) -> None:
raise NotImplementedError()
class ThemeGeneratorKitty(ThemeGenerator):
def file_name(self) -> str:
return "kitty.conf"
def generate(self, theme: Theme, output: TextIO) -> None:
def write_color(key_name: str, color: Color) -> None:
output.write("{} {}\n".format(key_name, color.css_hex))
write_color("background", theme.bg)
write_color("foreground", theme.fg)
write_color("cursor", theme.cursor_bg)
write_color("cursor_text_color", theme.cursor_fg)
write_color("selection_background", theme.selection_bg)
write_color("selection_foreground", theme.selection_fg)
for index, color in enumerate(theme.ansi_colors[:16]):
write_color("color{}".format(index), color)
write_color("url_color", theme.link_color)
write_color("active_border_color", theme.ansi_colors[2])
write_color("inactive_border_color", theme.ansi_colors[8])
write_color("bell_border_color", theme.ansi_colors[1])
write_color("active_tab_foreground", theme.base16_colors[0x1])
write_color("active_tab_background", theme.base16_colors[0xB])
write_color("inactive_tab_foreground", theme.base16_colors[0x4])
write_color("inactive_tab_background", theme.base16_colors[0x1])
write_color("tab_bar_background", theme.base16_colors[0x1])
class ThemeGeneratorTermux(ThemeGenerator):
def file_name(self) -> str:
return "termux.properties"
def generate(self, theme: Theme, output: TextIO) -> None:
def write_color(key_name: str, color: Color) -> None:
output.write("{}={}\n".format(key_name, color.css_hex))
write_color("background", theme.bg)
write_color("foreground", theme.fg)
write_color("cursor", theme.cursor_bg)
for index, color in enumerate(theme.ansi_colors[:16]):
write_color("color{}".format(index), color)
class ThemeGeneratorZsh(ThemeGenerator):
def file_name(self) -> str:
return "zsh.zsh"
def generate(self, theme: Theme, output: TextIO) -> None:
def write_color(key_name: str, color: Color) -> None:
output.write("colorscheme_{}={}\n".format(key_name, color.hex))
write_color("bg", theme.bg)
write_color("fg", theme.fg)
write_color("cursor_bg", theme.cursor_bg)
write_color("cursor_fg", theme.cursor_fg)
write_color("selection_bg", theme.selection_bg)
write_color("selection_fg", theme.selection_fg)
write_color("link_color", theme.link_color)
output.write("colorscheme_ansi_colors=(\n")
for color in theme.ansi_colors:
output.write(" {}\n".format(color.hex))
output.write(")\n")
class ThemeGeneratorVim(ThemeGenerator):
def file_name(self) -> str:
return "vim.vim"
def generate(self, theme: Theme, output: TextIO) -> None:
namespace = "dotfiles_colorscheme_"
output.write("let {}name = '{}'\n".format(namespace, theme.name))
output.write("let {}base16_name = '{}'\n".format(namespace, theme.base16_name))
output.write("let {}base16_colors = [\n".format(namespace))
for gui_color, cterm_color in zip(theme.base16_colors, ANSI_TO_BASE16_MAPPING):
output.write(
"\\ {{'gui': '{}', 'cterm': '{:02}'}},\n".format(gui_color.css_hex, cterm_color),
)
output.write("\\ ]\n")
namespace = "terminal_color_"
output.write("let {}background = '{}'\n".format(namespace, theme.bg.css_hex))
output.write("let {}foreground = '{}'\n".format(namespace, theme.fg.css_hex))
for index, color in enumerate(theme.ansi_colors[:16]):
output.write("let {}{} = '{}'\n".format(namespace, index, color.css_hex))
class ThemeGeneratorSetvtrgb(ThemeGenerator):
# default setvtrgb config:
# 0,170,0,170,0,170,0,170,85,255,85,255,85,255,85,255
# 0,0,170,85,0,0,170,170,85,85,255,255,85,85,255,255
# 0,0,0,0,170,170,170,170,85,85,85,85,255,255,255,255
def file_name(self) -> str:
return "setvtrgb.txt"
def generate(self, theme: Theme, output: TextIO) -> None:
for i in range(3):
output.write(",".join(str(color[i]) for color in theme.ansi_colors[:16]))
output.write("\n")
class ThemeGeneratorXfceTerminal(ThemeGenerator):
def file_name(self) -> str:
return "xfce4-terminal.theme"
def generate(self, theme: Theme, output: TextIO) -> None:
output.write("[Scheme]\n")
output.write("Name=dmitmel's dotfiles colorscheme\n")
output.write("ColorForeground={}\n".format(theme.fg.css_hex))
output.write("ColorBackground={}\n".format(theme.bg.css_hex))
output.write("ColorCursorUseDefault=FALSE\n")
output.write("ColorCursorForeground={}\n".format(theme.cursor_fg.css_hex))
output.write("ColorCursor={}\n".format(theme.cursor_bg.css_hex))
output.write("ColorSelectionUseDefault=FALSE\n")
output.write("ColorSelection={}\n".format(theme.selection_fg.css_hex))
output.write("ColorSelectionBackground={}\n".format(theme.selection_bg.css_hex))
output.write("TabActivityColor={}\n".format(theme.base16_colors[0x8].css_hex))
output.write("ColorBoldUseDefault=TRUE\n")
output.write(
"ColorPalette={}\n".format(";".join(color.css_hex for color in theme.ansi_colors)),
)
class ThemeGeneratorVscode(ThemeGenerator):
ANSI_COLOR_NAMES = [
"Black",
"Red",
"Green",
"Yellow",
"Blue",
"Magenta",
"Cyan",
"White",
]
def file_name(self) -> str:
return "vscode-colorCustomizations.json"
def generate(self, theme: Theme, output: TextIO) -> None:
colors: Dict[str, str] = {
"terminal.background": theme.bg.css_hex,
"terminal.foreground": theme.fg.css_hex,
"terminal.selectionBackground": theme.selection_bg.css_hex,
"terminalCursor.background": theme.cursor_fg.css_hex,
"terminalCursor.foreground": theme.cursor_bg.css_hex,
}
for is_bright in [False, True]:
for color_index, color_name in enumerate(self.ANSI_COLOR_NAMES):
color = theme.ansi_colors[color_index + int(is_bright) * len(self.ANSI_COLOR_NAMES)]
colors["terminal.ansi" + ("Bright" if is_bright else "") + color_name] = color.css_hex
json.dump(colors, output, ensure_ascii=False, indent=2)
output.write("\n")
class ThemeGeneratorIterm(ThemeGenerator):
def file_name(self) -> str:
return "iterm.itermcolors"
def generate(self, theme: Theme, output: TextIO) -> None:
output.write('<?xml version="1.0" encoding="UTF-8"?>\n')
output.write(
'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n',
)
output.write('<plist version="1.0">\n')
output.write("<dict>\n")
def write_color(key_name: str, color: Color) -> None:
r, g, b = (float(component) / 0xff for component in color)
output.write(" <key>{} Color</key>\n".format(key_name))
output.write(" <dict>\n")
output.write(" <key>Color Space</key>\n")
output.write(" <string>sRGB</string>\n")
output.write(" <key>Red Component</key>\n")
output.write(" <real>{}</real>\n".format(r))
output.write(" <key>Green Component</key>\n")
output.write(" <real>{}</real>\n".format(g))
output.write(" <key>Blue Component</key>\n")
output.write(" <real>{}</real>\n".format(b))
output.write(" </dict>\n")
write_color("Background", theme.bg)
write_color("Foreground", theme.fg)
write_color("Bold", theme.fg)
write_color("Cursor", theme.cursor_bg)
write_color("Cursor Text", theme.cursor_fg)
write_color("Selection Color", theme.selection_bg)
write_color("Selected Text Color", theme.selection_fg)
for index, color in enumerate(theme.ansi_colors[:16]):
write_color("Ansi " + str(index), color)
write_color("Link", theme.link_color)
output.write("</dict>\n")
output.write("</plist>\n")
class ThemeGeneratorCssVariables(ThemeGenerator):
def file_name(self) -> str:
return "variables.css"
def generate(self, theme: Theme, output: TextIO) -> None:
output.write(":root {\n")
for var_name, color in theme.css_variables.items():
output.write(" --dotfiles-colorscheme-{}: {};\n".format(var_name, color.css_hex))
output.write("}\n")
class ThemeGeneratorScss(ThemeGenerator):
def file_name(self) -> str:
return "_colorscheme.scss"
def generate(self, theme: Theme, output: TextIO) -> None:
output.write("$is-dark: {};\n".format("true" if theme.is_dark else "false"))
for var_name, color in theme.css_variables.items():
output.write("${}: {};\n".format(var_name, color.css_hex))
output.write("$base: ({});\n".format(", ".join(c.css_hex for c in theme.base16_colors)))
output.write("$ansi: ({});\n".format(", ".join(c.css_hex for c in theme.ansi_colors)))
class ThemeGeneratorPrismJs(ThemeGenerator):
def file_name(self) -> str:
return "prismjs-theme.css"
def generate(self, theme: Theme, output: TextIO) -> None:
with open(os.path.join(__dir__, "prismjs-theme-src.css")) as src_file:
src_css = src_file.read()
for var_name, color in theme.css_variables.items():
src_css = src_css.replace("var(--dotfiles-colorscheme-{})".format(var_name), color.css_hex)
output.write(src_css)
def main() -> None:
theme: Theme = MyTheme()
generators: List[ThemeGenerator] = [
ThemeGeneratorKitty(),
ThemeGeneratorTermux(),
ThemeGeneratorZsh(),
ThemeGeneratorVim(),
ThemeGeneratorSetvtrgb(),
ThemeGeneratorXfceTerminal(),
ThemeGeneratorVscode(),
ThemeGeneratorIterm(),
ThemeGeneratorCssVariables(),
ThemeGeneratorScss(),
ThemeGeneratorPrismJs(),
]
out_dir = os.path.join(__dir__, "out")
os.makedirs(out_dir, exist_ok=True)
for generator in generators:
with open(os.path.join(out_dir, generator.file_name()), "w") as output_file:
generator.generate(theme, output_file)
if __name__ == "__main__":
main()

View file

@ -1,25 +0,0 @@
$is-dark: true;
$bg: #2d2d2d;
$fg: #d3d0c8;
$selection-bg: #515151;
$selection-fg: #d3d0c8;
$cursor-bg: #d3d0c8;
$cursor-fg: #2d2d2d;
$base-00: #2d2d2d;
$base-01: #393939;
$base-02: #515151;
$base-03: #747369;
$base-04: #a09f93;
$base-05: #d3d0c8;
$base-06: #e8e6df;
$base-07: #f2f0ec;
$base-08: #f2777a;
$base-09: #f99157;
$base-0A: #ffcc66;
$base-0B: #99cc99;
$base-0C: #66cccc;
$base-0D: #6699cc;
$base-0E: #cc99cc;
$base-0F: #d27b53;
$base: (#2d2d2d, #393939, #515151, #747369, #a09f93, #d3d0c8, #e8e6df, #f2f0ec, #f2777a, #f99157, #ffcc66, #99cc99, #66cccc, #6699cc, #cc99cc, #d27b53);
$ansi: (#2d2d2d, #f2777a, #99cc99, #ffcc66, #6699cc, #cc99cc, #66cccc, #d3d0c8, #747369, #f2777a, #99cc99, #ffcc66, #6699cc, #cc99cc, #66cccc, #f2f0ec, #f99157, #d27b53, #393939, #515151, #a09f93, #e8e6df);

View file

@ -1,270 +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>Background Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.17647058823529413</real>
<key>Green Component</key>
<real>0.17647058823529413</real>
<key>Blue Component</key>
<real>0.17647058823529413</real>
</dict>
<key>Foreground Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.8274509803921568</real>
<key>Green Component</key>
<real>0.8156862745098039</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
</dict>
<key>Bold Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.8274509803921568</real>
<key>Green Component</key>
<real>0.8156862745098039</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
</dict>
<key>Cursor Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.8274509803921568</real>
<key>Green Component</key>
<real>0.8156862745098039</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
</dict>
<key>Cursor Text Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.17647058823529413</real>
<key>Green Component</key>
<real>0.17647058823529413</real>
<key>Blue Component</key>
<real>0.17647058823529413</real>
</dict>
<key>Selection Color Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.3176470588235294</real>
<key>Green Component</key>
<real>0.3176470588235294</real>
<key>Blue Component</key>
<real>0.3176470588235294</real>
</dict>
<key>Selected Text Color Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.8274509803921568</real>
<key>Green Component</key>
<real>0.8156862745098039</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
</dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.17647058823529413</real>
<key>Green Component</key>
<real>0.17647058823529413</real>
<key>Blue Component</key>
<real>0.17647058823529413</real>
</dict>
<key>Ansi 1 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9490196078431372</real>
<key>Green Component</key>
<real>0.4666666666666667</real>
<key>Blue Component</key>
<real>0.47843137254901963</real>
</dict>
<key>Ansi 2 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6</real>
<key>Green Component</key>
<real>0.8</real>
<key>Blue Component</key>
<real>0.6</real>
</dict>
<key>Ansi 3 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>1.0</real>
<key>Green Component</key>
<real>0.8</real>
<key>Blue Component</key>
<real>0.4</real>
</dict>
<key>Ansi 4 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.4</real>
<key>Green Component</key>
<real>0.6</real>
<key>Blue Component</key>
<real>0.8</real>
</dict>
<key>Ansi 5 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.8</real>
<key>Green Component</key>
<real>0.6</real>
<key>Blue Component</key>
<real>0.8</real>
</dict>
<key>Ansi 6 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.4</real>
<key>Green Component</key>
<real>0.8</real>
<key>Blue Component</key>
<real>0.8</real>
</dict>
<key>Ansi 7 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.8274509803921568</real>
<key>Green Component</key>
<real>0.8156862745098039</real>
<key>Blue Component</key>
<real>0.7843137254901961</real>
</dict>
<key>Ansi 8 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.4549019607843137</real>
<key>Green Component</key>
<real>0.45098039215686275</real>
<key>Blue Component</key>
<real>0.4117647058823529</real>
</dict>
<key>Ansi 9 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9490196078431372</real>
<key>Green Component</key>
<real>0.4666666666666667</real>
<key>Blue Component</key>
<real>0.47843137254901963</real>
</dict>
<key>Ansi 10 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.6</real>
<key>Green Component</key>
<real>0.8</real>
<key>Blue Component</key>
<real>0.6</real>
</dict>
<key>Ansi 11 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>1.0</real>
<key>Green Component</key>
<real>0.8</real>
<key>Blue Component</key>
<real>0.4</real>
</dict>
<key>Ansi 12 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.4</real>
<key>Green Component</key>
<real>0.6</real>
<key>Blue Component</key>
<real>0.8</real>
</dict>
<key>Ansi 13 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.8</real>
<key>Green Component</key>
<real>0.6</real>
<key>Blue Component</key>
<real>0.8</real>
</dict>
<key>Ansi 14 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.4</real>
<key>Green Component</key>
<real>0.8</real>
<key>Blue Component</key>
<real>0.8</real>
</dict>
<key>Ansi 15 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.9490196078431372</real>
<key>Green Component</key>
<real>0.9411764705882353</real>
<key>Blue Component</key>
<real>0.9254901960784314</real>
</dict>
<key>Link Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Red Component</key>
<real>0.4</real>
<key>Green Component</key>
<real>0.6</real>
<key>Blue Component</key>
<real>0.8</real>
</dict>
</dict>
</plist>

View file

@ -1,31 +0,0 @@
background #2d2d2d
foreground #d3d0c8
cursor #d3d0c8
cursor_text_color #2d2d2d
selection_background #515151
selection_foreground #d3d0c8
color0 #2d2d2d
color1 #f2777a
color2 #99cc99
color3 #ffcc66
color4 #6699cc
color5 #cc99cc
color6 #66cccc
color7 #d3d0c8
color8 #747369
color9 #f2777a
color10 #99cc99
color11 #ffcc66
color12 #6699cc
color13 #cc99cc
color14 #66cccc
color15 #f2f0ec
url_color #6699cc
active_border_color #99cc99
inactive_border_color #747369
bell_border_color #f2777a
active_tab_foreground #393939
active_tab_background #99cc99
inactive_tab_foreground #a09f93
inactive_tab_background #393939
tab_bar_background #393939

View file

@ -1,123 +0,0 @@
/* Based on <https://github.com/PrismJS/prism/blob/master/themes/prism.css> */
.markdown-body code,
.markdown-body pre {
font-family: 'Ubuntu Mono', monospace;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
}
.markdown-body pre {
background-color: #2d2d2d;
color: #d3d0c8;
}
.markdown-body pre::-moz-selection,
.markdown-body pre::selection,
.markdown-body pre ::-moz-selection,
.markdown-body pre ::selection {
background-color: #515151;
color: #d3d0c8;
}
.token.symbol {
color: #905;
}
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.url {
text-decoration: underline;
}
.token.entity {
cursor: help;
}
.token.attr-equals,
.token.punctuation,
.token.operator,
.token.combinator {
color: #d3d0c8;
}
.token.comment,
.token.doctype,
.token.doctype > .token.punctuation,
.token.cdata,
.token.cdata > .token.punctuation,
.token.prolog,
.token.blockquote,
.token.hr {
color: #747369;
}
.token.variable,
.token.parameter,
.token.constant,
.token.tag,
.token.property,
.token.deleted,
.token.selector {
color: #f2777a;
}
.token.boolean,
.token.number,
.token.unit,
.token.attr-name,
.token.color.hexcode,
.token.list,
.token.nil,
.token.nil.keyword {
color: #f99157;
}
.token.class-name,
.token.maybe-class-name,
.token.builtin,
.token.variable.dom,
.token.macro,
.token.interpolation-punctuation,
.language-json .token.property {
color: #ffcc66;
}
.token.string,
.token.char,
.token.attr-value,
.token.attr-value > .token.punctuation:not(.attr-equals),
.token.inserted {
color: #99cc99;
}
.token.regex,
.token.pseudo-class,
.token.pseudo-element,
.token.entity,
.token.important {
color: #66cccc;
}
.token.function,
.token.coord,
.token.url,
.token.heading,
.token.title,
.token.heading > .token.important,
.token.title > .token.punctuation {
color: #6699cc;
}
.token.keyword,
.token.operator.arrow,
.token.rule {
color: #cc99cc;
}

View file

@ -1,3 +0,0 @@
45,242,153,255,102,204,102,211,116,242,153,255,102,204,102,242
45,119,204,204,153,153,204,208,115,119,204,204,153,153,204,240
45,122,153,102,204,204,204,200,105,122,153,102,204,204,204,236

View file

@ -1,19 +0,0 @@
background=#2d2d2d
foreground=#d3d0c8
cursor=#d3d0c8
color0=#2d2d2d
color1=#f2777a
color2=#99cc99
color3=#ffcc66
color4=#6699cc
color5=#cc99cc
color6=#66cccc
color7=#d3d0c8
color8=#747369
color9=#f2777a
color10=#99cc99
color11=#ffcc66
color12=#6699cc
color13=#cc99cc
color14=#66cccc
color15=#f2f0ec

View file

@ -1,24 +0,0 @@
:root {
--dotfiles-colorscheme-bg: #2d2d2d;
--dotfiles-colorscheme-fg: #d3d0c8;
--dotfiles-colorscheme-selection-bg: #515151;
--dotfiles-colorscheme-selection-fg: #d3d0c8;
--dotfiles-colorscheme-cursor-bg: #d3d0c8;
--dotfiles-colorscheme-cursor-fg: #2d2d2d;
--dotfiles-colorscheme-base-00: #2d2d2d;
--dotfiles-colorscheme-base-01: #393939;
--dotfiles-colorscheme-base-02: #515151;
--dotfiles-colorscheme-base-03: #747369;
--dotfiles-colorscheme-base-04: #a09f93;
--dotfiles-colorscheme-base-05: #d3d0c8;
--dotfiles-colorscheme-base-06: #e8e6df;
--dotfiles-colorscheme-base-07: #f2f0ec;
--dotfiles-colorscheme-base-08: #f2777a;
--dotfiles-colorscheme-base-09: #f99157;
--dotfiles-colorscheme-base-0A: #ffcc66;
--dotfiles-colorscheme-base-0B: #99cc99;
--dotfiles-colorscheme-base-0C: #66cccc;
--dotfiles-colorscheme-base-0D: #6699cc;
--dotfiles-colorscheme-base-0E: #cc99cc;
--dotfiles-colorscheme-base-0F: #d27b53;
}

View file

@ -1,38 +0,0 @@
let dotfiles_colorscheme_name = 'base16-eighties'
let dotfiles_colorscheme_base16_name = 'eighties'
let dotfiles_colorscheme_base16_colors = [
\ {'gui': '#2d2d2d', 'cterm': '00'},
\ {'gui': '#393939', 'cterm': '18'},
\ {'gui': '#515151', 'cterm': '19'},
\ {'gui': '#747369', 'cterm': '08'},
\ {'gui': '#a09f93', 'cterm': '20'},
\ {'gui': '#d3d0c8', 'cterm': '07'},
\ {'gui': '#e8e6df', 'cterm': '21'},
\ {'gui': '#f2f0ec', 'cterm': '15'},
\ {'gui': '#f2777a', 'cterm': '01'},
\ {'gui': '#f99157', 'cterm': '16'},
\ {'gui': '#ffcc66', 'cterm': '03'},
\ {'gui': '#99cc99', 'cterm': '02'},
\ {'gui': '#66cccc', 'cterm': '06'},
\ {'gui': '#6699cc', 'cterm': '04'},
\ {'gui': '#cc99cc', 'cterm': '05'},
\ {'gui': '#d27b53', 'cterm': '17'},
\ ]
let terminal_color_background = '#2d2d2d'
let terminal_color_foreground = '#d3d0c8'
let terminal_color_0 = '#2d2d2d'
let terminal_color_1 = '#f2777a'
let terminal_color_2 = '#99cc99'
let terminal_color_3 = '#ffcc66'
let terminal_color_4 = '#6699cc'
let terminal_color_5 = '#cc99cc'
let terminal_color_6 = '#66cccc'
let terminal_color_7 = '#d3d0c8'
let terminal_color_8 = '#747369'
let terminal_color_9 = '#f2777a'
let terminal_color_10 = '#99cc99'
let terminal_color_11 = '#ffcc66'
let terminal_color_12 = '#6699cc'
let terminal_color_13 = '#cc99cc'
let terminal_color_14 = '#66cccc'
let terminal_color_15 = '#f2f0ec'

View file

@ -1,23 +0,0 @@
{
"terminal.background": "#2d2d2d",
"terminal.foreground": "#d3d0c8",
"terminal.selectionBackground": "#515151",
"terminalCursor.background": "#2d2d2d",
"terminalCursor.foreground": "#d3d0c8",
"terminal.ansiBlack": "#2d2d2d",
"terminal.ansiRed": "#f2777a",
"terminal.ansiGreen": "#99cc99",
"terminal.ansiYellow": "#ffcc66",
"terminal.ansiBlue": "#6699cc",
"terminal.ansiMagenta": "#cc99cc",
"terminal.ansiCyan": "#66cccc",
"terminal.ansiWhite": "#d3d0c8",
"terminal.ansiBrightBlack": "#747369",
"terminal.ansiBrightRed": "#f2777a",
"terminal.ansiBrightGreen": "#99cc99",
"terminal.ansiBrightYellow": "#ffcc66",
"terminal.ansiBrightBlue": "#6699cc",
"terminal.ansiBrightMagenta": "#cc99cc",
"terminal.ansiBrightCyan": "#66cccc",
"terminal.ansiBrightWhite": "#f2f0ec"
}

View file

@ -1,13 +0,0 @@
[Scheme]
Name=dmitmel's dotfiles colorscheme
ColorForeground=#d3d0c8
ColorBackground=#2d2d2d
ColorCursorUseDefault=FALSE
ColorCursorForeground=#2d2d2d
ColorCursor=#d3d0c8
ColorSelectionUseDefault=FALSE
ColorSelection=#d3d0c8
ColorSelectionBackground=#515151
TabActivityColor=#f2777a
ColorBoldUseDefault=TRUE
ColorPalette=#2d2d2d;#f2777a;#99cc99;#ffcc66;#6699cc;#cc99cc;#66cccc;#d3d0c8;#747369;#f2777a;#99cc99;#ffcc66;#6699cc;#cc99cc;#66cccc;#f2f0ec;#f99157;#d27b53;#393939;#515151;#a09f93;#e8e6df

View file

@ -1,31 +0,0 @@
colorscheme_bg=2d2d2d
colorscheme_fg=d3d0c8
colorscheme_cursor_bg=d3d0c8
colorscheme_cursor_fg=2d2d2d
colorscheme_selection_bg=515151
colorscheme_selection_fg=d3d0c8
colorscheme_link_color=6699cc
colorscheme_ansi_colors=(
2d2d2d
f2777a
99cc99
ffcc66
6699cc
cc99cc
66cccc
d3d0c8
747369
f2777a
99cc99
ffcc66
6699cc
cc99cc
66cccc
f2f0ec
f99157
d27b53
393939
515151
a09f93
e8e6df
)

View file

@ -1,123 +0,0 @@
/* Based on <https://github.com/PrismJS/prism/blob/master/themes/prism.css> */
.markdown-body code,
.markdown-body pre {
font-family: 'Ubuntu Mono', monospace;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
}
.markdown-body pre {
background-color: var(--dotfiles-colorscheme-bg);
color: var(--dotfiles-colorscheme-fg);
}
.markdown-body pre::-moz-selection,
.markdown-body pre::selection,
.markdown-body pre ::-moz-selection,
.markdown-body pre ::selection {
background-color: var(--dotfiles-colorscheme-selection-bg);
color: var(--dotfiles-colorscheme-selection-fg);
}
.token.symbol {
color: #905;
}
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.url {
text-decoration: underline;
}
.token.entity {
cursor: help;
}
.token.attr-equals,
.token.punctuation,
.token.operator,
.token.combinator {
color: var(--dotfiles-colorscheme-fg);
}
.token.comment,
.token.doctype,
.token.doctype > .token.punctuation,
.token.cdata,
.token.cdata > .token.punctuation,
.token.prolog,
.token.blockquote,
.token.hr {
color: var(--dotfiles-colorscheme-base-03);
}
.token.variable,
.token.parameter,
.token.constant,
.token.tag,
.token.property,
.token.deleted,
.token.selector {
color: var(--dotfiles-colorscheme-base-08);
}
.token.boolean,
.token.number,
.token.unit,
.token.attr-name,
.token.color.hexcode,
.token.list,
.token.nil,
.token.nil.keyword {
color: var(--dotfiles-colorscheme-base-09);
}
.token.class-name,
.token.maybe-class-name,
.token.builtin,
.token.variable.dom,
.token.macro,
.token.interpolation-punctuation,
.language-json .token.property {
color: var(--dotfiles-colorscheme-base-0A);
}
.token.string,
.token.char,
.token.attr-value,
.token.attr-value > .token.punctuation:not(.attr-equals),
.token.inserted {
color: var(--dotfiles-colorscheme-base-0B);
}
.token.regex,
.token.pseudo-class,
.token.pseudo-element,
.token.entity,
.token.important {
color: var(--dotfiles-colorscheme-base-0C);
}
.token.function,
.token.coord,
.token.url,
.token.heading,
.token.title,
.token.heading > .token.important,
.token.title > .token.punctuation {
color: var(--dotfiles-colorscheme-base-0D);
}
.token.keyword,
.token.operator.arrow,
.token.rule {
color: var(--dotfiles-colorscheme-base-0E);
}

View file

@ -1,4 +0,0 @@
The file [`icon24.png`](icon24.png) was cropped from the file
[`/usr/share/archlinux/web/arch83x31.gif`](file:///usr/share/archlinux/web/arch83x31.gif) of the AUR
package [`archlinux-artwork`](https://aur.archlinux.org/packages/archlinux-artwork/) and is
distributed under the CC-BY-NC-SA license.

View file

@ -1,13 +0,0 @@
{
"id": "btw-i-use-arch",
"title": "btw I use Arch",
"description": "A mod for masochists like myself",
"icons": {
"24": "icon24.png"
},
"dependencies": {
"crosscode-tweak-pack": "*"
},
"prestart": "prestart.js",
"poststart": "poststart.js"
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1 KiB

View file

@ -1,11 +0,0 @@
{
"name": "btw-i-use-arch",
"ccmodHumanName": "btw I use Arch",
"description": "A mod for masochists like myself",
"dependencies": {
"crosscode-tweak-pack": "*"
},
"prestart": "prestart.js",
"main": "poststart.js",
"module": true
}

View file

@ -1,4 +0,0 @@
export {};
ig.input.bind(ig.KEY.J, 'aim');
ig.input.bind(ig.KEY.K, 'dash');

1
dmitmel-dotfiles Submodule

@ -0,0 +1 @@
Subproject commit 71a04af8d770235eb5369cd4a3749054a453f6af

View file

@ -1,27 +0,0 @@
[color]
ui = true
[pull]
rebase = true
[core]
pager = diff-so-fancy | less --tabs=4 --RAW-CONTROL-CHARS
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[alias]
initial-commit = commit --message 'initial commit' --allow-empty
[init]
defaultBranch = main

View file

@ -1,6 +0,0 @@
Session.vim
.project.vim
.DS_Store
.ropeproject/
.ccls-cache/
*~

View file

@ -1 +0,0 @@
/Spoons/

View file

@ -1,117 +0,0 @@
items = {
{ text = "clear screen", keys = {{"ctrl","L"}} },
{ text = "insert mode", keys = {{"ctrl","X"},{"ctrl","O"}} },
{ text = "undo", keys = {{"ctrl","shift", "-"}} },
-- { text = "redo", keys = {{"alt","X"},{"r"},{"e"},{"d"},{"o"},{"return"}} },
{ text = "open command in editor", keys = {{"ctrl","X"},{"ctrl","E"}} },
{ text = "push input", keys = {{"ctrl","Q"}} },
{ text = "pop input", keys = {{"alt","G"}} },
{ text = "run buffer and reuse", keys = {{"alt","G"}} },
{ text = "execute ZLE widget", keys = {{"alt","X"}} },
{ text = "cancel ZLE widget", keys = {{"ctrl","G"}} },
{ text = "display help for current command", keys = {{"alt","H"}} },
{ text = "locate current command", keys = {{"alt","shift","?"}} },
{ text = "go to the buffer start", keys = {{"alt","shift","."}} },
{ text = "go to the buffer end", keys = {{"alt","shift",","}} },
{ text = "go to the line start", keys = {{"ctrl","A"}} },
{ text = "go to the line end", keys = {{"ctrl","E"}} },
{ text = "move one word backward", keys = {{"alt","B"}} },
{ text = "move one word forward", keys = {{"alt","F"}} },
{ text = "go to the matching bracket", keys = {{"ctrl","X"},{"ctrl","B"}} },
{ text = "find in previous commands", keys = {{"ctrl","R"}} },
{ text = "find in following commands", keys = {{"ctrl","S"}} },
{ text = "select", keys = {{"ctrl","shift","2"}} },
{ text = "cut word", keys = {{"alt","D"}} },
{ text = "go to selection start/end", keys = {{"ctrl","X"},{"ctrl","X"}} },
{ text = "cut selected text", keys = {{"alt","W"}} },
{ text = "quote selected text", keys = {{"alt","shift","'"}} },
{ text = "paste copied text", keys = {{"ctrl","Y"}} },
{ text = "clear buffer", keys = {{"ctrl","X"},{"ctrl","K"}} },
{ text = "delete line", keys = {{"ctrl","U"}} },
{ text = "delete word", keys = {{"ctrl","W"}} },
{ text = "join lines", keys = {{"ctrl","X"},{"ctrl","J"}} },
{ text = "tmux: send Ctrl+B", keys = {{"ctrl","B"},{"ctrl","B"}} },
{ text = "tmux: command prompt", keys = {{"ctrl","B"},{"shift",";"}} },
{ text = "tmux: rename current session", keys = {{"ctrl","B"},{"shift","4"}} },
{ text = "tmux: detach", keys = {{"ctrl","B"},{"d"}} },
{ text = "tmux: sessions", keys = {{"ctrl","B"},{"s"}} },
{ text = "tmux: next session", keys = {{"ctrl","B"},{")"}} },
{ text = "tmux: previous session", keys = {{"ctrl","B"},{"("}} },
{ text = "tmux: last session", keys = {{"ctrl","B"},{"shift","l"}} },
{ text = "tmux: create window", keys = {{"ctrl","B"},{"c"}} },
{ text = "tmux: switch to window", keys = {{"ctrl","B"}}, message = "press a number key (0-9)" },
{ text = "tmux: rename current window", keys = {{"ctrl","B"},{","}} },
{ text = "tmux: kill current window", keys = {{"ctrl","B"},{"shift","7"}} },
{ text = "tmux: windows", keys = {{"ctrl","B"},{"w"}} },
{ text = "tmux: next window", keys = {{"ctrl","B"},{"n"}} },
{ text = "tmux: previous window", keys = {{"ctrl","B"},{"p"}} },
{ text = "tmux: last window", keys = {{"ctrl","B"},{"l"}} },
{ text = "tmux: find window", keys = {{"ctrl","B"},{"f"}} },
{ text = "tmux: split horizontally", keys = {{"ctrl","B"},{"shift","'"}} },
{ text = "tmux: split vertically", keys = {{"ctrl","B"},{"shift","5"}} },
{ text = "tmux: switch to pane in a direction", keys = {{"ctrl","B"}}, message = "press an arrow key" },
{ text = "tmux: kill current pane", keys = {{"ctrl","B"},{"x"}} },
{ text = "tmux: next pane", keys = {{"ctrl","B"},{"o"}} },
{ text = "tmux: last pane", keys = {{"ctrl","B"},{";"}} },
{ text = "tmux: toggle pane zoom", keys = {{"ctrl","B"},{"z"}} },
{ text = "tmux: change pane layout", keys = {{"ctrl","B"},{"space"}} },
{ text = "tmux: move pane to a new window", keys = {{"ctrl","B"},{"shift","1"}} },
{ text = "tmux: copy mode", keys = {{"ctrl","B"},{"["}} },
{ text = "tmux: paste", keys = {{"ctrl","B"},{"]"}} },
}
chooser = hs.chooser.new(function(item)
if item then
if item.message then hs.alert(item.message) end
for _, key_combo in ipairs(item.keys) do
hs.eventtap.keyStroke(key_combo.mods, key_combo.key)
end
end
end)
chooser:choices(
hs.fnutils.imap(items, function(item)
subText = table.concat(hs.fnutils.imap(item.keys, function(key_combo)
return table.concat(hs.fnutils.imap(key_combo, function(key_stroke)
return hs.utf8.registeredKeys[key_stroke] or key_stroke
end))
end), " ")
keys = hs.fnutils.imap(item.keys, function(key_combo)
mods = {}
for i = 1, #key_combo - 1 do mods[i] = key_combo[i] end
key = key_combo[#key_combo]
return { mods = mods, key = key }
end)
return {
text = item.text,
subText = subText,
keys = keys,
message = item.message
}
end)
)
chooser:rows(9)
hs.hotkey.bind({"cmd", "shift"}, "a", function()
app = hs.application.frontmostApplication()
app_name = app:name():lower()
if app_name:match("term") or app_name:match("kitty") then
chooser:show()
end
end)

View file

@ -1,3 +0,0 @@
require "TerminalPalette"
hs.notify.show("Hammerspoon", "", "Hammespoon config loaded")

View file

@ -1,8 +0,0 @@
sudo hostname KeanuCodespaces
rm -rf ~/.oh-my-zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)" "" --unattended
git clone https://github.com/keanuplayz/dotfiles ~/.dotfiles
echo "source ~/.dotfiles/zsh/zshrc" >> ~/.zshrc
pip install colorama psutil distro
echo "zsh" >> ~/.bashrc
source ~/.bashrc

1
kitty/.gitignore vendored
View file

@ -1 +0,0 @@
/src/

View file

@ -1,63 +0,0 @@
#!/usr/bin/env bash
set -e
shopt -s nullglob
cd "$(dirname "$0")"
ansi_reset="$(tput sgr0)"
ansi_bold="$(tput bold)"
ansi_rev="$(tput rev)"
log() {
echo >&2 "${ansi_bold}${ansi_rev}[$0]${ansi_reset}" "$@"
}
mkdir -p src
cd src
log "fetching release information"
eval "$(
curl --show-error --fail https://api.github.com/repos/kovidgoyal/kitty/releases/latest |
jq --raw-output '
"release_version=" + (.name | sub("^version "; "") | @sh) + "\n" + (
.assets | map(select(.label == "Source code")) | first |
"release_src_filename=" + (.name | @sh) + "\n" +
"release_src_url=" + (.browser_download_url | @sh)
)
'
)"
if [ -z "$release_version" ]; then
log "couldn't parse response from GitHub API"
exit 1
fi
log "the latest version is $release_version"
if [ ! -f "$release_src_filename" ]; then
log "downloading $release_src_filename from $release_src_url"
curl --show-error --fail --location "$release_src_url" -o "$release_src_filename"
else
log "$release_src_filename has already been downloaded"
fi
release_src_dir="${release_src_filename%.tar.xz}"
if [ -d "$release_src_dir" ]; then
log "clearing previous source code directory"
rm -r "$release_src_dir"
fi
log "unpacking source code archive to src/$release_src_dir"
tar --xz -xf "$release_src_filename"
cd "$release_src_dir"
log "patching"
for patch in ../../patches/*.patch; do
log "applying $(basename "$patch")"
patch --unified --strip 0 < "$patch"
done
log "compiling"
case "$OSTYPE" in
darwin*) make app ;;
linux*) python3 setup.py linux-package ;;
*) log "error: compilation on $OSTYPE is not supported"; exit 1 ;;
esac

View file

@ -1,58 +1,14 @@
include ../colorschemes/out/kitty.conf
# Include Dima's config.
include ../dmitmel-dotfiles/kitty/kitty.conf
# Mouse {{{
# Disable cursor blinking
cursor_blink_interval 0
cursor_stop_blinking_after 0
mouse_hide_wait 1
# }}}
# I sure do love ligatures.
font_family Fira Code
# OS Windows {{{
# Always ask for confirmation before closing OS windows
confirm_os_window_close 1
# }}}
# Remember previous window size. (which will probably always be maximized)
remember_window_size yes
# Windows {{{
# These are the only layouts I use:
enabled_layouts horizontal, vertical
window_margin_width 1.0
window_padding_width 2.0
inactive_text_alpha 0.5
# }}}
# Disable the stupid bell.
enable_audio_bell no
# Tabs {{{
tab_bar_edge top
tab_bar_style powerline
# This option doesn't really do anything when the tab bar style is `powerline`,
# but this Unicode character is a nice find, so let's keep it just in case.
tab_separator " │ "
# Always show the tab bar
tab_bar_min_tabs 1
active_tab_font_style bold
inactive_tab_font_style none
# }}}
# Miscellaneous {{{
# Tip: on high-DPI screens the `double` style is more discernible
url_style single
# }}}
# macOS-specific settings {{{
macos_option_as_alt yes
macos_custom_beam_cursor yes
macos_show_window_title_in window
# open_url_modifiers cmd
# }}}
# Keybindings {{{
map kitty_mod+1 goto_tab 1
map kitty_mod+2 goto_tab 2
map kitty_mod+3 goto_tab 3
map kitty_mod+4 goto_tab 4
map kitty_mod+5 goto_tab 5
map kitty_mod+6 goto_tab 6
map kitty_mod+7 goto_tab 7
map kitty_mod+8 goto_tab 8
map kitty_mod+9 goto_tab 9
map kitty_mod+0 goto_tab 10
# }}}
# The block confuses me, shush.
cursor_shape beam

View file

@ -1,16 +0,0 @@
--- kitty/glfw.c 2019-07-29 07:15:02.000000000 +0300
+++ kitty/glfw.c 2019-08-01 23:38:47.259980678 +0300
@@ -842,13 +842,9 @@
double now = monotonic();
if (now - last_bell_at <= 0.1) return;
last_bell_at = now;
-#ifdef __APPLE__
if (w->handle) {
glfwWindowBell(w->handle);
}
-#else
- play_canberra_sound("bell", "kitty bell");
-#endif
}
static PyObject*

View file

@ -1,57 +0,0 @@
--- kitty/tab_bar.py.orig 2019-11-27 06:25:00.000000000 +0200
+++ kitty/tab_bar.py 2019-11-30 12:07:00.559881682 +0200
@@ -25,7 +25,7 @@
return (x << 8) | 2
-def draw_title(draw_data, screen, tab, index):
+def draw_title(draw_data, screen, tab, index, max_title_text_length):
if tab.needs_attention and draw_data.bell_on_tab:
fg = screen.cursor.fg
screen.cursor.fg = draw_data.bell_fg
@@ -38,19 +38,20 @@
draw_title.template_failure_reported = True
log_error('Invalid tab title template: "{}" with error: {}'.format(draw_data.title_template, e))
title = tab.title
+ extra = len(title) - max_title_text_length
+ if extra > 0:
+ title = '…' + title[1 + extra:]
screen.draw(title)
+ return extra
def draw_tab_with_separator(draw_data, screen, tab, before, max_title_length, index, is_last):
if draw_data.leading_spaces:
screen.draw(' ' * draw_data.leading_spaces)
- draw_title(draw_data, screen, tab, index)
+ max_title_text_length = max_title_length - draw_data.leading_spaces - draw_data.trailing_spaces
+ draw_title(draw_data, screen, tab, index, max_title_text_length)
trailing_spaces = min(max_title_length - 1, draw_data.trailing_spaces)
max_title_length -= trailing_spaces
- extra = screen.cursor.x - before - max_title_length
- if extra > 0:
- screen.cursor.x -= extra + 1
- screen.draw('…')
if trailing_spaces:
screen.draw(' ' * trailing_spaces)
end = screen.cursor.x
@@ -66,15 +67,12 @@
for bg in fade_colors:
screen.cursor.bg = bg
screen.draw(' ')
- draw_title(draw_data, screen, tab, index)
- extra = screen.cursor.x - before - max_title_length
+ max_title_text_length = max_title_length - len(fade_colors) * 2
+ extra = draw_title(draw_data, screen, tab, index, max_title_text_length)
if extra > 0:
screen.cursor.x = before
- draw_title(draw_data, screen, tab, index)
- extra = screen.cursor.x - before - max_title_length
- if extra > 0:
- screen.cursor.x -= extra + 1
- screen.draw('…')
+ max_title_text_length = max_title_length
+ extra = draw_title(draw_data, screen, tab, index, max_title_text_length)
for bg in reversed(fade_colors):
if extra >= 0:
break

View file

@ -1,8 +0,0 @@
set disassembly-flavor intel
set print asm-demangle on
python
import os
if 'GDB_OUTPUT_TTY' in os.environ:
gdb.execute('tty ' + os.environ['GDB_OUTPUT_TTY'])
end

View file

@ -1,5 +0,0 @@
configuration {
modi: "window,run,drun,ssh";
font: "monospace 16";
kb-cancel: "Control+g,Control+bracketleft,!Escape";
}

View file

@ -1 +0,0 @@
content_disposition = on

View file

@ -1,6 +0,0 @@
{
"answerdiff": "All",
"completioninterval": 1,
"devel": true,
"removemake": "yes"
}

1
nvim/.gitignore vendored
View file

@ -1 +0,0 @@
/spell

View file

@ -1 +0,0 @@
setlocal commentstring=#%s

View file

@ -1,4 +0,0 @@
" <https://stackoverflow.com/a/7212314/12005228>
let &l:makeprg = 'awk --lint --source "BEGIN{exit(0)}END{exit(0)}" --file %:S'
" <https://github.com/WolfgangMehner/vim-plugins/blob/a673942f0b7fe9cbbb19282ee4c3ebe5decf2a1d/plugin/awk-support.vim#L570>
let &l:errorformat = 'awk: %f:%l: %m'

View file

@ -1 +0,0 @@
setlocal iskeyword+=-

View file

@ -1 +0,0 @@
setlocal nofoldenable foldmethod=manual

View file

@ -1 +0,0 @@
setlocal nofoldenable foldmethod=manual

View file

@ -1 +0,0 @@
setlocal foldmethod< foldtext<

View file

@ -1 +0,0 @@
nnoremap <buffer> <F5> <Cmd>Open<CR>

View file

@ -1 +0,0 @@
setlocal matchpairs-=<:>

View file

@ -1 +0,0 @@
source <sfile>:h/javascript.vim

View file

@ -1 +0,0 @@
IndentTabs 4

View file

@ -1 +0,0 @@
source <sfile>:h/text.vim

View file

@ -1 +0,0 @@
IndentTabs 2

View file

@ -1,5 +0,0 @@
source <sfile>:h/text.vim
let &l:makeprg = 'markdown2htmldoc -- %:S %:S.html'
nnoremap <buffer> <F5> <Cmd>Open %.html<CR>

View file

@ -1 +0,0 @@
source <sfile>:h/text.vim

View file

@ -1 +0,0 @@
setlocal matchpairs-=<:>

View file

@ -1 +0,0 @@
source <sfile>:h/scss.vim

View file

@ -1,3 +0,0 @@
source <sfile>:h/css.vim
let &l:makeprg = 'sass -- %:S:%:S.css'

View file

@ -1,5 +0,0 @@
call pencil#init()
IndentLinesDisable
" Reset these mappings to their default function (jumping over sentences):
noremap <buffer> ( (
noremap <buffer> ) )

View file

@ -1 +0,0 @@
source <sfile>:h/javascript.vim

View file

@ -1 +0,0 @@
source <sfile>:h/typescript.vim

View file

@ -1 +0,0 @@
nnoremap <buffer> <F5> <Cmd>source %<CR>

View file

@ -1 +0,0 @@
setlocal foldmethod< foldtext<

View file

@ -1 +0,0 @@
setlocal foldmethod< foldtext<

View file

@ -1 +0,0 @@
syntax sync minlines=500

View file

@ -1 +0,0 @@
syntax match Comment +\/\/.\+$+

View file

@ -1,7 +0,0 @@
" Guess what. The `syntax/jinja.vim` script for the jinja templating language,
" which is not included in neither Vim's runtime, nor Neovim's runtime, nor in
" vim-polyglot (so the only way to get it is to install the python package) is
" sourced in `syntax/nginx.vim` in vim-polyglot, which resets the `commentstring`
" set in `ftplugin/nginx.vim` and sets `comments` to some garbage. This script
" undoes that damage.
setlocal comments< commentstring=#%s

View file

@ -1 +0,0 @@
setl commentstring=#%s

View file

@ -1,2 +0,0 @@
syn keyword pythonOperatorKeyword and in is not or
hi def link pythonOperatorKeyword Keyword

View file

@ -1,2 +0,0 @@
syn keyword rustOperatorKeyword as
hi def link rustOperatorKeyword Keyword

View file

@ -1 +0,0 @@
source <sfile>:h/javascript.vim

View file

@ -1 +0,0 @@
source <sfile>:h/typescript.vim

View file

@ -1,126 +0,0 @@
if !exists('g:did_coc_loaded')
finish
endif
function! airline#extensions#dotfiles_coclist#init(ext) abort
let g:coc_user_config['list.statusLineSegments'] = v:null
call a:ext.add_statusline_func('airline#extensions#dotfiles_coclist#apply')
call a:ext.add_inactive_statusline_func('airline#extensions#dotfiles_coclist#apply')
call airline#parts#define('dotfiles_coclist_mode', {
\ 'function': 'airline#extensions#dotfiles_coclist#part_mode',
\ 'accent': 'bold',
\ })
call airline#parts#define('dotfiles_coclist_args', {
\ 'function': 'airline#extensions#dotfiles_coclist#part_args',
\ })
call airline#parts#define('dotfiles_coclist_name', {
\ 'function': 'airline#extensions#dotfiles_coclist#part_name',
\ })
call airline#parts#define('dotfiles_coclist_cwd', {
\ 'function': 'airline#extensions#dotfiles_coclist#part_cwd',
\ })
call airline#parts#define('dotfiles_coclist_loading', {
\ 'function': 'airline#extensions#dotfiles_coclist#part_loading',
\ })
call airline#parts#define('dotfiles_coclist_total', {
\ 'function': 'airline#extensions#dotfiles_coclist#part_total',
\ })
" Default airline section setup:
" <https://github.com/vim-airline/vim-airline/blob/49cdcb7b3ea76ee19c737885c0ab19e64e564169/autoload/airline/init.vim#L209-L250>
" Beware that whitespaces in function expansions can cause some weirdness:
" <https://github.com/vim/vim/issues/3898>
let s:section_a = airline#section#create_left(['dotfiles_coclist_mode'])
let s:section_b = airline#section#create(['dotfiles_coclist_name'])
let s:section_c = airline#section#create(['%<', 'dotfiles_coclist_args', ' ', 'dotfiles_coclist_loading'])
let s:section_x = airline#section#create(['dotfiles_coclist_cwd'])
let s:section_y = airline#section#create(['#%L/', 'dotfiles_coclist_total'])
let s:section_z = airline#section#create(['%p%%', 'linenr', 'maxlinenr'])
endfunction
function! airline#extensions#dotfiles_coclist#statusline() abort
let context = { 'winnr': winnr(), 'active': 1, 'bufnr': bufnr() }
let builder = airline#builder#new(context)
call airline#extensions#dotfiles_coclist#apply(builder, context)
return builder.build()
endfunction
function! airline#extensions#dotfiles_coclist#apply(builder, context) abort
if getbufvar(a:context.bufnr, '&filetype', '') !=# 'list' | return 0 | endif
let list_status = getbufvar(a:context.bufnr, 'list_status', 0)
if type(list_status) !=# v:t_dict | return 0 | endif
" How b:list_status is populated:
" <https://github.com/neoclide/coc.nvim/blob/0aa97ad1bbdcc2bb95cf7aabd7818643db1e269d/src/list/session.ts#L417-L433>
" How the list buffer is created:
" <https://github.com/neoclide/coc.nvim/blob/0aa97ad1bbdcc2bb95cf7aabd7818643db1e269d/autoload/coc/list.vim#L82-L100>
" The default statusline:
" <https://github.com/neoclide/coc.nvim/blob/0aa97ad1bbdcc2bb95cf7aabd7818643db1e269d/data/schema.json#L870-L884>
" How airline generates its actual statuslines:
" <https://github.com/vim-airline/vim-airline/blob/49cdcb7b3ea76ee19c737885c0ab19e64e564169/autoload/airline/extensions/default.vim>
" <https://github.com/vim-airline/vim-airline/blob/49cdcb7b3ea76ee19c737885c0ab19e64e564169/autoload/airline/builder.vim>
" <https://github.com/vim-airline/vim-airline/blob/49cdcb7b3ea76ee19c737885c0ab19e64e564169/autoload/airline/section.vim>
let spc = g:airline_symbols.space
if a:context.active || (!a:context.active && !g:airline_inactive_collapse)
call a:builder.add_section('airline_a', s:get_section('a'))
call a:builder.add_section('airline_b', s:get_section('b'))
endif
call a:builder.add_section('airline_c', s:get_section('c'))
call a:builder.split()
call a:builder.add_section('airline_x', s:get_section('x'))
call a:builder.add_section('airline_y', s:get_section('y'))
call a:builder.add_section('airline_z', s:get_section('z'))
return 1
endfunction
" Copied from <https://github.com/vim-airline/vim-airline/blob/49cdcb7b3ea76ee19c737885c0ab19e64e564169/autoload/airline/extensions/default.vim#L7-L14>
let s:section_truncate_width = get(g:, 'airline#extensions#default#section_truncate_width', {
\ 'b': 79,
\ 'x': 60,
\ 'y': 88,
\ 'z': 45,
\ })
function! s:get_section(key) abort
if has_key(s:section_truncate_width, a:key) && airline#util#winwidth() < s:section_truncate_width[a:key]
return ''
endif
let spc = g:airline_symbols.space
let text = s:section_{a:key}
if empty(text) | return '' | endif
return '%(' . spc . text . spc . '%)'
endfunction
" TODO: Is recoloring of the section A based on `b:list_status.mode` possible?
function! airline#extensions#dotfiles_coclist#part_mode() abort
if get(w:, 'airline_active', 1)
" <https://github.com/vim-airline/vim-airline/blob/49cdcb7b3ea76ee19c737885c0ab19e64e564169/autoload/airline/parts.vim#L55-L57>
return airline#util#shorten(get(b:list_status, 'mode', ''), 79, 1)
else
return get(g:airline_mode_map, '__')
else
endfunction
function! airline#extensions#dotfiles_coclist#part_args() abort
return get(b:list_status, 'args', '')
endfunction
function! airline#extensions#dotfiles_coclist#part_name() abort
return get(b:list_status, 'name', '')
endfunction
function! airline#extensions#dotfiles_coclist#part_loading() abort
return get(b:list_status, 'loading', '')
endfunction
function! airline#extensions#dotfiles_coclist#part_total() abort
return get(b:list_status, 'total', '')
endfunction
function! airline#extensions#dotfiles_coclist#part_cwd() abort
return pathshorten(fnamemodify(get(b:list_status, 'cwd', ''), ':~:.'))
endfunction

View file

@ -1,43 +0,0 @@
" Based on <https://github.com/vim-airline/vim-airline/blob/70b06be4b067fec44756e843e2445cce5c97082f/autoload/airline/extensions/example.vim>
function! airline#extensions#dotfiles_filesize#init(ext) abort
call airline#parts#define_function('dotfiles_filesize', 'airline#extensions#dotfiles_filesize#get')
call a:ext.add_statusline_func('airline#extensions#dotfiles_filesize#apply')
endfunction
function! airline#extensions#dotfiles_filesize#apply(...) abort
call airline#extensions#append_to_section('y', airline#section#create_right(['', '', 'dotfiles_filesize']))
endfunction
" Finally, this function will be invoked from the statusline.
function! airline#extensions#dotfiles_filesize#get() abort
" Use several preliminary checks to prevent frequent updates. You see,
" wordcount() has to iterate the entire file to calculate its byte size.
" <https://github.com/vim-airline/vim-airline/blob/ecac148e19fe28d0f13af5f99d9500c2eadefe4c/autoload/airline/extensions/wordcount.vim#L78-L82>
" <https://github.com/vim-airline/vim-airline/blob/2e9df43962539e3a05e5571c63ccf6356451d46c/autoload/airline/extensions/lsp.vim#L95-L100>
" Implementation of wordcount: <https://github.com/neovim/neovim/blob/dab6b08a1e5571d0a0c4cb1f2f1af7000870c652/src/nvim/ops.c#L5568-L5808>
if empty(get(b:, 'dotfiles_filesize_str', '')) ||
\ (get(b:, 'dotfiles_filesize_changedtick', 0) !=# b:changedtick &&
\ reltimefloat(reltime()) - get(b:, 'dotfiles_filesize_timer') >=# get(g:, 'airline#extensions#dotfiles_filesize#update_delay', 0))
let bytes = wordcount().bytes
let b:dotfiles_filesize = bytes
let factor = 1
for unit in ['B', 'K', 'M', 'G']
let next_factor = factor * 1024
if bytes <# next_factor
let number_str = printf('%.2f', (bytes * 1.0) / factor)
" remove trailing zeros
let number_str = substitute(number_str, '\v(\.0*)=$', '', '')
let b:dotfiles_filesize_str = number_str . unit
break
endif
let factor = next_factor
endfor
let b:dotfiles_filesize_changedtick = b:changedtick
let b:dotfiles_filesize_timer = reltimefloat(reltime())
endif
return b:dotfiles_filesize_str
endfunction

View file

@ -1,7 +0,0 @@
function! airline#extensions#dotfiles_tweaks#init(ext) abort
" Undo this commit a little bit:
" <https://github.com/vim-airline/vim-airline/commit/8929bc72a13d358bb8369443386ac3cc4796ca16>
" Most of the hacks present here are not required anymore:
" <https://github.com/vim-airline/vim-airline/commit/1f94ec1556db36088897c85db62251b62b683ab3>
call airline#parts#define_accent('colnr', 'none')
endfunction

View file

@ -1,59 +0,0 @@
let s:palette = {
\ "inactive" : {},
\ "replace" : {},
\ "normal" : {},
\ "visual" : {},
\ "insert" : {},
\ "terminal" : {},
\ "commandline" : {},
\ }
let s:colors = g:dotfiles_colorscheme_base16_colors
function! s:base16_color(fg, bg) abort
let fg = s:colors[a:fg]
let bg = s:colors[a:bg]
return [fg.gui, bg.gui, fg.cterm, bg.cterm]
endfunction
let s:section_a = s:base16_color(0x1, 0xB)
let s:section_b = s:base16_color(0x6, 0x2)
let s:section_c = s:base16_color(0x9, 0x1)
let s:palette.normal = airline#themes#generate_color_map(
\ s:section_a,
\ s:section_b,
\ s:section_c)
let s:section_a_overrides = {
\ 'insert' : s:base16_color(0x1, 0xD),
\ 'visual' : s:base16_color(0x1, 0xE),
\ 'replace' : s:base16_color(0x1, 0x8),
\ 'terminal' : s:base16_color(0x1, 0xD),
\ 'commandline' : s:base16_color(0x1, 0xC),
\ }
for [s:mode, s:color] in items(s:section_a_overrides)
let s:palette[s:mode] = { 'airline_a': s:color, 'airline_z': s:color }
endfor
let s:section_inactive = s:base16_color(0x5, 0x1)
let s:palette.inactive = airline#themes#generate_color_map(
\ s:section_inactive,
\ s:section_inactive,
\ s:section_inactive)
if get(g:, 'loaded_ctrlp', 0)
let s:ctrlp_dark = s:base16_color(0x7, 0x2)
let s:ctrlp_light = s:base16_color(0x7, 0x4)
let s:ctrlp_white = s:base16_color(0x5, 0x1) + ['bold']
let s:palette.ctrlp = airline#extensions#ctrlp#generate_color_map(
\ s:ctrlp_dark,
\ s:ctrlp_light,
\ s:ctrlp_white)
endif
for s:mode in keys(s:palette)
let s:palette[s:mode]['airline_warning'] = s:base16_color(0x0, 0xA)
let s:palette[s:mode]['airline_error'] = s:base16_color(0x0, 0x8)
let s:palette[s:mode]['airline_term'] = s:base16_color(0x9, 0x1)
endfor
let airline#themes#dotfiles#palette = s:palette

View file

@ -1,84 +0,0 @@
" Based on <https://github.com/tpope/vim-rhubarb/blob/3d444b5b4f636408c239a59adb88ee13a56486e0/autoload/rhubarb.vim>
" Also see <https://github.com/tpope/vim-fugitive/blob/0868c30cc08a4cf49b5f43e08412c671b19fa3f0/autoload/fugitive.vim#L6123-L6343>.
" Other intersting links:
" <https://git.zx2c4.com/cgit/>
" <https://github.com/shumphrey/fugitive-gitlab.vim/blob/f3e56ff60fe3fb5ebc891cbe5fd12cd8c59ae6ef/autoload/gitlab.vim#L6-L93>
" <https://github.com/tommcdo/vim-fubitive/blob/5717417ee75c39ea2f8f446a9491cdf99d5965e9/plugin/fubitive.vim>
" <https://github.com/LinuxSuRen/fugitive-gitee.vim/blob/96221852753a04daeb8136c54b0082db36d1ac5b/plugin/gitee.vim>
" <https://github.com/jparise/vim-phabricator/blob/d5c0571f44f2c44ba32df2d12e52b4dfcd4921ed/autoload/phabricator.vim>
" <https://github.com/cedarbaum/fugitive-azure-devops.vim/blob/4f1adeac33f54d1ec1949364d049237d7485dea1/autoload/azuredevops.vim>
function! dotfiles#fugitive#aur#handler(opts) abort
if type(a:opts) != v:t_dict
return ''
endif
let opts = a:opts
let parsed = dotfiles#fugitive#aur#parse_url(get(opts, 'remote', ''))
if empty(parsed)
return ''
endif
let path = substitute(opts.path, '^/', '', '')
if path =~# '^\.git/refs/heads/'
let branch = path[16:-1]
" AUR packages can have only a single branch, master, as it is mapped to
" the branch named after the package in the central Git repository.
if branch ==# 'master'
return parsed.cgit_prefix . '/log/' . parsed.cgit_suffix
endif
return ''
elseif path =~# '^\.git/refs/tags/'
" Tags are not allowed for AUR packages.
let tag = path[15:-1]
return ''
elseif path =~# '^\.git/refs/remotes/[^/]\+/.'
let remote_branch = matchstr(path[18:-1], '^[^/]\+/\zs.*$')
" Same story as with regular branches.
if remote_branch ==# 'master'
return parsed.cgit_prefix . '/log/' . parsed.cgit_suffix
endif
return ''
elseif path =~# '^\.git/'
return parsed.cgit_prefix . '/' . parsed.cgit_suffix
endif
if opts.commit =~# '^\d\=$'
return ''
elseif expand('%') =~? '^fugitive:'
let commit = opts.commit
else
let commit = a:opts.repo.rev_parse('HEAD')
endif
let line = min([opts.line1, opts.line2])
let parsed.cgit_suffix .= '&id=' . substitute(commit, '#', '%23', 'g')
if opts.type ==# 'blob' || opts.type ==# 'tree'
return parsed.cgit_prefix . '/tree/' . substitute(path, '/$', '', 'g') . parsed.cgit_suffix . (line ? '#n'.line : '')
elseif opts.type ==# 'commit' || opts.type ==# 'tag'
return parsed.cgit_prefix . '/commit/' . parsed.cgit_suffix
endif
return ''
endfunction
" Based on <https://github.com/shumphrey/fugitive-gitlab.vim/blob/f3e56ff60fe3fb5ebc891cbe5fd12cd8c59ae6ef/autoload/gitlab.vim#L70-L79>
" and <https://github.com/tpope/vim-rhubarb/blob/3d444b5b4f636408c239a59adb88ee13a56486e0/autoload/rhubarb.vim#L32>.
" Also see <https://github.com/archlinux/aurweb/blob/d5e308550ad4682829c01feb32212540a6699100/web/html/404.php#L8>.
function! dotfiles#fugitive#aur#parse_url(url) abort
let intro_re = '%(https=|git|ssh)\://%([^/@]+\@)='
let domain_re = 'aur\.archlinux\.org'
let repo_path_re = '[a-zA-Z0-9][a-zA-Z0-9_\.\+\-]{-}'
let outro_re = '%(\.git)=/='
let combined_re = '\v^'.intro_re.'\zs('.domain_re.')/('.repo_path_re.')\ze'.outro_re.'$'
let matches = matchlist(a:url, combined_re)
if empty(matches)
return {}
endif
let domain = matches[1]
let package = matches[2]
let homepage = 'https://'.domain.'/pkgbase/'.package
let cgit_prefix = 'https://'.domain.'/cgit/aur.git'
let cgit_suffix = '?h='.package
return {'domain': domain, 'package': package, 'homepage': homepage, 'cgit_prefix': cgit_prefix, 'cgit_suffix': cgit_suffix}
endfunction

View file

@ -1,63 +0,0 @@
" Based on <https://github.com/kana/vim-textobj-indent/blob/deb76867c302f933c8f21753806cbf2d8461b548/autoload/textobj/indent.vim>
" A motion for moving over enclosing indentation blocks. Primarily intended
" for reverse-engineering CrossCode.
function! dotfiles#indent_motion#run(direction) abort
let cursor_linenr = line(".")
let max_linenr = line("$")
let retry = 0
while retry <# 2
let retry += 1
let base_linenr = cursor_linenr
let base_indent = 0
while 1 <=# base_linenr && base_linenr <=# max_linenr
let base_indent = dotfiles#indent_motion#indent_level_of(base_linenr)
if base_indent >=# 0
break
endif
let base_linenr += a:direction
endwhile
let target_linenr = base_linenr
let curr_linenr = base_linenr + a:direction
let prev_indent = base_indent
while 1 <=# curr_linenr && curr_linenr <=# max_linenr
let indent = dotfiles#indent_motion#indent_level_of(curr_linenr)
if indent >=# 0
if indent <# base_indent
break
else
let target_linenr = curr_linenr
endif
elseif base_indent ==# 0 && prev_indent ==# 0
break
endif
let prev_indent = indent
let curr_linenr += a:direction
endwhile
if target_linenr ==# cursor_linenr
let cursor_linenr += a:direction
if 1 <=# cursor_linenr && cursor_linenr <=# max_linenr
continue
endif
endif
break
endwhile
execute "normal! " . target_linenr . "G^"
endfunction
" <https://github.com/kana/vim-textobj-indent/blob/deb76867c302f933c8f21753806cbf2d8461b548/autoload/textobj/indent.vim#L120-L127>
function! dotfiles#indent_motion#indent_level_of(linenr) abort
if getline(a:linenr) ==# ""
return -1
endif
return indent(a:linenr)
endfunction

View file

@ -1,6 +0,0 @@
function! dotfiles#utils#array_remove_element(array, element) abort
let index = index(a:array, a:element)
if index >= 0
call remove(a:array, index)
endif
endfunction

View file

@ -1,17 +0,0 @@
let s:filetypes = ['c', 'cpp', 'objc', 'objcpp']
let g:coc_filetypes += s:filetypes
let g:coc_user_config['languageserver.ccls'] = {
\ 'filetypes': s:filetypes,
\ 'command': 'ccls',
\ 'rootPatterns': ['.ccls', 'compile_commands.json', '.vim/', '.git/', '.hg/'],
\ 'initializationOptions': {
\ 'cache.directory': tempname(),
\ },
\ }
" let g:coc_user_config['languageserver.clangd'] = {
" \ 'filetypes': s:filetypes,
" \ 'command': 'clangd',
" \ 'rootPatterns': ['compile_flags.txt', 'compile_commands.json', '.vim/', '.git/', '.hg/'],
" \ }

View file

@ -1,2 +0,0 @@
let g:coc_global_extensions += ['coc-css']
let g:coc_filetypes += ['css', 'scss', 'less']

View file

@ -1,8 +0,0 @@
let s:filetypes = ['haskell', 'lhaskell', 'chaskell']
let g:coc_filetypes += s:filetypes
let g:coc_user_config['languageserver.haskell'] = {
\ 'filetypes': s:filetypes,
\ 'command': 'hie-wrapper',
\ 'rootPatterns': ['.stack.yaml', 'cabal.config', 'package.yaml'],
\ 'initializationOptions': {},
\ }

View file

@ -1,4 +0,0 @@
let g:coc_global_extensions += ['coc-html', 'coc-emmet']
let s:emmet_filetype_mapping = { 'jinja': 'html' }
let g:coc_filetypes += ['html'] + keys(s:emmet_filetype_mapping)
let g:coc_user_config['emmet.includeLanguages'] = s:emmet_filetype_mapping

View file

@ -1,23 +0,0 @@
let g:coc_global_extensions += ['coc-tsserver', 'coc-eslint', 'coc-prettier']
let s:filetypes = ['javascript', 'javascriptreact', 'typescript', 'typescriptreact']
let g:coc_filetypes += s:filetypes
let g:coc_user_config['eslint'] = {
\ 'filetypes': s:filetypes,
\ 'autoFixOnSave': v:true,
\ }
" See <https://github.com/dmitmel/eslint-config-dmitmel/blob/9b14f45aef7efbf333b38a06277296f5b0304484/prettier.config.js>
let g:coc_user_config['prettier'] = {
\ 'printWidth': 100,
\ 'tabWidth': 2,
\ 'useTabs': v:false,
\ 'semi': v:true,
\ 'singleQuote': v:true,
\ 'quoteProps': 'as-needed',
\ 'jsxSingleQuote': v:false,
\ 'trailingComma': 'all',
\ 'bracketSpacing': v:true,
\ 'jsxBracketSameLine': v:true,
\ 'arrowParens': 'always',
\ 'proseWrap': 'preserve',
\ 'disableSuccessMessage': v:true,
\ }

View file

@ -1,2 +0,0 @@
let g:coc_global_extensions += ['coc-json']
let g:coc_filetypes += ['json', 'json5']

View file

@ -1,3 +0,0 @@
let g:coc_global_extensions += ['coc-lua']
let s:filetypes = ['lua']
let g:coc_filetypes += s:filetypes

View file

@ -1 +0,0 @@
let g:coc_filetypes += ['markdown']

View file

@ -1,17 +0,0 @@
let g:coc_global_extensions += ['coc-pyright']
let g:coc_filetypes += ['python']
let g:coc_user_config['python'] = {
\ 'formatting': {
\ 'provider': 'yapf',
\ 'yapfArgs': ['--style=' . simplify(g:dotfiles_dir.'/python/yapf.ini')],
\ },
\ 'linting': {
\ 'pylintEnabled': v:false,
\ 'flake8Enabled': v:true,
\ 'flake8Args': ['--config=' . simplify(g:dotfiles_dir.'/python/flake8.ini')],
\ },
\ 'analysis': {
\ 'typeCheckingMode': 'strict',
\ },
\ }

View file

@ -1,15 +0,0 @@
let g:coc_filetypes += ['rust']
let g:coc_global_extensions += ['coc-rust-analyzer']
let g:coc_user_config['rust-analyzer'] = {
\ 'serverPath': 'rust-analyzer',
\ 'lens.enable': v:false,
\ 'inlayHints.typeHints': v:false,
\ 'inlayHints.chainingHints': v:false,
\ 'diagnostics.enable': v:false,
\ 'completion.autoimport.enable': v:false,
\ 'checkOnSave.command': 'clippy',
\ 'cargo.loadOutDirsFromCheck': v:true,
\ }
" let g:coc_global_extensions += ['coc-rls']
" let g:coc_user_config['rust'] = { 'clippy_preference': 'on' }

View file

@ -0,0 +1,2 @@
let g:coc_global_extensions += ['coc-sh']
let g:coc_filetypes += ['sh', 'zsh']

View file

@ -1,55 +0,0 @@
" This plugin ended up being useless.
finish
let s:filetypes = ['vim']
let g:coc_filetypes += s:filetypes
let g:coc_global_extensions += ['coc-vimlsp']
let g:coc_user_config['vimlsp'] = {
\ 'suggest.fromRuntimepath': v:true,
\ }
" The coc-vimlsp plugin is basically reimplemented here because it doesn't do
" much beyond just wrapping the language server and passing some init options,
" but having two processes (plugin+LSP) almost doubles the memory usage.
"
" On a second thought... Apparently that's just how this extension works...
" Either way it spawns two processes (with the controller process having
" roughly the same memory usage regardless of being in a coc extension). And
" having updates through :CocUpdate is nice, so I'm gonna use the coc-vimlsp
" plugin itself. The janky reimplementation is left in this file for better
" times and bragging purposes.
finish
" <https://github.com/iamcco/coc-vimlsp/blob/38beb0033c24a50e306343282acb071ffae6eed4/src/index.ts#L47-L82>
" workspace.isNvim: <https://github.com/neoclide/coc.nvim/blob/1c25102840e1d6d36bca9db8114e8a56f480afc4/autoload/coc/util.vim#L539>
let g:coc_user_config['languageserver.vimls'] = {
\ 'filetypes': s:filetypes,
\ 'command': 'vim-language-server',
\ 'args': ['--stdio'],
\ 'initializationOptions': {
\ 'isNeovim': has('nvim'),
\ 'iskeyword': &iskeyword,
\ 'vimruntime': $VIMRUNTIME,
\ 'runtimepath': &runtimepath,
\ 'suggest.fromRuntimepath': v:true,
\ },
\ }
augroup dotfiles-coc-vimls
autocmd!
" NOTE: Apparently delaying runtimepath initialization even until VimEnter
" is not enough, as coc-snippets adds its plugin to rtp during coc
" intialization phase which happens sometime after VimEnter[1]. Although,
" judging by the coc source code, custom language servers are initialized
" just before activation of extensions[2], and coc-snippets adds its plugin
" to rtp in the activation phase[3], so this might be reasonable for us.
" [1]: <https://github.com/neoclide/coc.nvim/blob/1c25102840e1d6d36bca9db8114e8a56f480afc4/src/attach.ts#L111-L115>
" [2]: <https://github.com/neoclide/coc.nvim/blob/1c25102840e1d6d36bca9db8114e8a56f480afc4/src/plugin.ts#L445-L446>
" [3]: <https://github.com/neoclide/coc-snippets/blob/053311a0d9edcc88b9dc0a8e8375dd82b7705f61/src/index.ts#L102>
autocmd VimEnter * let g:coc_user_config['languageserver.vimls.initializationOptions.runtimepath'] = &runtimepath
autocmd User CocNvimInit call CocNotify('vimls', '$/change/iskeyword', &iskeyword)
autocmd OptionSet iskeyword call CocNotify('vimls', '$/change/iskeyword', v:option_new)
augroup END

View file

@ -1 +0,0 @@
let g:coc_filetypes += ['yaml']

View file

@ -1,438 +0,0 @@
" modified version of base16-vim (https://github.com/chriskempson/base16-vim)
" by Chris Kempson (http://chriskempson.com)
" Color definitions {{{
execute 'source' fnameescape(g:dotfiles_dir.'/colorschemes/out/vim.vim')
let s:is_gui_color = !has('win32') && !has('win64') && !has('win32unix') && has('termguicolors') && &termguicolors
if s:is_gui_color && exists('$_COLORSCHEME_TERMINAL')
set notermguicolors
endif
let s:is_kitty = $TERM ==# 'xterm-kitty'
" }}}
" Theme setup {{{
hi clear
syntax reset
let g:colors_name = g:dotfiles_colorscheme_name
" }}}
" The highlighting function {{{
function! s:is_number(value) abort
return type(a:value) == v:t_number
endfunction
let s:colors = g:dotfiles_colorscheme_base16_colors
function! s:hi(group, fg, bg, attr, sp) abort
let fg = {}
let bg = {}
let attr = 'NONE'
let sp = {}
if a:fg isnot ''
let fg = s:is_number(a:fg) ? s:colors[a:fg] : {'gui': a:fg, 'cterm': a:fg}
endif
if a:bg isnot ''
let bg = s:is_number(a:bg) ? s:colors[a:bg] : {'gui': a:bg, 'cterm': a:bg}
endif
if a:attr isnot ''
let attr = a:attr
endif
if a:sp isnot ''
let sp = s:is_number(a:sp) ? s:colors[a:sp] : {'gui': a:sp, 'cterm': a:sp}
endif
exec 'hi' a:group
\ 'guifg='.get(fg, 'gui', 'NONE') 'ctermfg='.get(fg, 'cterm', 'NONE')
\ 'guibg='.get(bg, 'gui', 'NONE') 'ctermbg='.get(bg, 'cterm', 'NONE')
\ 'gui='.(attr) 'cterm='.(attr)
\ 'guisp='.get(sp, 'gui', 'NONE')
endfunction
" }}}
" General syntax highlighting {{{
" TODO: `hi clear` ?
call s:hi('Normal', 0x5, 0x0, '', '')
call s:hi('Italic', 0xE, '', 'italic', '')
call s:hi('Bold', 0xA, '', 'bold', '')
call s:hi('Underlined', 0x8, '', 'underline', '')
call s:hi('Title', 0xD, '', '', '')
hi! link Directory Title
call s:hi('Conceal', 0xC, '', '', '')
call s:hi('IndentLine', 0x2, '', '', '')
call s:hi('NonText', 0x3, '', '', '')
hi! link SpecialKey Special
call s:hi('MatchParen', 'fg', 0x3, '', '')
call s:hi('Keyword', 0xE, '', '', '')
hi! link Statement Keyword
hi! link Repeat Keyword
hi! link StorageClass Keyword
hi! link Exception Keyword
hi! link Structure Keyword
hi! link Conditional Keyword
call s:hi('Constant', 0x9, '', '', '')
hi! link Boolean Constant
hi! link Float Constant
hi! link Number Constant
call s:hi('String', 0xB, '', '', '')
hi! link Character String
hi! link Quote String
hi! link StringDelimiter String
call s:hi('Comment', 0x3, '', '', '')
hi! link SpecialComment Comment
call s:hi('Todo', 'bg', 0xA, 'bold', '')
call s:hi('Function', 0xD, '', '', '')
call s:hi('Identifier', 0x8, '', '', '')
hi! link Variable Identifier
" call s:hi('Include', 0xF, '', '', '')
hi! link Include Keyword
call s:hi('PreProc', 0xA, '', '', '')
call s:hi('Label', 0xA, '', '', '')
hi! link Operator NONE
hi! link Delimiter NONE
call s:hi('Special', 0xC, '', '', '')
call s:hi('Tag', 0xA, '', '', '')
call s:hi('Type', 0xA, '', '', '')
hi! link Typedef Type
" }}}
" User interface {{{
call s:hi('Error', 'bg', 0x8, '', '')
call s:hi('ErrorMsg', 0x8, '', '', '')
call s:hi('WarningMsg', 0x9, '', '', '')
call s:hi('TooLong', 0x8, '', '', '')
call s:hi('Debug', 0x8, '', '', '')
call s:hi('CocErrorSign', 'bg', 0x8, '', '')
call s:hi('CocWarningSign', 'bg', 0xA, '', '')
call s:hi('CocInfoSign', 'bg', 0xD, '', '')
hi! link CocHintSign CocInfoSign
call s:hi('CocSelectedText', 0xE, 0x1, 'bold', '')
call s:hi('CocCodeLens', 0x4, '', '', '')
call s:hi('CocFadeOut', 0x3, '', '', '')
call s:hi('CocStrikeThrough', '', '', 'strikethrough', '')
hi! link CocMarkdownLink Underlined
hi! link CocDiagnosticsFile Directory
hi! link CocOutlineName NONE
hi! link CocExtensionsLoaded NONE
hi! link CocSymbolsName NONE
hi! link CocOutlineIndentLine IndentLine
hi! link CocSymbolsFile Directory
call s:hi('FoldColumn', 0xC, 0x1, '', '')
call s:hi('Folded', 0x3, 0x1, '', '')
call s:hi('IncSearch', 0x1, 0x9, '', '')
call s:hi('Search', 0x1, 0xA, '', '')
hi! link Substitute Search
call s:hi('ModeMsg', 0xB, '', 'bold', '')
call s:hi('Question', 0xB, '', '', '')
hi! link MoreMsg Question
call s:hi('Visual', '', 0x2, '', '')
call s:hi('WildMenu', 0x1, 'fg', '', '')
call s:hi('CursorLine', '', 0x1, '', '')
hi! link CursorColumn CursorLine
call s:hi('ColorColumn', '', 0x1, '', '')
call s:hi('LineNr', 0x3, 0x1, '', '')
call s:hi('CursorLineNr', 0x4, 0x1, '', '')
call s:hi('QuickFixLine', '', 0x2, '', '')
call s:hi('SignColumn', 0x3, 0x1, '', '')
call s:hi('StatusLine', 0x4, 0x1, '', '')
call s:hi('StatusLineNC', 0x3, 0x1, '', '')
call s:hi('VertSplit', 0x2, 0x2, '', '')
call s:hi('TabLine', 0x3, 0x1, '', '')
call s:hi('TabLineFill', 0x3, 0x1, '', '')
call s:hi('TabLineSel', 0xB, 0x1, '', '')
call s:hi('PMenu', 'fg', 0x1, '', '')
call s:hi('PMenuSel', 0x1, 'fg', '', '')
hi! link ctrlsfMatch Search
hi! link ctrlsfLnumMatch ctrlsfMatch
let s:spell_fg = s:is_kitty ? '' : 'bg'
let s:spell_attr = s:is_kitty ? 'undercurl' : ''
call s:hi('SpellBad', s:spell_fg, s:is_kitty ? '' : 0x8, s:spell_attr, 0x8)
call s:hi('SpellLocal', s:spell_fg, s:is_kitty ? '' : 0xC, s:spell_attr, 0xC)
call s:hi('SpellCap', s:spell_fg, s:is_kitty ? '' : 0xD, s:spell_attr, 0xD)
call s:hi('SpellRare', s:spell_fg, s:is_kitty ? '' : 0xE, s:spell_attr, 0xE)
unlet s:spell_fg s:spell_attr
call s:hi('Sneak', 'bg', 0xB, 'bold', '')
hi! link SneakScope Visual
hi! link SneakLabel Sneak
" checkhealth UI
call s:hi('healthSuccess', 'bg', 0xB, 'bold', '')
call s:hi('healthWarning', 'bg', 0xA, 'bold', '')
call s:hi('healthError', 'bg', 0x8, 'bold', '')
" }}}
" AWK {{{
hi! link awkArrayElement Number
hi! link awkBoolLogic Operator
hi! link awkComma Delimiter
hi! link awkExpression Operator
hi! link awkFieldVars awkVariables
hi! link awkOperator Operator
hi! link awkPatterns Label
hi! link awkSemicolon Delimiter
hi! link awkVariables Variable
" }}}
" Diff {{{
" diff mode
call s:hi('DiffAdd', 0xB, 0x1, '', '')
call s:hi('DiffDelete', 0x8, 0x1, '', '')
call s:hi('DiffText', 0xE, 0x1, '', '')
call s:hi('DiffChange', 0x3, 0x1, '', '')
" diff file
call s:hi('diffAdded', 0xB, '', '', '')
call s:hi('diffRemoved', 0x8, '', '', '')
call s:hi('diffChanged', 0xE, '', '', '')
hi! link diffNewFile diffAdded
hi! link diffFile diffRemoved
hi! link diffIndexLine Bold
hi! link diffLine Title
hi! link diffSubname Include
" }}}
" XML {{{
call s:hi('xmlTagName', 0x8, '', '', '')
call s:hi('xmlAttrib', 0x9, '', '', '')
hi! link xmlTag Delimiter
hi! link xmlEndTag Delimiter
hi! link xmlAttribPunct Delimiter
hi! link xmlProcessingDelim Delimiter
" }}}
" Git {{{
hi! link gitCommitOverflow TooLong
hi! link gitCommitSummary String
hi! link gitCommitComment Comment
hi! link gitcommitUntracked Comment
hi! link gitcommitDiscarded Comment
hi! link gitcommitSelected Comment
hi! link gitcommitHeader Keyword
call s:hi('gitcommitSelectedType', 0xD, '', '', '')
call s:hi('gitcommitUnmergedType', 0xD, '', '', '')
call s:hi('gitcommitDiscardedType', 0xD, '', '', '')
hi! link gitcommitBranch Function
call s:hi('gitcommitUntrackedFile', 0xA, '', 'bold', '')
call s:hi('gitcommitUnmergedFile', 0x8, '', 'bold', '')
call s:hi('gitcommitDiscardedFile', 0x8, '', 'bold', '')
call s:hi('gitcommitSelectedFile', 0xB, '', 'bold', '')
hi! link GitGutterAdd DiffAdd
hi! link GitGutterDelete DiffDelete
hi! link GitGutterChange DiffText
hi! link GitGutterChangeDelete GitGutterDelete
hi! link SignifySignAdd DiffAdd
hi! link SignifySignChange DiffText
hi! link SignifySignDelete DiffDelete
" }}}
" Vim scripts {{{
hi! link vimUserFunc vimFuncName
hi! link vimBracket vimMapModKey
hi! link vimFunction vimFuncName
hi! link vimParenSep Delimiter
hi! link vimSep Delimiter
hi! link vimVar Variable
hi! link vimFuncVar Variable
" }}}
" C {{{
hi! link cOperator Special
" }}}
" C# {{{
call s:hi('csClass', 0xA, '', '', '')
call s:hi('csAttribute', 0xA, '', '', '')
call s:hi('csModifier', 0xE, '', '', '')
hi! link csType Type
call s:hi('csUnspecifiedStatement', 0xD, '', '', '')
call s:hi('csContextualStatement', 0xE, '', '', '')
call s:hi('csNewDecleration', 0x8, '', '', '')
" }}}
" Rust {{{
hi! link rustEnumVariant rustType
hi! link rustSelf Variable
hi! link rustSigil rustOperator
hi! link rustMacroVariable Variable
hi! link rustModPath Identifier
" }}}
" HTML {{{
hi! link htmlBold Bold
hi! link htmlItalic Italic
hi! link htmlTag xmlTag
hi! link htmlTagName xmlTagName
hi! link htmlSpecialTagName xmlTagName
hi! link htmlEndTag xmlEndTag
hi! link htmlArg xmlAttrib
" }}}
" CSS {{{
hi! link cssBraces Delimiter
hi! link cssTagName htmlTagName
hi! link cssPseudoClassId Type
hi! link cssPseudoClass cssPseudoClassId
hi! link cssClassName Type
hi! link cssClassNameDot cssClassName
hi! link cssAtRule Keyword
hi! link cssProp Identifier
hi! link cssVendor Special
hi! link cssNoise Delimiter
hi! link cssAttr String
hi! link cssAttrComma Delimiter
hi! link cssAttrRegion cssAttr
" }}}
" SCSS {{{
hi! link scssSelectorName cssClassName
hi! link scssSelectorChar cssClassnameDot
hi! link scssAmpersand cssSelectorOp
hi! link scssProperty cssProp
" }}}
" JavaScript {{{
hi! link javaScriptBraces Delimiter
hi! link jsParens Delimiter
hi! link jsOperator Operator
hi! link jsStorageClass StorageClass
hi! link jsThis Variable
hi! link jsSuper jsThis
hi! link jsClassDefinition Type
hi! link jsFunction Keyword
hi! link jsArrowFunction jsFunction
hi! link jsFuncName jsFuncCall
hi! link jsClassFuncName jsFuncCall
hi! link jsClassMethodType jsFunction
hi! link jsRegexpString Special
hi! link jsGlobalObjects Type
hi! link jsGlobalNodeObjects Type
hi! link jsException Exception
hi! link jsExceptions Type
hi! link jsBuiltins jsFuncName
hi! link jsNull Constant
hi! link jsUndefined Constant
hi! link jsOperatorKeyword Keyword
hi! link jsObjectKey Identifier
hi! link jsEnvComment Special
hi! link jsImport Include
hi! link jsExport Include
hi! link jsTemplateBraces PreProc
" }}}
" JSON {{{
hi! link jsonNull Constant
" }}}
" TypeScript {{{
let g:yats_host_keyword = 0
hi! link typescriptParens jsParens
hi! link typescriptBraces javaScriptBraces
hi! link typescriptOperator jsOperatorKeyword
hi! link typescriptKeywordOp typescriptOperator
hi! link typescriptCastKeyword typescriptOperator
hi! link typescriptMappedIn typescriptOperator
hi! link typescriptBinaryOp jsOperator
hi! link typescriptOptionalMark typescriptBinaryOp
hi! link typescriptIdentifier jsThis
hi! link typescriptArrowFunc jsArrowFunction
hi! link typescriptFuncTypeArrow typescriptArrowFunc
hi! link typescriptCall Variable
hi! link typescriptArrowFuncArg typescriptCall
hi! link typescriptFuncType typescriptCall
hi! link typescriptMessage NONE
hi! link typescriptVariable jsStorageClass
hi! link typescriptAmbientDeclaration typescriptVariable
hi! link typescriptVariableDeclaration Variable
hi! link typescriptDestructureLabel typescriptVariableDeclaration
hi! link typescriptDestructureVariable typescriptVariableDeclaration
hi! link typescriptGlobal typescriptVariableDeclaration
hi! link typescriptTypeReference Type
hi! link typescriptTypeParameter typescriptTypeReference
hi! link typescriptConstructSignature Keyword
hi! link typescriptConstructorType typescriptConstructSignature
hi! link typescriptEndColons Delimiter
hi! link typescriptImport jsImport
hi! link typescriptImportType typescriptImport
hi! link typescriptExport jsExport
hi! link typescriptNull jsNull
hi! link typescriptObjectLabel jsObjectKey
hi! link typescriptMethodAccessor Keyword
hi! link typescriptClassName jsClassDefinition
hi! link typescriptClassHeritage jsClassDefinition
hi! link typescriptExceptions jsException
hi! link typescriptTry typescriptExceptions
hi! link typescriptEnumKeyword typescriptClassKeyword
hi! link typescriptModule jsImport
hi! link typescriptAbstract Keyword
hi! link typescriptTemplateSB PreProc
hi! link typescriptDebugger Keyword
" }}}
" Markdown {{{
hi! link mkdHeading Title
" }}}
" Mail {{{
call s:hi('mailQuoted1', 0x8, '', '', '')
call s:hi('mailQuoted2', 0x9, '', '', '')
call s:hi('mailQuoted3', 0xA, '', '', '')
call s:hi('mailQuoted4', 0xB, '', '', '')
call s:hi('mailQuoted5', 0xD, '', '', '')
call s:hi('mailQuoted6', 0xE, '', '', '')
hi! link mailURL Underlined
hi! link mailEmail Underlined
" }}}
" Python {{{
hi! link pythonClass Type
hi! link pythonBuiltinType pythonClass
hi! link pythonExClass pythonClass
hi! link pythonBuiltinObj pythonFunction
hi! link pythonClassVar Variable
" }}}
" Ruby {{{
hi! link rubyPseudoVariable Variable
hi! link rubyClassName Type
hi! link rubyAttribute rubyFunction
hi! link rubyConstant Constant
hi! link rubyInterpolationDelimiter PreProc
hi! link rubySymbol String
hi! link rubyStringDelimiter StringDelimiter
hi! link rubyRegexp Special
hi! link rubyRegexpDelimiter rubyRegexp
" }}}
" Lua {{{
hi! link luaFuncCall Function
hi! link luaBraces Delimiter
" }}}
" Shell {{{
hi! link shQuote String
hi! link zshFunction Function
hi! link zshVariable Variable
" }}}
" Assembly {{{
hi! def link riscvRegister Variable
hi! def link riscvCSRegister Special
hi! def link riscvLabel Function
" }}}

View file

@ -1,76 +1,13 @@
" Files {{{
Plug 'tpope/vim-eunuch'
if g:vim_ide
Plug 'francoiscabrol/ranger.vim'
Plug 'rbgrouleff/bclose.vim'
endif
Plug 'weirongxu/coc-explorer'
" }}}
" Editing {{{
if g:vim_ide
" Plug 'easymotion/vim-easymotion'
Plug 'junegunn/vim-easy-align'
endif
Plug 'Raimondi/delimitMate'
Plug 'tpope/vim-repeat'
Plug 'tomtom/tcomment_vim'
Plug 'tpope/vim-surround'
Plug 'Yggdroot/indentLine'
Plug 'henrik/vim-indexed-search'
Plug 'andymass/vim-matchup'
Plug 'inkarkat/vim-ingo-library' " required by LineJuggler
Plug 'inkarkat/vim-LineJuggler', { 'branch': 'stable' }
Plug 'reedes/vim-pencil'
Plug 'tommcdo/vim-exchange'
Plug 'justinmk/vim-sneak'
" }}}
" Text objects {{{
Plug 'kana/vim-textobj-user'
Plug 'kana/vim-textobj-entire'
Plug 'kana/vim-textobj-line'
Plug 'kana/vim-textobj-indent'
Plug 'glts/vim-textobj-comment'
" }}}
" UI {{{
Plug 'moll/vim-bbye'
Plug 'gerw/vim-HiLinkTrace'
Plug 'vim-airline/vim-airline'
Plug 'tpope/vim-obsession'
Plug 'romainl/vim-qf'
" }}}
" Git {{{
if g:vim_ide
Plug 'tpope/vim-fugitive'
Plug 'tpope/vim-rhubarb'
Plug 'airblade/vim-gitgutter'
endif
" }}}
" FZF {{{
Plug 'junegunn/fzf', { 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
" }}}
" Programming {{{
let g:polyglot_disabled = ['sensible']
Plug 'sheerun/vim-polyglot'
Plug 'chikamichi/mediawiki.vim'
Plug 'ron-rs/ron.vim'
Plug 'kylelaker/riscv.vim'
if g:vim_ide
Plug 'neoclide/coc.nvim', { 'branch': 'release' }
Plug 'dag/vim2hs'
Plug 'norcalli/nvim-colorizer.lua'
if g:vim_ide_treesitter
Plug 'nvim-treesitter/nvim-treesitter', { 'do': ':TSUpdate' }
endif
endif
" Language specific {{{
Plug 'alaviss/nim.nvim'
" }}}
" Misc {{{
Plug 'wakatime/vim-wakatime'
if has('nvim-0.5.0')
Plug 'andweeb/presence.nvim'
endif
" }}}

View file

@ -1,11 +0,0 @@
lua <<EOF
require'nvim-treesitter.configs'.setup {
ensure_installed = "maintained",
highlight = {
enable = true,
},
indent = {
enable = true,
},
}
EOF

View file

@ -1 +0,0 @@
au BufNewFile,BufRead *.json.patch setf json

View file

@ -1,8 +0,0 @@
" nvim-qt settings {{{
if exists('g:GuiLoaded')
GuiFont Ubuntu Mono:h14
GuiTabline 0
endif
" }}}

View file

@ -1,86 +1,22 @@
let g:nvim_dotfiles_dir = expand('<sfile>:p:h')
let g:dotfiles_dir = expand('<sfile>:p:h:h')
let g:k_nvim_dotfiles_dir = expand('<sfile>:p:h')
let g:k_dotfiles_dir = expand('<sfile>:p:h:h')
let g:vim_ide = get(g:, 'vim_ide', 0)
let g:vim_ide_treesitter = get(g:, 'vim_ide_treesitter', 0)
let &runtimepath = g:k_nvim_dotfiles_dir.','.&runtimepath.','.g:k_nvim_dotfiles_dir.'/after'
let &runtimepath = g:nvim_dotfiles_dir.','.&runtimepath.','.g:nvim_dotfiles_dir.'/after'
" Enable the clearly superior mode.
let g:vim_ide = 1
" Source Dima's config
source <sfile>:p:h/../dmitmel-dotfiles/nvim/init.vim
let s:vim_config_dir = stdpath("config")
let s:vim_plug_script = s:vim_config_dir . '/autoload/plug.vim'
let s:vim_plug_home = s:vim_config_dir . '/plugged'
" Give me that beautiful colorscheme
set termguicolors
let airline_powerline_fonts = 1
let s:just_installed_vim_plug = 0
if !filereadable(s:vim_plug_script)
execute '!curl -fL https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim --create-dirs -o' shellescape(s:vim_plug_script, 1)
autocmd VimEnter * PlugInstall --sync
endif
" HACK: Set `shiftwidth` to something unreasonable to make Polyglot's built-in
" indentation detector believe that it's the "default" value. The problem
" comes from the fact that Polyglot bundles vim-sleuth, but executes it in an
" autoload script, which is loaded by an ftdetect script, which is... loaded
" when vim-plug invokes `filetype on`. Thus vim-sleuth is loaded way before
" the primary chunk of my configuration is loaded, so it won't see my
" preferred indentation value, save 8 (Vim's default) to a local variable
" `s:default_shiftwidth` and always assume that some ftplugin explicitly
" modified the shiftwidth to 2 (my real default value) for that particular
" filetype. So instead I use a classic approach to rectify the problem:
" ridiculously hacky workarounds. In any case, blame this commit:
" <https://github.com/sheerun/vim-polyglot/commit/113f9b8949643f7e02c29051ad2148c3265b8131>.
let s:fake_default_shiftwidth = 0
let &shiftwidth = s:fake_default_shiftwidth
call plug#begin(s:vim_plug_home)
Plug 'junegunn/vim-plug'
runtime! dotfiles/plugins-list.vim
call plug#end()
if g:vim_ide_treesitter
runtime! dotfiles/treesitter.vim
endif
" Automatically install/clean plugins (because I'm a programmer) {{{
augroup vimrc-plugins
autocmd!
autocmd VimEnter *
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | q
\| endif
augroup END
" Copy to clipboard register and paste from clipboard register {{{
" Taken from https://unix.stackexchange.com/a/23437
nnoremap <C-y> "+y
vnoremap <C-y> "+y
nnoremap <C-p> "+gP
vnoremap <C-p> "+gP
" }}}
colorscheme dotfiles
if exists(':Sleuth')
" HACK: Continuation of the indentation detection hack. Here I first destroy
" Polyglot's vim-sleuth's autocommands, fortunately there is just one, which
" calls `s:detect_indent()` on `BufEnter`. And also registration into tpope's
" statusline plugin, which I don't use, therefore I don't care.
augroup polyglot-sleuth
autocmd!
" HACK: Now I install my own autocommand, which first resets the local
" shiftwidth to the unreasonable value picked above, which vim-sleuth
" internally compares with its local `s:default_shiftwidth`, sees that both
" are the same, and proceeds to execute the indent detection algorithm.
" ALSO Note how I'm not using `BufEnter` as vim-sleuth does because
" apparently `BufWinEnter` leads to better compatibility with the
" indentLine plugin and potentially less useless invocations (see the note
" about window splits in the docs for this event). Oh, one last thing:
" vim-sleuth forgets to assign the tabstop options, which I have to do as
" well. But anyway, boom, my work here is done.
autocmd BufWinEnter *
\ let &l:shiftwidth = s:fake_default_shiftwidth
\| Sleuth
\| let &l:tabstop = &l:shiftwidth
\| let &l:softtabstop = &l:shiftwidth
augroup END
" HACK: In case you are wondering why I'm using Polyglot's bundled vim-sleuth
" given that it requires those terrible hacks to function normally and respect
" my configs, and not something like <https://github.com/idbrii/detectindent>
" (this is a fork I used to use and which checks syntax groups to improve
" detection quality). ...Well, frankly, even though vim-sleuth's detector uses
" unreliable (at first glance) regex heuristics, in practice it still works
" better than detectindent's syntax group querying.
endif

Some files were not shown because too many files have changed in this diff Show more