feat: add home configuration
This commit is contained in:
parent
fbaefef463
commit
edffe6f416
58 changed files with 3064 additions and 1 deletions
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
config/git/config/*
|
||||
!config/git/config/.gitkeep
|
||||
!config/git/config/README.md
|
21
LICENSE
Normal file
21
LICENSE
Normal file
|
@ -0,0 +1,21 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2022 Dan Anglin
|
||||
|
||||
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.
|
34
Makefile
Normal file
34
Makefile
Normal file
|
@ -0,0 +1,34 @@
|
|||
check_xdg_settings:
|
||||
@./helpers/xdg/check-xdg-settings
|
||||
|
||||
.PHONY: ansible_configs
|
||||
ansible_configs: check_xdg_settings
|
||||
@./helpers/ansible/generate-ansible-config
|
||||
|
||||
.PHONY: bash_configs
|
||||
bash_configs:
|
||||
@./helpers/bash/generate-bash-config
|
||||
|
||||
.PHONY: git_configs
|
||||
git_configs: check_xdg_settings
|
||||
@./helpers/git/generate-git-config
|
||||
|
||||
.PHONY: tmux_configs
|
||||
tmux_configs: check_xdg_settings
|
||||
@./helpers/tmux/generate-tmux-config
|
||||
|
||||
.PHONY: xdg_configs
|
||||
xdg_configs: check_xdg_settings
|
||||
@./helpers/xdg/generate-user-dirs-config
|
||||
|
||||
.PHONY: x11_configs
|
||||
x11_configs: check_xdg_settings
|
||||
@./helpers/X11/generate-x11-config
|
||||
|
||||
.PHONY: lf_configs
|
||||
lf_configs: check_xdg_settings
|
||||
@./helpers/lf/generate-lf-config
|
||||
|
||||
.PHONY: amfora_configs
|
||||
amfora_configs: check_xdg_settings
|
||||
@./helpers/amfora/generate-amfora-config
|
2
config/X11/xinitrc
Normal file
2
config/X11/xinitrc
Normal file
|
@ -0,0 +1,2 @@
|
|||
nitrogen --restore &
|
||||
exec dwm
|
328
config/amfora/config.toml
Normal file
328
config/amfora/config.toml
Normal file
|
@ -0,0 +1,328 @@
|
|||
[a-general]
|
||||
# Press Ctrl-Space to access it
|
||||
home = "gemini://gemini.circumlunar.space"
|
||||
|
||||
# Follow up to 5 Gemini redirects without prompting.
|
||||
# A prompt is always shown after the 5th redirect and for redirects to protocols other than Gemini.
|
||||
# If set to false, a prompt will be shown before following redirects.
|
||||
auto_redirect = true
|
||||
|
||||
# What command to run to open a HTTP(S) URL.
|
||||
# Set to "default" to try to guess the browser, or set to "off" to not open HTTP(S) URLs.
|
||||
# If a command is set, than the URL will be added (in quotes) to the end of the command.
|
||||
# A space will be prepended to the URL.
|
||||
#
|
||||
# The best to define a command is using a string array.
|
||||
# Examples:
|
||||
# http = ['firefox']
|
||||
# http = ['custom-browser', '--flag', '--option=2']
|
||||
# http = ['/path/with spaces/in it/firefox']
|
||||
#
|
||||
# Note the use of single quotes, so that backslashes will not be escaped.
|
||||
# Using just a string will also work, but it is deprecated, and will degrade if
|
||||
# you use paths with spaces.
|
||||
http = ['firefox']
|
||||
|
||||
# Any URL that will accept a query string can be put here
|
||||
search = "gemini://geminispace.info/search"
|
||||
|
||||
# Whether colors will be used in the terminal
|
||||
color = true
|
||||
|
||||
# Whether ANSI color codes from the page content should be rendered
|
||||
ansi = true
|
||||
|
||||
# Whether to replace list asterisks with unicode bullets
|
||||
bullets = true
|
||||
|
||||
# Whether to show link after link text
|
||||
show_link = false
|
||||
|
||||
# A number from 0 to 1, indicating what percentage of the terminal width the left margin should take up.
|
||||
left_margin = 0.10
|
||||
|
||||
# The max number of columns to wrap a page's text to. Preformatted blocks are not wrapped.
|
||||
max_width = 140
|
||||
|
||||
# 'downloads' is the path to a downloads folder.
|
||||
# An empty value means the code will find the default downloads folder for your system.
|
||||
# If the path does not exist it will be created.
|
||||
# Note the use of single quotes, so that backslashes will not be escaped.
|
||||
downloads = ''
|
||||
|
||||
# Max size for displayable content in bytes - after that size a download window pops up
|
||||
page_max_size = 2097152 # 2 MiB
|
||||
|
||||
# Max time it takes to load a page in seconds - after that a download window pops up
|
||||
page_max_time = 10
|
||||
|
||||
# Whether to replace tab numbers with emoji favicons, which are cached.
|
||||
emoji_favicons = true
|
||||
|
||||
# When a scrollbar appears. "never", "auto", and "always" are the only valid values.
|
||||
# "auto" means the scrollbar only appears when the page is longer than the window.
|
||||
scrollbar = "never"
|
||||
|
||||
|
||||
[auth]
|
||||
# Authentication settings
|
||||
# Note the use of single quotes for values, so that backslashes will not be escaped.
|
||||
|
||||
[auth.certs]
|
||||
# Client certificates
|
||||
# Set domain name equal to path to client cert
|
||||
# "example.com" = 'mycert.crt'
|
||||
|
||||
[auth.keys]
|
||||
# Client certificate keys
|
||||
# Set domain name equal to path to key for the client cert above
|
||||
# "example.com" = 'mycert.key'
|
||||
|
||||
[keybindings]
|
||||
# If you have a non-US keyboard, use bind_tab1 through bind_tab0 to
|
||||
# setup the shift-number bindings: Eg, for US keyboards (the default):
|
||||
bind_tab1 = '!'
|
||||
bind_tab2 = '"'
|
||||
bind_tab3 = '£'
|
||||
bind_tab4 = '$'
|
||||
bind_tab5 = '%'
|
||||
bind_tab6 = '^'
|
||||
bind_tab7 = '&'
|
||||
bind_tab8 = '*'
|
||||
bind_tab9 = '('
|
||||
bind_tab0 = ')'
|
||||
|
||||
# The bind_link[1-90] options are for the commands to go to the first 10 links on a page,
|
||||
# typically these are bound to the number keys:
|
||||
bind_link1 = "1"
|
||||
bind_link2 = "2"
|
||||
bind_link3 = "3"
|
||||
bind_link4 = "4"
|
||||
bind_link5 = "5"
|
||||
bind_link6 = "6"
|
||||
bind_link7 = "7"
|
||||
bind_link8 = "8"
|
||||
bind_link9 = "9"
|
||||
bind_link0 = "0"
|
||||
|
||||
bind_bottom = ":"
|
||||
bind_quit = "Ctrl-Q"
|
||||
bind_home = "Ctrl-Space"
|
||||
bind_reload = "Ctrl-R"
|
||||
bind_back = "H"
|
||||
bind_forward = "L"
|
||||
bind_new_tab = "Ctrl-T"
|
||||
bind_close_tab = "Ctrl-C"
|
||||
bind_next_tab = "J"
|
||||
bind_prev_tab = "K"
|
||||
bind_edit = "e"
|
||||
bind_bookmarks = "b"
|
||||
bind_add_bookmark = "B"
|
||||
bind_save = "Ctrl-S"
|
||||
bind_help = "F1"
|
||||
bind_pgup = "PgUp"
|
||||
bind_pgdn = "PgDn"
|
||||
# bind_sub: for viewing the subscriptions page
|
||||
# bind_add_sub
|
||||
|
||||
[url-handlers]
|
||||
# Allows setting the commands to run for various URL schemes.
|
||||
# E.g. to open FTP URLs with FileZilla set the following key:
|
||||
# ftp = 'filezilla'
|
||||
# You can set any scheme to "off" or "" to disable handling it, or
|
||||
# just leave the key unset.
|
||||
#
|
||||
# DO NOT use this for setting the HTTP command.
|
||||
# Use the http setting in the "a-general" section above.
|
||||
#
|
||||
# NOTE: These settings are overrided by the ones in the proxies section.
|
||||
# Note the use of single quotes, so that backslashes will not be escaped.
|
||||
|
||||
# This is a special key that defines the handler for all URL schemes for which
|
||||
# no handler is defined.
|
||||
other = 'off'
|
||||
|
||||
# [[mediatype-handlers]] section
|
||||
# ---------------------------------
|
||||
#
|
||||
# Specify what applications will open certain media types.
|
||||
# By default your default application will be used to open the file when you select "Open".
|
||||
# You only need to configure this section if you want to override your default application,
|
||||
# or do special things like streaming.
|
||||
#
|
||||
# Note the use of single quotes for commands, so that backslashes will not be escaped.
|
||||
#
|
||||
#
|
||||
# To open jpeg files with the feh command:
|
||||
#
|
||||
# [[mediatype-handlers]]
|
||||
# cmd = ['feh']
|
||||
# types = ["image/jpeg"]
|
||||
#
|
||||
# Each command that you specify must come under its own [[mediatype-handlers]]. You may
|
||||
# specify as many [[mediatype-handlers]] as you want to setup multiple commands.
|
||||
#
|
||||
# If the subtype is omitted then the specified command will be used for the
|
||||
# entire type:
|
||||
#
|
||||
# [[mediatype-handlers]]
|
||||
# command = ['vlc', '--flag']
|
||||
# types = ["audio", "video"]
|
||||
#
|
||||
# A catch-all handler can by specified with "*".
|
||||
# Note that there are already catch-all handlers in place for all OSes,
|
||||
# that open the file using your default application. This is only if you
|
||||
# want to override that.
|
||||
#
|
||||
# [[mediatype-handlers]]
|
||||
# cmd = ['some-command']
|
||||
# types = [
|
||||
# "application/pdf",
|
||||
# "*",
|
||||
# ]
|
||||
#
|
||||
# You can also choose to stream the data instead of downloading it all before
|
||||
# opening it. This is especially useful for large video or audio files, as
|
||||
# well as radio streams, which will never complete. You can do this like so:
|
||||
#
|
||||
# [[mediatype-handlers]]
|
||||
# cmd = ['vlc', '-']
|
||||
# types = ["audio", "video"]
|
||||
# stream = true
|
||||
#
|
||||
# This uses vlc to stream all video and audio content.
|
||||
# By default stream is set to off for all handlers
|
||||
#
|
||||
#
|
||||
# If you want to always open a type in its viewer without the download or open
|
||||
# prompt appearing, you can add no_prompt = true
|
||||
#
|
||||
# [[mediatype-handlers]]
|
||||
# cmd = ['feh']
|
||||
# types = ["image"]
|
||||
# no_prompt = true
|
||||
#
|
||||
# Note: Multiple handlers cannot be defined for the same full media type, but
|
||||
# still there needs to be an order for which handlers are used. The following
|
||||
# order applies regardless of the order written in the config:
|
||||
#
|
||||
# 1. Full media type: "image/jpeg"
|
||||
# 2. Just type: "image"
|
||||
# 3. Catch-all: "*"
|
||||
[[mediatype-handlers]]
|
||||
cmd = ['st', '-e', 'mpv', '--no-video']
|
||||
types = ["audio"]
|
||||
|
||||
[[mediatype-handlers]]
|
||||
cmd = ['mpv']
|
||||
types = ["video"]
|
||||
|
||||
[[mediatype-handlers]]
|
||||
cmd = ['feh']
|
||||
types = ["image"]
|
||||
no_prompt = true
|
||||
|
||||
[cache]
|
||||
# Options for page cache - which is only for text pages
|
||||
# Increase the cache size to speed up browsing at the expense of memory
|
||||
# Zero values mean there is no limit
|
||||
|
||||
max_size = 0 # Size in bytes
|
||||
max_pages = 30 # The maximum number of pages the cache will store
|
||||
|
||||
# How long a page will stay in cache, in seconds.
|
||||
timeout = 1800 # 30 mins
|
||||
|
||||
[proxies]
|
||||
# Allows setting a Gemini proxy for different schemes.
|
||||
# The settings are similar to the url-handlers section above.
|
||||
# E.g. to open a gopher page by connecting to a Gemini proxy server:
|
||||
# gopher = "example.com:123"
|
||||
#
|
||||
# Port 1965 is assumed if no port is specified.
|
||||
#
|
||||
# NOTE: These settings override any external handlers specified in
|
||||
# the url-handlers section.
|
||||
#
|
||||
# Note that HTTP and HTTPS are treated as separate protocols here.
|
||||
|
||||
[subscriptions]
|
||||
# For tracking feeds and pages
|
||||
|
||||
# Whether a pop-up appears when viewing a potential feed
|
||||
popup = true
|
||||
|
||||
# How often to check for updates to subscriptions in the background, in seconds.
|
||||
# Set it to 0 to disable this feature. You can still update individual feeds
|
||||
# manually, or restart the browser.
|
||||
#
|
||||
# Note Amfora will check for updates on browser start no matter what this setting is.
|
||||
update_interval = 1800 # 30 mins
|
||||
|
||||
# How many subscriptions can be checked at the same time when updating.
|
||||
# If you have many subscriptions you may want to increase this for faster
|
||||
# update times. Any value below 1 will be corrected to 1.
|
||||
workers = 3
|
||||
|
||||
# The number of subscription updates displayed per page.
|
||||
entries_per_page = 20
|
||||
|
||||
[theme]
|
||||
|
||||
# Atom One Dark theme ported to Amfora
|
||||
# by Serge Tymoshenko <serge@tymo.name>
|
||||
# Link: https://github.com/makeworld-the-better-one/amfora/blob/master/contrib/themes/one_dark.toml
|
||||
|
||||
bg = "#282c34"
|
||||
fg = "#abb2bf"
|
||||
tab_num = "#abb2bf"
|
||||
tab_divider = "#abb2bf"
|
||||
bottombar_bg = "#abb2bf"
|
||||
bottombar_text = "#282c34"
|
||||
bottombar_label = "#282c34"
|
||||
|
||||
hdg_1 = "#e06c75"
|
||||
hdg_2 = "#c678dd"
|
||||
hdg_3 = "#c678dd"
|
||||
amfora_link = "#61afef"
|
||||
foreign_link = "#56b6c2"
|
||||
link_number = "#abb2bf"
|
||||
regular_text = "#abb2bf"
|
||||
quote_text = "#98c379"
|
||||
preformatted_text = "#e5c07b"
|
||||
list_text = "#abb2bf"
|
||||
|
||||
btn_bg = "#282c34"
|
||||
btn_text = "#abb2bf"
|
||||
|
||||
dl_choice_modal_bg = "#98c379"
|
||||
dl_choice_modal_text = "#282c34"
|
||||
|
||||
dl_modal_bg = "#98c379"
|
||||
dl_modal_text = "#282c34"
|
||||
|
||||
info_modal_bg = "#98c379"
|
||||
info_modal_text = "#282c34"
|
||||
|
||||
error_modal_bg = "#e06c75"
|
||||
error_modal_text = "#282c34"
|
||||
|
||||
yesno_modal_bg = "#e5c07b"
|
||||
yesno_modal_text = "#282c34"
|
||||
|
||||
tofu_modal_bg = "#e5c07b"
|
||||
tofu_modal_text = "#282c34"
|
||||
|
||||
input_modal_bg = "#98c379"
|
||||
input_modal_text = "#282c34"
|
||||
input_modal_field_bg = "#282c34"
|
||||
input_modal_field_text = "#abb2bf"
|
||||
|
||||
bkmk_modal_bg = "#98c379"
|
||||
bkmk_modal_text = "#282c34"
|
||||
bkmk_modal_label = "#282c34"
|
||||
bkmk_modal_field_bg = "#282c34"
|
||||
bkmk_modal_field_text = "#abb2bf"
|
||||
|
||||
subscription_modal_bg = "#c678dd"
|
||||
subscription_modal_text = "#282c34"
|
10
config/ansible/ansible.cfg
Normal file
10
config/ansible/ansible.cfg
Normal file
|
@ -0,0 +1,10 @@
|
|||
[defaults]
|
||||
|
||||
nocows = 1
|
||||
cow_selection = default
|
||||
interpreter_python = /usr/bin/python3
|
||||
|
||||
[persistent_connection]
|
||||
|
||||
connect_timeout = 30
|
||||
command_timeout = 60
|
5
config/ansible/hosts.yml
Normal file
5
config/ansible/hosts.yml
Normal file
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
all:
|
||||
hosts:
|
||||
localhost:
|
||||
ansible_connection: local
|
5
config/bash/bash_profile
Normal file
5
config/bash/bash_profile
Normal file
|
@ -0,0 +1,5 @@
|
|||
[[ -f ~/.bashrc ]] && source ~/.bashrc
|
||||
|
||||
if [[ ! $DISPLAY && $XDG_VTNR && $XDG_VTNR -le 3 ]]; then
|
||||
exec startx "$XINITRC"
|
||||
fi
|
21
config/bash/bashrc
Normal file
21
config/bash/bashrc
Normal file
|
@ -0,0 +1,21 @@
|
|||
# If not running interactively, don't do anything
|
||||
[[ $- != *i* ]] && return
|
||||
|
||||
# == Add personal bin directory to PATH
|
||||
if [ -d ${HOME}/.local/bin ]; then
|
||||
export PATH=${HOME}/.local/bin:${PATH}
|
||||
fi
|
||||
|
||||
export XDG_CONFIG_HOME=${HOME}/.local/config
|
||||
export XDG_DATA_HOME=${HOME}/.local/share
|
||||
export XDG_CACHE_HOME=${HOME}/.local/cache
|
||||
export XDG_STATE_HOME=${HOME}/.local/state
|
||||
|
||||
# == load all enabled scripts in ~/.bashrc.d
|
||||
# == any scripts with the .disabled extension won't be loaded
|
||||
for f in $(find ${XDG_CONFIG_HOME}/bash/bashrc.d -mindepth 1 -maxdepth 1 -type f -not -iname *.disabled | sort); do source $f; done
|
||||
|
||||
# == Run tmux in the default session whenever a terminal session starts
|
||||
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
|
||||
exec tmux new-session -A -s main
|
||||
fi
|
4
config/bash/bashrc.d/X11
Normal file
4
config/bash/bashrc.d/X11
Normal file
|
@ -0,0 +1,4 @@
|
|||
## Description: Bash configuration for X11.
|
||||
## vim: ft=sh :
|
||||
|
||||
export XINITRC=${XDG_CONFIG_HOME}/X11/xinitrc
|
29
config/bash/bashrc.d/aliases
Normal file
29
config/bash/bashrc.d/aliases
Normal file
|
@ -0,0 +1,29 @@
|
|||
## Description: All aliases are defined here.
|
||||
## vim: ft=sh :
|
||||
|
||||
alias ls='ls --color=auto'
|
||||
alias ll='ls -laF'
|
||||
alias la='ls -A'
|
||||
alias l='ls -CF'
|
||||
|
||||
alias rm='rm -i'
|
||||
alias mv='mv -i'
|
||||
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
|
||||
alias systemctl='sudo systemctl'
|
||||
alias journalctl='sudo journalctl'
|
||||
|
||||
# aliases for pacman
|
||||
if [[ -x $( command -v pacman ) ]]; then
|
||||
alias pacman='sudo pacman'
|
||||
alias pacupdate='sudo pacman -Syu --noconfirm'
|
||||
fi
|
||||
|
||||
alias tmux="tmux -f ${XDG_CONFIG_HOME}/tmux/tmux.conf"
|
||||
alias pwgen="pwgen -s -c -n"
|
||||
alias dc="docker-compose"
|
||||
|
||||
alias vim=nvim
|
7
config/bash/bashrc.d/ansible
Normal file
7
config/bash/bashrc.d/ansible
Normal file
|
@ -0,0 +1,7 @@
|
|||
## Description: Bash configuration for Ansible.
|
||||
## vim: ft=sh :
|
||||
|
||||
export ANSIBLE_CONFIG=${XDG_CONFIG_HOME}/ansible/ansible.cfg
|
||||
export ANSIBLE_INVENTORY=${XDG_CONFIG_HOME}/ansible/hosts.yml
|
||||
export ANSIBLE_LOCAL_TEMP=${XDG_CACHE_HOME}/ansible
|
||||
export ANSIBLE_COLLECTIONS_PATH=${XDG_DATA_HOME}/ansible/collections
|
8
config/bash/bashrc.d/exercism
Normal file
8
config/bash/bashrc.d/exercism
Normal file
|
@ -0,0 +1,8 @@
|
|||
## File: ~/.bashrc.d/exercism
|
||||
## Description: Bash completion for exercism
|
||||
## vim: ft=sh :
|
||||
|
||||
# == Bash completion for exercism
|
||||
if [ -f ${HOME}/.config/exercism/exercism_completion.bash ]; then
|
||||
source ~/.config/exercism/exercism_completion.bash
|
||||
fi
|
39
config/bash/bashrc.d/functions
Normal file
39
config/bash/bashrc.d/functions
Normal file
|
@ -0,0 +1,39 @@
|
|||
## Description: All aliases are defined here.
|
||||
## vim: ft=sh :
|
||||
|
||||
# mkcd creates a new directory (including the parent directories if they don't exist)
|
||||
# and makes it the current directory.
|
||||
mkcd() {
|
||||
mkdir -p $1
|
||||
cd $1
|
||||
}
|
||||
|
||||
# go_up() navigates up a specified number of parent directories.
|
||||
# Inspired from DT's up() function:
|
||||
# https://gitlab.com/dwt1/dotfiles/-/blob/80632c5cad56ac96955e0ca1d582a4b59741bace/.bashrc#L109
|
||||
go_up() {
|
||||
local d=""
|
||||
local steps="$1"
|
||||
|
||||
if [ -z "$steps" ] || [ "$steps" -lt 1 ]; then
|
||||
steps=1
|
||||
fi
|
||||
|
||||
for ((i=1; i<=steps; i++)); do
|
||||
d="../$d"
|
||||
done
|
||||
|
||||
if ! cd "$d"; then
|
||||
echo "Unable to go up $steps directories."
|
||||
fi
|
||||
}
|
||||
|
||||
# run_package_updates() ensures all apt packages are updated
|
||||
# and runs autoremove to remove any unused packages.
|
||||
run_package_updates() {
|
||||
sudo apt update
|
||||
apt list --upgradable
|
||||
sleep 5
|
||||
sudo apt dist-upgrade
|
||||
sudo apt autoremove
|
||||
}
|
10
config/bash/bashrc.d/git
Normal file
10
config/bash/bashrc.d/git
Normal file
|
@ -0,0 +1,10 @@
|
|||
## File: ~/.bashrc.d/git
|
||||
## Description: Bash configuration for Git
|
||||
## vim: ft=sh :
|
||||
|
||||
if [ -f /usr/share/bash-completion/completions/git ]; then
|
||||
source /usr/share/bash-completion/completions/git
|
||||
fi
|
||||
|
||||
alias g="git"
|
||||
complete -o bashdefault -o default -o nospace -F __git_wrap__git_main g
|
16
config/bash/bashrc.d/go
Normal file
16
config/bash/bashrc.d/go
Normal file
|
@ -0,0 +1,16 @@
|
|||
## Description: Bash configuration for the Go setup
|
||||
## vim: ft=sh :
|
||||
|
||||
if [ -f "${HOME}/.local/software/go/bin/go" ]; then
|
||||
export GOPATH=${XDG_DATA_HOME}/go
|
||||
export GOROOT=${HOME}/.local/software/go
|
||||
export PATH=${PATH}:${GOPATH}/bin
|
||||
|
||||
if ! [ -d "${GOPATH}" ]; then
|
||||
mkdir ${GOPATH}
|
||||
fi
|
||||
|
||||
export GOOS=linux
|
||||
export GOARCH=amd64
|
||||
export CGO_ENABLED=0
|
||||
fi
|
21
config/bash/bashrc.d/history
Normal file
21
config/bash/bashrc.d/history
Normal file
|
@ -0,0 +1,21 @@
|
|||
## File: ~/.bashrc.d/history
|
||||
## Description: Configuration for Bash history
|
||||
## vim: ft=sh :
|
||||
|
||||
# The name of the history file.
|
||||
HISTFILE=${XDG_DATA_HOME}/bash/history
|
||||
|
||||
# Don't put duplicate lines or lines starting with space in the history.
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# The maximum number of lines in the history file.
|
||||
HISTFILESIZE=10000
|
||||
|
||||
# The number of commands to remember in the command history.
|
||||
HISTSIZE=1000
|
||||
|
||||
# Display the timestamp of each command in history using the below format.
|
||||
HISTTIMEFORMAT="%d/%m/%y %T: "
|
||||
|
||||
# Append to the history file, don't overwrite it.
|
||||
shopt -s histappend
|
9
config/bash/bashrc.d/kubectl
Normal file
9
config/bash/bashrc.d/kubectl
Normal file
|
@ -0,0 +1,9 @@
|
|||
## Description: Bash settings for kubectl
|
||||
## vim: ft=sh :
|
||||
export KUBECONFIG=${XDG_CONFIG_HOME}/kube/config
|
||||
|
||||
if [ -x "$( command -v kubectl )" ]; then
|
||||
source <(kubectl completion bash)
|
||||
alias k='kubectl'
|
||||
complete -F __start_kubectl k
|
||||
fi
|
16
config/bash/bashrc.d/lf
Normal file
16
config/bash/bashrc.d/lf
Normal file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
lf () {
|
||||
tmp="$(mktemp)"
|
||||
|
||||
command lf --last-dir-path="$tmp" "$@"
|
||||
if [ -f "$tmp" ]; then
|
||||
dir="$(cat "$tmp")"
|
||||
rm -f "$tmp"
|
||||
if [ -d "$dir" ]; then
|
||||
if [ "$dir" != "$(pwd)" ]; then
|
||||
cd "$dir"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
9
config/bash/bashrc.d/local_software
Normal file
9
config/bash/bashrc.d/local_software
Normal file
|
@ -0,0 +1,9 @@
|
|||
if [[ -d "$HOME/.local/software" ]]; then
|
||||
for dir in ${HOME}/.local/software/*; do
|
||||
dir=${dir:A}
|
||||
if [[ -d "$dir/bin" ]]; then
|
||||
export PATH="$dir/bin:$PATH"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
unset dir
|
21
config/bash/bashrc.d/misc
Normal file
21
config/bash/bashrc.d/misc
Normal file
|
@ -0,0 +1,21 @@
|
|||
## Description: Bash configuration where we can't categorize anywhere else.
|
||||
## vim: ft=sh :
|
||||
|
||||
export BROWSER=firefox
|
||||
export EDITOR=nvim
|
||||
export TERMINAL=st
|
||||
export LANG=en_GB.UTF-8
|
||||
export MANPAGER="nvim -c 'set ft=man' -"
|
||||
|
||||
# == vi mode in Bash
|
||||
set -o vi
|
||||
|
||||
# == make less more friendly for non-text input files, see lesspipe(1)
|
||||
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
|
||||
|
||||
# == ensure that programmable completion features are enabled.
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
9
config/bash/bashrc.d/pass
Normal file
9
config/bash/bashrc.d/pass
Normal file
|
@ -0,0 +1,9 @@
|
|||
## Description: Bash configuration for pass
|
||||
## vim: ft=sh :
|
||||
|
||||
export PASSWORD_STORE_DIR=${XDG_DATA_HOME}/pass
|
||||
|
||||
if ! [ -d "${PASSWORD_STORE_DIR}" ]; then
|
||||
mkdir ${PASSWORD_STORE_DIR}
|
||||
chmod 0700 ${PASSWORD_STORE_DIR}
|
||||
fi
|
32
config/bash/bashrc.d/prompt
Normal file
32
config/bash/bashrc.d/prompt
Normal file
|
@ -0,0 +1,32 @@
|
|||
## File: ~/.bashrc.d/prompt
|
||||
## Description: Configuration for the Bash prompt
|
||||
## vim: ft=sh :
|
||||
|
||||
get_date() {
|
||||
date '+%d.%m.%Y'
|
||||
}
|
||||
|
||||
if [ -f /usr/share/git/completion/git-prompt.sh ]; then
|
||||
source /usr/share/git/completion/git-prompt.sh
|
||||
elif [ -f /usr/share/git/git-prompt.sh ]; then
|
||||
source /usr/share/git/git-prompt.sh
|
||||
elif [ -f /usr/lib/git-core/git-sh-prompt ]; then
|
||||
source /usr/lib/git-core/git-sh-prompt
|
||||
elif [ -f /etc/bash_completion.d/git-prompt ]; then
|
||||
source /etc/bash_completion.d/git-prompt
|
||||
elif [ -f ${HOME}/.git-prompt ]; then
|
||||
source ${HOME}/.git-prompt
|
||||
fi
|
||||
|
||||
GIT_PS1_SHOWDIRTYSTATE="true"
|
||||
GIT_PS1_SHOWUPSTREAM="auto"
|
||||
GIT_PS1_STATESEPARATOR=": "
|
||||
|
||||
DATE_BG="$(tput setab 68)"
|
||||
GREY_BG="$(tput setab 240)"
|
||||
RESET="$(tput sgr0)"
|
||||
FILEPATH_TC="$(tput setaf 81)"
|
||||
WHITE_TC="$(tput setaf 255)"
|
||||
GREEN_TC="$(tput setaf 2)"
|
||||
PS1='${DATE_BG}${WHITE_TC}$(get_date) ${GREY_BG} \u • ${FILEPATH_TC}\033[1m\w ${RESET} ${GREEN_TC}\033[3m$(__git_ps1 "git:(%s)")${RESET}\n\$ '
|
||||
PS2=" -> "
|
8
config/bash/bashrc.d/vault
Normal file
8
config/bash/bashrc.d/vault
Normal file
|
@ -0,0 +1,8 @@
|
|||
## File: ~/.bashrc.d/vault
|
||||
## Description: Bash configuration for vault setup.
|
||||
## vim: ft=sh :
|
||||
|
||||
# bash autocompletion for vault
|
||||
if [ -f "${HOME}/.local/bin/vault" ]; then
|
||||
complete -C /home/dananglin/.local/bin/vault vault
|
||||
fi
|
36
config/git/gitconfig
Normal file
36
config/git/gitconfig
Normal file
|
@ -0,0 +1,36 @@
|
|||
[alias]
|
||||
br = branch
|
||||
cm = commit
|
||||
co = checkout
|
||||
df = diff
|
||||
gr = log --all --graph --decorate --format=format:'%C(bold "#62ccff")%h%C(reset) %C(bold "#fa9c43")(%ai)%C(reset) %C(auto)%d%C(reset)%n%C(italic "#929292")%an:%C(reset) %C("#ffffff")%s%C(reset)%n'
|
||||
# mr allows you to checkout a merge request locally.
|
||||
# $1 is the name of the remote
|
||||
# $2 is the ID of the merge request
|
||||
# e.g. git mr origin 3
|
||||
# e.g. git mr upstream 5
|
||||
mr = !sh -c 'git fetch $1 merge-requests/$2/head:mr-$1-$2 && git checkout mr-$1-$2' -
|
||||
pl = pull
|
||||
ps = push
|
||||
sr = reset --soft
|
||||
st = status
|
||||
up = !sh -c 'git checkout $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@') && git fetch --all && git pull origin $(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@')'
|
||||
[commit]
|
||||
gpgsign = true
|
||||
template = $gitmessage_output
|
||||
[core]
|
||||
excludesFile = $gitignore_output
|
||||
[diff]
|
||||
tool = vimdiff
|
||||
[fetch]
|
||||
prune = true
|
||||
[gpg]
|
||||
program = gpg2
|
||||
[pull]
|
||||
rebase = false
|
||||
[user]
|
||||
email = $git_user_email
|
||||
name = $git_user_name
|
||||
signingkey = $git_user_signingkey
|
||||
[init]
|
||||
defaultBranch = main
|
6
config/git/gitignore
Normal file
6
config/git/gitignore
Normal file
|
@ -0,0 +1,6 @@
|
|||
/tags
|
||||
/notes/*
|
||||
/tmp/*
|
||||
|
||||
library/__pycache__/
|
||||
library/*.pyc
|
34
config/git/gitmessage
Normal file
34
config/git/gitmessage
Normal file
|
@ -0,0 +1,34 @@
|
|||
|
||||
|
||||
# <type>(<scope>): <subject>
|
||||
#
|
||||
# <body>
|
||||
#
|
||||
# <footer>
|
||||
#
|
||||
# The header is mandatory and the scope of the header is optional.
|
||||
#
|
||||
# Wrap longer lines to 72 characters.
|
||||
#
|
||||
# The commit body should include:
|
||||
#
|
||||
# - The problem that is being solved
|
||||
# - The solution to said problem
|
||||
# - Any side effects or dependencies
|
||||
#
|
||||
# The footer should contain a closing reference or issue link, if any.
|
||||
#
|
||||
# Commit Types
|
||||
# ------------
|
||||
#
|
||||
# feat This commit adds a new feature
|
||||
# fix This commit fixes a bug
|
||||
# docs This commit has documentation only changes
|
||||
# style This commit has changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
|
||||
# refactor This commit has changes that neither fixes a bug nor adds a feature
|
||||
# perf This commit has performance improvement changes
|
||||
# test This commit adds missing tests or corrects existing ones
|
||||
# build This commit has changes that affect the build system or external dependencies (e.g. gomod, npm, gulp)
|
||||
# ci This commit has changes to CI configuration files and scripts
|
||||
# chore This commit has other changes that don't modify the source or test files
|
||||
# revert This commit reverts a previous commit
|
89
config/lf/lfrc
Normal file
89
config/lf/lfrc
Normal file
|
@ -0,0 +1,89 @@
|
|||
set shell bash
|
||||
set shellopts '-eu'
|
||||
set info size:time
|
||||
|
||||
map o open
|
||||
map x extract
|
||||
map t trash
|
||||
map <delete> delete
|
||||
map r rename
|
||||
|
||||
push mw
|
||||
map q push 'w:quit<enter>
|
||||
map Q push :quit<enter>
|
||||
|
||||
cmd open ${{
|
||||
case $(file --mime-type $f -b) in
|
||||
text/*) $EDITOR $fx;;
|
||||
*) for f in $fx; do setsid $OPENER $f > /dev/null 2> /dev/null & done;;
|
||||
esac
|
||||
}}
|
||||
|
||||
# extract files from the selected archive file using
|
||||
# the method based on it's file type.
|
||||
cmd extract ${{
|
||||
set -f
|
||||
case $f in
|
||||
*.tar.bz|*.tar.bz2|*.tbz|*.tbz2) tar xjvf $f;;
|
||||
*.tar.gz|*.tgz) tar xzvf $f;;
|
||||
*.tar.xz|*.txz) tar xJvf $f;;
|
||||
*.zip) unzip $f;;
|
||||
*.rar) unrar x $f;;
|
||||
*.7z) 7z x $f;;
|
||||
esac
|
||||
}}
|
||||
|
||||
# trash moves a file to the trash folder.
|
||||
cmd trash $trash-put $fx
|
||||
|
||||
# empty-trash empties the trash folder.
|
||||
cmd empty-trash %{{
|
||||
set -f
|
||||
printf "Are you sure you want to empty the trash? [yes/no] "
|
||||
read ans
|
||||
[ $ans = "yes" ] && trash-empty
|
||||
}}
|
||||
|
||||
# list-trash list all files and directories in the trash folder.
|
||||
cmd list-trash $trash-list | less
|
||||
|
||||
# delete permanently deletes a file.
|
||||
cmd delete %{{
|
||||
set -f
|
||||
printf "Are you sure you want to delete $fx? [yes/no] "
|
||||
read ans
|
||||
[ $ans = "yes" ] && rm -rf $fx
|
||||
}}
|
||||
|
||||
# vim opens a file in vim.
|
||||
# If the selected file is a directory
|
||||
# the command opens vim in that directory
|
||||
# with an empty buffer.
|
||||
cmd vim ${{
|
||||
if [ -d $fx ]; then
|
||||
cd $fx && vim
|
||||
else
|
||||
vim $fx
|
||||
fi
|
||||
}}
|
||||
|
||||
# mkdir creates a new directory
|
||||
cmd mkdir %{{
|
||||
printf "Directory name: "
|
||||
read ans
|
||||
mkdir $ans
|
||||
}}
|
||||
|
||||
# mkfile creates a new file
|
||||
cmd mkfile %{{
|
||||
printf "File name: "
|
||||
read ans
|
||||
touch $ans
|
||||
}}
|
||||
|
||||
# rename renames a file or folder
|
||||
cmd rename %{{
|
||||
printf "Enter the new name: "
|
||||
read ans
|
||||
mv $fx $ans
|
||||
}}
|
39
config/tmux/tmux.conf
Normal file
39
config/tmux/tmux.conf
Normal file
|
@ -0,0 +1,39 @@
|
|||
set-option -g default-terminal "tmux-256color"
|
||||
set-option -g default-shell /bin/bash
|
||||
set-option -g mouse off
|
||||
|
||||
set-window-option -g status-keys vi
|
||||
set-option -g mode-keys vi
|
||||
|
||||
set-option -g pane-active-border-style "fg=colour234"
|
||||
set-option -g pane-border-style "fg=colour234"
|
||||
|
||||
set-option -g status-style "bg=colour234"
|
||||
set-option -ag status-style "fg=colour255"
|
||||
|
||||
set-option -g status-left-length 32
|
||||
set-window-option -g status-left "#[bg=colour55,fg=colour255,bold] #S "
|
||||
|
||||
set-option -g status-right-length 32
|
||||
set-window-option -g status-right "#[bg=colour237,fg=colour255] %d.%m.%Y %H:%M "
|
||||
|
||||
set-option -g window-status-format " #I: #W "
|
||||
set-option -g window-status-current-format "#[fg=colour255,bg=colour25,bold] #I: #W "
|
||||
set-option -g window-status-separator "|"
|
||||
|
||||
# Navigate through panes using vim movement keys
|
||||
bind h select-pane -L
|
||||
bind j select-pane -D
|
||||
bind k select-pane -U
|
||||
bind l select-pane -R
|
||||
|
||||
# Reduce the escape timeout for neovim
|
||||
set -sg escape-time 10
|
||||
|
||||
# Enable focus events for the autoread feature in neovim
|
||||
set-option -g focus-events on
|
||||
|
||||
# Create new panes or windows with the current working directory
|
||||
bind '"' split-window -c "#{pane_current_path}"
|
||||
bind % split-window -h -c "#{pane_current_path}"
|
||||
bind c new-window -c "#{pane_current_path}"
|
2
config/vim/after/ftplugin/gitcommit.vim
Normal file
2
config/vim/after/ftplugin/gitcommit.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
" Enable spell checking by default
|
||||
setlocal spell spelllang=en_gb
|
15
config/vim/after/ftplugin/go.vim
Normal file
15
config/vim/after/ftplugin/go.vim
Normal file
|
@ -0,0 +1,15 @@
|
|||
" load vista.vim
|
||||
packadd vista.vim
|
||||
|
||||
|
||||
" Tabs and spaces
|
||||
setlocal noexpandtab
|
||||
setlocal tabstop=4
|
||||
setlocal shiftwidth=4
|
||||
setlocal softtabstop=4
|
||||
|
||||
" Run goimports after every save
|
||||
autocmd BufWritePre <buffer> :keepjumps exe '%!goimports'
|
||||
|
||||
" A macro for the error handling template
|
||||
let @e="oif err != nil {\<CR>}\<Esc>k"
|
1
config/vim/after/ftplugin/gomod.vim
Normal file
1
config/vim/after/ftplugin/gomod.vim
Normal file
|
@ -0,0 +1 @@
|
|||
packadd govim
|
1
config/vim/after/ftplugin/make.vim
Normal file
1
config/vim/after/ftplugin/make.vim
Normal file
|
@ -0,0 +1 @@
|
|||
setlocal noexpandtab
|
5
config/vim/after/ftplugin/markdown.vim
Normal file
5
config/vim/after/ftplugin/markdown.vim
Normal file
|
@ -0,0 +1,5 @@
|
|||
" Enable spell checking by default
|
||||
setlocal spell spelllang=en_gb
|
||||
|
||||
" load vista.vim
|
||||
packadd vista.vim
|
2
config/vim/after/ftplugin/netrw.vim
Normal file
2
config/vim/after/ftplugin/netrw.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
setlocal statusline=[Tree\ List]
|
||||
noremap <buffer> <C-l> :vert resize +5<CR>
|
1
config/vim/after/ftplugin/python.vim
Normal file
1
config/vim/after/ftplugin/python.vim
Normal file
|
@ -0,0 +1 @@
|
|||
setlocal tabstop=4 shiftwidth=4 softtabstop=4
|
2
config/vim/after/ftplugin/sh.vim
Normal file
2
config/vim/after/ftplugin/sh.vim
Normal file
|
@ -0,0 +1,2 @@
|
|||
setlocal tabstop=4 shiftwidth=4 softtabstop=4
|
||||
setlocal makeprg=shellcheck\ -f\ gcc\ %
|
504
config/vim/colors/cosmic_latte.vim
Normal file
504
config/vim/colors/cosmic_latte.vim
Normal file
|
@ -0,0 +1,504 @@
|
|||
" Name: cosmic_latte
|
||||
" Author: nightsense
|
||||
" Maintainer: nightsense
|
||||
" License: MIT
|
||||
|
||||
if !(has('termguicolors') && &termguicolors) && !has('gui_running')
|
||||
\ && (!exists('&t_Co') || &t_Co < 256)
|
||||
echoerr '[cosmic_latte] There are not enough colors.'
|
||||
finish
|
||||
endif
|
||||
|
||||
hi clear
|
||||
if exists('syntax_on')
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name = 'cosmic_latte'
|
||||
|
||||
if &background ==# 'dark'
|
||||
hi Bold ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi Conceal ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Directory ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi EndOfBuffer ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi FoldColumn ctermfg=145 ctermbg=NONE guifg=#abb0c0 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Ignore ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Italic ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,italic gui=NONE,italic
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi MoreMsg ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi NonText ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Normal ctermfg=145 ctermbg=235 guifg=#abb0c0 guibg=#202a31 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Question ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SignColumn ctermfg=145 ctermbg=NONE guifg=#abb0c0 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Terminal ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Title ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi Underlined ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,underline gui=NONE,underline
|
||||
hi Comment ctermfg=246 ctermbg=NONE guifg=#898f9e guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi CursorLineNr ctermfg=246 ctermbg=NONE guifg=#898f9e guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi LineNr ctermfg=246 ctermbg=NONE guifg=#898f9e guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi ColorColumn ctermfg=NONE ctermbg=237 guifg=NONE guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=237 guifg=NONE guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi CursorLine ctermfg=NONE ctermbg=237 guifg=NONE guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=237 guifg=NONE guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Folded ctermfg=NONE ctermbg=237 guifg=NONE guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Pmenu ctermfg=145 ctermbg=237 guifg=#abb0c0 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi QuickFixLine ctermfg=NONE ctermbg=237 guifg=NONE guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi StatusLineNC ctermfg=145 ctermbg=237 guifg=#abb0c0 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi StatusLineTermNC ctermfg=145 ctermbg=237 guifg=#abb0c0 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi TabLine ctermfg=145 ctermbg=237 guifg=#abb0c0 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi ToolbarButton ctermfg=145 ctermbg=237 guifg=#abb0c0 guibg=#2b3740 guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi VisualNOS ctermfg=145 ctermbg=237 guifg=#abb0c0 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi WildMenu ctermfg=145 ctermbg=237 guifg=#abb0c0 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi PmenuSel ctermfg=145 ctermbg=235 guifg=#abb0c0 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi StatusLine ctermfg=145 ctermbg=235 guifg=#abb0c0 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi StatusLineTerm ctermfg=145 ctermbg=235 guifg=#abb0c0 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi TabLineSel ctermfg=145 ctermbg=235 guifg=#abb0c0 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Cursor ctermfg=252 ctermbg=235 guifg=#c5cbdb guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi MatchParen ctermfg=252 ctermbg=240 guifg=#c5cbdb guibg=#4c5764 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Visual ctermfg=252 ctermbg=240 guifg=#c5cbdb guibg=#4c5764 guisp=NONE cterm=NONE gui=NONE
|
||||
hi PmenuSbar ctermfg=240 ctermbg=240 guifg=#4c5764 guibg=#4c5764 guisp=NONE cterm=NONE gui=NONE
|
||||
hi PmenuThumb ctermfg=145 ctermbg=145 guifg=#abb0c0 guibg=#abb0c0 guisp=NONE cterm=NONE gui=NONE
|
||||
hi TabLineFill ctermfg=237 ctermbg=237 guifg=#2b3740 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi ToolbarLine ctermfg=237 ctermbg=237 guifg=#2b3740 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi VertSplit ctermfg=237 ctermbg=237 guifg=#2b3740 guibg=#2b3740 guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpellBad ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#c17b8d cterm=NONE,underline gui=NONE,undercurl
|
||||
hi SpellCap ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#5496bd cterm=NONE,underline gui=NONE,undercurl
|
||||
hi SpellLocal ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#459d90 cterm=NONE,underline gui=NONE,undercurl
|
||||
hi SpellRare ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#9b85bb cterm=NONE,underline gui=NONE,undercurl
|
||||
hi StorageClass ctermfg=139 ctermbg=NONE guifg=#9b85bb guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Structure ctermfg=139 ctermbg=NONE guifg=#9b85bb guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Type ctermfg=139 ctermbg=NONE guifg=#9b85bb guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Typedef ctermfg=139 ctermbg=NONE guifg=#9b85bb guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi TooLong ctermfg=139 ctermbg=235 guifg=#9b85bb guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi WarningMsg ctermfg=139 ctermbg=235 guifg=#9b85bb guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Function ctermfg=168 ctermbg=NONE guifg=#c17b8d guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Identifier ctermfg=168 ctermbg=NONE guifg=#c17b8d guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffDelete ctermfg=168 ctermbg=235 guifg=#c17b8d guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi DiffRemoved ctermfg=168 ctermbg=235 guifg=#c17b8d guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Error ctermfg=168 ctermbg=235 guifg=#c17b8d guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi ErrorMsg ctermfg=168 ctermbg=235 guifg=#c17b8d guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Debug ctermfg=137 ctermbg=NONE guifg=#b28761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Delimiter ctermfg=137 ctermbg=NONE guifg=#b28761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Special ctermfg=137 ctermbg=NONE guifg=#b28761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpecialChar ctermfg=137 ctermbg=NONE guifg=#b28761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpecialComment ctermfg=137 ctermbg=NONE guifg=#b28761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpecialKey ctermfg=137 ctermbg=NONE guifg=#b28761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Tag ctermfg=137 ctermbg=NONE guifg=#b28761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffChanged ctermfg=137 ctermbg=235 guifg=#b28761 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi DiffText ctermfg=137 ctermbg=235 guifg=#b28761 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Search ctermfg=137 ctermbg=235 guifg=#b28761 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Conditional ctermfg=107 ctermbg=NONE guifg=#7d9761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Exception ctermfg=107 ctermbg=NONE guifg=#7d9761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Keyword ctermfg=107 ctermbg=NONE guifg=#7d9761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Label ctermfg=107 ctermbg=NONE guifg=#7d9761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Operator ctermfg=107 ctermbg=NONE guifg=#7d9761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Repeat ctermfg=107 ctermbg=NONE guifg=#7d9761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Statement ctermfg=107 ctermbg=NONE guifg=#7d9761 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffAdd ctermfg=107 ctermbg=235 guifg=#7d9761 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi DiffAdded ctermfg=107 ctermbg=235 guifg=#7d9761 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Define ctermfg=37 ctermbg=NONE guifg=#459d90 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Include ctermfg=37 ctermbg=NONE guifg=#459d90 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Macro ctermfg=37 ctermbg=NONE guifg=#459d90 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi PreCondit ctermfg=37 ctermbg=NONE guifg=#459d90 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi PreProc ctermfg=37 ctermbg=NONE guifg=#459d90 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Todo ctermfg=37 ctermbg=235 guifg=#459d90 guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Boolean ctermfg=67 ctermbg=NONE guifg=#5496bd guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Character ctermfg=67 ctermbg=NONE guifg=#5496bd guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Constant ctermfg=67 ctermbg=NONE guifg=#5496bd guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Float ctermfg=67 ctermbg=NONE guifg=#5496bd guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Number ctermfg=67 ctermbg=NONE guifg=#5496bd guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi String ctermfg=67 ctermbg=NONE guifg=#5496bd guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi IncSearch ctermfg=67 ctermbg=235 guifg=#5496bd guibg=#202a31 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
if has("nvim")
|
||||
let g:terminal_color_0 = "#202a31"
|
||||
let g:terminal_color_1 = "#c17b8d"
|
||||
let g:terminal_color_2 = "#7d9761"
|
||||
let g:terminal_color_3 = "#b28761"
|
||||
let g:terminal_color_4 = "#5496bd"
|
||||
let g:terminal_color_5 = "#9b85bb"
|
||||
let g:terminal_color_6 = "#459d90"
|
||||
let g:terminal_color_7 = "#abb0c0"
|
||||
let g:terminal_color_8 = "#898f9e"
|
||||
let g:terminal_color_9 = "#c17b8d"
|
||||
let g:terminal_color_10 = "#7d9761"
|
||||
let g:terminal_color_11 = "#b28761"
|
||||
let g:terminal_color_12 = "#5496bd"
|
||||
let g:terminal_color_13 = "#9b85bb"
|
||||
let g:terminal_color_14 = "#459d90"
|
||||
let g:terminal_color_15 = "#c5cbdb"
|
||||
elseif has("terminal")
|
||||
let g:terminal_ansi_colors = [
|
||||
\ "#202a31",
|
||||
\ "#c17b8d",
|
||||
\ "#7d9761",
|
||||
\ "#b28761",
|
||||
\ "#5496bd",
|
||||
\ "#9b85bb",
|
||||
\ "#459d90",
|
||||
\ "#abb0c0",
|
||||
\ "#898f9e",
|
||||
\ "#c17b8d",
|
||||
\ "#7d9761",
|
||||
\ "#b28761",
|
||||
\ "#5496bd",
|
||||
\ "#9b85bb",
|
||||
\ "#459d90",
|
||||
\ "#c5cbdb"
|
||||
\ ]
|
||||
endif
|
||||
finish
|
||||
endif
|
||||
|
||||
hi Bold ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi Conceal ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Directory ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi EndOfBuffer ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi FoldColumn ctermfg=240 ctermbg=NONE guifg=#485a62 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Ignore ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Italic ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,italic gui=NONE,italic
|
||||
hi ModeMsg ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi MoreMsg ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi NonText ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Normal ctermfg=240 ctermbg=231 guifg=#485a62 guibg=#fff8e7 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Question ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SignColumn ctermfg=240 ctermbg=NONE guifg=#485a62 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Terminal ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Title ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi Underlined ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=NONE cterm=NONE,underline gui=NONE,underline
|
||||
hi Comment ctermfg=243 ctermbg=NONE guifg=#63757e guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi CursorLineNr ctermfg=243 ctermbg=NONE guifg=#63757e guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi LineNr ctermfg=243 ctermbg=NONE guifg=#63757e guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi ColorColumn ctermfg=NONE ctermbg=254 guifg=NONE guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi CursorColumn ctermfg=NONE ctermbg=254 guifg=NONE guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi CursorLine ctermfg=NONE ctermbg=254 guifg=NONE guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffChange ctermfg=NONE ctermbg=254 guifg=NONE guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Folded ctermfg=NONE ctermbg=254 guifg=NONE guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Pmenu ctermfg=240 ctermbg=254 guifg=#485a62 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi QuickFixLine ctermfg=NONE ctermbg=254 guifg=NONE guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi StatusLineNC ctermfg=240 ctermbg=254 guifg=#485a62 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi StatusLineTermNC ctermfg=240 ctermbg=254 guifg=#485a62 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi TabLine ctermfg=240 ctermbg=254 guifg=#485a62 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi ToolbarButton ctermfg=240 ctermbg=254 guifg=#485a62 guibg=#efe4d2 guisp=NONE cterm=NONE,bold gui=NONE,bold
|
||||
hi VisualNOS ctermfg=240 ctermbg=254 guifg=#485a62 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi WildMenu ctermfg=240 ctermbg=254 guifg=#485a62 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi PmenuSel ctermfg=240 ctermbg=231 guifg=#485a62 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi StatusLine ctermfg=240 ctermbg=231 guifg=#485a62 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi StatusLineTerm ctermfg=240 ctermbg=231 guifg=#485a62 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi TabLineSel ctermfg=240 ctermbg=231 guifg=#485a62 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Cursor ctermfg=238 ctermbg=231 guifg=#364850 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi MatchParen ctermfg=238 ctermbg=144 guifg=#364850 guibg=#b1b4a2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi Visual ctermfg=238 ctermbg=144 guifg=#364850 guibg=#b1b4a2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi PmenuSbar ctermfg=144 ctermbg=144 guifg=#b1b4a2 guibg=#b1b4a2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi PmenuThumb ctermfg=240 ctermbg=240 guifg=#485a62 guibg=#485a62 guisp=NONE cterm=NONE gui=NONE
|
||||
hi TabLineFill ctermfg=254 ctermbg=254 guifg=#efe4d2 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi ToolbarLine ctermfg=254 ctermbg=254 guifg=#efe4d2 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi VertSplit ctermfg=254 ctermbg=254 guifg=#efe4d2 guibg=#efe4d2 guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpellBad ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#ff0056 cterm=NONE,underline gui=NONE,undercurl
|
||||
hi SpellCap ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#0096ff cterm=NONE,underline gui=NONE,undercurl
|
||||
hi SpellLocal ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#00a6c0 cterm=NONE,underline gui=NONE,undercurl
|
||||
hi SpellRare ctermfg=NONE ctermbg=NONE guifg=NONE guibg=NONE guisp=#de3ffc cterm=NONE,underline gui=NONE,undercurl
|
||||
hi StorageClass ctermfg=133 ctermbg=NONE guifg=#a154ae guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Structure ctermfg=133 ctermbg=NONE guifg=#a154ae guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Type ctermfg=133 ctermbg=NONE guifg=#a154ae guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Typedef ctermfg=133 ctermbg=NONE guifg=#a154ae guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi TooLong ctermfg=133 ctermbg=231 guifg=#a154ae guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi WarningMsg ctermfg=133 ctermbg=231 guifg=#a154ae guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Function ctermfg=131 ctermbg=NONE guifg=#c44756 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Identifier ctermfg=131 ctermbg=NONE guifg=#c44756 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffDelete ctermfg=131 ctermbg=231 guifg=#c44756 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi DiffRemoved ctermfg=131 ctermbg=231 guifg=#c44756 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Error ctermfg=131 ctermbg=231 guifg=#c44756 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi ErrorMsg ctermfg=131 ctermbg=231 guifg=#c44756 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Debug ctermfg=94 ctermbg=NONE guifg=#916d03 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Delimiter ctermfg=94 ctermbg=NONE guifg=#916d03 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Special ctermfg=94 ctermbg=NONE guifg=#916d03 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpecialChar ctermfg=94 ctermbg=NONE guifg=#916d03 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpecialComment ctermfg=94 ctermbg=NONE guifg=#916d03 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi SpecialKey ctermfg=94 ctermbg=NONE guifg=#916d03 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Tag ctermfg=94 ctermbg=NONE guifg=#916d03 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffChanged ctermfg=94 ctermbg=231 guifg=#916d03 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi DiffText ctermfg=94 ctermbg=231 guifg=#916d03 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Search ctermfg=222 ctermbg=238 guifg=#f6c967 guibg=#364850 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Conditional ctermfg=28 ctermbg=NONE guifg=#1f8332 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Exception ctermfg=28 ctermbg=NONE guifg=#1f8332 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Keyword ctermfg=28 ctermbg=NONE guifg=#1f8332 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Label ctermfg=28 ctermbg=NONE guifg=#1f8332 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Operator ctermfg=28 ctermbg=NONE guifg=#1f8332 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Repeat ctermfg=28 ctermbg=NONE guifg=#1f8332 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Statement ctermfg=28 ctermbg=NONE guifg=#1f8332 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi DiffAdd ctermfg=28 ctermbg=231 guifg=#1f8332 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi DiffAdded ctermfg=28 ctermbg=231 guifg=#1f8332 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Define ctermfg=30 ctermbg=NONE guifg=#007f8a guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Include ctermfg=30 ctermbg=NONE guifg=#007f8a guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Macro ctermfg=30 ctermbg=NONE guifg=#007f8a guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi PreCondit ctermfg=30 ctermbg=NONE guifg=#007f8a guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi PreProc ctermfg=30 ctermbg=NONE guifg=#007f8a guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Todo ctermfg=30 ctermbg=231 guifg=#007f8a guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
hi Boolean ctermfg=32 ctermbg=NONE guifg=#0075c9 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Character ctermfg=32 ctermbg=NONE guifg=#0075c9 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Constant ctermfg=32 ctermbg=NONE guifg=#0075c9 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Float ctermfg=32 ctermbg=NONE guifg=#0075c9 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi Number ctermfg=32 ctermbg=NONE guifg=#0075c9 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi String ctermfg=32 ctermbg=NONE guifg=#0075c9 guibg=NONE guisp=NONE cterm=NONE gui=NONE
|
||||
hi IncSearch ctermfg=32 ctermbg=231 guifg=#0075c9 guibg=#fff8e7 guisp=NONE cterm=NONE,reverse gui=NONE,reverse
|
||||
if has("nvim")
|
||||
let g:terminal_color_0 = "#fff8e7"
|
||||
let g:terminal_color_1 = "#c44756"
|
||||
let g:terminal_color_2 = "#1f8332"
|
||||
let g:terminal_color_3 = "#916d03"
|
||||
let g:terminal_color_4 = "#0075c9"
|
||||
let g:terminal_color_5 = "#a154ae"
|
||||
let g:terminal_color_6 = "#007f8a"
|
||||
let g:terminal_color_7 = "#485a62"
|
||||
let g:terminal_color_8 = "#63757e"
|
||||
let g:terminal_color_9 = "#c44756"
|
||||
let g:terminal_color_10 = "#1f8332"
|
||||
let g:terminal_color_11 = "#916d03"
|
||||
let g:terminal_color_12 = "#0075c9"
|
||||
let g:terminal_color_13 = "#a154ae"
|
||||
let g:terminal_color_14 = "#007f8a"
|
||||
let g:terminal_color_15 = "#364850"
|
||||
elseif has("terminal")
|
||||
let g:terminal_ansi_colors = [
|
||||
\ "#fff8e7",
|
||||
\ "#c44756",
|
||||
\ "#1f8332",
|
||||
\ "#916d03",
|
||||
\ "#0075c9",
|
||||
\ "#a154ae",
|
||||
\ "#007f8a",
|
||||
\ "#485a62",
|
||||
\ "#63757e",
|
||||
\ "#c44756",
|
||||
\ "#1f8332",
|
||||
\ "#916d03",
|
||||
\ "#0075c9",
|
||||
\ "#a154ae",
|
||||
\ "#007f8a",
|
||||
\ "#364850"
|
||||
\ ]
|
||||
endif
|
||||
finish
|
||||
|
||||
" Background: light
|
||||
" Color: gry0 #fff8e7 ~
|
||||
" Color: gry1 #efe4d2 ~
|
||||
" Color: gry2 #63757e ~
|
||||
" Color: gry3 #485a62 ~
|
||||
" Color: gryc #364850 ~
|
||||
" Color: srch #f6c967 ~
|
||||
" Color: grys #364850 ~
|
||||
" Color: gryp #b1b4a2 ~
|
||||
" Color: sprd #ff0056 ~
|
||||
" Color: spbl #0096ff ~
|
||||
" Color: spcy #00a6c0 ~
|
||||
" Color: spmg #de3ffc ~
|
||||
" Color: red_ #c44756 ~
|
||||
" Color: gold #916d03 ~
|
||||
" Color: gren #1f8332 ~
|
||||
" Color: cyan #007f8a ~
|
||||
" Color: blue #0075c9 ~
|
||||
" Color: mgnt #a154ae ~
|
||||
" Bold none none bold
|
||||
" Conceal none none
|
||||
" Directory none none bold
|
||||
" EndOfBuffer none none
|
||||
" FoldColumn gry3 none
|
||||
" Ignore none none
|
||||
" Italic none none italic
|
||||
" ModeMsg none none
|
||||
" MoreMsg none none
|
||||
" NonText none none
|
||||
" Normal gry3 gry0
|
||||
" Question none none
|
||||
" SignColumn gry3 none
|
||||
" Terminal none none
|
||||
" Title none none bold
|
||||
" Underlined none none underline
|
||||
" Comment gry2 none
|
||||
" CursorLineNr gry2 none
|
||||
" LineNr gry2 none
|
||||
" ColorColumn none gry1
|
||||
" CursorColumn none gry1
|
||||
" CursorLine none gry1
|
||||
" DiffChange none gry1
|
||||
" Folded none gry1
|
||||
" Pmenu gry3 gry1
|
||||
" QuickFixLine none gry1
|
||||
" StatusLineNC gry3 gry1
|
||||
" StatusLineTermNC gry3 gry1
|
||||
" TabLine gry3 gry1
|
||||
" ToolbarButton gry3 gry1 bold
|
||||
" VisualNOS gry3 gry1
|
||||
" WildMenu gry3 gry1
|
||||
" PmenuSel gry3 gry0 reverse
|
||||
" StatusLine gry3 gry0 reverse
|
||||
" StatusLineTerm gry3 gry0 reverse
|
||||
" TabLineSel gry3 gry0 reverse
|
||||
" Cursor gryc gry0 reverse
|
||||
" MatchParen gryc gryp
|
||||
" Visual gryc gryp
|
||||
" PmenuSbar gryp gryp
|
||||
" PmenuThumb gry3 gry3
|
||||
" TabLineFill gry1 gry1
|
||||
" ToolbarLine gry1 gry1
|
||||
" VertSplit gry1 gry1
|
||||
" SpellBad none none g=undercurl s=sprd t=underline
|
||||
" SpellCap none none g=undercurl s=spbl t=underline
|
||||
" SpellLocal none none g=undercurl s=spcy t=underline
|
||||
" SpellRare none none g=undercurl s=spmg t=underline
|
||||
" StorageClass mgnt none
|
||||
" Structure mgnt none
|
||||
" Type mgnt none
|
||||
" Typedef mgnt none
|
||||
" TooLong mgnt gry0 reverse
|
||||
" WarningMsg mgnt gry0 reverse
|
||||
" Function red_ none
|
||||
" Identifier red_ none
|
||||
" DiffDelete red_ gry0 reverse
|
||||
" DiffRemoved red_ gry0 reverse
|
||||
" Error red_ gry0 reverse
|
||||
" ErrorMsg red_ gry0 reverse
|
||||
" Debug gold none
|
||||
" Delimiter gold none
|
||||
" Special gold none
|
||||
" SpecialChar gold none
|
||||
" SpecialComment gold none
|
||||
" SpecialKey gold none
|
||||
" Tag gold none
|
||||
" DiffChanged gold gry0 reverse
|
||||
" DiffText gold gry0 reverse
|
||||
" Search srch grys reverse
|
||||
" Conditional gren none
|
||||
" Exception gren none
|
||||
" Keyword gren none
|
||||
" Label gren none
|
||||
" Operator gren none
|
||||
" Repeat gren none
|
||||
" Statement gren none
|
||||
" DiffAdd gren gry0 reverse
|
||||
" DiffAdded gren gry0 reverse
|
||||
" Define cyan none
|
||||
" Include cyan none
|
||||
" Macro cyan none
|
||||
" PreCondit cyan none
|
||||
" PreProc cyan none
|
||||
" Todo cyan gry0 reverse
|
||||
" Boolean blue none
|
||||
" Character blue none
|
||||
" Constant blue none
|
||||
" Float blue none
|
||||
" Number blue none
|
||||
" String blue none
|
||||
" IncSearch blue gry0 reverse
|
||||
" Background: dark
|
||||
" Color: gry0 #202a31 ~
|
||||
" Color: gry1 #2b3740 ~
|
||||
" Color: gry2 #898f9e ~
|
||||
" Color: gry3 #abb0c0 ~
|
||||
" Color: gryc #c5cbdb ~
|
||||
" Color: srch #b28761 ~
|
||||
" Color: grys #202a31 ~
|
||||
" Color: gryp #4c5764 ~
|
||||
" Color: sprd #c17b8d ~
|
||||
" Color: spbl #5496bd ~
|
||||
" Color: spcy #459d90 ~
|
||||
" Color: spmg #9b85bb ~
|
||||
" Color: red_ #c17b8d ~
|
||||
" Color: gold #b28761 ~
|
||||
" Color: gren #7d9761 ~
|
||||
" Color: cyan #459d90 ~
|
||||
" Color: blue #5496bd ~
|
||||
" Color: mgnt #9b85bb ~
|
||||
" Bold none none bold
|
||||
" Conceal none none
|
||||
" Directory none none bold
|
||||
" EndOfBuffer none none
|
||||
" FoldColumn gry3 none
|
||||
" Ignore none none
|
||||
" Italic none none italic
|
||||
" ModeMsg none none
|
||||
" MoreMsg none none
|
||||
" NonText none none
|
||||
" Normal gry3 gry0
|
||||
" Question none none
|
||||
" SignColumn gry3 none
|
||||
" Terminal none none
|
||||
" Title none none bold
|
||||
" Underlined none none underline
|
||||
" Comment gry2 none
|
||||
" CursorLineNr gry2 none
|
||||
" LineNr gry2 none
|
||||
" ColorColumn none gry1
|
||||
" CursorColumn none gry1
|
||||
" CursorLine none gry1
|
||||
" DiffChange none gry1
|
||||
" Folded none gry1
|
||||
" Pmenu gry3 gry1
|
||||
" QuickFixLine none gry1
|
||||
" StatusLineNC gry3 gry1
|
||||
" StatusLineTermNC gry3 gry1
|
||||
" TabLine gry3 gry1
|
||||
" ToolbarButton gry3 gry1 bold
|
||||
" VisualNOS gry3 gry1
|
||||
" WildMenu gry3 gry1
|
||||
" PmenuSel gry3 gry0 reverse
|
||||
" StatusLine gry3 gry0 reverse
|
||||
" StatusLineTerm gry3 gry0 reverse
|
||||
" TabLineSel gry3 gry0 reverse
|
||||
" Cursor gryc gry0 reverse
|
||||
" MatchParen gryc gryp
|
||||
" Visual gryc gryp
|
||||
" PmenuSbar gryp gryp
|
||||
" PmenuThumb gry3 gry3
|
||||
" TabLineFill gry1 gry1
|
||||
" ToolbarLine gry1 gry1
|
||||
" VertSplit gry1 gry1
|
||||
" SpellBad none none g=undercurl s=sprd t=underline
|
||||
" SpellCap none none g=undercurl s=spbl t=underline
|
||||
" SpellLocal none none g=undercurl s=spcy t=underline
|
||||
" SpellRare none none g=undercurl s=spmg t=underline
|
||||
" StorageClass mgnt none
|
||||
" Structure mgnt none
|
||||
" Type mgnt none
|
||||
" Typedef mgnt none
|
||||
" TooLong mgnt gry0 reverse
|
||||
" WarningMsg mgnt gry0 reverse
|
||||
" Function red_ none
|
||||
" Identifier red_ none
|
||||
" DiffDelete red_ gry0 reverse
|
||||
" DiffRemoved red_ gry0 reverse
|
||||
" Error red_ gry0 reverse
|
||||
" ErrorMsg red_ gry0 reverse
|
||||
" Debug gold none
|
||||
" Delimiter gold none
|
||||
" Special gold none
|
||||
" SpecialChar gold none
|
||||
" SpecialComment gold none
|
||||
" SpecialKey gold none
|
||||
" Tag gold none
|
||||
" DiffChanged gold gry0 reverse
|
||||
" DiffText gold gry0 reverse
|
||||
" Search srch grys reverse
|
||||
" Conditional gren none
|
||||
" Exception gren none
|
||||
" Keyword gren none
|
||||
" Label gren none
|
||||
" Operator gren none
|
||||
" Repeat gren none
|
||||
" Statement gren none
|
||||
" DiffAdd gren gry0 reverse
|
||||
" DiffAdded gren gry0 reverse
|
||||
" Define cyan none
|
||||
" Include cyan none
|
||||
" Macro cyan none
|
||||
" PreCondit cyan none
|
||||
" PreProc cyan none
|
||||
" Todo cyan gry0 reverse
|
||||
" Boolean blue none
|
||||
" Character blue none
|
||||
" Constant blue none
|
||||
" Float blue none
|
||||
" Number blue none
|
||||
" String blue none
|
||||
" IncSearch blue gry0 reverse
|
82
config/vim/colors/nighted.vim
Normal file
82
config/vim/colors/nighted.vim
Normal file
|
@ -0,0 +1,82 @@
|
|||
" Vim color scheme
|
||||
"
|
||||
" Name: nighted.vim
|
||||
" Author: Takaaki Hirano <hivedark@gmail.com>
|
||||
" Source: https://github.com/wolf-dog/nighted.vim
|
||||
|
||||
set background=dark
|
||||
highlight clear
|
||||
if exists('syntax_on')
|
||||
syntax reset
|
||||
endif
|
||||
let g:colors_name = 'nighted'
|
||||
|
||||
" General colors
|
||||
hi Normal ctermfg=251 ctermbg=234 cterm=none guifg=#c6c6c6 guibg=#1c1c1c gui=none
|
||||
hi Visual ctermfg=none ctermbg=232 cterm=none guifg=NONE guibg=#121212 gui=none
|
||||
hi Search ctermfg=234 ctermbg=75 cterm=none guifg=#1c1c1c guibg=#5fafff gui=none
|
||||
hi IncSearch ctermfg=234 ctermbg=61 cterm=none guifg=#1c1c1c guibg=#5f5f5f gui=none
|
||||
hi Folded ctermfg=147 ctermbg=232 cterm=none guifg=#afafff guibg=#121212 gui=none
|
||||
hi StatusLine ctermfg=255 ctermbg=60 cterm=none guifg=#eeeeee guibg=#5f5f87 gui=none
|
||||
hi StatusLineNC ctermfg=249 ctermbg=237 cterm=none guifg=#b2b2b2 guibg=#3a3a3a gui=none
|
||||
hi TabLine ctermfg=253 ctermbg=239 cterm=none guifg=#dadada guibg=#4e4e4e gui=none
|
||||
hi TabLineSel ctermfg=255 ctermbg=60 cterm=bold guifg=#eeeeee guibg=#5f5f87 gui=none
|
||||
hi TabLineFill ctermfg=249 ctermbg=237 cterm=none guifg=#b2b2b2 guibg=#3a3a3a gui=none
|
||||
hi VertSplit ctermfg=59 ctermbg=59 cterm=none guifg=#5f5f5f guibg=#5f5f5f gui=none
|
||||
hi LineNr ctermfg=241 ctermbg=232 cterm=none guifg=#606060 guibg=#080808 gui=none
|
||||
hi NonText ctermfg=236 ctermbg=none cterm=none guifg=#303030 guibg=NONE gui=none
|
||||
hi ErrorMsg ctermfg=234 ctermbg=214 cterm=bold guifg=#1c1c1c guibg=#ffaf00 gui=bold
|
||||
hi ModeMsg ctermfg=75 ctermbg=none cterm=bold guifg=#5fafff guibg=NONE gui=bold
|
||||
hi WarningMsg ctermfg=214 ctermbg=none cterm=none guifg=#ffaf00 guibg=NONE gui=none
|
||||
hi Title ctermfg=255 ctermbg=none cterm=bold guifg=#e0e0e0 guibg=NONE gui=bold
|
||||
hi Cursor ctermfg=none ctermbg=214 cterm=none guifg=#1c1c1c guibg=#ffaf00 gui=none
|
||||
hi CursorIM ctermfg=none ctermbg=214 cterm=none guifg=#1c1c1c guibg=#ffaf00 gui=none
|
||||
|
||||
hi CursorLine ctermfg=none ctermbg=235 cterm=none guifg=NONE guibg=#262626 gui=none
|
||||
hi CursorLineNr ctermfg=255 ctermbg=234 cterm=none guifg=#e0e0e0 guibg=#1c1c1c gui=none
|
||||
hi ColorColumn ctermfg=none ctermbg=236 cterm=none guifg=NONE guibg=#303030 gui=none
|
||||
hi MatchParen ctermfg=255 ctermbg=97 cterm=bold guifg=#e0e0e0 guibg=#875faf gui=bold
|
||||
hi Pmenu ctermfg=255 ctermbg=60 cterm=none guifg=#e0e0e0 guibg=#5f5f87 gui=none
|
||||
hi PmenuSel ctermfg=255 ctermbg=103 cterm=none guifg=#e0e0e0 guibg=#8787af gui=none
|
||||
hi PmenuSbar ctermfg=none ctermbg=240 cterm=none guifg=NONE guibg=#585858 gui=none
|
||||
hi PmenuThumb ctermfg=none ctermbg=110 cterm=none guifg=NONE guibg=#87afdf gui=none
|
||||
hi WildMenu ctermfg=234 ctermbg=214 cterm=none guifg=#1c1c1c guibg=#ffaf00 gui=none
|
||||
hi SpellBad ctermfg=255 ctermbg=161 cterm=undercurl guifg=#e0e0e0 guibg=#df005f gui=undercurl guisp=#e0e0e0
|
||||
hi SpellCap ctermfg=255 ctermbg=69 cterm=undercurl guifg=#e0e0e0 guibg=#5f87ff gui=undercurl guisp=#e0e0e0
|
||||
hi SpellRare ctermfg=255 ctermbg=61 cterm=undercurl guifg=#e0e0e0 guibg=#5f5faf gui=undercurl guisp=#e0e0e0
|
||||
hi SpellLocal ctermfg=255 ctermbg=59 cterm=undercurl guifg=#e0e0e0 guibg=#5f5f5f gui=undercurl guisp=#e0e0e0
|
||||
|
||||
" Diff highlighting
|
||||
hi DiffAdd ctermfg=234 ctermbg=111 cterm=none guifg=#1c1c1c guibg=#87afff gui=none
|
||||
hi DiffDelete ctermfg=234 ctermbg=68 cterm=none guifg=#1c1c1c guibg=#5f87df gui=none
|
||||
hi DiffChange ctermfg=234 ctermbg=60 cterm=none guifg=#1c1c1c guibg=#5f5f87 gui=none
|
||||
hi DiffText ctermfg=234 ctermbg=103 cterm=none guifg=#1c1c1c guibg=#8787af gui=none
|
||||
|
||||
" Syntax highlighting
|
||||
hi Comment ctermfg=59 ctermbg=none cterm=none guifg=#5f5f5f guibg=NONE gui=none
|
||||
hi Constant ctermfg=60 ctermbg=none cterm=none guifg=#5f5f87 guibg=NONE gui=none
|
||||
hi String ctermfg=147 ctermbg=none cterm=none guifg=#afafff guibg=NONE gui=none
|
||||
hi Number ctermfg=153 ctermbg=none cterm=none guifg=#afdfff guibg=NONE gui=none
|
||||
hi Identifier ctermfg=111 ctermbg=none cterm=none guifg=#87afff guibg=NONE gui=none
|
||||
hi Function ctermfg=75 ctermbg=none cterm=none guifg=#5fafff guibg=NONE gui=none
|
||||
hi Statement ctermfg=61 ctermbg=none cterm=none guifg=#5f5faf guibg=NONE gui=none
|
||||
hi Keyword ctermfg=75 ctermbg=none cterm=none guifg=#5fafff guibg=NONE gui=none
|
||||
hi PreProc ctermfg=153 ctermbg=none cterm=none guifg=#afdfff guibg=NONE gui=none
|
||||
hi Type ctermfg=69 ctermbg=none cterm=none guifg=#5f87ff guibg=NONE gui=none
|
||||
hi Special ctermfg=60 ctermbg=none cterm=bold guifg=#5f5f87 guibg=NONE gui=none
|
||||
hi Underlined ctermfg=75 ctermbg=none cterm=underline guifg=#5fafff guibg=NONE gui=underline
|
||||
hi Error ctermfg=234 ctermbg=161 cterm=bold guifg=#1c1c1c guibg=#df005f gui=none
|
||||
hi Todo ctermfg=234 ctermbg=147 cterm=bold guifg=#1c1c1c guibg=#afafff gui=none
|
||||
|
||||
" Links
|
||||
hi! link Boolean Constant
|
||||
hi! link SpecialChar Constant
|
||||
hi! link Directory Identifier
|
||||
hi! link Conceal Keyword
|
||||
hi! link VisualNOS Visual
|
||||
hi! link FoldColumn Folded
|
||||
hi! link CursorColumn CursorLine
|
||||
hi! link SpecialKey NonText
|
||||
hi! link MoreMsg ModeMsg
|
||||
hi! link Question Todo
|
||||
hi! link SignColumn Normal
|
892
config/vim/colors/one.vim
Normal file
892
config/vim/colors/one.vim
Normal file
|
@ -0,0 +1,892 @@
|
|||
" Name: one vim colorscheme
|
||||
" Author: Ramzi Akremi
|
||||
" License: MIT
|
||||
" Version: 1.1.1-pre
|
||||
|
||||
" Global setup =============================================================={{{
|
||||
|
||||
if exists("*<SID>X")
|
||||
delf <SID>X
|
||||
delf <SID>XAPI
|
||||
delf <SID>rgb
|
||||
delf <SID>color
|
||||
delf <SID>rgb_color
|
||||
delf <SID>rgb_level
|
||||
delf <SID>rgb_number
|
||||
delf <SID>grey_color
|
||||
delf <SID>grey_level
|
||||
delf <SID>grey_number
|
||||
endif
|
||||
|
||||
hi clear
|
||||
syntax reset
|
||||
if exists('g:colors_name')
|
||||
unlet g:colors_name
|
||||
endif
|
||||
let g:colors_name = 'one'
|
||||
|
||||
if !exists('g:one_allow_italics')
|
||||
let g:one_allow_italics = 0
|
||||
endif
|
||||
|
||||
let s:italic = ''
|
||||
if g:one_allow_italics == 1
|
||||
let s:italic = 'italic'
|
||||
endif
|
||||
|
||||
if has('gui_running') || has('termguicolors') || &t_Co == 88 || &t_Co == 256
|
||||
" functions
|
||||
" returns an approximate grey index for the given grey level
|
||||
|
||||
" Utility functions -------------------------------------------------------{{{
|
||||
fun <SID>grey_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 23
|
||||
return 0
|
||||
elseif a:x < 69
|
||||
return 1
|
||||
elseif a:x < 103
|
||||
return 2
|
||||
elseif a:x < 127
|
||||
return 3
|
||||
elseif a:x < 150
|
||||
return 4
|
||||
elseif a:x < 173
|
||||
return 5
|
||||
elseif a:x < 196
|
||||
return 6
|
||||
elseif a:x < 219
|
||||
return 7
|
||||
elseif a:x < 243
|
||||
return 8
|
||||
else
|
||||
return 9
|
||||
endif
|
||||
else
|
||||
if a:x < 14
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 8) / 10
|
||||
let l:m = (a:x - 8) % 10
|
||||
if l:m < 5
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual grey level represented by the grey index
|
||||
fun <SID>grey_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 46
|
||||
elseif a:n == 2
|
||||
return 92
|
||||
elseif a:n == 3
|
||||
return 115
|
||||
elseif a:n == 4
|
||||
return 139
|
||||
elseif a:n == 5
|
||||
return 162
|
||||
elseif a:n == 6
|
||||
return 185
|
||||
elseif a:n == 7
|
||||
return 208
|
||||
elseif a:n == 8
|
||||
return 231
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 8 + (a:n * 10)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given grey index
|
||||
fun <SID>grey_color(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 9
|
||||
return 79
|
||||
else
|
||||
return 79 + a:n
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 16
|
||||
elseif a:n == 25
|
||||
return 231
|
||||
else
|
||||
return 231 + a:n
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns an approximate color index for the given color level
|
||||
fun <SID>rgb_number(x)
|
||||
if &t_Co == 88
|
||||
if a:x < 69
|
||||
return 0
|
||||
elseif a:x < 172
|
||||
return 1
|
||||
elseif a:x < 230
|
||||
return 2
|
||||
else
|
||||
return 3
|
||||
endif
|
||||
else
|
||||
if a:x < 75
|
||||
return 0
|
||||
else
|
||||
let l:n = (a:x - 55) / 40
|
||||
let l:m = (a:x - 55) % 40
|
||||
if l:m < 20
|
||||
return l:n
|
||||
else
|
||||
return l:n + 1
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the actual color level for the given color index
|
||||
fun <SID>rgb_level(n)
|
||||
if &t_Co == 88
|
||||
if a:n == 0
|
||||
return 0
|
||||
elseif a:n == 1
|
||||
return 139
|
||||
elseif a:n == 2
|
||||
return 205
|
||||
else
|
||||
return 255
|
||||
endif
|
||||
else
|
||||
if a:n == 0
|
||||
return 0
|
||||
else
|
||||
return 55 + (a:n * 40)
|
||||
endif
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index for the given R/G/B color indices
|
||||
fun <SID>rgb_color(x, y, z)
|
||||
if &t_Co == 88
|
||||
return 16 + (a:x * 16) + (a:y * 4) + a:z
|
||||
else
|
||||
return 16 + (a:x * 36) + (a:y * 6) + a:z
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the given R/G/B color levels
|
||||
fun <SID>color(r, g, b)
|
||||
" get the closest grey
|
||||
let l:gx = <SID>grey_number(a:r)
|
||||
let l:gy = <SID>grey_number(a:g)
|
||||
let l:gz = <SID>grey_number(a:b)
|
||||
|
||||
" get the closest color
|
||||
let l:x = <SID>rgb_number(a:r)
|
||||
let l:y = <SID>rgb_number(a:g)
|
||||
let l:z = <SID>rgb_number(a:b)
|
||||
|
||||
if l:gx == l:gy && l:gy == l:gz
|
||||
" there are two possibilities
|
||||
let l:dgr = <SID>grey_level(l:gx) - a:r
|
||||
let l:dgg = <SID>grey_level(l:gy) - a:g
|
||||
let l:dgb = <SID>grey_level(l:gz) - a:b
|
||||
let l:dgrey = (l:dgr * l:dgr) + (l:dgg * l:dgg) + (l:dgb * l:dgb)
|
||||
let l:dr = <SID>rgb_level(l:gx) - a:r
|
||||
let l:dg = <SID>rgb_level(l:gy) - a:g
|
||||
let l:db = <SID>rgb_level(l:gz) - a:b
|
||||
let l:drgb = (l:dr * l:dr) + (l:dg * l:dg) + (l:db * l:db)
|
||||
if l:dgrey < l:drgb
|
||||
" use the grey
|
||||
return <SID>grey_color(l:gx)
|
||||
else
|
||||
" use the color
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
else
|
||||
" only one possibility
|
||||
return <SID>rgb_color(l:x, l:y, l:z)
|
||||
endif
|
||||
endfun
|
||||
|
||||
" returns the palette index to approximate the 'rrggbb' hex string
|
||||
fun <SID>rgb(rgb)
|
||||
let l:r = ('0x' . strpart(a:rgb, 0, 2)) + 0
|
||||
let l:g = ('0x' . strpart(a:rgb, 2, 2)) + 0
|
||||
let l:b = ('0x' . strpart(a:rgb, 4, 2)) + 0
|
||||
|
||||
return <SID>color(l:r, l:g, l:b)
|
||||
endfun
|
||||
|
||||
" sets the highlighting for the given group
|
||||
fun <SID>XAPI(group, fg, bg, attr)
|
||||
let l:attr = a:attr
|
||||
if g:one_allow_italics == 0 && l:attr ==? 'italic'
|
||||
let l:attr= 'none'
|
||||
endif
|
||||
|
||||
let l:bg = ""
|
||||
let l:fg = ""
|
||||
let l:decoration = ""
|
||||
|
||||
if a:bg != ''
|
||||
let l:bg = " guibg=#" . a:bg . " ctermbg=" . <SID>rgb(a:bg)
|
||||
endif
|
||||
|
||||
if a:fg != ''
|
||||
let l:fg = " guifg=#" . a:fg . " ctermfg=" . <SID>rgb(a:fg)
|
||||
endif
|
||||
|
||||
if a:attr != ''
|
||||
let l:decoration = " gui=" . l:attr . " cterm=" . l:attr
|
||||
endif
|
||||
|
||||
let l:exec = l:fg . l:bg . l:decoration
|
||||
|
||||
if l:exec != ''
|
||||
exec "hi " . a:group . l:exec
|
||||
endif
|
||||
|
||||
endfun
|
||||
|
||||
" Highlight function
|
||||
" the original one is borrowed from mhartington/oceanic-next
|
||||
function! <SID>X(group, fg, bg, attr, ...)
|
||||
let l:attrsp = get(a:, 1, "")
|
||||
" fg, bg, attr, attrsp
|
||||
if !empty(a:fg)
|
||||
exec "hi " . a:group . " guifg=" . a:fg[0]
|
||||
exec "hi " . a:group . " ctermfg=" . a:fg[1]
|
||||
endif
|
||||
if !empty(a:bg)
|
||||
exec "hi " . a:group . " guibg=" . a:bg[0]
|
||||
exec "hi " . a:group . " ctermbg=" . a:bg[1]
|
||||
endif
|
||||
if a:attr != ""
|
||||
exec "hi " . a:group . " gui=" . a:attr
|
||||
exec "hi " . a:group . " cterm=" . a:attr
|
||||
endif
|
||||
if !empty(l:attrsp)
|
||||
exec "hi " . a:group . " guisp=" . l:attrsp[0]
|
||||
endif
|
||||
endfunction
|
||||
|
||||
" }}}
|
||||
|
||||
|
||||
" Color definition --------------------------------------------------------{{{
|
||||
let s:dark = 0
|
||||
if &background ==# 'dark'
|
||||
let s:dark = 1
|
||||
let s:mono_1 = ['#abb2bf', '145']
|
||||
let s:mono_2 = ['#828997', '102']
|
||||
let s:mono_3 = ['#5c6370', '59']
|
||||
let s:mono_4 = ['#4b5263', '59']
|
||||
|
||||
let s:hue_1 = ['#56b6c2', '73'] " cyan
|
||||
let s:hue_2 = ['#61afef', '75'] " blue
|
||||
let s:hue_3 = ['#c678dd', '176'] " purple
|
||||
let s:hue_4 = ['#98c379', '114'] " green
|
||||
|
||||
let s:hue_5 = ['#e06c75', '168'] " red 1
|
||||
let s:hue_5_2 = ['#be5046', '130'] " red 2
|
||||
|
||||
let s:hue_6 = ['#d19a66', '173'] " orange 1
|
||||
let s:hue_6_2 = ['#e5c07b', '180'] " orange 2
|
||||
|
||||
let s:syntax_bg = ['#282c34', '16']
|
||||
let s:syntax_gutter = ['#636d83', '60']
|
||||
let s:syntax_cursor = ['#2c323c', '16']
|
||||
|
||||
let s:syntax_accent = ['#528bff', '69']
|
||||
|
||||
let s:vertsplit = ['#181a1f', '233']
|
||||
let s:special_grey = ['#3b4048', '16']
|
||||
let s:visual_grey = ['#3e4452', '17']
|
||||
let s:pmenu = ['#333841', '16']
|
||||
else
|
||||
let s:mono_1 = ['#494b53', '23']
|
||||
let s:mono_2 = ['#696c77', '60']
|
||||
let s:mono_3 = ['#a0a1a7', '145']
|
||||
let s:mono_4 = ['#c2c2c3', '250']
|
||||
|
||||
let s:hue_1 = ['#0184bc', '31'] " cyan
|
||||
let s:hue_2 = ['#4078f2', '33'] " blue
|
||||
let s:hue_3 = ['#a626a4', '127'] " purple
|
||||
let s:hue_4 = ['#50a14f', '71'] " green
|
||||
|
||||
let s:hue_5 = ['#e45649', '166'] " red 1
|
||||
let s:hue_5_2 = ['#ca1243', '160'] " red 2
|
||||
|
||||
let s:hue_6 = ['#986801', '94'] " orange 1
|
||||
let s:hue_6_2 = ['#c18401', '136'] " orange 2
|
||||
|
||||
let s:syntax_bg = ['#fafafa', '255']
|
||||
let s:syntax_gutter = ['#9e9e9e', '247']
|
||||
let s:syntax_cursor = ['#f0f0f0', '254']
|
||||
|
||||
let s:syntax_accent = ['#526fff', '63']
|
||||
let s:syntax_accent_2 = ['#0083be', '31']
|
||||
|
||||
let s:vertsplit = ['#e7e9e1', '188']
|
||||
let s:special_grey = ['#d3d3d3', '251']
|
||||
let s:visual_grey = ['#d0d0d0', '251']
|
||||
let s:pmenu = ['#dfdfdf', '253']
|
||||
endif
|
||||
|
||||
let s:syntax_fg = s:mono_1
|
||||
let s:syntax_fold_bg = s:mono_3
|
||||
|
||||
" }}}
|
||||
|
||||
" Vim editor color --------------------------------------------------------{{{
|
||||
call <sid>X('Normal', s:syntax_fg, s:syntax_bg, '')
|
||||
call <sid>X('bold', '', '', 'bold')
|
||||
call <sid>X('ColorColumn', '', s:syntax_cursor, '')
|
||||
call <sid>X('Conceal', s:mono_4, s:syntax_bg, '')
|
||||
call <sid>X('Cursor', '', s:syntax_accent, '')
|
||||
call <sid>X('CursorIM', '', '', '')
|
||||
call <sid>X('CursorColumn', '', s:syntax_cursor, '')
|
||||
call <sid>X('CursorLine', '', s:syntax_cursor, 'none')
|
||||
call <sid>X('Directory', s:hue_2, '', '')
|
||||
call <sid>X('ErrorMsg', s:hue_5, s:syntax_bg, 'none')
|
||||
call <sid>X('VertSplit', s:vertsplit, '', 'none')
|
||||
call <sid>X('Folded', s:syntax_bg, s:syntax_fold_bg, 'none')
|
||||
call <sid>X('FoldColumn', s:mono_3, s:syntax_cursor, '')
|
||||
call <sid>X('IncSearch', s:hue_6, '', '')
|
||||
call <sid>X('LineNr', s:mono_4, '', '')
|
||||
call <sid>X('CursorLineNr', s:syntax_fg, s:syntax_cursor, 'none')
|
||||
call <sid>X('MatchParen', s:hue_5, s:syntax_cursor, 'underline,bold')
|
||||
call <sid>X('Italic', '', '', s:italic)
|
||||
call <sid>X('ModeMsg', s:syntax_fg, '', '')
|
||||
call <sid>X('MoreMsg', s:syntax_fg, '', '')
|
||||
call <sid>X('NonText', s:mono_3, '', 'none')
|
||||
call <sid>X('PMenu', '', s:pmenu, '')
|
||||
call <sid>X('PMenuSel', '', s:mono_4, '')
|
||||
call <sid>X('PMenuSbar', '', s:syntax_bg, '')
|
||||
call <sid>X('PMenuThumb', '', s:mono_1, '')
|
||||
call <sid>X('Question', s:hue_2, '', '')
|
||||
call <sid>X('Search', s:syntax_bg, s:hue_6_2, '')
|
||||
call <sid>X('SpecialKey', s:special_grey, '', 'none')
|
||||
call <sid>X('Whitespace', s:special_grey, '', 'none')
|
||||
call <sid>X('StatusLine', s:syntax_fg, s:syntax_cursor, 'none')
|
||||
call <sid>X('StatusLineNC', s:mono_3, '', '')
|
||||
call <sid>X('TabLine', s:mono_1, s:syntax_bg, '')
|
||||
call <sid>X('TabLineFill', s:mono_3, s:visual_grey, 'none')
|
||||
call <sid>X('TabLineSel', s:syntax_bg, s:hue_2, '')
|
||||
call <sid>X('Title', s:syntax_fg, '', 'bold')
|
||||
call <sid>X('Visual', '', s:visual_grey, '')
|
||||
call <sid>X('VisualNOS', '', s:visual_grey, '')
|
||||
call <sid>X('WarningMsg', s:hue_5, '', '')
|
||||
call <sid>X('TooLong', s:hue_5, '', '')
|
||||
call <sid>X('WildMenu', s:syntax_fg, s:mono_3, '')
|
||||
call <sid>X('SignColumn', '', s:syntax_bg, '')
|
||||
call <sid>X('Special', s:hue_2, '', '')
|
||||
" }}}
|
||||
|
||||
" Vim Help highlighting ---------------------------------------------------{{{
|
||||
call <sid>X('helpCommand', s:hue_6_2, '', '')
|
||||
call <sid>X('helpExample', s:hue_6_2, '', '')
|
||||
call <sid>X('helpHeader', s:mono_1, '', 'bold')
|
||||
call <sid>X('helpSectionDelim', s:mono_3, '', '')
|
||||
" }}}
|
||||
|
||||
" Standard syntax highlighting --------------------------------------------{{{
|
||||
call <sid>X('Comment', s:mono_3, '', s:italic)
|
||||
call <sid>X('Constant', s:hue_4, '', '')
|
||||
call <sid>X('String', s:hue_4, '', '')
|
||||
call <sid>X('Character', s:hue_4, '', '')
|
||||
call <sid>X('Number', s:hue_6, '', '')
|
||||
call <sid>X('Boolean', s:hue_6, '', '')
|
||||
call <sid>X('Float', s:hue_6, '', '')
|
||||
call <sid>X('Identifier', s:hue_5, '', 'none')
|
||||
call <sid>X('Function', s:hue_2, '', '')
|
||||
call <sid>X('Statement', s:hue_3, '', 'none')
|
||||
call <sid>X('Conditional', s:hue_3, '', '')
|
||||
call <sid>X('Repeat', s:hue_3, '', '')
|
||||
call <sid>X('Label', s:hue_3, '', '')
|
||||
call <sid>X('Operator', s:syntax_accent, '', 'none')
|
||||
call <sid>X('Keyword', s:hue_5, '', '')
|
||||
call <sid>X('Exception', s:hue_3, '', '')
|
||||
call <sid>X('PreProc', s:hue_6_2, '', '')
|
||||
call <sid>X('Include', s:hue_2, '', '')
|
||||
call <sid>X('Define', s:hue_3, '', 'none')
|
||||
call <sid>X('Macro', s:hue_3, '', '')
|
||||
call <sid>X('PreCondit', s:hue_6_2, '', '')
|
||||
call <sid>X('Type', s:hue_6_2, '', 'none')
|
||||
call <sid>X('StorageClass', s:hue_6_2, '', '')
|
||||
call <sid>X('Structure', s:hue_6_2, '', '')
|
||||
call <sid>X('Typedef', s:hue_6_2, '', '')
|
||||
call <sid>X('Special', s:hue_2, '', '')
|
||||
call <sid>X('SpecialChar', '', '', '')
|
||||
call <sid>X('Tag', '', '', '')
|
||||
call <sid>X('Delimiter', '', '', '')
|
||||
call <sid>X('SpecialComment', '', '', '')
|
||||
call <sid>X('Debug', '', '', '')
|
||||
call <sid>X('Underlined', '', '', 'underline')
|
||||
call <sid>X('Ignore', '', '', '')
|
||||
call <sid>X('Error', s:hue_5, s:syntax_bg, 'bold')
|
||||
call <sid>X('Todo', s:hue_3, s:syntax_bg, '')
|
||||
" }}}
|
||||
|
||||
" Diff highlighting -------------------------------------------------------{{{
|
||||
call <sid>X('DiffAdd', s:hue_4, s:visual_grey, '')
|
||||
call <sid>X('DiffChange', s:hue_6, s:visual_grey, '')
|
||||
call <sid>X('DiffDelete', s:hue_5, s:visual_grey, '')
|
||||
call <sid>X('DiffText', s:hue_2, s:visual_grey, '')
|
||||
call <sid>X('DiffAdded', s:hue_4, s:visual_grey, '')
|
||||
call <sid>X('DiffFile', s:hue_5, s:visual_grey, '')
|
||||
call <sid>X('DiffNewFile', s:hue_4, s:visual_grey, '')
|
||||
call <sid>X('DiffLine', s:hue_2, s:visual_grey, '')
|
||||
call <sid>X('DiffRemoved', s:hue_5, s:visual_grey, '')
|
||||
" }}}
|
||||
|
||||
" Asciidoc highlighting ---------------------------------------------------{{{
|
||||
call <sid>X('asciidocListingBlock', s:mono_2, '', '')
|
||||
" }}}
|
||||
|
||||
" C/C++ highlighting ------------------------------------------------------{{{
|
||||
call <sid>X('cInclude', s:hue_3, '', '')
|
||||
call <sid>X('cPreCondit', s:hue_3, '', '')
|
||||
call <sid>X('cPreConditMatch', s:hue_3, '', '')
|
||||
|
||||
call <sid>X('cType', s:hue_3, '', '')
|
||||
call <sid>X('cStorageClass', s:hue_3, '', '')
|
||||
call <sid>X('cStructure', s:hue_3, '', '')
|
||||
call <sid>X('cOperator', s:hue_3, '', '')
|
||||
call <sid>X('cStatement', s:hue_3, '', '')
|
||||
call <sid>X('cTODO', s:hue_3, '', '')
|
||||
call <sid>X('cConstant', s:hue_6, '', '')
|
||||
call <sid>X('cSpecial', s:hue_1, '', '')
|
||||
call <sid>X('cSpecialCharacter', s:hue_1, '', '')
|
||||
call <sid>X('cString', s:hue_4, '', '')
|
||||
|
||||
call <sid>X('cppType', s:hue_3, '', '')
|
||||
call <sid>X('cppStorageClass', s:hue_3, '', '')
|
||||
call <sid>X('cppStructure', s:hue_3, '', '')
|
||||
call <sid>X('cppModifier', s:hue_3, '', '')
|
||||
call <sid>X('cppOperator', s:hue_3, '', '')
|
||||
call <sid>X('cppAccess', s:hue_3, '', '')
|
||||
call <sid>X('cppStatement', s:hue_3, '', '')
|
||||
call <sid>X('cppConstant', s:hue_5, '', '')
|
||||
call <sid>X('cCppString', s:hue_4, '', '')
|
||||
" }}}
|
||||
|
||||
" Cucumber highlighting ---------------------------------------------------{{{
|
||||
call <sid>X('cucumberGiven', s:hue_2, '', '')
|
||||
call <sid>X('cucumberWhen', s:hue_2, '', '')
|
||||
call <sid>X('cucumberWhenAnd', s:hue_2, '', '')
|
||||
call <sid>X('cucumberThen', s:hue_2, '', '')
|
||||
call <sid>X('cucumberThenAnd', s:hue_2, '', '')
|
||||
call <sid>X('cucumberUnparsed', s:hue_6, '', '')
|
||||
call <sid>X('cucumberFeature', s:hue_5, '', 'bold')
|
||||
call <sid>X('cucumberBackground', s:hue_3, '', 'bold')
|
||||
call <sid>X('cucumberScenario', s:hue_3, '', 'bold')
|
||||
call <sid>X('cucumberScenarioOutline', s:hue_3, '', 'bold')
|
||||
call <sid>X('cucumberTags', s:mono_3, '', 'bold')
|
||||
call <sid>X('cucumberDelimiter', s:mono_3, '', 'bold')
|
||||
" }}}
|
||||
|
||||
" CSS/Sass highlighting ---------------------------------------------------{{{
|
||||
call <sid>X('cssAttrComma', s:hue_3, '', '')
|
||||
call <sid>X('cssAttributeSelector', s:hue_4, '', '')
|
||||
call <sid>X('cssBraces', s:mono_2, '', '')
|
||||
call <sid>X('cssClassName', s:hue_6, '', '')
|
||||
call <sid>X('cssClassNameDot', s:hue_6, '', '')
|
||||
call <sid>X('cssDefinition', s:hue_3, '', '')
|
||||
call <sid>X('cssFontAttr', s:hue_6, '', '')
|
||||
call <sid>X('cssFontDescriptor', s:hue_3, '', '')
|
||||
call <sid>X('cssFunctionName', s:hue_2, '', '')
|
||||
call <sid>X('cssIdentifier', s:hue_2, '', '')
|
||||
call <sid>X('cssImportant', s:hue_3, '', '')
|
||||
call <sid>X('cssInclude', s:mono_1, '', '')
|
||||
call <sid>X('cssIncludeKeyword', s:hue_3, '', '')
|
||||
call <sid>X('cssMediaType', s:hue_6, '', '')
|
||||
call <sid>X('cssProp', s:hue_1, '', '')
|
||||
call <sid>X('cssPseudoClassId', s:hue_6, '', '')
|
||||
call <sid>X('cssSelectorOp', s:hue_3, '', '')
|
||||
call <sid>X('cssSelectorOp2', s:hue_3, '', '')
|
||||
call <sid>X('cssStringQ', s:hue_4, '', '')
|
||||
call <sid>X('cssStringQQ', s:hue_4, '', '')
|
||||
call <sid>X('cssTagName', s:hue_5, '', '')
|
||||
call <sid>X('cssAttr', s:hue_6, '', '')
|
||||
|
||||
call <sid>X('sassAmpersand', s:hue_5, '', '')
|
||||
call <sid>X('sassClass', s:hue_6_2, '', '')
|
||||
call <sid>X('sassControl', s:hue_3, '', '')
|
||||
call <sid>X('sassExtend', s:hue_3, '', '')
|
||||
call <sid>X('sassFor', s:mono_1, '', '')
|
||||
call <sid>X('sassProperty', s:hue_1, '', '')
|
||||
call <sid>X('sassFunction', s:hue_1, '', '')
|
||||
call <sid>X('sassId', s:hue_2, '', '')
|
||||
call <sid>X('sassInclude', s:hue_3, '', '')
|
||||
call <sid>X('sassMedia', s:hue_3, '', '')
|
||||
call <sid>X('sassMediaOperators', s:mono_1, '', '')
|
||||
call <sid>X('sassMixin', s:hue_3, '', '')
|
||||
call <sid>X('sassMixinName', s:hue_2, '', '')
|
||||
call <sid>X('sassMixing', s:hue_3, '', '')
|
||||
|
||||
call <sid>X('scssSelectorName', s:hue_6_2, '', '')
|
||||
" }}}
|
||||
|
||||
" Elixir highlighting------------------------------------------------------{{{
|
||||
hi link elixirModuleDefine Define
|
||||
call <sid>X('elixirAlias', s:hue_6_2, '', '')
|
||||
call <sid>X('elixirAtom', s:hue_1, '', '')
|
||||
call <sid>X('elixirBlockDefinition', s:hue_3, '', '')
|
||||
call <sid>X('elixirModuleDeclaration', s:hue_6, '', '')
|
||||
call <sid>X('elixirInclude', s:hue_5, '', '')
|
||||
call <sid>X('elixirOperator', s:hue_6, '', '')
|
||||
" }}}
|
||||
|
||||
" Git and git related plugins highlighting --------------------------------{{{
|
||||
call <sid>X('gitcommitComment', s:mono_3, '', '')
|
||||
call <sid>X('gitcommitUnmerged', s:hue_4, '', '')
|
||||
call <sid>X('gitcommitOnBranch', '', '', '')
|
||||
call <sid>X('gitcommitBranch', s:hue_3, '', '')
|
||||
call <sid>X('gitcommitDiscardedType', s:hue_5, '', '')
|
||||
call <sid>X('gitcommitSelectedType', s:hue_4, '', '')
|
||||
call <sid>X('gitcommitHeader', '', '', '')
|
||||
call <sid>X('gitcommitUntrackedFile', s:hue_1, '', '')
|
||||
call <sid>X('gitcommitDiscardedFile', s:hue_5, '', '')
|
||||
call <sid>X('gitcommitSelectedFile', s:hue_4, '', '')
|
||||
call <sid>X('gitcommitUnmergedFile', s:hue_6_2, '', '')
|
||||
call <sid>X('gitcommitFile', '', '', '')
|
||||
hi link gitcommitNoBranch gitcommitBranch
|
||||
hi link gitcommitUntracked gitcommitComment
|
||||
hi link gitcommitDiscarded gitcommitComment
|
||||
hi link gitcommitSelected gitcommitComment
|
||||
hi link gitcommitDiscardedArrow gitcommitDiscardedFile
|
||||
hi link gitcommitSelectedArrow gitcommitSelectedFile
|
||||
hi link gitcommitUnmergedArrow gitcommitUnmergedFile
|
||||
|
||||
call <sid>X('SignifySignAdd', s:hue_4, '', '')
|
||||
call <sid>X('SignifySignChange', s:hue_6_2, '', '')
|
||||
call <sid>X('SignifySignDelete', s:hue_5, '', '')
|
||||
hi link GitGutterAdd SignifySignAdd
|
||||
hi link GitGutterChange SignifySignChange
|
||||
hi link GitGutterDelete SignifySignDelete
|
||||
call <sid>X('diffAdded', s:hue_4, '', '')
|
||||
call <sid>X('diffRemoved', s:hue_5, '', '')
|
||||
" }}}
|
||||
|
||||
" Go highlighting ---------------------------------------------------------{{{
|
||||
call <sid>X('goDeclaration', s:hue_3, '', '')
|
||||
call <sid>X('goField', s:hue_5, '', '')
|
||||
call <sid>X('goMethod', s:hue_1, '', '')
|
||||
call <sid>X('goType', s:hue_3, '', '')
|
||||
call <sid>X('goUnsignedInts', s:hue_1, '', '')
|
||||
" }}}
|
||||
|
||||
" Haskell highlighting ----------------------------------------------------{{{
|
||||
call <sid>X('haskellDeclKeyword', s:hue_2, '', '')
|
||||
call <sid>X('haskellType', s:hue_4, '', '')
|
||||
call <sid>X('haskellWhere', s:hue_5, '', '')
|
||||
call <sid>X('haskellImportKeywords', s:hue_2, '', '')
|
||||
call <sid>X('haskellOperators', s:hue_5, '', '')
|
||||
call <sid>X('haskellDelimiter', s:hue_2, '', '')
|
||||
call <sid>X('haskellIdentifier', s:hue_6, '', '')
|
||||
call <sid>X('haskellKeyword', s:hue_5, '', '')
|
||||
call <sid>X('haskellNumber', s:hue_1, '', '')
|
||||
call <sid>X('haskellString', s:hue_1, '', '')
|
||||
"}}}
|
||||
|
||||
" HTML highlighting -------------------------------------------------------{{{
|
||||
call <sid>X('htmlArg', s:hue_6, '', '')
|
||||
call <sid>X('htmlTagName', s:hue_5, '', '')
|
||||
call <sid>X('htmlTagN', s:hue_5, '', '')
|
||||
call <sid>X('htmlSpecialTagName', s:hue_5, '', '')
|
||||
call <sid>X('htmlTag', s:mono_2, '', '')
|
||||
call <sid>X('htmlEndTag', s:mono_2, '', '')
|
||||
|
||||
call <sid>X('MatchTag', s:hue_5, s:syntax_cursor, 'underline,bold')
|
||||
" }}}
|
||||
|
||||
" JavaScript highlighting -------------------------------------------------{{{
|
||||
call <sid>X('coffeeString', s:hue_4, '', '')
|
||||
|
||||
call <sid>X('javaScriptBraces', s:mono_2, '', '')
|
||||
call <sid>X('javaScriptFunction', s:hue_3, '', '')
|
||||
call <sid>X('javaScriptIdentifier', s:hue_3, '', '')
|
||||
call <sid>X('javaScriptNull', s:hue_6, '', '')
|
||||
call <sid>X('javaScriptNumber', s:hue_6, '', '')
|
||||
call <sid>X('javaScriptRequire', s:hue_1, '', '')
|
||||
call <sid>X('javaScriptReserved', s:hue_3, '', '')
|
||||
" https://github.com/pangloss/vim-javascript
|
||||
call <sid>X('jsArrowFunction', s:hue_3, '', '')
|
||||
call <sid>X('jsBraces', s:mono_2, '', '')
|
||||
call <sid>X('jsClassBraces', s:mono_2, '', '')
|
||||
call <sid>X('jsClassKeywords', s:hue_3, '', '')
|
||||
call <sid>X('jsDocParam', s:hue_2, '', '')
|
||||
call <sid>X('jsDocTags', s:hue_3, '', '')
|
||||
call <sid>X('jsFuncBraces', s:mono_2, '', '')
|
||||
call <sid>X('jsFuncCall', s:hue_2, '', '')
|
||||
call <sid>X('jsFuncParens', s:mono_2, '', '')
|
||||
call <sid>X('jsFunction', s:hue_3, '', '')
|
||||
call <sid>X('jsGlobalObjects', s:hue_6_2, '', '')
|
||||
call <sid>X('jsModuleWords', s:hue_3, '', '')
|
||||
call <sid>X('jsModules', s:hue_3, '', '')
|
||||
call <sid>X('jsNoise', s:mono_2, '', '')
|
||||
call <sid>X('jsNull', s:hue_6, '', '')
|
||||
call <sid>X('jsOperator', s:hue_3, '', '')
|
||||
call <sid>X('jsParens', s:mono_2, '', '')
|
||||
call <sid>X('jsStorageClass', s:hue_3, '', '')
|
||||
call <sid>X('jsTemplateBraces', s:hue_5_2, '', '')
|
||||
call <sid>X('jsTemplateVar', s:hue_4, '', '')
|
||||
call <sid>X('jsThis', s:hue_5, '', '')
|
||||
call <sid>X('jsUndefined', s:hue_6, '', '')
|
||||
call <sid>X('jsObjectValue', s:hue_2, '', '')
|
||||
call <sid>X('jsObjectKey', s:hue_1, '', '')
|
||||
call <sid>X('jsReturn', s:hue_3, '', '')
|
||||
" https://github.com/othree/yajs.vim
|
||||
call <sid>X('javascriptArrowFunc', s:hue_3, '', '')
|
||||
call <sid>X('javascriptClassExtends', s:hue_3, '', '')
|
||||
call <sid>X('javascriptClassKeyword', s:hue_3, '', '')
|
||||
call <sid>X('javascriptDocNotation', s:hue_3, '', '')
|
||||
call <sid>X('javascriptDocParamName', s:hue_2, '', '')
|
||||
call <sid>X('javascriptDocTags', s:hue_3, '', '')
|
||||
call <sid>X('javascriptEndColons', s:mono_3, '', '')
|
||||
call <sid>X('javascriptExport', s:hue_3, '', '')
|
||||
call <sid>X('javascriptFuncArg', s:mono_1, '', '')
|
||||
call <sid>X('javascriptFuncKeyword', s:hue_3, '', '')
|
||||
call <sid>X('javascriptIdentifier', s:hue_5, '', '')
|
||||
call <sid>X('javascriptImport', s:hue_3, '', '')
|
||||
call <sid>X('javascriptObjectLabel', s:mono_1, '', '')
|
||||
call <sid>X('javascriptOpSymbol', s:hue_1, '', '')
|
||||
call <sid>X('javascriptOpSymbols', s:hue_1, '', '')
|
||||
call <sid>X('javascriptPropertyName', s:hue_4, '', '')
|
||||
call <sid>X('javascriptTemplateSB', s:hue_5_2, '', '')
|
||||
call <sid>X('javascriptVariable', s:hue_3, '', '')
|
||||
" }}}
|
||||
|
||||
" JSON highlighting -------------------------------------------------------{{{
|
||||
call <sid>X('jsonCommentError', s:mono_1, '', '' )
|
||||
call <sid>X('jsonKeyword', s:hue_5, '', '' )
|
||||
call <sid>X('jsonQuote', s:mono_3, '', '' )
|
||||
call <sid>X('jsonTrailingCommaError', s:hue_5, '', 'reverse' )
|
||||
call <sid>X('jsonMissingCommaError', s:hue_5, '', 'reverse' )
|
||||
call <sid>X('jsonNoQuotesError', s:hue_5, '', 'reverse' )
|
||||
call <sid>X('jsonNumError', s:hue_5, '', 'reverse' )
|
||||
call <sid>X('jsonString', s:hue_4, '', '' )
|
||||
call <sid>X('jsonBoolean', s:hue_3, '', '' )
|
||||
call <sid>X('jsonNumber', s:hue_6, '', '' )
|
||||
call <sid>X('jsonStringSQError', s:hue_5, '', 'reverse' )
|
||||
call <sid>X('jsonSemicolonError', s:hue_5, '', 'reverse' )
|
||||
" }}}
|
||||
|
||||
" Markdown highlighting ---------------------------------------------------{{{
|
||||
call <sid>X('markdownUrl', s:mono_3, '', '')
|
||||
call <sid>X('markdownBold', s:hue_6, '', 'bold')
|
||||
call <sid>X('markdownItalic', s:hue_6, '', 'bold')
|
||||
call <sid>X('markdownCode', s:hue_4, '', '')
|
||||
call <sid>X('markdownCodeBlock', s:hue_5, '', '')
|
||||
call <sid>X('markdownCodeDelimiter', s:hue_4, '', '')
|
||||
call <sid>X('markdownHeadingDelimiter', s:hue_5_2, '', '')
|
||||
call <sid>X('markdownH1', s:hue_5, '', '')
|
||||
call <sid>X('markdownH2', s:hue_5, '', '')
|
||||
call <sid>X('markdownH3', s:hue_5, '', '')
|
||||
call <sid>X('markdownH3', s:hue_5, '', '')
|
||||
call <sid>X('markdownH4', s:hue_5, '', '')
|
||||
call <sid>X('markdownH5', s:hue_5, '', '')
|
||||
call <sid>X('markdownH6', s:hue_5, '', '')
|
||||
call <sid>X('markdownListMarker', s:hue_5, '', '')
|
||||
" }}}
|
||||
|
||||
" PHP highlighting --------------------------------------------------------{{{
|
||||
call <sid>X('phpClass', s:hue_6_2, '', '')
|
||||
call <sid>X('phpFunction', s:hue_2, '', '')
|
||||
call <sid>X('phpFunctions', s:hue_2, '', '')
|
||||
call <sid>X('phpInclude', s:hue_3, '', '')
|
||||
call <sid>X('phpKeyword', s:hue_3, '', '')
|
||||
call <sid>X('phpParent', s:mono_3, '', '')
|
||||
call <sid>X('phpType', s:hue_3, '', '')
|
||||
call <sid>X('phpSuperGlobals', s:hue_5, '', '')
|
||||
" }}}
|
||||
|
||||
" Pug (Formerly Jade) highlighting ----------------------------------------{{{
|
||||
call <sid>X('pugAttributesDelimiter', s:hue_6, '', '')
|
||||
call <sid>X('pugClass', s:hue_6, '', '')
|
||||
call <sid>X('pugDocType', s:mono_3, '', s:italic)
|
||||
call <sid>X('pugTag', s:hue_5, '', '')
|
||||
" }}}
|
||||
|
||||
" PureScript highlighting -------------------------------------------------{{{
|
||||
call <sid>X('purescriptKeyword', s:hue_3, '', '')
|
||||
call <sid>X('purescriptModuleName', s:syntax_fg, '', '')
|
||||
call <sid>X('purescriptIdentifier', s:syntax_fg, '', '')
|
||||
call <sid>X('purescriptType', s:hue_6_2, '', '')
|
||||
call <sid>X('purescriptTypeVar', s:hue_5, '', '')
|
||||
call <sid>X('purescriptConstructor', s:hue_5, '', '')
|
||||
call <sid>X('purescriptOperator', s:syntax_fg, '', '')
|
||||
" }}}
|
||||
|
||||
" Python highlighting -----------------------------------------------------{{{
|
||||
call <sid>X('pythonImport', s:hue_3, '', '')
|
||||
call <sid>X('pythonBuiltin', s:hue_1, '', '')
|
||||
call <sid>X('pythonStatement', s:hue_3, '', '')
|
||||
call <sid>X('pythonParam', s:hue_6, '', '')
|
||||
call <sid>X('pythonEscape', s:hue_5, '', '')
|
||||
call <sid>X('pythonSelf', s:mono_2, '', s:italic)
|
||||
call <sid>X('pythonClass', s:hue_2, '', '')
|
||||
call <sid>X('pythonOperator', s:hue_3, '', '')
|
||||
call <sid>X('pythonEscape', s:hue_5, '', '')
|
||||
call <sid>X('pythonFunction', s:hue_2, '', '')
|
||||
call <sid>X('pythonKeyword', s:hue_2, '', '')
|
||||
call <sid>X('pythonModule', s:hue_3, '', '')
|
||||
call <sid>X('pythonStringDelimiter', s:hue_4, '', '')
|
||||
call <sid>X('pythonSymbol', s:hue_1, '', '')
|
||||
" }}}
|
||||
|
||||
" Ruby highlighting -------------------------------------------------------{{{
|
||||
call <sid>X('rubyBlock', s:hue_3, '', '')
|
||||
call <sid>X('rubyBlockParameter', s:hue_5, '', '')
|
||||
call <sid>X('rubyBlockParameterList', s:hue_5, '', '')
|
||||
call <sid>X('rubyCapitalizedMethod', s:hue_3, '', '')
|
||||
call <sid>X('rubyClass', s:hue_3, '', '')
|
||||
call <sid>X('rubyConstant', s:hue_6_2, '', '')
|
||||
call <sid>X('rubyControl', s:hue_3, '', '')
|
||||
call <sid>X('rubyDefine', s:hue_3, '', '')
|
||||
call <sid>X('rubyEscape', s:hue_5, '', '')
|
||||
call <sid>X('rubyFunction', s:hue_2, '', '')
|
||||
call <sid>X('rubyGlobalVariable', s:hue_5, '', '')
|
||||
call <sid>X('rubyInclude', s:hue_2, '', '')
|
||||
call <sid>X('rubyIncluderubyGlobalVariable', s:hue_5, '', '')
|
||||
call <sid>X('rubyInstanceVariable', s:hue_5, '', '')
|
||||
call <sid>X('rubyInterpolation', s:hue_1, '', '')
|
||||
call <sid>X('rubyInterpolationDelimiter', s:hue_5, '', '')
|
||||
call <sid>X('rubyKeyword', s:hue_2, '', '')
|
||||
call <sid>X('rubyModule', s:hue_3, '', '')
|
||||
call <sid>X('rubyPseudoVariable', s:hue_5, '', '')
|
||||
call <sid>X('rubyRegexp', s:hue_1, '', '')
|
||||
call <sid>X('rubyRegexpDelimiter', s:hue_1, '', '')
|
||||
call <sid>X('rubyStringDelimiter', s:hue_4, '', '')
|
||||
call <sid>X('rubySymbol', s:hue_1, '', '')
|
||||
" }}}
|
||||
|
||||
" Spelling highlighting ---------------------------------------------------{{{
|
||||
call <sid>X('SpellBad', '', s:syntax_bg, 'undercurl')
|
||||
call <sid>X('SpellLocal', '', s:syntax_bg, 'undercurl')
|
||||
call <sid>X('SpellCap', '', s:syntax_bg, 'undercurl')
|
||||
call <sid>X('SpellRare', '', s:syntax_bg, 'undercurl')
|
||||
" }}}
|
||||
|
||||
" Vim highlighting --------------------------------------------------------{{{
|
||||
call <sid>X('vimCommand', s:hue_3, '', '')
|
||||
call <sid>X('vimCommentTitle', s:mono_3, '', 'bold')
|
||||
call <sid>X('vimFunction', s:hue_1, '', '')
|
||||
call <sid>X('vimFuncName', s:hue_3, '', '')
|
||||
call <sid>X('vimHighlight', s:hue_2, '', '')
|
||||
call <sid>X('vimLineComment', s:mono_3, '', s:italic)
|
||||
call <sid>X('vimParenSep', s:mono_2, '', '')
|
||||
call <sid>X('vimSep', s:mono_2, '', '')
|
||||
call <sid>X('vimUserFunc', s:hue_1, '', '')
|
||||
call <sid>X('vimVar', s:hue_5, '', '')
|
||||
" }}}
|
||||
|
||||
" XML highlighting --------------------------------------------------------{{{
|
||||
call <sid>X('xmlAttrib', s:hue_6_2, '', '')
|
||||
call <sid>X('xmlEndTag', s:hue_5, '', '')
|
||||
call <sid>X('xmlTag', s:hue_5, '', '')
|
||||
call <sid>X('xmlTagName', s:hue_5, '', '')
|
||||
" }}}
|
||||
|
||||
" ZSH highlighting --------------------------------------------------------{{{
|
||||
call <sid>X('zshCommands', s:syntax_fg, '', '')
|
||||
call <sid>X('zshDeref', s:hue_5, '', '')
|
||||
call <sid>X('zshShortDeref', s:hue_5, '', '')
|
||||
call <sid>X('zshFunction', s:hue_1, '', '')
|
||||
call <sid>X('zshKeyword', s:hue_3, '', '')
|
||||
call <sid>X('zshSubst', s:hue_5, '', '')
|
||||
call <sid>X('zshSubstDelim', s:mono_3, '', '')
|
||||
call <sid>X('zshTypes', s:hue_3, '', '')
|
||||
call <sid>X('zshVariableDef', s:hue_6, '', '')
|
||||
" }}}
|
||||
|
||||
" Rust highlighting -------------------------------------------------------{{{
|
||||
call <sid>X('rustExternCrate', s:hue_5, '', 'bold')
|
||||
call <sid>X('rustIdentifier', s:hue_2, '', '')
|
||||
call <sid>X('rustDeriveTrait', s:hue_4, '', '')
|
||||
call <sid>X('SpecialComment', s:mono_3, '', '')
|
||||
call <sid>X('rustCommentLine', s:mono_3, '', '')
|
||||
call <sid>X('rustCommentLineDoc', s:mono_3, '', '')
|
||||
call <sid>X('rustCommentLineDocError', s:mono_3, '', '')
|
||||
call <sid>X('rustCommentBlock', s:mono_3, '', '')
|
||||
call <sid>X('rustCommentBlockDoc', s:mono_3, '', '')
|
||||
call <sid>X('rustCommentBlockDocError', s:mono_3, '', '')
|
||||
" }}}
|
||||
|
||||
" man highlighting --------------------------------------------------------{{{
|
||||
hi link manTitle String
|
||||
call <sid>X('manFooter', s:mono_3, '', '')
|
||||
" }}}
|
||||
|
||||
" ALE (Asynchronous Lint Engine) highlighting -----------------------------{{{
|
||||
call <sid>X('ALEWarningSign', s:hue_6_2, '', '')
|
||||
call <sid>X('ALEErrorSign', s:hue_5, '', '')
|
||||
|
||||
|
||||
" Neovim NERDTree Background fix ------------------------------------------{{{
|
||||
call <sid>X('NERDTreeFile', s:syntax_fg, '', '')
|
||||
" }}}
|
||||
|
||||
" Neovim Terminal Colors --------------------------------------------------{{{
|
||||
if has('nvim')
|
||||
let g:terminal_color_0 = "#353a44"
|
||||
let g:terminal_color_8 = "#353a44"
|
||||
let g:terminal_color_1 = "#e88388"
|
||||
let g:terminal_color_9 = "#e88388"
|
||||
let g:terminal_color_2 = "#a7cc8c"
|
||||
let g:terminal_color_10 = "#a7cc8c"
|
||||
let g:terminal_color_3 = "#ebca8d"
|
||||
let g:terminal_color_11 = "#ebca8d"
|
||||
let g:terminal_color_4 = "#72bef2"
|
||||
let g:terminal_color_12 = "#72bef2"
|
||||
let g:terminal_color_5 = "#d291e4"
|
||||
let g:terminal_color_13 = "#d291e4"
|
||||
let g:terminal_color_6 = "#65c2cd"
|
||||
let g:terminal_color_14 = "#65c2cd"
|
||||
let g:terminal_color_7 = "#e3e5e9"
|
||||
let g:terminal_color_15 = "#e3e5e9"
|
||||
endif
|
||||
|
||||
" Delete functions =========================================================={{{
|
||||
" delf <SID>X
|
||||
" delf <SID>XAPI
|
||||
" delf <SID>rgb
|
||||
" delf <SID>color
|
||||
" delf <SID>rgb_color
|
||||
" delf <SID>rgb_level
|
||||
" delf <SID>rgb_number
|
||||
" delf <SID>grey_color
|
||||
" delf <SID>grey_level
|
||||
" delf <SID>grey_number
|
||||
" }}}
|
||||
|
||||
endif
|
||||
"}}}
|
||||
|
||||
" Public API --------------------------------------------------------------{{{
|
||||
function! one#highlight(group, fg, bg, attr)
|
||||
call <sid>XAPI(a:group, a:fg, a:bg, a:attr)
|
||||
endfunction
|
||||
"}}}
|
||||
|
||||
if exists('s:dark') && s:dark
|
||||
set background=dark
|
||||
endif
|
||||
|
||||
" vim: set fdl=0 fdm=marker:
|
1
config/vim/ftdetect/gomod.vim
Normal file
1
config/vim/ftdetect/gomod.vim
Normal file
|
@ -0,0 +1 @@
|
|||
autocmd BufNewFile,BufRead *go.mod setlocal filetype=gomod
|
140
config/vim/plugin/lf.vim
Normal file
140
config/vim/plugin/lf.vim
Normal file
|
@ -0,0 +1,140 @@
|
|||
" Copyright (c) 2015 François Cabrol
|
||||
"
|
||||
" MIT License
|
||||
"
|
||||
" 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.
|
||||
|
||||
|
||||
" ================ Lf =======================
|
||||
let s:default_edit_cmd='edit '
|
||||
|
||||
let s:choice_file_path = tempname()
|
||||
|
||||
if exists('g:lf_command_override')
|
||||
let s:lf_command = g:lf_command_override
|
||||
else
|
||||
let s:lf_command = 'lf'
|
||||
endif
|
||||
|
||||
function! OpenLfIn(path, edit_cmd)
|
||||
let oldguioptions = &guioptions
|
||||
let s:oldlaststatus = &laststatus
|
||||
let s:oldshowmode = &showmode
|
||||
let s:oldrelativenumber = &relativenumber
|
||||
try
|
||||
if has('nvim')
|
||||
set laststatus=0
|
||||
set noshowmode norelativenumber
|
||||
let currentPath = expand(a:path)
|
||||
let lfCallback = { 'name': 'lf', 'edit_cmd': a:edit_cmd }
|
||||
function! lfCallback.on_exit(job_id, code, event)
|
||||
if a:code == 0
|
||||
if exists(":Bdelete")
|
||||
silent! Bdelete!
|
||||
else
|
||||
echoerr "Failed to close buffer, make sure the `moll/vim-bbye` plugin is installed"
|
||||
endif
|
||||
endif
|
||||
try
|
||||
if filereadable(s:choice_file_path)
|
||||
for f in readfile(s:choice_file_path)
|
||||
exec self.edit_cmd . f
|
||||
endfor
|
||||
call delete(s:choice_file_path)
|
||||
endif
|
||||
endtry
|
||||
let &laststatus=s:oldlaststatus
|
||||
let &showmode=s:oldshowmode
|
||||
let &relativenumber=s:oldrelativenumber
|
||||
endfunction
|
||||
enew
|
||||
call termopen(s:lf_command . ' -selection-path=' . s:choice_file_path . ' "' . currentPath . '"', lfCallback)
|
||||
startinsert
|
||||
else
|
||||
set guioptions+=! " Make it work with MacVim
|
||||
let currentPath = expand(a:path) != "" ? expand(a:path) : getcwd()
|
||||
silent exec '!' . s:lf_command . ' -selection-path=' . s:choice_file_path . ' "' . currentPath . '"'
|
||||
if filereadable(s:choice_file_path)
|
||||
for f in readfile(s:choice_file_path)
|
||||
exec a:edit_cmd . f
|
||||
endfor
|
||||
call delete(s:choice_file_path)
|
||||
endif
|
||||
redraw!
|
||||
" reset the filetype to fix the issue that happens
|
||||
" when opening lf on VimEnter (with `vim .`)
|
||||
filetype detect
|
||||
endif
|
||||
endtry
|
||||
let &guioptions=oldguioptions
|
||||
endfun
|
||||
|
||||
command! LfCurrentFile call OpenLfIn("%", s:default_edit_cmd)
|
||||
command! LfCurrentDirectory call OpenLfIn("%:p:h", s:default_edit_cmd)
|
||||
command! LfWorkingDirectory call OpenLfIn(".", s:default_edit_cmd)
|
||||
command! Lf LfCurrentFile
|
||||
|
||||
" To open the selected file in a new tab
|
||||
command! LfCurrentFileNewTab call OpenLfIn("%", 'tabedit ')
|
||||
command! LfCurrentFileExistingOrNewTab call OpenLfIn("%", 'tab drop ')
|
||||
command! LfCurrentDirectoryNewTab call OpenLfIn("%:p:h", 'tabedit ')
|
||||
command! LfCurrentDirectoryExistingOrNewTab call OpenLfIn("%:p:h", 'tab drop ')
|
||||
command! LfWorkingDirectoryNewTab call OpenLfIn(".", 'tabedit ')
|
||||
command! LfWorkingDirectoryExistingOrNewTab call OpenLfIn(".", 'tab drop ')
|
||||
command! LfNewTab LfCurrentDirectoryNewTab
|
||||
|
||||
" To open the selected file in a new split, vertical split or tab
|
||||
command! LfChooser call OpenLfIn("%", 'edit ')
|
||||
command! LfChooserSplit call OpenLfIn("%", 'split ')
|
||||
command! LfChooserVsplit call OpenLfIn("%", 'vsplit ')
|
||||
command! LfChooserTab call OpenLfIn("%", 'tabedit ')
|
||||
|
||||
command! Lfsp LfChooserSplit
|
||||
command! Lfvsp LfChooserVsplit
|
||||
command! Lftab LfChooserTab
|
||||
|
||||
" For retro-compatibility
|
||||
function! OpenLf()
|
||||
Lf
|
||||
endfunction
|
||||
|
||||
" Open Lf in the directory passed by argument
|
||||
function! OpenLfOnVimLoadDir(argv_path)
|
||||
let path = expand(a:argv_path)
|
||||
|
||||
" Delete empty buffer created by vim
|
||||
Bdelete!
|
||||
|
||||
" Open Lf
|
||||
call OpenLfIn(path, s:default_edit_cmd)
|
||||
endfunction
|
||||
|
||||
" To open lf when vim load a directory
|
||||
if exists('g:lf_replace_netrw') && g:lf_replace_netrw
|
||||
augroup ReplaceNetrwByLfVim
|
||||
autocmd VimEnter * silent! autocmd! FileExplorer
|
||||
autocmd BufEnter * if isdirectory(expand("%")) | call OpenLfOnVimLoadDir("%") | endif
|
||||
augroup END
|
||||
endif
|
||||
|
||||
map <leader>ll :LfChooser<CR>
|
||||
map <leader>ls :LfChooserSplit<CR>
|
||||
map <leader>lv :LfChooserVsplit<CR>
|
||||
map <leader>lt :LfChooserTab<CR>
|
38
config/vim/plugin/statusline.vim
Normal file
38
config/vim/plugin/statusline.vim
Normal file
|
@ -0,0 +1,38 @@
|
|||
let g:currentmode={
|
||||
\ 'n' : 'Normal',
|
||||
\ 'no' : 'Normal·Operator Pending',
|
||||
\ 'v' : 'Visual',
|
||||
\ 'V' : 'Visual (Line)',
|
||||
\ "\<c-v>" : 'Visual (Block)',
|
||||
\ 's' : 'Select',
|
||||
\ 'S' : 'Select (Line)',
|
||||
\ "\<c-s>" : 'Select (Block)',
|
||||
\ 'i' : 'Insert',
|
||||
\ 'R' : 'Replace',
|
||||
\ 'Rv' : 'V·Replace',
|
||||
\ 'c' : 'Command',
|
||||
\ 'cv' : 'Vim Ex',
|
||||
\ 'ce' : 'Ex',
|
||||
\ 'r' : 'Prompt',
|
||||
\ 'rm' : 'More',
|
||||
\ 'r?' : 'Confirm',
|
||||
\ '!' : 'Shell',
|
||||
\ 't' : 'Terminal'
|
||||
\}
|
||||
|
||||
set laststatus=2
|
||||
set showmode
|
||||
|
||||
" Editing the left side of the status line.
|
||||
set statusline=
|
||||
set statusline+=☰
|
||||
set statusline+=\ %{toupper(g:currentmode[mode()])}
|
||||
set statusline+=\ \ ☰
|
||||
set statusline+=\ %r%t\ %m
|
||||
" Editing the right side of the status line.
|
||||
set statusline+=%=
|
||||
set statusline+=☰
|
||||
set statusline+=\ %{&ff}%y
|
||||
set statusline+=\ %{''.(&fenc!=''?&fenc:&enc).''}
|
||||
set statusline+=\ \ ☰
|
||||
set statusline+=\ line:\ %03l/%03L
|
238
config/vim/vimrc
Normal file
238
config/vim/vimrc
Normal file
|
@ -0,0 +1,238 @@
|
|||
""" Configuration for XDG support
|
||||
if empty($XDG_CONFIG_HOME) | let $XDG_CONFIG_HOME = $HOME."/.config" | endif
|
||||
if empty($XDG_CACHE_HOME) | let $XDG_CACHE_HOME = $HOME."/.cache" | endif
|
||||
if empty($XDG_DATA_HOME) | let $XDG_DATA_HOME = $HOME."/.local/share" | endif
|
||||
|
||||
let $MYVIMRC = $XDG_CONFIG_HOME."/vim/vimrc"
|
||||
|
||||
set runtimepath^=$XDG_CONFIG_HOME/vim
|
||||
set runtimepath+=$XDG_CONFIG_HOME/vim/after
|
||||
set runtimepath+=$XDG_DATA_HOME/vim
|
||||
|
||||
set packpath^=$XDG_DATA_HOME/vim
|
||||
|
||||
if !has('nvim') " Neovim has its own special location
|
||||
set viminfofile=$XDG_CACHE_HOME/vim/viminfo
|
||||
endif
|
||||
|
||||
""" We don't want vim to be Vi-compatible
|
||||
if &compatible
|
||||
set nocompatible
|
||||
endif
|
||||
|
||||
set spellfile=$XDG_DATA_HOME/vim/spell/en.utf-8.add " specifies where the word list file is
|
||||
|
||||
""" Temporary files
|
||||
set backup
|
||||
set writebackup
|
||||
set swapfile
|
||||
set undofile
|
||||
set backupdir=$XDG_CACHE_HOME/vim/backup
|
||||
set directory=$XDG_CACHE_HOME/vim/swap
|
||||
set undodir=$XDG_CACHE_HOME/vim/undo
|
||||
set viewdir=$XDG_CACHE_HOME/vim/view
|
||||
|
||||
|
||||
""" Minpac settings and package management.
|
||||
packadd minpac
|
||||
call minpac#init({'package_name':'bundle', 'verbose':3})
|
||||
call minpac#add('k-takata/minpac', {'type': 'opt', 'rev': '093f00891aeb04e98ceb5a541885d025c9fae169'})
|
||||
call minpac#add('natebosch/vim-lsc', {'type': 'start', 'rev': '25d625aa0274b4c9845afd49a5c8f21aceb25073'})
|
||||
call minpac#add('iamcco/markdown-preview.nvim', {'do': 'packloadall! | call mkdp#util#install()'})
|
||||
call minpac#add('liuchengxu/vista.vim', {'type': 'opt', 'rev': 'a2236deb0a40d745f38fac4523ed6a0c86639863'})
|
||||
call minpac#add('hashivim/vim-terraform', {'type': 'start', 'rev': 'e62cac4d3186209a510f51becd768ee414b2be76'})
|
||||
|
||||
|
||||
let mapleader="," " The leader key
|
||||
filetype plugin indent on " load filetype-specific indent files
|
||||
set scrolloff=5 " start scrolling when cursor is # lines above the bottom of the window.
|
||||
|
||||
" File format and encoding
|
||||
if &modifiable
|
||||
set fileformat=unix " always use the unix file format
|
||||
set encoding=utf-8 " set the character encoding to UTF-8
|
||||
set fileencoding=utf-8 " set the character encoding for the file of this buffer to UTF-8
|
||||
set fileencodings=utf-8 " set UTF-8 as the only character encoding considered when starting to edit an existing file.
|
||||
endif
|
||||
|
||||
set ignorecase " ignore case when searching
|
||||
set smartcase " override ignorecase when upper case characters are used when searching
|
||||
set incsearch " set incremental searching.
|
||||
|
||||
|
||||
""" Default spaces and tabs
|
||||
set expandtab " turn tabs into spaces
|
||||
set tabstop=2 " number of spaces per tab
|
||||
set softtabstop=2 " number of spaces per tab while editing
|
||||
set shiftwidth=2 " specifies the amount of whitespace to insert/remove using indentation commands in normal mode.
|
||||
|
||||
|
||||
""" Colour scheme
|
||||
" this magic block enables true colour in tmux and ST.
|
||||
if (has("termguicolors"))
|
||||
let &t_8f = "\<Esc>[38;2;%lu;%lu;%lum"
|
||||
let &t_8b = "\<Esc>[48;2;%lu;%lu;%lum"
|
||||
set termguicolors
|
||||
endif
|
||||
|
||||
set background=dark " use the dark version of the colour scheme
|
||||
colorscheme one " set the colour scheme
|
||||
|
||||
|
||||
""" UI Config
|
||||
syntax enable " enable syntax
|
||||
set number relativenumber " both line number & relative line numbers
|
||||
set wildmenu " visualize autocomplete for command menu
|
||||
set lazyredraw " do not redraw screen when executing macros, registers, etc that have not been typed
|
||||
set splitright " when splitting veritically the new window will be on the right
|
||||
set splitbelow " when splitting horizontally the new window will be below the current one
|
||||
set ai " set autoindent
|
||||
set showmatch " show matching brace or parenthesis
|
||||
set pastetoggle=<F3> " toggle set paste/set nopaste
|
||||
set path+=** " add current directories and sub directories in the search path
|
||||
set confirm " raise a dialogue to confirm if you wish to save a file before continuing.
|
||||
set cmdheight=2 " set the height of the command window to 2 lines.
|
||||
set modelines=5 " the first 5 lines are checked for modelines.
|
||||
set cursorline " highlights the line where the cursor is.
|
||||
|
||||
|
||||
""" Netrw settings
|
||||
let g:netrw_banner = 0 " disable the banner
|
||||
let g:netrw_liststyle = 3 " display files and folders in a tree style
|
||||
let g:netrw_browse_split = 2 " open files in a vertical split by default
|
||||
let g:netrw_altv = 1 " open split to the right
|
||||
let g:netrw_winsize = 10 " set the size of the Explorer window
|
||||
let g:netrw_list_hide = netrw_gitignore#Hide() " Hide files from gitignore
|
||||
let g:netrw_keepdir = 0 " keep the browsing directory the same as the current directory
|
||||
|
||||
|
||||
""" Mappings with leader key
|
||||
|
||||
" open the terminal (horizontal split)
|
||||
map <leader>t :terminal<CR>
|
||||
|
||||
" open the terminal (vertical split)
|
||||
map <leader>T :vertical terminal<CR>
|
||||
|
||||
" toggle Vista
|
||||
map <leader>b :Vista<CR>
|
||||
|
||||
""" Commands
|
||||
|
||||
" Commands for minpac
|
||||
command! PackUpdate source $MYVIMRC | call minpac#update()
|
||||
command! PackClean source $MYVIMRC | call minpac#clean()
|
||||
command! PackStatus source $MYVIMRC | call minpac#status()
|
||||
|
||||
|
||||
""" Forbid arrow key navigation
|
||||
no <Up> <Nop>
|
||||
no <Down> <Nop>
|
||||
no <Left> <Nop>
|
||||
no <Right> <Nop>
|
||||
|
||||
ino <Up> <Nop>
|
||||
ino <Down> <Nop>
|
||||
ino <Left> <Nop>
|
||||
ino <Right> <Nop>
|
||||
|
||||
vno <Up> <Nop>
|
||||
vno <Down> <Nop>
|
||||
vno <Left> <Nop>
|
||||
vno <Right> <Nop>
|
||||
|
||||
""" Code completion settings
|
||||
set completeopt=longest,menuone
|
||||
|
||||
" use CTRL+Space to open the autocompletion popup menu.
|
||||
inoremap <C-@> <C-x><C-o>
|
||||
|
||||
" use the TAB key to cycle through the autocompletion popup menu.
|
||||
inoremap <expr> <TAB> pumvisible() ? "\<C-n>" : "\<TAB>"
|
||||
inoremap <expr> <S-TAB> pumvisible() ? "\<C-p>" : "\<TAB>"
|
||||
|
||||
""" Control buffer split using CTRL + arrow keys
|
||||
nmap <C-l> :vert resize +5<CR>
|
||||
nmap <C-h> :vert resize -5<CR>
|
||||
nmap <C-k> :resize -5<CR>
|
||||
nmap <C-j> :resize +5<CR>
|
||||
|
||||
" Add matching curly brace
|
||||
inoremap \{ {<cr>}<ESC>O
|
||||
inoremap <{ {}<ESC>a
|
||||
inoremap -{ {}<ESC>i
|
||||
|
||||
" Add matching parentheses
|
||||
inoremap \( (<cr>)<ESC>O
|
||||
inoremap <( ()<ESC>a
|
||||
inoremap -( ()<ESC>i
|
||||
|
||||
" Add matching square braces
|
||||
inoremap \[ [<cr>]<ESC>O
|
||||
inoremap <[ []<ESC>a
|
||||
inoremap -[ []<ESC>i
|
||||
|
||||
""" Vim Language Server Client (vim-lsc) Configuration
|
||||
|
||||
" map a filetype to the language server command
|
||||
let g:lsc_server_commands = {
|
||||
\ 'python': {
|
||||
\ 'command': 'pyls',
|
||||
\ },
|
||||
\ 'terraform': {
|
||||
\ 'name': 'terraform-ls',
|
||||
\ 'command': 'terraform-ls serve',
|
||||
\ 'suppress_stderr': v:true,
|
||||
\ },
|
||||
\ 'go': {
|
||||
\ 'name': 'gopls',
|
||||
\ 'command': 'gopls serve',
|
||||
\ 'log_level': -1,
|
||||
\ 'suppress_stderr': v:true,
|
||||
\ },
|
||||
\}
|
||||
|
||||
" enable/disable autocompletion
|
||||
let g:lsc_enable_autocomplete = v:false
|
||||
|
||||
" apply all defaults with a few overrides
|
||||
let g:lsc_auto_map = {
|
||||
\ 'defaults': v:true,
|
||||
\ 'GoToDefinition': '<leader>gtd',
|
||||
\ 'ShowHover': '<leader>h',
|
||||
\ 'Completion': 'omnifunc',
|
||||
\ }
|
||||
|
||||
|
||||
""" Vista.vim Configuration
|
||||
let g:vista_icon_indent = ["╰─▸ ", "├─▸ "]
|
||||
let g:vista_default_executive = 'ctags'
|
||||
let g:vista#renderer#enable_icon = 1
|
||||
let g:vista_disable_statusline = 1
|
||||
let g:vista_sidebar_width = 30
|
||||
let g:vista_sidebar_position = 'vertical topleft'
|
||||
|
||||
let g:vista#renderer#icons = {
|
||||
\ "function": "{}",
|
||||
\ "variable": "v",
|
||||
\ "struct": "s",
|
||||
\ }
|
||||
|
||||
let g:vista_executive_for = {
|
||||
\ 'python': 'vim_lsc',
|
||||
\ 'go': 'vim_lsc',
|
||||
\ 'terraform': 'vim_lsc',
|
||||
\ 'markdown': 'toc',
|
||||
\ }
|
||||
|
||||
|
||||
""" Markdown Preview Configuration
|
||||
let g:mkdp_auto_start = 0
|
||||
let g:mkdp_auto_close = 1
|
||||
let g:mkdp_refresh_slow = 1
|
||||
let g:mkdp_command_for_global = 0
|
||||
let g:mkdp_open_to_the_world = 0
|
||||
let g:mkdp_browser = 'firefox'
|
||||
|
||||
""" vim-terraform configuration
|
||||
let g:terraform_fmt_on_save=1
|
16
config/xdg/user-dirs.dirs
Normal file
16
config/xdg/user-dirs.dirs
Normal file
|
@ -0,0 +1,16 @@
|
|||
# This file is written by xdg-user-dirs-update
|
||||
# If you want to change or add directories, just edit the line you're
|
||||
# interested in. All local changes will be retained on the next run.
|
||||
# Format is XDG_xxx_DIR="$HOME/yyy", where yyy is a shell-escaped
|
||||
# homedir-relative path, or XDG_xxx_DIR="/yyy", where /yyy is an
|
||||
# absolute path. No other format is supported.
|
||||
#
|
||||
|
||||
XDG_DESKTOP_DIR="$HOME/Desktop"
|
||||
XDG_DOWNLOAD_DIR="$HOME/Downloads"
|
||||
XDG_TEMPLATES_DIR="$HOME/Templates"
|
||||
XDG_PUBLICSHARE_DIR="$HOME/Public"
|
||||
XDG_DOCUMENTS_DIR="$HOME/Documents"
|
||||
XDG_MUSIC_DIR="$HOME/Music"
|
||||
XDG_PICTURES_DIR="$HOME/Pictures"
|
||||
XDG_VIDEOS_DIR="$HOME/Videos"
|
1
config/xdg/user-dirs.locale
Normal file
1
config/xdg/user-dirs.locale
Normal file
|
@ -0,0 +1 @@
|
|||
en_GB
|
14
helpers/X11/generate-x11-config
Executable file
14
helpers/X11/generate-x11-config
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
X11_DOTFILES_SOURCE_DIR="${GIT_ROOT_DIR}/config/X11"
|
||||
X11_DOTFILES_DESTINATION_DIR="${XDG_CONFIG_HOME}/X11"
|
||||
|
||||
if ! [ -d ${X11_DOTFILES_DESTINATION_DIR} ]; then
|
||||
echo "INFO: Creating directory ${X11_DOTFILES_DESTINATION_DIR}"
|
||||
mkdir ${X11_DOTFILES_DESTINATION_DIR}
|
||||
fi
|
||||
|
||||
rsync -avh ${X11_DOTFILES_SOURCE_DIR}/xinitrc ${X11_DOTFILES_DESTINATION_DIR}/xinitrc && chmod a-rwx,u+rw $_
|
15
helpers/amfora/generate-amfora-config
Executable file
15
helpers/amfora/generate-amfora-config
Executable file
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
AMFORA_CONFIG_SOURCE_DIR="${GIT_ROOT_DIR}/config/amfora"
|
||||
AMFORA_CONFIG_DESTINATION_DIR="${XDG_CONFIG_HOME}/amfora"
|
||||
|
||||
if ! [ -d ${AMFORA_CONFIG_DESTINATION_DIR} ]; then
|
||||
echo "INFO: Creating directory ${AMFORA_CONFIG_DESTINATION_DIR}"
|
||||
mkdir ${AMFORA_CONFIG_DESTINATION_DIR}
|
||||
fi
|
||||
|
||||
rsync -avh ${AMFORA_CONFIG_SOURCE_DIR}/ ${AMFORA_CONFIG_DESTINATION_DIR}
|
||||
chmod a-rwx,u+rw ${AMFORA_CONFIG_DESTINATION_DIR}/*
|
21
helpers/ansible/generate-ansible-config
Executable file
21
helpers/ansible/generate-ansible-config
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
ANSIBLE_DOTFILES_DIR="${GIT_ROOT_DIR}/config/ansible"
|
||||
ANSIBLE_CONFIG_DIR=${XDG_CONFIG_HOME}/ansible
|
||||
ANSIBLE_DATA_DIR=${XDG_DATA_HOME}/ansible
|
||||
ANSIBLE_CACHE_DIR=${XDG_CACHE_HOME}/ansible
|
||||
|
||||
for d in ${ANSIBLE_CONFIG_DIR} ${ANSIBLE_DATA_DIR} ${ANSIBLE_CACHE_DIR}; do
|
||||
if ! [ -d ${d} ]; then
|
||||
echo "INFO: Creating directory ${d}"
|
||||
mkdir ${d}
|
||||
fi
|
||||
done
|
||||
|
||||
for f in $( find ${ANSIBLE_DOTFILES_DIR} -type f -exec basename {} \; ); do
|
||||
echo "INFO: Installing ${f}"
|
||||
rsync -avh ${ANSIBLE_DOTFILES_DIR}/${f} ${ANSIBLE_CONFIG_DIR}/${f} && chmod a-rwx,u+rw $_
|
||||
done
|
31
helpers/bash/generate-bash-config
Executable file
31
helpers/bash/generate-bash-config
Executable file
|
@ -0,0 +1,31 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
BASH_DOTFILES_DIR="${GIT_ROOT_DIR}/config/bash"
|
||||
BASHRC_DIRNAME="bashrc.d"
|
||||
BASHRC_CONFIG_DIR=${XDG_CONFIG_HOME}/bash/${BASHRC_DIRNAME}
|
||||
BASH_DATA_DIR=${XDG_DATA_HOME}/bash
|
||||
|
||||
source ${GIT_ROOT_DIR}/scripts/lib/install-config
|
||||
|
||||
for d in ${BASHRC_CONFIG_DIR} ${BASH_DATA_DIR}; do
|
||||
if ! [ -d ${d} ]; then
|
||||
mkdir -p ${d}
|
||||
fi
|
||||
done
|
||||
|
||||
for f in $(find ${BASH_DOTFILES_DIR}/${BASHRC_DIRNAME} -mindepth 1 -maxdepth 1 -type f -exec basename {} \;); do
|
||||
configFilename=${f}
|
||||
|
||||
if [ -f ${BASHRC_CONFIG_DIR}/${f}.disabled ]; then
|
||||
configFilename=${f}.disabled
|
||||
fi
|
||||
|
||||
install_config ${BASH_DOTFILES_DIR}/${BASHRC_DIRNAME}/${f} ${BASHRC_CONFIG_DIR}/${configFilename}
|
||||
done
|
||||
|
||||
for f in "bashrc" "bash_profile"; do
|
||||
install_config ${BASH_DOTFILES_DIR}/${f} ${HOME}/.${f}
|
||||
done
|
63
helpers/git/generate-git-config
Executable file
63
helpers/git/generate-git-config
Executable file
|
@ -0,0 +1,63 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
GIT_DOTFILES_DIR="${GIT_ROOT_DIR}/config/git"
|
||||
PARAMETER_FILE="${GIT_DOTFILES_DIR}/config/gitconfig-parameters"
|
||||
|
||||
GITCONFIG_FILE="${GIT_DOTFILES_DIR}/gitconfig"
|
||||
GITIGNORE_FILE="${GIT_DOTFILES_DIR}/gitignore"
|
||||
GITMESSAGE_FILE="${GIT_DOTFILES_DIR}/gitmessage"
|
||||
|
||||
GIT_OUTPUT_ROOT_DIR="${XDG_CONFIG_HOME}/git"
|
||||
GITCONFIG_OUTPUT="${GIT_OUTPUT_ROOT_DIR}/config"
|
||||
GITIGNORE_OUTPUT="${GIT_OUTPUT_ROOT_DIR}/ignore"
|
||||
GITMESSAGE_OUTPUT="${GIT_OUTPUT_ROOT_DIR}/message"
|
||||
|
||||
validate_params() {
|
||||
if [ -z ${GIT_USER_NAME+x} ]; then
|
||||
echo "ERROR: 'GIT_USER_NAME' is not set or is empty in ${PARAMETER_FILE}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z ${GIT_USER_EMAIL+x} ]; then
|
||||
echo "ERROR: 'GIT_USER_EMAIL' is not set or is empty in ${PARAMETER_FILE}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z ${GIT_USER_SIGNINGKEY+x} ]; then
|
||||
echo "ERROR: 'GIT_USER_SIGNINGKEY' is not set or is empty in ${PARAMETER_FILE}"
|
||||
return 1
|
||||
fi
|
||||
|
||||
return 0
|
||||
}
|
||||
|
||||
echo "INFO: Attempting to source parameters from ${PARAMETER_FILE}."
|
||||
test -f ${PARAMETER_FILE} && source ${PARAMETER_FILE}
|
||||
|
||||
echo "INFO: Validating parameters."
|
||||
validate_params || exit 1
|
||||
|
||||
if ! [ -d ${GIT_OUTPUT_ROOT_DIR} ]; then
|
||||
echo "INFO: Creating directory ${GIT_OUTPUT_ROOT_DIR}"
|
||||
mkdir ${GIT_OUTPUT_ROOT_DIR}
|
||||
fi
|
||||
|
||||
echo "INFO: Generating the gitconfig file and installing it to ${GITCONFIG_OUTPUT}."
|
||||
|
||||
gitmessage_output=${GITMESSAGE_OUTPUT} \
|
||||
gitignore_output=${GITIGNORE_OUTPUT} \
|
||||
git_user_name=${GIT_USER_NAME} \
|
||||
git_user_email=${GIT_USER_EMAIL} \
|
||||
git_user_signingkey=${GIT_USER_SIGNINGKEY} \
|
||||
envsubst < ${GITCONFIG_FILE} > ${GITCONFIG_OUTPUT}
|
||||
|
||||
chmod a-rwx,u+rw ${GITCONFIG_OUTPUT}
|
||||
|
||||
echo "INFO: Installing ${GITIGNORE_OUTPUT}."
|
||||
rsync -avh ${GITIGNORE_FILE} ${GITIGNORE_OUTPUT} && chmod a-rwx,u+rw $_
|
||||
|
||||
echo "INFO: Installing ${GITMESSAGE_OUTPUT}."
|
||||
rsync -avh ${GITMESSAGE_FILE} ${GITMESSAGE_OUTPUT} && chmod a-rwx,u+rw $_
|
14
helpers/lf/generate-lf-config
Executable file
14
helpers/lf/generate-lf-config
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
LF_DOTFILES_SOURCE_DIR="${GIT_ROOT_DIR}/config/lf"
|
||||
LF_DOTFILES_DESTINATION_DIR="${XDG_CONFIG_HOME}/lf"
|
||||
|
||||
if ! [ -d ${LF_DOTFILES_DESTINATION_DIR} ]; then
|
||||
echo "INFO: Creating directory ${LF_DOTFILES_DESTINATION_DIR}"
|
||||
mkdir ${LF_DOTFILES_DESTINATION_DIR}
|
||||
fi
|
||||
|
||||
rsync -avh ${LF_DOTFILES_SOURCE_DIR}/lfrc ${LF_DOTFILES_DESTINATION_DIR}/lfrc && chmod a-rwx,u+rw $_
|
8
helpers/lib/install-config
Executable file
8
helpers/lib/install-config
Executable file
|
@ -0,0 +1,8 @@
|
|||
# vi: set ft=bash :
|
||||
|
||||
install_config() {
|
||||
[ -f ${2} ] && rm -rf ${2}
|
||||
echo "INFO: Installing ${1} to ${2}"
|
||||
cp ${1} ${2}
|
||||
chmod -R a-rwx,u+rw ${2}
|
||||
}
|
14
helpers/tmux/generate-tmux-config
Executable file
14
helpers/tmux/generate-tmux-config
Executable file
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
TMUX_DOTFILES_SOURCE_DIR="${GIT_ROOT_DIR}/config/tmux"
|
||||
TMUX_DOTFILES_DESTINATION_DIR="${XDG_CONFIG_HOME}/tmux"
|
||||
|
||||
if ! [ -d ${TMUX_DOTFILES_DESTINATION_DIR} ]; then
|
||||
echo "INFO: Creating directory ${TMUX_DOTFILES_DESTINATION_DIR}"
|
||||
mkdir ${TMUX_DOTFILES_DESTINATION_DIR}
|
||||
fi
|
||||
|
||||
rsync -avh ${TMUX_DOTFILES_SOURCE_DIR}/tmux.conf ${TMUX_DOTFILES_DESTINATION_DIR}/tmux.conf && chmod a-rwx,u+rw $_
|
37
helpers/vim/generate-vim-config
Executable file
37
helpers/vim/generate-vim-config
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
VIM_CONFIG_SOURCE_DIR="${GIT_ROOT_DIR}/config/vim"
|
||||
VIM_CONFIG_DESTINATION_DIR="${XDG_CONFIG_HOME}/vim"
|
||||
|
||||
MINPAC_SOURCE="https://github.com/k-takata/minpac.git"
|
||||
MINPAC_DESTINATION="${XDG_DATA_HOME}/vim/pack/bundle/opt/minpac"
|
||||
|
||||
GOTAGS_SOURCE="github.com/jstemmer/gotags"
|
||||
|
||||
# Creating essential vim directories
|
||||
mkdir -p ${VIM_CONFIG_DESTINATION_DIR}
|
||||
mkdir -p ${XDG_CACHE_HOME}/vim/{backup,swap,undo,view} && chmod 0700 ${XDG_CACHE_HOME}/vim/{backup,swap,undo,view}
|
||||
mkdir -p ${XDG_DATA_HOME}/vim/spell && chmod 0700 ${XDG_DATA_HOME}/vim/spell
|
||||
|
||||
# Syncing the vim configuration files
|
||||
echo "INFO: syncing ${VIM_CONFIG_SOURCE_DIR} to ${VIM_CONFIG_DESTINATION_DIR}"
|
||||
rsync -avh --exclude=*.gitkeep ${VIM_CONFIG_SOURCE_DIR}/ ${VIM_CONFIG_DESTINATION_DIR}
|
||||
chmod a-rwx,u+rwx ${VIM_CONFIG_DESTINATION_DIR}
|
||||
find ${VIM_CONFIG_DESTINATION_DIR} -type d -not -wholename */pack/bundle/opt/* -not -wholename */pack/bundle/start/* \
|
||||
| xargs chmod a-rwx,u+rwx
|
||||
|
||||
# Ensuring minpac and gotags are installed
|
||||
if ! [ -d ${MINPAC_DESTINATION}/.git ]; then
|
||||
echo "INFO: Cloning ${MINPAC_SOURCE} to ${MINPAC_DESTINATION}"
|
||||
git clone --depth=1 ${MINPAC_SOURCE} ${MINPAC_DESTINATION}
|
||||
fi
|
||||
|
||||
if [ -x "$( command -v go )" ]; then
|
||||
if ! [ -x "$( command -v gotags )" ]; then
|
||||
echo "INFO: Installing gotags"
|
||||
go get -u ${GOTAGS_SOURCE}
|
||||
fi
|
||||
fi
|
23
helpers/xdg/check-xdg-settings
Executable file
23
helpers/xdg/check-xdg-settings
Executable file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
if [ -z ${XDG_CONFIG_HOME+x} ]; then
|
||||
echo "ERROR: 'XDG_CONFIG_HOME' is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${XDG_DATA_HOME+x} ]; then
|
||||
echo "ERROR: 'XDG_DATA_HOME' is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${XDG_CACHE_HOME+x} ]; then
|
||||
echo "ERROR: 'XDG_CACHE_HOME' is not set."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z ${XDG_STATE_HOME+x} ]; then
|
||||
echo "ERROR: 'XDG_STATE_HOME' is not set."
|
||||
exit 1
|
||||
fi
|
11
helpers/xdg/generate-user-dirs-config
Executable file
11
helpers/xdg/generate-user-dirs-config
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
GIT_ROOT_DIR="$( cd "$( dirname $0 )/../.." && pwd )"
|
||||
XDG_DOTFILES_DIR="${GIT_ROOT_DIR}/config/xdg"
|
||||
|
||||
for f in $( find ${XDG_DOTFILES_DIR} -type f -exec basename {} \; ); do
|
||||
echo "INFO: Installing ${f}"
|
||||
rsync -avh ${XDG_DOTFILES_DIR}/${f} ${XDG_CONFIG_HOME}/${f} && chmod a-rwx,u+rw $_
|
||||
done
|
Loading…
Reference in a new issue