1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2026-01-10 02:49:45 +01:00

Compare commits

...

5 Commits

5 changed files with 32 additions and 11 deletions

View File

@@ -19,7 +19,7 @@
<string>Joy Pixels</string>
</edit>
<edit mode="append" name="family">
<string>Font Awesome 6 Free</string>
<string>Symbola</string>
</edit>
</match>
<!-- Default sans-serif fonts -->
@@ -34,7 +34,7 @@
<string>Joy Pixels</string>
</edit>
<edit mode="append" name="family">
<string>Font Awesome 6 Free</string>
<string>Symbola</string>
</edit>
</match>
<!-- Default mono fonts -->
@@ -49,7 +49,7 @@
<string>Joy Pixels</string>
</edit>
<edit mode="append" name="family">
<string>Font Awesome 6 Free</string>
<string>Symbola</string>
</edit>
</match>
<!-- Japanese -->

View File

@@ -70,6 +70,7 @@ wk.add({
-- hrsh7th/nvim-cmp
{mode = "n", "gd", function() vim.lsp.buf.definition() end, desc = "LSP: goto definition", noremap = true},
{mode = "n", "gD", function() vim.lsp.buf.declaration() end, desc = "LSP: goto declaration", noremap = true},
{mode = "n", "gT", function() vim.lsp.buf.type_definition() end, desc = "LSP: goto type definition", noremap = true},
{mode = "n", "gi", function() vim.lsp.buf.implementation() end, desc = "LSP: list implementation", noremap = true},
{mode = "n", "gr", function() vim.lsp.buf.references() end, desc = "LSP: list references", noremap = true},
{mode = "n", "K", vim.lsp.buf.hover(), desc = "LSP: show documentation", noremap = true},

View File

@@ -15,7 +15,7 @@ return {
textopdfforwardjump = "zathura --synctex-forward=%line%:%column%:%srcfile% %outputfile%",
-- markdown
mdoutputext = "pdf",
mdtopdf = "pandoc %docroot% --toc --toc-depth=5 -V colorlinks=true -V linkcolor=blue -V urlcolor=red -V toccolor=gray -o %outputfile%",
mdtopdf = "pandoc %docroot% --pdf-engine=xelatex -H ~/.config/nvim/lua/resources/header.tex --toc --toc-depth=5 -V colorlinks=true -V linkcolor=blue -V urlcolor=red -V toccolor=gray -o %outputfile%",
mdtopdfviewerlaunch = "zathura ./%outputfile%",
mdtohtml = "pandoc --standalone %docroot% -o %outputfile%",
mdtohtmlviewerlaunch = "firefox --kiosk --new-window %outputfile%",

View File

@@ -0,0 +1,13 @@
% \usepackage[utf8]{inputenc}
% \DeclareUnicodeCharacter{2605}{\ensuremath{\star}}
%
\usepackage{fontspec}
\usepackage{newunicodechar}
\newfontfamily\symbolafont{Symbola}
% U+2605 BLACK STAR
\newunicodechar{}{{\symbolafont}}
% U+2606 WHITE STAR
\newunicodechar{}{{\symbolafont}}

View File

@@ -85,21 +85,28 @@ function +vi-git-stash() {
# CUSTOM WIDGETS #
##################
_git_fix_master_main() {
_git_fix_main_master() {
if [[ $BUFFER == git\ * ]]; then
if [[ $BUFFER == *" master"* ]]; then
if git rev-parse --verify main >/dev/null 2>&1 \
&& ! git rev-parse --verify master >/dev/null 2>&1; then
local has_main=0
local has_master=0
git rev-parse --verify main >/dev/null 2>&1 && has_main=1
git rev-parse --verify master >/dev/null 2>&1 && has_master=1
if [[ $has_main -eq 1 && $has_master -eq 0 ]]; then
if [[ $BUFFER == *" master"* ]]; then
BUFFER=${BUFFER//" master"/" main"}
fi
fi
if [[ $has_master -eq 1 && $has_main -eq 0 ]]; then
if [[ $BUFFER == *" main"* ]]; then
BUFFER=${BUFFER//" main"/" master"}
fi
fi
fi
zle accept-line
}
zle -N _git_fix_master_main
bindkey "^M" _git_fix_master_main
zle -N _git_fix_main_master
bindkey "^M" _git_fix_main_master
#########
# STYLE #