commit 3b9306e1cc8ed9ad7dbdeb023cbdd1c25c8230d5
parent 5077c0b89c7cffa8b1971fb4672236994dbf70d9
Author: Alex Balgavy <a.balgavy@gmail.com>
Date: Tue, 3 Nov 2020 15:19:51 +0100
Some fixes regarding bat
Former-commit-id: 215008cdc2637a2fc961af6c43566212ceff7e15
Diffstat:
5 files changed, 2 insertions(+), 122 deletions(-)
diff --git a/bat/config b/bat/config
@@ -1,5 +0,0 @@
---italic-text=always
---paging=auto
---pager="less -Ri"
---color=always
-# --theme set dynamically from ~/.dotfiles/shell/aliases
diff --git a/bat/syntaxes/lean.sublime-syntax b/bat/syntaxes/lean.sublime-syntax
@@ -1,114 +0,0 @@
-%YAML 1.2
----
-# http://www.sublimetext.com/docs/3/syntax.html
-name: Lean
-file_extensions:
- - lean
-scope: source.lean
-contexts:
- main:
- - include: comments
- - match: '\b(?<!\.)(inductive|coinductive|structure|theorem|axiom|axioms|abbreviation|lemma|definition|def|instance|class|constant)\b\s+(\{[^}]*\})?'
- captures:
- 1: keyword.other.definitioncommand.lean
- push:
- - meta_scope: meta.definitioncommand.lean
- - match: '(?=\bwith\b|\bextends\b|[:\|\(\[\{⦃<>])'
- pop: true
- - include: comments
- - include: definitionName
- - match: ","
- - match: \b(Prop|Type|Sort)\b
- scope: storage.type.lean
- - match: '\battribute\b\s*\[[^\]]*\]'
- scope: storage.modifier.lean
- - match: '@\[[^\]]*\]'
- scope: storage.modifier.lean
- - match: \b(?<!\.)(private|meta|mutual|protected|noncomputable)\b
- scope: keyword.control.definition.modifier.lean
- - match: \b(sorry)\b
- scope: invalid.illegal.lean
- - match: '#print\s+(def|definition|inductive|instance|structure|axiom|axioms|class)\b'
- scope: keyword.other.command.lean
- - match: '#(print|eval|reduce|check|help|exit|find|where)\b'
- scope: keyword.other.command.lean
- - match: \b(?<!\.)(import|export|prelude|theory|definition|def|abbreviation|instance|renaming|hiding|exposing|parameter|parameters|begin|constant|constants|lemma|variable|variables|theorem|example|open|axiom|inductive|coinductive|with|structure|universe|universes|alias|precedence|reserve|postfix|prefix|infix|infixl|infixr|notation|end|using|namespace|section|local|set_option|extends|include|omit|class|classes|instances|raw|run_cmd|restate_axiom)(?!\.)\b
- scope: keyword.other.lean
- - match: \b(?<!\.)(calc|have|this|match|do|suffices|show|by|in|at|let|forall|fun|exists|assume|from|λ)(?!\.)\b
- scope: keyword.other.lean
- - match: «
- push:
- - meta_content_scope: entity.name.lean
- - match: »
- pop: true
- - match: \b(?<!\.)(if|then|else)\b
- scope: keyword.control.lean
- - match: '"'
- captures:
- 0: punctuation.definition.string.begin.lean
- push:
- - meta_scope: string.quoted.double.lean
- - match: '"'
- captures:
- 0: punctuation.definition.string.end.lean
- pop: true
- - match: '\\[\\"nt'']'
- scope: constant.character.escape.lean
- - match: '\\x[0-9A-Fa-f][0-9A-Fa-f]'
- scope: constant.character.escape.lean
- - match: '\\u[0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f][0-9A-Fa-f]'
- scope: constant.character.escape.lean
- - match: '''[^\\'']'''
- scope: string.quoted.single.lean
- - match: '''(\\(x..|u....|.))'''
- scope: string.quoted.single.lean
- captures:
- 1: constant.character.escape.lean
- - match: '`+[^\[(]\S+'
- scope: entity.name.lean
- - match: '\b([0-9]+|0([xX][0-9a-fA-F]+))\b'
- scope: constant.numeric.lean
- blockComment:
- - match: /-
- push:
- - meta_scope: comment.block.lean
- - match: "-/"
- pop: true
- - include: blockComment
- comments:
- - include: dashComment
- - include: docComment
- - include: modDocComment
- - include: blockComment
- dashComment:
- - match: (--)
- captures:
- 0: punctuation.definition.comment.lean
- push:
- - meta_scope: comment.line.double-dash.lean
- - match: $
- pop: true
- definitionName:
- - match: '\b[^:«»\(\)\{\}[:space:]=→λ∀?][^:«»\(\)\{\}[:space:]]*'
- scope: entity.name.function.lean
- - match: «
- push:
- - meta_content_scope: entity.name.function.lean
- - match: »
- pop: true
- docComment:
- - match: /--
- push:
- - meta_scope: comment.block.documentation.lean
- - match: "-/"
- pop: true
- - include: scope:source.lean.markdown
- - include: blockComment
- modDocComment:
- - match: /-!
- push:
- - meta_scope: comment.block.documentation.lean
- - match: "-/"
- pop: true
- - include: scope:source.lean.markdown
- - include: blockComment
diff --git a/dot.map b/dot.map
@@ -43,7 +43,6 @@ mutt: ~/.config/mutt
mbsync: ~/.config/mbsync
urlview/urlview: ~/.urlview
gnupg: ~/.config/gnupg
-bat: ~/.config/bat
# Config: X server (Linux)
xinitrc: ~/.xinitrc
diff --git a/shell/aliases b/shell/aliases
@@ -28,4 +28,4 @@ alias scim="sc-im"
alias mbsync='mbsync -c $HOME/.config/mbsync/mbsyncrc'
alias mutt='BW_SESSION="$(bw unlock --raw)" neomutt'
[ -n "$VIM_TERMINAL" ] && alias vim=vimsend
-{ [ -f ~/.config/dark-theme ] && alias bat="bat --theme=1337"; } || alias bat="bat --theme=GitHub"
+{ [ -f ~/.config/dark-theme ] && alias bat="bat --theme=1337 --color=always"; } || alias bat="bat --theme=GitHub --color=always"
diff --git a/shell/env b/shell/env
@@ -4,7 +4,7 @@ export DOTFILES="$HOME/.dotfiles"
EDITOR="$(command -v vim)"; export EDITOR
export MUSIC_DIR="/Volumes/HDD/Music/iTunes/iTunes Media/Music"
-if command -v bat 1>/dev/null 2>&1; then export PAGER="bat"
+if command -v bat 1>/dev/null 2>&1 && [ -z "$VIMRUNTIME" ]; then export PAGER="bat"
else export PAGER="less -Ri"; fi
export LANG="en_US.UTF-8"