mirror of
https://github.com/ivuorinen/dotfiles.git
synced 2026-01-27 21:45:41 +00:00
Compare commits
21 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ea7807718 | ||
| 6a776bd3dd | |||
| 6ffe581326 | |||
| 5d476e8eed | |||
|
|
bf84c67f08 | ||
| 9cb400dd3f | |||
| fce649619a | |||
| 8b0148e468 | |||
| 9cb27eb9dc | |||
| f1ed88a98e | |||
| ec35f1cb1e | |||
| dab8504cfd | |||
| 0f9a76e36f | |||
|
|
97244d5287 | ||
| 50ea9bea89 | |||
| 688469ad8b | |||
|
|
af32914d71 | ||
|
|
840bd85232 | ||
| c81ee240bf | |||
| e215fe0a2f | |||
| 38e340ac8d |
2
.github/workflows/pre-commit-autoupdate.yml
vendored
2
.github/workflows/pre-commit-autoupdate.yml
vendored
@@ -25,7 +25,7 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||
|
||||
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
|
||||
- uses: actions/setup-python@8d9ed9ac5c53483de85588cdf95a591a75ab9f55 # v5.5.0
|
||||
|
||||
- run: pip install pre-commit && pre-commit autoupdate
|
||||
|
||||
|
||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -45,3 +45,4 @@ config/fish/completions/asdf.fish
|
||||
config/vim/.netrwhist
|
||||
config/vim/extra/*
|
||||
config/gh/hosts.yml
|
||||
dependency-check-report.html
|
||||
|
||||
3
.gitmodules
vendored
3
.gitmodules
vendored
@@ -80,3 +80,6 @@
|
||||
shallow = true
|
||||
ignore = dirty
|
||||
|
||||
[submodule "tmux/tmux-resurrect"]
|
||||
path = config/tmux/plugins/tmux-resurrect
|
||||
url = https://github.com/tmux-plugins/tmux-resurrect.git
|
||||
|
||||
@@ -49,7 +49,7 @@ repos:
|
||||
- id: actionlint
|
||||
|
||||
- repo: https://github.com/renovatebot/pre-commit-hooks
|
||||
rev: 39.212.0
|
||||
rev: 39.227.2
|
||||
hooks:
|
||||
- id: renovate-config-validator
|
||||
|
||||
|
||||
@@ -1 +1 @@
|
||||
3.13.2
|
||||
3.13.3
|
||||
|
||||
@@ -26,6 +26,8 @@ git submodule add --name tmux/tmux-continuum \
|
||||
-f https://github.com/tmux-plugins/tmux-continuum config/tmux/plugins/tmux-continuum
|
||||
git submodule add --name tmux/tmux-mode-indicator \
|
||||
-f https://github.com/MunifTanjim/tmux-mode-indicator.git config/tmux/plugins/tmux-mode-indicator
|
||||
git submodule add --name tmux/tmux-resurrect \
|
||||
-f https://github.com/tmux-plugins/tmux-resurrect.git config/tmux/plugins/tmux-resurrect
|
||||
git submodule add --name tmux/tmux-sensible \
|
||||
-f https://github.com/tmux-plugins/tmux-sensible.git config/tmux/plugins/tmux-sensible
|
||||
git submodule add --name tmux/tmux-sessionist \
|
||||
@@ -55,7 +57,6 @@ folders=(
|
||||
"config/tmux/plugins/tpm"
|
||||
"config/tmux/plugins/tmux"
|
||||
"config/tmux/plugins/tmux-menus"
|
||||
"config/tmux/plugins/tmux-resurrect"
|
||||
"tools/dotbot-crontab"
|
||||
"tools/dotbot-snap"
|
||||
"config/nvim-kickstart"
|
||||
|
||||
@@ -1 +1 @@
|
||||
lts/*
|
||||
v22.14.0
|
||||
|
||||
235
config/fish/completions/docker.fish
Executable file
235
config/fish/completions/docker.fish
Executable file
@@ -0,0 +1,235 @@
|
||||
# fish completion for docker -*- shell-script -*-
|
||||
|
||||
function __docker_debug
|
||||
set -l file "$BASH_COMP_DEBUG_FILE"
|
||||
if test -n "$file"
|
||||
echo "$argv" >> $file
|
||||
end
|
||||
end
|
||||
|
||||
function __docker_perform_completion
|
||||
__docker_debug "Starting __docker_perform_completion"
|
||||
|
||||
# Extract all args except the last one
|
||||
set -l args (commandline -opc)
|
||||
# Extract the last arg and escape it in case it is a space
|
||||
set -l lastArg (string escape -- (commandline -ct))
|
||||
|
||||
__docker_debug "args: $args"
|
||||
__docker_debug "last arg: $lastArg"
|
||||
|
||||
# Disable ActiveHelp which is not supported for fish shell
|
||||
set -l requestComp "DOCKER_ACTIVE_HELP=0 $args[1] __complete $args[2..-1] $lastArg"
|
||||
|
||||
__docker_debug "Calling $requestComp"
|
||||
set -l results (eval $requestComp 2> /dev/null)
|
||||
|
||||
# Some programs may output extra empty lines after the directive.
|
||||
# Let's ignore them or else it will break completion.
|
||||
# Ref: https://github.com/spf13/cobra/issues/1279
|
||||
for line in $results[-1..1]
|
||||
if test (string trim -- $line) = ""
|
||||
# Found an empty line, remove it
|
||||
set results $results[1..-2]
|
||||
else
|
||||
# Found non-empty line, we have our proper output
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
set -l comps $results[1..-2]
|
||||
set -l directiveLine $results[-1]
|
||||
|
||||
# For Fish, when completing a flag with an = (e.g., <program> -n=<TAB>)
|
||||
# completions must be prefixed with the flag
|
||||
set -l flagPrefix (string match -r -- '-.*=' "$lastArg")
|
||||
|
||||
__docker_debug "Comps: $comps"
|
||||
__docker_debug "DirectiveLine: $directiveLine"
|
||||
__docker_debug "flagPrefix: $flagPrefix"
|
||||
|
||||
for comp in $comps
|
||||
printf "%s%s\n" "$flagPrefix" "$comp"
|
||||
end
|
||||
|
||||
printf "%s\n" "$directiveLine"
|
||||
end
|
||||
|
||||
# this function limits calls to __docker_perform_completion, by caching the result behind $__docker_perform_completion_once_result
|
||||
function __docker_perform_completion_once
|
||||
__docker_debug "Starting __docker_perform_completion_once"
|
||||
|
||||
if test -n "$__docker_perform_completion_once_result"
|
||||
__docker_debug "Seems like a valid result already exists, skipping __docker_perform_completion"
|
||||
return 0
|
||||
end
|
||||
|
||||
set --global __docker_perform_completion_once_result (__docker_perform_completion)
|
||||
if test -z "$__docker_perform_completion_once_result"
|
||||
__docker_debug "No completions, probably due to a failure"
|
||||
return 1
|
||||
end
|
||||
|
||||
__docker_debug "Performed completions and set __docker_perform_completion_once_result"
|
||||
return 0
|
||||
end
|
||||
|
||||
# this function is used to clear the $__docker_perform_completion_once_result variable after completions are run
|
||||
function __docker_clear_perform_completion_once_result
|
||||
__docker_debug ""
|
||||
__docker_debug "========= clearing previously set __docker_perform_completion_once_result variable =========="
|
||||
set --erase __docker_perform_completion_once_result
|
||||
__docker_debug "Successfully erased the variable __docker_perform_completion_once_result"
|
||||
end
|
||||
|
||||
function __docker_requires_order_preservation
|
||||
__docker_debug ""
|
||||
__docker_debug "========= checking if order preservation is required =========="
|
||||
|
||||
__docker_perform_completion_once
|
||||
if test -z "$__docker_perform_completion_once_result"
|
||||
__docker_debug "Error determining if order preservation is required"
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__docker_perform_completion_once_result[-1])
|
||||
__docker_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveKeepOrder 32
|
||||
set -l keeporder (math (math --scale 0 $directive / $shellCompDirectiveKeepOrder) % 2)
|
||||
__docker_debug "Keeporder is: $keeporder"
|
||||
|
||||
if test $keeporder -ne 0
|
||||
__docker_debug "This does require order preservation"
|
||||
return 0
|
||||
end
|
||||
|
||||
__docker_debug "This doesn't require order preservation"
|
||||
return 1
|
||||
end
|
||||
|
||||
|
||||
# This function does two things:
|
||||
# - Obtain the completions and store them in the global __docker_comp_results
|
||||
# - Return false if file completion should be performed
|
||||
function __docker_prepare_completions
|
||||
__docker_debug ""
|
||||
__docker_debug "========= starting completion logic =========="
|
||||
|
||||
# Start fresh
|
||||
set --erase __docker_comp_results
|
||||
|
||||
__docker_perform_completion_once
|
||||
__docker_debug "Completion results: $__docker_perform_completion_once_result"
|
||||
|
||||
if test -z "$__docker_perform_completion_once_result"
|
||||
__docker_debug "No completion, probably due to a failure"
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l directive (string sub --start 2 $__docker_perform_completion_once_result[-1])
|
||||
set --global __docker_comp_results $__docker_perform_completion_once_result[1..-2]
|
||||
|
||||
__docker_debug "Completions are: $__docker_comp_results"
|
||||
__docker_debug "Directive is: $directive"
|
||||
|
||||
set -l shellCompDirectiveError 1
|
||||
set -l shellCompDirectiveNoSpace 2
|
||||
set -l shellCompDirectiveNoFileComp 4
|
||||
set -l shellCompDirectiveFilterFileExt 8
|
||||
set -l shellCompDirectiveFilterDirs 16
|
||||
|
||||
if test -z "$directive"
|
||||
set directive 0
|
||||
end
|
||||
|
||||
set -l compErr (math (math --scale 0 $directive / $shellCompDirectiveError) % 2)
|
||||
if test $compErr -eq 1
|
||||
__docker_debug "Received error directive: aborting."
|
||||
# Might as well do file completion, in case it helps
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l filefilter (math (math --scale 0 $directive / $shellCompDirectiveFilterFileExt) % 2)
|
||||
set -l dirfilter (math (math --scale 0 $directive / $shellCompDirectiveFilterDirs) % 2)
|
||||
if test $filefilter -eq 1; or test $dirfilter -eq 1
|
||||
__docker_debug "File extension filtering or directory filtering not supported"
|
||||
# Do full file completion instead
|
||||
return 1
|
||||
end
|
||||
|
||||
set -l nospace (math (math --scale 0 $directive / $shellCompDirectiveNoSpace) % 2)
|
||||
set -l nofiles (math (math --scale 0 $directive / $shellCompDirectiveNoFileComp) % 2)
|
||||
|
||||
__docker_debug "nospace: $nospace, nofiles: $nofiles"
|
||||
|
||||
# If we want to prevent a space, or if file completion is NOT disabled,
|
||||
# we need to count the number of valid completions.
|
||||
# To do so, we will filter on prefix as the completions we have received
|
||||
# may not already be filtered so as to allow fish to match on different
|
||||
# criteria than the prefix.
|
||||
if test $nospace -ne 0; or test $nofiles -eq 0
|
||||
set -l prefix (commandline -t | string escape --style=regex)
|
||||
__docker_debug "prefix: $prefix"
|
||||
|
||||
set -l completions (string match -r -- "^$prefix.*" $__docker_comp_results)
|
||||
set --global __docker_comp_results $completions
|
||||
__docker_debug "Filtered completions are: $__docker_comp_results"
|
||||
|
||||
# Important not to quote the variable for count to work
|
||||
set -l numComps (count $__docker_comp_results)
|
||||
__docker_debug "numComps: $numComps"
|
||||
|
||||
if test $numComps -eq 1; and test $nospace -ne 0
|
||||
# We must first split on \t to get rid of the descriptions to be
|
||||
# able to check what the actual completion will be.
|
||||
# We don't need descriptions anyway since there is only a single
|
||||
# real completion which the shell will expand immediately.
|
||||
set -l split (string split --max 1 \t $__docker_comp_results[1])
|
||||
|
||||
# Fish won't add a space if the completion ends with any
|
||||
# of the following characters: @=/:.,
|
||||
set -l lastChar (string sub -s -1 -- $split)
|
||||
if not string match -r -q "[@=/:.,]" -- "$lastChar"
|
||||
# In other cases, to support the "nospace" directive we trick the shell
|
||||
# by outputting an extra, longer completion.
|
||||
__docker_debug "Adding second completion to perform nospace directive"
|
||||
set --global __docker_comp_results $split[1] $split[1].
|
||||
__docker_debug "Completions are now: $__docker_comp_results"
|
||||
end
|
||||
end
|
||||
|
||||
if test $numComps -eq 0; and test $nofiles -eq 0
|
||||
# To be consistent with bash and zsh, we only trigger file
|
||||
# completion when there are no other completions
|
||||
__docker_debug "Requesting file completion"
|
||||
return 1
|
||||
end
|
||||
end
|
||||
|
||||
return 0
|
||||
end
|
||||
|
||||
# Since Fish completions are only loaded once the user triggers them, we trigger them ourselves
|
||||
# so we can properly delete any completions provided by another script.
|
||||
# Only do this if the program can be found, or else fish may print some errors; besides,
|
||||
# the existing completions will only be loaded if the program can be found.
|
||||
if type -q "docker"
|
||||
# The space after the program name is essential to trigger completion for the program
|
||||
# and not completion of the program name itself.
|
||||
# Also, we use '> /dev/null 2>&1' since '&>' is not supported in older versions of fish.
|
||||
complete --do-complete "docker " > /dev/null 2>&1
|
||||
end
|
||||
|
||||
# Remove any pre-existing completions for the program since we will be handling all of them.
|
||||
complete -c docker -e
|
||||
|
||||
# this will get called after the two calls below and clear the $__docker_perform_completion_once_result global
|
||||
complete -c docker -n '__docker_clear_perform_completion_once_result'
|
||||
# The call to __docker_prepare_completions will setup __docker_comp_results
|
||||
# which provides the program's completion choices.
|
||||
# If this doesn't require order preservation, we don't use the -k flag
|
||||
complete -c docker -n 'not __docker_requires_order_preservation && __docker_prepare_completions' -f -a '$__docker_comp_results'
|
||||
# otherwise we use the -k flag
|
||||
complete -k -c docker -n '__docker_requires_order_preservation && __docker_prepare_completions' -f -a '$__docker_comp_results'
|
||||
@@ -21,5 +21,6 @@ set -gx PATH $PATH $HOME/.lmstudio/bin
|
||||
type -q rbenv; and source (rbenv init -|psub)
|
||||
type -q pyenv; and source (pyenv init -|psub)
|
||||
type -q goenv; and source (goenv init -|psub)
|
||||
type -q fnm; and source (fnm env|psub)
|
||||
type -q fnm; and fnm env --use-on-cd --shell fish | source
|
||||
type -q load_nvm; and load_nvm > /dev/stderr
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ set -q GOBIN; or set -x GOBIN "$XDG_BIN_HOME"
|
||||
fish_add_path "$GOBIN"
|
||||
|
||||
set -q GOENV_ROOT; or set -x GOENV_ROOT "$XDG_DATA_HOME/goenv"
|
||||
set -q GOENV_RC_FILE; or set -x GOENV_RC_FILE "$XDG_CONFIG_HOME/goenv/goenvrc"
|
||||
set -q GOENV_RC_FILE; or set -x GOENV_RC_FILE "$XDG_CONFIG_HOME/goenv/goenvrc.fish"
|
||||
|
||||
# 1Password configuration
|
||||
set -q OP_CACHE; or set -x OP_CACHE "$XDG_STATE_HOME/1password"
|
||||
@@ -121,9 +121,6 @@ set -q OP_CACHE; or set -x OP_CACHE "$XDG_STATE_HOME/1password"
|
||||
set -q WORKON_HOME; or set -x WORKON_HOME "$XDG_DATA_HOME/virtualenvs"
|
||||
set -q PYENV_ROOT; or set -x PYENV_ROOT "$XDG_DATA_HOME/pyenv"
|
||||
fish_add_path "$PYENV_ROOT/bin"
|
||||
if x-have pyenv; and not functions -q pyenv
|
||||
status --is-interactive; and source (pyenv init - | psub)
|
||||
end
|
||||
|
||||
# Poetry configuration
|
||||
set -q POETRY_HOME; or set -x POETRY_HOME "$XDG_DATA_HOME/poetry"
|
||||
|
||||
16
config/fish/functions/load_nvm.fish
Normal file
16
config/fish/functions/load_nvm.fish
Normal file
@@ -0,0 +1,16 @@
|
||||
function load_nvm --on-variable="PWD"
|
||||
set -l default_node_version (nvm version default)
|
||||
set -l node_version (nvm version)
|
||||
set -l nvmrc_path (nvm_find_nvmrc)
|
||||
if test -n "$nvmrc_path"
|
||||
set -l nvmrc_node_version (nvm version (cat $nvmrc_path))
|
||||
if test "$nvmrc_node_version" = "N/A"
|
||||
nvm install (cat $nvmrc_path)
|
||||
else if test "$nvmrc_node_version" != "$node_version"
|
||||
nvm use $nvmrc_node_version
|
||||
end
|
||||
else if test "$node_version" != "$default_node_version"
|
||||
echo "Reverting to default Node version"
|
||||
nvm use default
|
||||
end
|
||||
end
|
||||
4
config/fish/functions/nvm.fish
Normal file
4
config/fish/functions/nvm.fish
Normal file
@@ -0,0 +1,4 @@
|
||||
function nvm
|
||||
bass source $NVM_DIR/nvm.sh --no-use ';' nvm $argv
|
||||
end
|
||||
|
||||
3
config/fish/functions/nvm_find_nvmrc.fish
Normal file
3
config/fish/functions/nvm_find_nvmrc.fish
Normal file
@@ -0,0 +1,3 @@
|
||||
function nvm_find_nvmrc
|
||||
bass source $NVM_DIR/nvm.sh --no-use ';' nvm_find_nvmrc
|
||||
end
|
||||
@@ -1,3 +1,6 @@
|
||||
GOENV_PATH_ORDER=front
|
||||
GOENV_PREPEND_GOPATH=true
|
||||
GOENV_AUTO_INSTALL=true
|
||||
# Detect shell
|
||||
if [ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ]; then
|
||||
export GOENV_PATH_ORDER=front
|
||||
export GOENV_PREPEND_GOPATH=true
|
||||
export GOENV_AUTO_INSTALL=true
|
||||
fi
|
||||
|
||||
4
config/goenv/goenvrc.fish
Normal file
4
config/goenv/goenvrc.fish
Normal file
@@ -0,0 +1,4 @@
|
||||
set -gx GOENV_PATH_ORDER front
|
||||
set -gx GOENV_PREPEND_GOPATH true
|
||||
set -gx GOENV_AUTO_INSTALL true
|
||||
|
||||
@@ -107,6 +107,10 @@ brew "choose-rust"
|
||||
brew "cmake"
|
||||
# Get a file from an HTTP, HTTPS or FTP server
|
||||
brew "curl"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# OWASP dependency-check
|
||||
brew "dependency-check"
|
||||
# Lightweight DNS forwarder and DHCP server
|
||||
brew "dnsmasq"
|
||||
# .NET Core
|
||||
@@ -121,8 +125,6 @@ brew "figlet"
|
||||
brew "fish"
|
||||
# Lock file during command
|
||||
brew "flock"
|
||||
# Fast and simple Node.js version manager
|
||||
brew "fnm"
|
||||
# Libraries to talk to Microsoft SQL Server and Sybase databases
|
||||
brew "freetds"
|
||||
# Monitor a directory for changes and run a shell command
|
||||
@@ -135,8 +137,6 @@ brew "gd"
|
||||
brew "gdu"
|
||||
# GitHub command-line tool
|
||||
brew "gh"
|
||||
# OpenType text shaping engine
|
||||
brew "harfbuzz"
|
||||
# Secure hashing function
|
||||
brew "libb2"
|
||||
# Framework for layout and rendering of i18n text
|
||||
@@ -193,6 +193,8 @@ brew "jq"
|
||||
brew "json-c"
|
||||
# Network authentication protocol
|
||||
brew "krb5"
|
||||
# Style and grammar checker
|
||||
brew "languagetool"
|
||||
# Tool to detect/remediate misconfig and security risks of GitHub/GitLab assets
|
||||
brew "legitify"
|
||||
# BSD-style licensed readline alternative
|
||||
@@ -230,7 +232,9 @@ brew "openldap"
|
||||
# ISO-C API and CLI for generating UUIDs
|
||||
brew "ossp-uuid"
|
||||
# General-purpose scripting language
|
||||
brew "php@8.2", link: true
|
||||
brew "php"
|
||||
# General-purpose scripting language
|
||||
brew "php@8.2"
|
||||
# General-purpose scripting language
|
||||
brew "php@8.3"
|
||||
# Pins GitHub Actions to full hashes and versions
|
||||
@@ -336,6 +340,8 @@ cask "jetbrains-toolbox"
|
||||
cask "keybase"
|
||||
# Kubernetes IDE
|
||||
cask "lens"
|
||||
# Neovim Client
|
||||
cask "neovide"
|
||||
# Reverse proxy, secure introspectable tunnels to localhost
|
||||
cask "ngrok"
|
||||
# Simple application that will prevent iTunes or Apple Music from launching
|
||||
|
||||
@@ -64,7 +64,7 @@ require('lazy').setup(
|
||||
}
|
||||
)
|
||||
|
||||
require('nvm-default').setup()
|
||||
-- require('nvm-default').setup()
|
||||
|
||||
require 'keymaps'
|
||||
|
||||
|
||||
@@ -13,9 +13,9 @@ local a = vim.api -- A table to store API functions
|
||||
g.mapleader = ' ' -- Space as the leader key
|
||||
g.maplocalleader = ' ' -- Space as the local leader key
|
||||
|
||||
g.colors_theme = 'tokyonight' -- Set the colorscheme
|
||||
g.colors_variant_light = 'tokyonight-day' -- Set the light variant
|
||||
g.colors_variant_dark = 'tokyonight-storm' -- Set the dark variant
|
||||
g.colors_theme = 'pencil' -- Set the colorscheme
|
||||
-- g.colors_variant_light = 'tokyonight-day' -- Set the light variant
|
||||
-- g.colors_variant_dark = 'tokyonight-storm' -- Set the dark variant
|
||||
|
||||
g.editorconfig = true -- Make sure editorconfig support is enabled
|
||||
g.loaded_perl_provider = 0 -- Disable perl provider
|
||||
@@ -26,6 +26,7 @@ g.loaded_java_provider = 0 -- Disable java provider
|
||||
-- Most of the good defaults are provided by `mini.basics`
|
||||
-- See: lua/plugins/mini.lua
|
||||
o.confirm = true -- Confirm before closing unsaved buffers
|
||||
o.dictionary = '/usr/share/dict/words' -- Add system dictionary
|
||||
o.ignorecase = true -- Ignore case in search patterns
|
||||
o.inccommand = 'split' -- Preview substitutions live, as you type!
|
||||
o.list = true -- Show invisible characters
|
||||
@@ -37,7 +38,7 @@ o.scrolloff = 8 -- Show context around cursor
|
||||
o.sidescrolloff = 8 -- Show context around cursor
|
||||
o.signcolumn = 'yes' -- Keep signcolumn on by default
|
||||
o.spell = true -- Enable spell checking
|
||||
o.spelllang = 'en_us' -- Set the spell checking language
|
||||
o.spelllang = 'en_gb,en_us' -- Set the spell checking language
|
||||
o.splitbelow = true -- split to the bottom
|
||||
o.splitright = true -- vsplit to the right
|
||||
o.termguicolors = true -- Enable GUI colors
|
||||
|
||||
@@ -5,8 +5,14 @@ return {
|
||||
'folke/snacks.nvim',
|
||||
priority = 1000,
|
||||
lazy = false,
|
||||
---@type snacks.Config
|
||||
opts = {
|
||||
bigfile = { enabled = true },
|
||||
input = { enabled = true },
|
||||
notifier = {
|
||||
enabled = true,
|
||||
timeout = 3000,
|
||||
},
|
||||
gitbrowse = { enabled = true },
|
||||
quickfile = { enabled = true },
|
||||
statuscolumn = {
|
||||
@@ -38,6 +44,11 @@ return {
|
||||
{
|
||||
'folke/noice.nvim',
|
||||
event = 'VeryLazy',
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
'MunifTanjim/nui.nvim',
|
||||
'rcarriga/nvim-notify',
|
||||
},
|
||||
opts = {
|
||||
lsp = {
|
||||
-- override markdown rendering so that **cmp** and other plugins use **Treesitter**
|
||||
@@ -60,7 +71,10 @@ return {
|
||||
filter = {
|
||||
event = 'msg_show',
|
||||
kind = '',
|
||||
find = 'written',
|
||||
any = {
|
||||
{ find = 'written' },
|
||||
{ find = '%d of %d --%d%--' },
|
||||
},
|
||||
},
|
||||
opts = { skip = true },
|
||||
},
|
||||
@@ -101,14 +115,6 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
dependencies = {
|
||||
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
|
||||
'MunifTanjim/nui.nvim',
|
||||
-- OPTIONAL:
|
||||
-- `nvim-notify` is only needed, if you want to use the notification view.
|
||||
-- If not available, we use `mini` as the fallback
|
||||
'rcarriga/nvim-notify',
|
||||
},
|
||||
},
|
||||
|
||||
-- A pretty diagnostics, references, telescope results,
|
||||
@@ -131,7 +137,7 @@ return {
|
||||
},
|
||||
modes = {
|
||||
diagnostics = {
|
||||
auto_open = true,
|
||||
auto_open = false,
|
||||
},
|
||||
test = {
|
||||
mode = 'diagnostics',
|
||||
@@ -139,7 +145,7 @@ return {
|
||||
type = 'split',
|
||||
relative = 'win',
|
||||
position = 'right',
|
||||
size = 0.3,
|
||||
size = 0.25,
|
||||
},
|
||||
},
|
||||
cascade = {
|
||||
@@ -158,13 +164,4 @@ return {
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
-- Navigate your code with search labels, enhanced
|
||||
-- character motions and Treesitter integration
|
||||
-- https://github.com/folke/flash.nvim
|
||||
{
|
||||
'folke/flash.nvim',
|
||||
event = 'VeryLazy',
|
||||
opts = {},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -108,17 +108,25 @@ local lsp_servers = {
|
||||
-- These are automatically configured by WhoIsSethDaniel/mason-tool-installer.nvim
|
||||
local mason_tools = {
|
||||
'actionlint',
|
||||
'ast-grep',
|
||||
'black',
|
||||
'editorconfig-checker',
|
||||
'goimports',
|
||||
'golangci-lint',
|
||||
'golines',
|
||||
'gopls',
|
||||
'gotests',
|
||||
'isort',
|
||||
'phpcbf',
|
||||
'phpmd',
|
||||
'phpstan',
|
||||
'pint',
|
||||
'prettierd',
|
||||
'revive',
|
||||
'semgrep',
|
||||
'shellcheck',
|
||||
'shfmt',
|
||||
'sonarlint-language-server',
|
||||
'staticcheck',
|
||||
'stylua',
|
||||
'trivy',
|
||||
@@ -323,7 +331,7 @@ return {
|
||||
|
||||
-- Disable autoformat for files in a certain paths
|
||||
local bufname = vim.api.nvim_buf_get_name(bufnr)
|
||||
if bufname:match '/node_modules|vendor/' then return end
|
||||
if bufname:match '/dist|node_modules|vendor/' then return end
|
||||
|
||||
return {
|
||||
timeout_ms = 500,
|
||||
@@ -335,6 +343,7 @@ return {
|
||||
sh = { 'shfmt' },
|
||||
bash = { 'shfmt' },
|
||||
php = { 'phpcbf' },
|
||||
python = { 'isort', 'black' },
|
||||
-- Conform can also run multiple formatters sequentially
|
||||
-- python = { "isort", "black" },
|
||||
--
|
||||
|
||||
@@ -25,6 +25,14 @@ return {
|
||||
},
|
||||
}
|
||||
|
||||
-- Better Around/Inside textobjects
|
||||
--
|
||||
-- Examples:
|
||||
-- - va) - [V]isually select [A]round [)]paren
|
||||
-- - yinq - [Y]ank [I]nside [N]ext [Q]uote
|
||||
-- - ci' - [C]hange [I]nside [']quote
|
||||
require('mini.ai').setup { n_lines = 500 }
|
||||
|
||||
-- Animate common Neovim actions
|
||||
-- Replaced anuvyklack/windows.nvim
|
||||
require('mini.animate').setup()
|
||||
|
||||
@@ -41,7 +41,7 @@ return {
|
||||
'document_symbols',
|
||||
},
|
||||
source_selector = {
|
||||
winbar = true,
|
||||
winbar = false,
|
||||
statusline = false,
|
||||
separator = { left = '', right = '' },
|
||||
show_separator_on_edge = true,
|
||||
@@ -54,7 +54,7 @@ return {
|
||||
event_handlers = {
|
||||
{
|
||||
event = 'file_opened',
|
||||
handler = function(file_path)
|
||||
handler = function(_)
|
||||
require('neo-tree.command').execute { action = 'close' }
|
||||
end,
|
||||
},
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
return {
|
||||
-- Theme of choice, tokyonight
|
||||
-- https://github.com/folke/tokyonight.nvim
|
||||
-- https://github.com/rmehri01/onenord.nvim
|
||||
{
|
||||
'folke/tokyonight.nvim',
|
||||
'rmehri01/onenord.nvim',
|
||||
priority = 1000, -- Make sure to load this before all the other start plugins.
|
||||
init = function() vim.cmd.colorscheme(vim.g.colors_theme) end,
|
||||
opts = {
|
||||
transparent = true,
|
||||
borders = true,
|
||||
fade_nc = true,
|
||||
disable = {
|
||||
float_background = true,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -18,11 +20,11 @@ return {
|
||||
update_interval = 1000,
|
||||
set_dark_mode = function()
|
||||
vim.api.nvim_set_option_value('background', 'dark', {})
|
||||
vim.cmd.colorscheme(vim.g.colors_variant_dark)
|
||||
-- vim.cmd.colorscheme(vim.g.colors_variant_dark)
|
||||
end,
|
||||
set_light_mode = function()
|
||||
vim.api.nvim_set_option_value('background', 'light', {})
|
||||
vim.cmd.colorscheme(vim.g.colors_variant_light)
|
||||
-- vim.cmd.colorscheme(vim.g.colors_variant_light)
|
||||
end,
|
||||
},
|
||||
},
|
||||
|
||||
1
config/tmux/plugins/tmux-resurrect
Submodule
1
config/tmux/plugins/tmux-resurrect
Submodule
Submodule config/tmux/plugins/tmux-resurrect added at cff343cf9e
@@ -137,6 +137,9 @@ set -g @mode_indicator_sync_mode_style 'bg=default,fg=red'
|
||||
set -g @fzf-url-bind 'u'
|
||||
set -g @fzf-url-history-limit '2000'
|
||||
|
||||
# https://github.com/tmux-plugins/tmux-continuum
|
||||
set -g @continuum-restore 'on'
|
||||
|
||||
# ── Own scripts ───────────────────────────────────────────────────────
|
||||
|
||||
# If we started tmux with a session name, rename it.
|
||||
@@ -154,6 +157,7 @@ run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-window-name/tmux_window_name
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-mode-indicator/mode_indicator.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-suspend/suspend.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-continuum/continuum.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-resurrect/resurrect.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-sessionist/sessionist.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-yank/yank.tmux"
|
||||
run-shell "$HOME/.dotfiles/config/tmux/plugins/tmux-current-pane-hostname/current_pane_hostname.tmux"
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
let mapleader=' ' " Map leader to <space>
|
||||
filetype off " disable filetype detection (but re-enable later, see below)
|
||||
|
||||
" find matching tags in html/xml documents using matchit
|
||||
filetype plugin on
|
||||
packadd! matchit
|
||||
" disable super buggy netrw
|
||||
let g:loaded_netrw=1
|
||||
let g:netrw_loaded_netrwPlugin=1
|
||||
" show JSDoc highlight colors
|
||||
let g:javascript_plugin_jsdoc=1
|
||||
|
||||
set backspace=indent,eol,start " Backspace behavior
|
||||
set cindent " Use 'C' style program indenting
|
||||
set cursorline " Highlight current line
|
||||
set encoding=utf-8 " UTF-8
|
||||
set expandtab " Use spaces instead of tabs
|
||||
set fileformats=unix,dos,mac " File formats
|
||||
set foldmethod=indent " Fold based on indent
|
||||
set foldlevel=99 " Open all folds
|
||||
set guioptions=egmrti " GUI options
|
||||
set hidden " Enable hidden buffers
|
||||
set ignorecase " Always case-insensitive
|
||||
set incsearch " Searches for strings incrementally
|
||||
set laststatus=2 " Always show statusline (even with only single window)
|
||||
set linespace=3 " Set line spacing
|
||||
set list " Show invisible characters
|
||||
set listchars=tab:⌴\ ,trail:◼,nbsp:•,extends:…,precedes:… " Invisible characters
|
||||
set modeline " Enable modelines
|
||||
set modelines=3 " Number of lines to check for modelines
|
||||
set mouse=a " Enable mouse support
|
||||
set mousemodel=popup " Enable mouse support
|
||||
set nobackup " Disable backup files
|
||||
set nocompatible " disable compatibility mode with vi
|
||||
set nowritebackup " Disable backup files
|
||||
set number " Show line numbers
|
||||
set relativenumber " Show relative line numbers
|
||||
set ruler " Show row and column ruler information
|
||||
set scrolloff=8 " Minimum number of lines to keep above and below the cursor
|
||||
set shiftwidth=4 " Number of auto-indent spaces
|
||||
set shortmess+=A " Don't show autocommand messages
|
||||
set shortmess+=F " Avoid showing the "file-info" message
|
||||
set shortmess+=I " Don't show intro message
|
||||
set shortmess+=O " Avoid showing the "file-read" message
|
||||
set shortmess+=O " Don't show overlength messages
|
||||
set shortmess+=T " Don't show title messages
|
||||
set shortmess+=W " Don't show "written" messages
|
||||
set shortmess+=a " Avoid showing the "ATTENTION" message
|
||||
set shortmess+=c " Avoid showing the "ins-completion-menu" message
|
||||
set shortmess+=c " Don't pass messages to |ins-completion-menu|
|
||||
set shortmess+=o " Avoid showing the "overlength" message
|
||||
set shortmess+=t " Avoid showing the "trailing whitespace" message
|
||||
set showcmd " Show command in status line
|
||||
set showmatch " Highlight matching brace
|
||||
set signcolumn=yes " Show sign column
|
||||
set smartcase " Enable smart-case search
|
||||
set smartindent " Enable smart-indent
|
||||
set smarttab " Enable smart-tabs
|
||||
set softtabstop=4 " Number of spaces per Tab
|
||||
set spelllang=fi,en " Set the spell language
|
||||
set spellsuggest=double " Suggest the first word when spell checking
|
||||
set t_Co=256 " 256 colors
|
||||
set termguicolors " Enable 24-bit RGB color in the terminal
|
||||
set timeoutlen=500 " By default timeoutlen=1000 (ms)
|
||||
set ttimeoutlen=0 " By default ttimeoutlen=-1 (ms)
|
||||
set undolevels=1000 " Number of undo levels
|
||||
set visualbell " Use visual bell (no beeping)
|
||||
set wildmenu " Enable wildmenu
|
||||
set wildmode=longest,list:longest " Command-line completion mode
|
||||
set wrap " Wrap lines
|
||||
set wrapscan " Searches wrap around the end of the file
|
||||
|
||||
" Ignore these files in wildmenu
|
||||
set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__,vendor
|
||||
|
||||
colorscheme iceberg " Set the color scheme
|
||||
filetype plugin indent on " enable filetype detection, plugins and indenting
|
||||
|
||||
" Set the shell
|
||||
if exists('$SHELL')
|
||||
set shell=$SHELL
|
||||
else
|
||||
set shell=/bin/sh
|
||||
endif
|
||||
|
||||
175
config/vim/autoload/airline/themes/pencil.vim
Normal file
175
config/vim/autoload/airline/themes/pencil.vim
Normal file
@@ -0,0 +1,175 @@
|
||||
let g:airline#themes#pencil#palette = {}
|
||||
|
||||
function! airline#themes#pencil#refresh()
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Options
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let s:background = get(g:, 'airline_pencil_bg', &background)
|
||||
let s:ansi_colors = &t_Co < 16 ? 1 : 0
|
||||
let s:tty = &t_Co == 8
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Colors
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Base colors
|
||||
let s:base03 = {'t': s:ansi_colors ? 8 : (s:tty ? '0' : 234), 'g': '#212121'}
|
||||
let s:base02 = {'t': s:ansi_colors ? '0' : (s:tty ? '0' : 235), 'g': '#424242'}
|
||||
let s:base01 = {'t': s:ansi_colors ? 10 : (s:tty ? '0' : 240), 'g': '#909090'}
|
||||
let s:base00 = {'t': s:ansi_colors ? 11 : (s:tty ? '7' : 241), 'g': '#545454'}
|
||||
let s:base0 = {'t': s:ansi_colors ? 12 : (s:tty ? '7' : 244), 'g': '#B2B2B2'}
|
||||
let s:base1 = {'t': s:ansi_colors ? 14 : (s:tty ? '7' : 245), 'g': '#636363'}
|
||||
let s:base2 = {'t': s:ansi_colors ? 7 : (s:tty ? '7' : 254), 'g': '#D9D9D9'}
|
||||
let s:base3 = {'t': s:ansi_colors ? 15 : (s:tty ? '7' : 7 ), 'g': '#C6C6C6'}
|
||||
let s:darkblue= {'t': s:ansi_colors ? 4 : (s:tty ? '4' : 24 ), 'g': '#005F87'}
|
||||
let s:orange = {'t': s:ansi_colors ? 9 : (s:tty ? '1' : 166), 'g': '#D75F5F'}
|
||||
let s:red = {'t': s:ansi_colors ? 1 : (s:tty ? '1' : 160), 'g': '#C30771'}
|
||||
let s:magenta = {'t': s:ansi_colors ? 5 : (s:tty ? '5' : 125), 'g': '#E32791'}
|
||||
let s:violet = {'t': s:ansi_colors ? 13 : (s:tty ? '5' : 61 ), 'g': '#6855DE'}
|
||||
let s:blue = {'t': s:ansi_colors ? 4 : (s:tty ? '4' : 33 ), 'g': '#008EC4'}
|
||||
let s:cyan = {'t': s:ansi_colors ? 6 : (s:tty ? '6' : 37 ), 'g': '#20A5BA'}
|
||||
let s:green = {'t': s:ansi_colors ? 2 : (s:tty ? '2' : 64 ), 'g': '#10A778'}
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Simple mappings
|
||||
" NOTE: These are easily tweakable mappings. The actual mappings get
|
||||
" the specific gui and terminal colors from the base color dicts.
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Normal mode
|
||||
if s:background == 'dark'
|
||||
let s:N1 = [s:base3, s:base1, 'bold']
|
||||
let s:N2 = [s:base2, (s:tty ? s:base01 : s:base00), '']
|
||||
let s:N3 = [s:base01, s:base02, '']
|
||||
else
|
||||
let s:N1 = [s:base2, s:base00, 'bold']
|
||||
let s:N2 = [(s:tty ? s:base01 : s:base2), s:base1, '']
|
||||
let s:N3 = [s:base1, s:base2, '']
|
||||
endif
|
||||
let s:NF = [s:orange, s:N3[1], '']
|
||||
let s:NW = [s:base3, s:orange, '']
|
||||
if s:background == 'dark'
|
||||
let s:NM = [s:base1, s:N3[1], '']
|
||||
let s:NMi = [s:base2, s:N3[1], '']
|
||||
else
|
||||
let s:NM = [s:base01, s:N3[1], '']
|
||||
let s:NMi = [s:base02, s:N3[1], '']
|
||||
endif
|
||||
|
||||
" Insert mode
|
||||
let s:I1 = [s:N1[0], s:darkblue, 'bold']
|
||||
let s:I2 = s:N2
|
||||
let s:I3 = s:N3
|
||||
let s:IF = s:NF
|
||||
let s:IM = s:NM
|
||||
|
||||
" Visual mode
|
||||
let s:V1 = [s:N1[0], s:magenta, 'bold']
|
||||
let s:V2 = s:N2
|
||||
let s:V3 = s:N3
|
||||
let s:VF = s:NF
|
||||
let s:VM = s:NM
|
||||
|
||||
" Replace mode
|
||||
let s:R1 = [s:N1[0], s:red, '']
|
||||
let s:R2 = s:N2
|
||||
let s:R3 = s:N3
|
||||
let s:RM = s:NM
|
||||
let s:RF = s:NF
|
||||
|
||||
" Inactive, according to VertSplit in pencil
|
||||
" (bg dark: base00; bg light: base0)
|
||||
if s:background == 'dark'
|
||||
let s:IA = [s:base01, s:base02, '']
|
||||
else
|
||||
let s:IA = [s:base1, s:base2, '']
|
||||
endif
|
||||
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
" Actual mappings
|
||||
" WARNING: Don't modify this section unless necessary.
|
||||
""""""""""""""""""""""""""""""""""""""""""""""""
|
||||
let s:NFa = [s:NF[0].g, s:NF[1].g, s:NF[0].t, s:NF[1].t, s:NF[2]]
|
||||
let s:IFa = [s:IF[0].g, s:IF[1].g, s:IF[0].t, s:IF[1].t, s:IF[2]]
|
||||
let s:VFa = [s:VF[0].g, s:VF[1].g, s:VF[0].t, s:VF[1].t, s:VF[2]]
|
||||
let s:RFa = [s:RF[0].g, s:RF[1].g, s:RF[0].t, s:RF[1].t, s:RF[2]]
|
||||
|
||||
let g:airline#themes#pencil#palette.accents = {
|
||||
\ 'red': s:NFa,
|
||||
\ }
|
||||
|
||||
let g:airline#themes#pencil#palette.inactive = airline#themes#generate_color_map(
|
||||
\ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]],
|
||||
\ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]],
|
||||
\ [s:IA[0].g, s:IA[1].g, s:IA[0].t, s:IA[1].t, s:IA[2]])
|
||||
let g:airline#themes#pencil#palette.inactive_modified = {
|
||||
\ 'airline_c': [s:NMi[0].g, '', s:NMi[0].t, '', s:NMi[2]]}
|
||||
|
||||
let g:airline#themes#pencil#palette.normal = airline#themes#generate_color_map(
|
||||
\ [s:N1[0].g, s:N1[1].g, s:N1[0].t, s:N1[1].t, s:N1[2]],
|
||||
\ [s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]],
|
||||
\ [s:N3[0].g, s:N3[1].g, s:N3[0].t, s:N3[1].t, s:N3[2]])
|
||||
|
||||
let g:airline#themes#pencil#palette.normal.airline_warning = [
|
||||
\ s:NW[0].g, s:NW[1].g, s:NW[0].t, s:NW[1].t, s:NW[2]]
|
||||
|
||||
let g:airline#themes#pencil#palette.normal_modified = {
|
||||
\ 'airline_c': [s:NM[0].g, s:NM[1].g,
|
||||
\ s:NM[0].t, s:NM[1].t, s:NM[2]]}
|
||||
|
||||
let g:airline#themes#pencil#palette.normal_modified.airline_warning =
|
||||
\ g:airline#themes#pencil#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#pencil#palette.insert = airline#themes#generate_color_map(
|
||||
\ [s:I1[0].g, s:I1[1].g, s:I1[0].t, s:I1[1].t, s:I1[2]],
|
||||
\ [s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]],
|
||||
\ [s:I3[0].g, s:I3[1].g, s:I3[0].t, s:I3[1].t, s:I3[2]])
|
||||
|
||||
let g:airline#themes#pencil#palette.insert.airline_warning =
|
||||
\ g:airline#themes#pencil#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#pencil#palette.insert_modified = {
|
||||
\ 'airline_c': [s:IM[0].g, s:IM[1].g,
|
||||
\ s:IM[0].t, s:IM[1].t, s:IM[2]]}
|
||||
|
||||
let g:airline#themes#pencil#palette.insert_modified.airline_warning =
|
||||
\ g:airline#themes#pencil#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#pencil#palette.visual = airline#themes#generate_color_map(
|
||||
\ [s:V1[0].g, s:V1[1].g, s:V1[0].t, s:V1[1].t, s:V1[2]],
|
||||
\ [s:V2[0].g, s:V2[1].g, s:V2[0].t, s:V2[1].t, s:V2[2]],
|
||||
\ [s:V3[0].g, s:V3[1].g, s:V3[0].t, s:V3[1].t, s:V3[2]])
|
||||
|
||||
let g:airline#themes#pencil#palette.visual.airline_warning =
|
||||
\ g:airline#themes#pencil#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#pencil#palette.visual_modified = {
|
||||
\ 'airline_c': [s:VM[0].g, s:VM[1].g,
|
||||
\ s:VM[0].t, s:VM[1].t, s:VM[2]]}
|
||||
|
||||
let g:airline#themes#pencil#palette.visual_modified.airline_warning =
|
||||
\ g:airline#themes#pencil#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#pencil#palette.replace = airline#themes#generate_color_map(
|
||||
\ [s:R1[0].g, s:R1[1].g, s:R1[0].t, s:R1[1].t, s:R1[2]],
|
||||
\ [s:R2[0].g, s:R2[1].g, s:R2[0].t, s:R2[1].t, s:R2[2]],
|
||||
\ [s:R3[0].g, s:R3[1].g, s:R3[0].t, s:R3[1].t, s:R3[2]])
|
||||
|
||||
let g:airline#themes#pencil#palette.replace.airline_warning =
|
||||
\ g:airline#themes#pencil#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#pencil#palette.replace_modified = {
|
||||
\ 'airline_c': [s:RM[0].g, s:RM[1].g,
|
||||
\ s:RM[0].t, s:RM[1].t, s:RM[2]]}
|
||||
|
||||
let g:airline#themes#pencil#palette.replace_modified.airline_warning =
|
||||
\ g:airline#themes#pencil#palette.normal.airline_warning
|
||||
|
||||
let g:airline#themes#pencil#palette.tabline = {}
|
||||
|
||||
let g:airline#themes#pencil#palette.tabline.airline_tab = [
|
||||
\ s:I2[0].g, s:I2[1].g, s:I2[0].t, s:I2[1].t, s:I2[2]]
|
||||
|
||||
let g:airline#themes#pencil#palette.tabline.airline_tabtype = [
|
||||
\ s:N2[0].g, s:N2[1].g, s:N2[0].t, s:N2[1].t, s:N2[2]]
|
||||
endfunction
|
||||
|
||||
call airline#themes#pencil#refresh()
|
||||
@@ -372,8 +372,10 @@ function! plug#end()
|
||||
|
||||
for [cmd, names] in items(lod.cmd)
|
||||
execute printf(
|
||||
\ 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)',
|
||||
\ cmd, string(cmd), string(names))
|
||||
\ has('patch-7.4.1898')
|
||||
\ ? 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, <q-mods> ,%s)'
|
||||
\ : 'command! -nargs=* -range -bang -complete=file %s call s:lod_cmd(%s, "<bang>", <line1>, <line2>, <q-args>, %s)'
|
||||
\ , cmd, string(cmd), string(names))
|
||||
endfor
|
||||
|
||||
for [map, names] in items(lod.map)
|
||||
@@ -651,11 +653,19 @@ function! s:lod_ft(pat, names)
|
||||
call s:doautocmd('filetypeindent', 'FileType')
|
||||
endfunction
|
||||
|
||||
function! s:lod_cmd(cmd, bang, l1, l2, args, names)
|
||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||
call s:dobufread(a:names)
|
||||
execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
||||
endfunction
|
||||
if has('patch-7.4.1898')
|
||||
function! s:lod_cmd(cmd, bang, l1, l2, args, mods, names)
|
||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||
call s:dobufread(a:names)
|
||||
execute printf('%s %s%s%s %s', a:mods, (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
||||
endfunction
|
||||
else
|
||||
function! s:lod_cmd(cmd, bang, l1, l2, args, names)
|
||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||
call s:dobufread(a:names)
|
||||
execute printf('%s%s%s %s', (a:l1 == a:l2 ? '' : (a:l1.','.a:l2)), a:cmd, a:bang, a:args)
|
||||
endfunction
|
||||
endif
|
||||
|
||||
function! s:lod_map(map, names, with_prefix, prefix)
|
||||
call s:lod(a:names, ['ftdetect', 'after/ftdetect', 'plugin', 'after/plugin'])
|
||||
@@ -1075,12 +1085,16 @@ function! s:hash_match(a, b)
|
||||
return stridx(a:a, a:b) == 0 || stridx(a:b, a:a) == 0
|
||||
endfunction
|
||||
|
||||
function! s:disable_credential_helper()
|
||||
return s:git_version_requirement(2) && get(g:, 'plug_disable_credential_helper', 1)
|
||||
endfunction
|
||||
|
||||
function! s:checkout(spec)
|
||||
let sha = a:spec.commit
|
||||
let output = s:git_revision(a:spec.dir)
|
||||
let error = 0
|
||||
if !empty(output) && !s:hash_match(sha, s:lines(output)[0])
|
||||
let credential_helper = s:git_version_requirement(2) ? '-c credential.helper= ' : ''
|
||||
let credential_helper = s:disable_credential_helper() ? '-c credential.helper= ' : ''
|
||||
let output = s:system(
|
||||
\ 'git '.credential_helper.'fetch --depth 999999 && git checkout '.plug#shellescape(sha).' --', a:spec.dir)
|
||||
let error = v:shell_error
|
||||
@@ -1589,7 +1603,7 @@ while 1 " Without TCO, Vim stack is bound to explode
|
||||
let [error, _] = s:git_validate(spec, 0)
|
||||
if empty(error)
|
||||
if pull
|
||||
let cmd = s:git_version_requirement(2) ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch']
|
||||
let cmd = s:disable_credential_helper() ? ['git', '-c', 'credential.helper=', 'fetch'] : ['git', 'fetch']
|
||||
if has_tag && !empty(globpath(spec.dir, '.git/shallow'))
|
||||
call extend(cmd, ['--depth', '99999999'])
|
||||
endif
|
||||
|
||||
383
config/vim/colors/pencil.vim
Normal file
383
config/vim/colors/pencil.vim
Normal file
@@ -0,0 +1,383 @@
|
||||
" Vim Color File
|
||||
" Name: pencil.vim
|
||||
" Version: 0.6
|
||||
" Maintainer: github.com/preservim
|
||||
" License: The MIT License (MIT)
|
||||
|
||||
" Original iA Writer colors, to use as a guide
|
||||
" White #F1F1F1
|
||||
" OffWhiteIPad #F5F2EC
|
||||
" OffWhiteDemo #F9F8F4
|
||||
" Cursor #20BBFC
|
||||
" Selection #B6D6FD
|
||||
" SelectionNOS #D4D4D4
|
||||
" StatusBar #EDEDED
|
||||
" StatusBarBorder #D9D9D9 used for search too
|
||||
" Text #424242
|
||||
" Blue #B5D6FD
|
||||
" Green #30C798
|
||||
" Blue2 #1DAEE4
|
||||
" gray #999999
|
||||
" Red #E32791
|
||||
" UnfocusedText #B8B8B8
|
||||
" MenuSelected #2C81FB
|
||||
" MenuUnSelected #545454
|
||||
" MenuText #F1F1F1
|
||||
" LightKeyBg #4B4B4B
|
||||
" DarkKeyBg #262626
|
||||
" NearBlack #181818
|
||||
" SyntaxButton #363738
|
||||
" SearchHighlight #F3E430 yellow
|
||||
|
||||
hi clear
|
||||
|
||||
if exists('syntax on')
|
||||
syntax reset
|
||||
endif
|
||||
|
||||
let g:colors_name='pencil'
|
||||
|
||||
if ! exists("g:pencil_higher_contrast_ui")
|
||||
let g:pencil_higher_contrast_ui = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:pencil_neutral_code_bg")
|
||||
let g:pencil_neutral_code_bg = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:pencil_neutral_headings")
|
||||
let g:pencil_neutral_headings = 0
|
||||
endif
|
||||
|
||||
" not all terminals support italics properly. If yours does, opt-in.
|
||||
if ! exists("g:pencil_terminal_italics")
|
||||
let g:pencil_terminal_italics = 0
|
||||
endif
|
||||
|
||||
if ! exists("g:pencil_spell_undercurl")
|
||||
let g:pencil_spell_undercurl = 1
|
||||
endif
|
||||
|
||||
if ! exists("g:pencil_gutter_color")
|
||||
let g:pencil_gutter_color = 0
|
||||
endif
|
||||
|
||||
" Colors
|
||||
let s:black = { "gui": "#212121", "cterm": "0" }
|
||||
let s:medium_gray = { "gui": "#767676", "cterm": "243" }
|
||||
let s:white = { "gui": "#F1F1F1", "cterm": "15" }
|
||||
let s:actual_white = { "gui": "#FFFFFF", "cterm": "231" }
|
||||
let s:light_black = { "gui": "#424242", "cterm": "8" }
|
||||
let s:lighter_black = { "gui": "#545454", "cterm": "240" }
|
||||
|
||||
if g:pencil_higher_contrast_ui == 0
|
||||
" darker shadow and whiter grays
|
||||
let s:subtle_black = { "gui": "#262626", "cterm": "235" }
|
||||
let s:light_gray = { "gui": "#D9D9D9", "cterm": "253" }
|
||||
let s:lighter_gray = { "gui": "#E5E6E6", "cterm": "254" }
|
||||
else
|
||||
" lighter shadows and darker grays
|
||||
let s:subtle_black = { "gui": "#303030", "cterm": "236" }
|
||||
let s:light_gray = { "gui": "#B2B2B2", "cterm": "249" }
|
||||
let s:lighter_gray = { "gui": "#C6C6C6", "cterm": "251" }
|
||||
endif
|
||||
|
||||
let s:pink = { "gui": "#fb007a", "cterm": "9" }
|
||||
let s:dark_red = { "gui": "#C30771", "cterm": "1" }
|
||||
let s:light_red = { "gui": "#E32791", "cterm": "1" }
|
||||
let s:orange = { "gui": "#D75F5F", "cterm": "167" }
|
||||
|
||||
let s:darker_blue = { "gui": "#005F87", "cterm": "18" }
|
||||
let s:dark_blue = { "gui": "#008EC4", "cterm": "4" }
|
||||
let s:blue = { "gui": "#20BBFC", "cterm": "12" }
|
||||
let s:light_blue = { "gui": "#b6d6fd", "cterm": "153" }
|
||||
let s:dark_cyan = { "gui": "#20A5BA", "cterm": "6" }
|
||||
let s:light_cyan = { "gui": "#4FB8CC", "cterm": "14" }
|
||||
|
||||
let s:dark_green = { "gui": "#10A778", "cterm": "2" }
|
||||
let s:light_green = { "gui": "#5FD7A7", "cterm": "10" }
|
||||
|
||||
let s:dark_purple = { "gui": "#523C79", "cterm": "5" }
|
||||
let s:light_purple = { "gui": "#6855DE", "cterm": "13" }
|
||||
|
||||
let s:yellow = { "gui": "#F3E430", "cterm": "11" }
|
||||
let s:dark_yellow = { "gui": "#A89C14", "cterm": "3" }
|
||||
|
||||
if &background == "dark"
|
||||
let s:bg = s:black
|
||||
let s:bg_subtle = s:light_black
|
||||
let s:bg_very_subtle = s:subtle_black
|
||||
let s:norm = s:lighter_gray
|
||||
let s:norm_subtle = s:light_gray
|
||||
let s:purple = s:light_purple
|
||||
let s:cyan = s:light_cyan
|
||||
let s:green = s:light_green
|
||||
let s:red = s:light_red
|
||||
let s:visual = s:lighter_black
|
||||
else
|
||||
let s:bg = s:white
|
||||
let s:bg_subtle = s:light_gray
|
||||
let s:bg_very_subtle = s:lighter_gray
|
||||
let s:norm = s:light_black
|
||||
let s:norm_subtle = s:lighter_black
|
||||
let s:purple = s:dark_purple
|
||||
let s:cyan = s:dark_cyan
|
||||
let s:green = s:dark_green
|
||||
let s:red = s:dark_red
|
||||
let s:visual = s:light_blue
|
||||
endif
|
||||
|
||||
if g:pencil_neutral_headings == 1
|
||||
let s:head_a = s:norm
|
||||
let s:head_b = s:norm
|
||||
let s:head_c = s:norm
|
||||
else
|
||||
let s:head_a = s:dark_blue
|
||||
let s:head_b = s:blue
|
||||
let s:head_c = s:dark_cyan
|
||||
endif
|
||||
|
||||
if g:pencil_neutral_code_bg == 1
|
||||
let s:code_bg = s:bg
|
||||
else
|
||||
let s:code_bg = s:bg_very_subtle
|
||||
endif
|
||||
|
||||
if g:pencil_spell_undercurl == 1
|
||||
let s:sp_un = 'undercurl'
|
||||
else
|
||||
let s:sp_un = 'underline'
|
||||
endif
|
||||
|
||||
" shamelessly stolen from hemisu: https://github.com/noahfrederick/vim-hemisu/
|
||||
function! s:h(group, style)
|
||||
" Not all terminals support italics properly. If yours does, opt-in.
|
||||
if g:pencil_terminal_italics == 0 && has_key(a:style, "cterm") && a:style["cterm"] == "italic"
|
||||
unlet a:style.cterm
|
||||
endif
|
||||
execute "highlight" a:group
|
||||
\ "guifg=" (has_key(a:style, "fg") ? a:style.fg.gui : "NONE")
|
||||
\ "guibg=" (has_key(a:style, "bg") ? a:style.bg.gui : "NONE")
|
||||
\ "guisp=" (has_key(a:style, "sp") ? a:style.sp.gui : "NONE")
|
||||
\ "gui=" (has_key(a:style, "gui") ? a:style.gui : "NONE")
|
||||
\ "ctermfg=" (has_key(a:style, "fg") ? a:style.fg.cterm : "NONE")
|
||||
\ "ctermbg=" (has_key(a:style, "bg") ? a:style.bg.cterm : "NONE")
|
||||
\ "cterm=" (has_key(a:style, "cterm") ? a:style.cterm : "NONE")
|
||||
endfunction
|
||||
|
||||
" common groups ================================================================
|
||||
" (see `:h w18`)
|
||||
|
||||
call s:h("Normal", {"bg": s:bg, "fg": s:norm})
|
||||
call s:h("Cursor", {"bg": s:blue, "fg": s:norm })
|
||||
call s:h("Comment", {"fg": s:medium_gray, "gui": "italic", "cterm": "italic"})
|
||||
|
||||
call s:h("Constant", {"fg": s:cyan})
|
||||
hi! link String Constant
|
||||
hi! link Character Constant
|
||||
hi! link Number Constant
|
||||
hi! link Boolean Constant
|
||||
hi! link Float Constant
|
||||
|
||||
call s:h("Identifier", {"fg": s:dark_blue})
|
||||
hi! link Function Identifier
|
||||
|
||||
call s:h("Statement", {"fg": s:green})
|
||||
hi! link Conditonal Statement
|
||||
hi! link Repeat Statement
|
||||
hi! link Label Statement
|
||||
hi! link Operator Statement
|
||||
hi! link Keyword Statement
|
||||
hi! link Exception Statement
|
||||
|
||||
call s:h("PreProc", {"fg": s:red})
|
||||
hi! link Include PreProc
|
||||
hi! link Define PreProc
|
||||
hi! link Macro PreProc
|
||||
hi! link PreCondit PreProc
|
||||
|
||||
call s:h("Type", {"fg": s:purple})
|
||||
hi! link StorageClass Type
|
||||
hi! link Structure Type
|
||||
hi! link Typedef Type
|
||||
|
||||
call s:h("Special", {"fg": s:pink})
|
||||
hi! link SpecialChar Special
|
||||
hi! link Tag Special
|
||||
hi! link Delimiter Special
|
||||
hi! link SpecialComment Special
|
||||
hi! link Debug Special
|
||||
|
||||
call s:h("Underlined", {"fg": s:norm , "gui": "underline", "cterm": "underline"})
|
||||
call s:h("Ignore", {"fg": s:bg })
|
||||
call s:h("Error", {"fg": s:actual_white, "bg": s:red , "gui": "bold" , "cterm": "bold" })
|
||||
call s:h("Todo", {"fg": s:actual_white, "bg": s:pink, "gui": "bold" , "cterm": "bold" })
|
||||
|
||||
" ui chrome ====================================================================
|
||||
" ordered according to `:help hitest.vim`
|
||||
|
||||
call s:h("SpecialKey", {"fg": s:light_green})
|
||||
call s:h("NonText", {"fg": s:bg_subtle})
|
||||
call s:h("Directory", {"fg": s:dark_blue})
|
||||
call s:h("ErrorMsg", {"fg": s:pink})
|
||||
call s:h("IncSearch", {"bg": s:yellow, "fg": s:light_black})
|
||||
call s:h("Search", {"bg": s:bg_subtle})
|
||||
call s:h("MoreMsg", {"fg": s:medium_gray, "gui": "bold", "cterm": "bold"})
|
||||
hi! link ModeMsg MoreMsg
|
||||
call s:h("LineNr", {"fg": s:bg_subtle})
|
||||
call s:h("CursorLineNr", {"fg": s:blue, "bg": s:bg_very_subtle})
|
||||
call s:h("Question", {"fg": s:red})
|
||||
call s:h("StatusLine", {"bg": s:bg_very_subtle})
|
||||
call s:h("Conceal", {"fg": s:norm})
|
||||
call s:h("StatusLineNC", {"bg": s:bg_very_subtle, "fg": s:medium_gray})
|
||||
call s:h("VertSplit", {"bg": s:bg_very_subtle, "fg": s:bg_very_subtle})
|
||||
call s:h("Title", {"fg": s:dark_blue})
|
||||
call s:h("Visual", {"bg": s:visual})
|
||||
call s:h("VisualNOS", {"bg": s:bg_subtle})
|
||||
call s:h("WarningMsg", {"fg": s:red})
|
||||
call s:h("WildMenu", {"fg": s:bg, "bg": s:norm})
|
||||
call s:h("Folded", {"fg": s:medium_gray})
|
||||
call s:h("FoldColumn", {"fg": s:bg_subtle})
|
||||
call s:h("DiffAdd", {"bg": s:bg_subtle, "fg": s:green})
|
||||
call s:h("DiffAdded", {"bg": s:bg_subtle, "fg": s:green})
|
||||
call s:h("DiffDelete", {"bg": s:bg_subtle, "fg": s:red})
|
||||
call s:h("DiffRemoved", {"bg": s:bg_subtle, "fg": s:red})
|
||||
call s:h("DiffChange", {"bg": s:bg_subtle, "fg": s:dark_yellow})
|
||||
call s:h("DiffChanged", {"bg": s:bg_subtle, "fg": s:dark_yellow})
|
||||
call s:h("DiffText", {"bg": s:bg_subtle, "fg": s:dark_blue})
|
||||
call s:h("SignColumn", {"fg": s:light_green})
|
||||
|
||||
call s:h("SpellBad", {"gui": s:sp_un, "sp": s:red, "cterm": s:sp_un, "fg": s:red})
|
||||
call s:h("SpellCap", {"gui": s:sp_un, "sp": s:light_green, "cterm": s:sp_un, "fg": s:light_green})
|
||||
call s:h("SpellRare", {"gui": s:sp_un, "sp": s:pink, "cterm": s:sp_un, "fg": s:pink})
|
||||
call s:h("SpellLocal", {"gui": s:sp_un, "sp": s:dark_green, "cterm": s:sp_un, "fg": s:dark_green})
|
||||
|
||||
call s:h("Pmenu", {"fg": s:norm, "bg": s:bg_subtle})
|
||||
call s:h("PmenuSel", {"fg": s:norm, "bg": s:blue})
|
||||
call s:h("PmenuSbar", {"fg": s:norm, "bg": s:bg_subtle})
|
||||
call s:h("PmenuThumb", {"fg": s:norm, "bg": s:bg_subtle})
|
||||
call s:h("TabLine", {"fg": s:norm, "bg": s:bg_very_subtle})
|
||||
call s:h("TabLineSel", {"fg": s:blue, "bg": s:bg_subtle, "gui": "bold", "cterm": "bold"})
|
||||
call s:h("TabLineFill", {"fg": s:norm, "bg": s:bg_very_subtle})
|
||||
call s:h("CursorColumn", {"bg": s:bg_very_subtle})
|
||||
call s:h("CursorLine", {"bg": s:bg_very_subtle})
|
||||
call s:h("ColorColumn", {"bg": s:bg_subtle})
|
||||
|
||||
" remainder of syntax highlighting
|
||||
call s:h("MatchParen", {"bg": s:bg_subtle, "fg": s:norm})
|
||||
call s:h("qfLineNr", {"fg": s:medium_gray})
|
||||
|
||||
" hi helpHyperTextJump guifg=#5FAFD7 ctermfg=74
|
||||
|
||||
" HTML syntax
|
||||
hi! link htmlTag Special
|
||||
hi! link htmlEndTag htmlTag
|
||||
|
||||
hi! link htmlTagName KeyWord
|
||||
" html5 tags show up as htmlTagN
|
||||
hi! link htmlTagN Keyword
|
||||
|
||||
" HTML content
|
||||
call s:h("htmlH1", {"fg": s:head_a, "gui": "bold,italic", "cterm": "bold" })
|
||||
call s:h("htmlH2", {"fg": s:head_a, "gui": "bold" , "cterm": "bold" })
|
||||
call s:h("htmlH3", {"fg": s:head_b, "gui": "italic" , "cterm": "italic" })
|
||||
call s:h("htmlH4", {"fg": s:head_b, "gui": "italic" , "cterm": "italic" })
|
||||
call s:h("htmlH5", {"fg": s:head_c })
|
||||
call s:h("htmlH6", {"fg": s:head_c })
|
||||
call s:h("htmlLink", {"fg": s:blue , "gui": "underline" , "cterm": "underline"})
|
||||
call s:h("htmlItalic", { "gui": "italic" , "cterm": "italic" })
|
||||
call s:h("htmlBold", { "gui": "bold" , "cterm": "bold" })
|
||||
call s:h("htmlBoldItalic",{ "gui": "bold,italic", "cterm": "bold" })
|
||||
" hi htmlString guifg=#87875f guibg=NONE gui=NONE ctermfg=101 ctermbg=NONE cterm=NONE
|
||||
|
||||
" tpope/vim-markdown
|
||||
call s:h("markdownBlockquote", {"fg": s:norm})
|
||||
call s:h("markdownBold", {"fg": s:norm , "gui": "bold" , "cterm": "bold" })
|
||||
call s:h("markdownBoldItalic", {"fg": s:norm , "gui": "bold,italic", "cterm": "bold" })
|
||||
call s:h("markdownEscape", {"fg": s:norm})
|
||||
call s:h("markdownH1", {"fg": s:head_a, "gui": "bold,italic", "cterm": "bold" })
|
||||
call s:h("markdownH2", {"fg": s:head_a, "gui": "bold" , "cterm": "bold" })
|
||||
call s:h("markdownH3", {"fg": s:head_a, "gui": "italic" , "cterm": "italic"})
|
||||
call s:h("markdownH4", {"fg": s:head_a, "gui": "italic" , "cterm": "italic"})
|
||||
call s:h("markdownH5", {"fg": s:head_a})
|
||||
call s:h("markdownH6", {"fg": s:head_a})
|
||||
call s:h("markdownHeadingDelimiter", {"fg": s:norm})
|
||||
call s:h("markdownHeadingRule", {"fg": s:norm})
|
||||
call s:h("markdownId", {"fg": s:medium_gray})
|
||||
call s:h("markdownIdDeclaration", {"fg": s:norm_subtle})
|
||||
call s:h("markdownItalic", {"fg": s:norm , "gui": "italic" , "cterm": "italic"})
|
||||
call s:h("markdownLinkDelimiter", {"fg": s:medium_gray})
|
||||
call s:h("markdownLinkText", {"fg": s:norm})
|
||||
call s:h("markdownLinkTextDelimiter", {"fg": s:medium_gray})
|
||||
call s:h("markdownListMarker", {"fg": s:norm})
|
||||
call s:h("markdownOrderedListMarker", {"fg": s:norm})
|
||||
call s:h("markdownRule", {"fg": s:norm})
|
||||
call s:h("markdownUrl", {"fg": s:medium_gray, "gui": "underline", "cterm": "underline"})
|
||||
call s:h("markdownUrlDelimiter", {"fg": s:medium_gray})
|
||||
call s:h("markdownUrlTitle", {"fg": s:norm})
|
||||
call s:h("markdownUrlTitleDelimiter", {"fg": s:medium_gray})
|
||||
call s:h("markdownCode", {"fg": s:norm, "bg": s:code_bg})
|
||||
call s:h("markdownCodeDelimiter", {"fg": s:norm, "bg": s:code_bg})
|
||||
|
||||
" plasticboy/vim-markdown
|
||||
call s:h("mkdBlockquote", {"fg": s:norm})
|
||||
call s:h("mkdDelimiter", {"fg": s:medium_gray})
|
||||
call s:h("mkdID", {"fg": s:medium_gray})
|
||||
call s:h("mkdLink", {"fg": s:norm})
|
||||
call s:h("mkdLinkDef", {"fg": s:medium_gray})
|
||||
call s:h("mkdListItem", {"fg": s:norm})
|
||||
call s:h("mkdNonListItemBlock", {"fg": s:norm}) " bug in syntax?
|
||||
call s:h("mkdRule", {"fg": s:norm})
|
||||
call s:h("mkdURL", {"fg": s:medium_gray, "gui": "underline", "cterm": "underline"})
|
||||
call s:h("mkdCode", {"fg": s:norm, "bg": s:code_bg})
|
||||
|
||||
" gabrielelana/vim-markdown
|
||||
call s:h("markdownBlockquoteDelimiter", {"fg": s:norm})
|
||||
call s:h("markdownInlineDelimiter", {"fg": s:norm})
|
||||
call s:h("markdownItemDelimiter", {"fg": s:norm})
|
||||
call s:h("markdownLinkReference", {"fg": s:medium_gray})
|
||||
call s:h("markdownLinkText", {"fg": s:norm})
|
||||
call s:h("markdownLinkTextContainer", {"fg": s:medium_gray})
|
||||
call s:h("markdownLinkUrl", {"fg": s:medium_gray, "gui": "underline", "cterm": "underline"})
|
||||
call s:h("markdownLinkUrlContainer", {"fg": s:medium_gray})
|
||||
call s:h("markdownFencedCodeBlock", {"fg": s:norm, "bg": s:code_bg})
|
||||
call s:h("markdownInlineCode", {"fg": s:norm, "bg": s:code_bg})
|
||||
|
||||
" mattly/vim-markdown-enhancements
|
||||
call s:h("mmdFootnoteDelimiter", {"fg": s:medium_gray})
|
||||
call s:h("mmdFootnoteMarker", {"fg": s:norm})
|
||||
call s:h("mmdTableAlign", {"fg": s:norm})
|
||||
call s:h("mmdTableDelimiter", {"fg": s:norm})
|
||||
call s:h("mmdTableHeadDelimiter", {"fg": s:norm})
|
||||
call s:h("mmdTableHeader", {"fg": s:norm})
|
||||
call s:h("mmdTableCaptionDelimiter", {"fg": s:norm})
|
||||
call s:h("mmdTableCaption", {"fg": s:norm})
|
||||
|
||||
" Textile content
|
||||
" https://github.com/timcharper/textile.vim/blob/master/syntax/textile.vim
|
||||
"call s:h("txtBold", {"fg": s:norm , "gui": "bold" , "cterm": "bold" })
|
||||
"call s:h("txtEmphasis", {"fg": s:norm , "gui": "italic" , "cterm": "italic"})
|
||||
|
||||
" XML content
|
||||
hi! link xmlTag htmlTag
|
||||
hi! link xmlEndTag xmlTag
|
||||
hi! link xmlTagName htmlTagName
|
||||
|
||||
" Signify, git-gutter
|
||||
if g:pencil_gutter_color == 1
|
||||
hi link SignifySignAdd DiffAdd
|
||||
hi link SignifySignDelete DiffDelete
|
||||
hi link SignifySignChange DiffChange
|
||||
hi link GitGutterAdd DiffAdd
|
||||
hi link GitGutterDelete DiffDelete
|
||||
hi link GitGutterChange DiffChange
|
||||
hi link GitGutterChangeDelete DiffChange
|
||||
else
|
||||
hi link SignifySignAdd LineNr
|
||||
hi link SignifySignDelete LineNr
|
||||
hi link SignifySignChange LineNr
|
||||
hi link GitGutterAdd LineNr
|
||||
hi link GitGutterDelete LineNr
|
||||
hi link GitGutterChange LineNr
|
||||
hi link GitGutterChangeDelete LineNr
|
||||
endif
|
||||
130
config/vim/vimrc
130
config/vim/vimrc
@@ -15,9 +15,13 @@ endif
|
||||
|
||||
let g:vim_bootstrap_langs = "go,html,javascript,lua,php,python,typescript"
|
||||
let g:vim_bootstrap_editor = "vim" " nvim or vim
|
||||
let g:vim_bootstrap_theme = "iceberg"
|
||||
let g:vim_bootstrap_theme = "pencil"
|
||||
let g:vim_bootstrap_frams = "vuejs"
|
||||
|
||||
" ale
|
||||
let g:ale_fixers = {}
|
||||
let g:ale_linters = { "python": [ "flake8" ] }
|
||||
|
||||
if !filereadable(vimplug_exists)
|
||||
if !executable(curl_exists)
|
||||
echoerr "You have to install curl or first install vim-plug yourself!"
|
||||
@@ -68,9 +72,6 @@ call plug#begin(expand('$HOME/.config/vim/plugged'))
|
||||
" vim-airline
|
||||
Plug 'vim-airline/vim-airline'
|
||||
|
||||
" iceberg.vim - Iceberg color scheme
|
||||
Plug 'cocopon/iceberg.vim'
|
||||
|
||||
" fzf.vim - Fuzzy finder
|
||||
if isdirectory('~/.config/vim/extra/fzf')
|
||||
Plug '~/.config/vim/extra/fzf' | Plug 'junegunn/fzf.vim'
|
||||
@@ -132,6 +133,92 @@ call plug#begin(expand('$HOME/.config/vim/plugged'))
|
||||
call plug#end()
|
||||
" }}}
|
||||
|
||||
let mapleader=' ' " Map leader to <space>
|
||||
filetype off " disable filetype detection (but re-enable later, see below)
|
||||
|
||||
" find matching tags in html/xml documents using matchit
|
||||
filetype plugin on
|
||||
packadd! matchit
|
||||
" disable super buggy netrw
|
||||
let g:loaded_netrw=1
|
||||
let g:netrw_loaded_netrwPlugin=1
|
||||
" show JSDoc highlight colors
|
||||
let g:javascript_plugin_jsdoc=1
|
||||
|
||||
set backspace=indent,eol,start " Backspace behavior
|
||||
set cindent " Use 'C' style program indenting
|
||||
set cursorline " Highlight current line
|
||||
set encoding=utf-8 " UTF-8
|
||||
set expandtab " Use spaces instead of tabs
|
||||
set fileformats=unix,dos,mac " File formats
|
||||
set foldmethod=indent " Fold based on indent
|
||||
set foldlevel=99 " Open all folds
|
||||
set guioptions=egmrti " GUI options
|
||||
set hidden " Enable hidden buffers
|
||||
set ignorecase " Always case-insensitive
|
||||
set incsearch " Searches for strings incrementally
|
||||
set laststatus=2 " Always show statusline (even with only single window)
|
||||
set linespace=3 " Set line spacing
|
||||
set list " Show invisible characters
|
||||
set listchars=tab:⌴\ ,trail:◼,nbsp:•,extends:…,precedes:… " Invisible characters
|
||||
set modeline " Enable modelines
|
||||
set modelines=3 " Number of lines to check for modelines
|
||||
set mouse=a " Enable mouse support
|
||||
set mousemodel=popup " Enable mouse support
|
||||
set nobackup " Disable backup files
|
||||
set nocompatible " disable compatibility mode with vi
|
||||
set nowritebackup " Disable backup files
|
||||
set number " Show line numbers
|
||||
set relativenumber " Show relative line numbers
|
||||
set ruler " Show row and column ruler information
|
||||
set scrolloff=8 " Minimum number of lines to keep above and below the cursor
|
||||
set shiftwidth=4 " Number of auto-indent spaces
|
||||
set shortmess+=A " Don't show autocommand messages
|
||||
set shortmess+=F " Avoid showing the "file-info" message
|
||||
set shortmess+=I " Don't show intro message
|
||||
set shortmess+=O " Avoid showing the "file-read" message
|
||||
set shortmess+=O " Don't show overlength messages
|
||||
set shortmess+=T " Don't show title messages
|
||||
set shortmess+=W " Don't show "written" messages
|
||||
set shortmess+=a " Avoid showing the "ATTENTION" message
|
||||
set shortmess+=c " Avoid showing the "ins-completion-menu" message
|
||||
set shortmess+=c " Don't pass messages to |ins-completion-menu|
|
||||
set shortmess+=o " Avoid showing the "overlength" message
|
||||
set shortmess+=t " Avoid showing the "trailing whitespace" message
|
||||
set showcmd " Show command in status line
|
||||
set showmatch " Highlight matching brace
|
||||
set signcolumn=yes " Show sign column
|
||||
set smartcase " Enable smart-case search
|
||||
set smartindent " Enable smart-indent
|
||||
set smarttab " Enable smart-tabs
|
||||
set softtabstop=4 " Number of spaces per Tab
|
||||
set spelllang=fi,en " Set the spell language
|
||||
set spellsuggest=double " Suggest the first word when spell checking
|
||||
set t_Co=256 " 256 colors
|
||||
set termguicolors " Enable 24-bit RGB color in the terminal
|
||||
set timeoutlen=500 " By default timeoutlen=1000 (ms)
|
||||
set ttimeoutlen=0 " By default ttimeoutlen=-1 (ms)
|
||||
set undolevels=1000 " Number of undo levels
|
||||
set visualbell " Use visual bell (no beeping)
|
||||
set wildmenu " Enable wildmenu
|
||||
set wildmode=longest,list:longest " Command-line completion mode
|
||||
set wrap " Wrap lines
|
||||
set wrapscan " Searches wrap around the end of the file
|
||||
|
||||
" Ignore these files in wildmenu
|
||||
set wildignore+=*.o,*.obj,.git,*.rbc,*.pyc,__pycache__,vendor
|
||||
|
||||
colorscheme pencil " Set the color scheme
|
||||
filetype plugin indent on " enable filetype detection, plugins and indenting
|
||||
|
||||
" Set the shell
|
||||
if exists('$SHELL')
|
||||
set shell=$SHELL
|
||||
else
|
||||
set shell=/bin/sh
|
||||
endif
|
||||
|
||||
|
||||
" COC
|
||||
let g:coc_global_extensions = [
|
||||
\ '@yaegassy/coc-intelephense',
|
||||
@@ -160,9 +247,6 @@ let g:session_command_aliases = 1
|
||||
|
||||
syntax on
|
||||
|
||||
" set statusline to show the file name
|
||||
" set statusline=%F%m%r%h%w%=(%{&ff}/%Y)\ (line\ %l\/%L)|
|
||||
|
||||
" Search mappings: These will make it so that going to the next one in a
|
||||
" search will center on the line it's found in.
|
||||
nnoremap n nzzzv
|
||||
@@ -180,14 +264,14 @@ let g:airline#extensions#tabline#enabled = 1
|
||||
let g:airline#extensions#tagbar#enabled = 1
|
||||
let g:airline_powerline_fonts = 1
|
||||
let g:airline_skip_empty_sections = 1
|
||||
let g:airline_theme = 'iceberg'
|
||||
let g:airline_theme = 'pencil'
|
||||
|
||||
" NERDTree configuration
|
||||
let g:NERDTreeChDirMode=2
|
||||
let g:NERDTreeIgnore=['node_modules', 'vendor', '\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__']
|
||||
let g:NERDTreeSortOrder=['^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$']
|
||||
let g:NERDTreeShowBookmarks=1
|
||||
let g:nerdtree_tabs_focus_on_files=1
|
||||
let g:NERDTreeIgnore = [ 'node_modules', 'vendor', '\.rbc$', '\~$', '\.pyc$', '\.db$', '\.sqlite$', '__pycache__' ]
|
||||
let g:NERDTreeSortOrder = [ '^__\.py$', '\/$', '*', '\.swp$', '\.bak$', '\~$' ]
|
||||
let g:NERDTreeShowBookmarks = 1
|
||||
let g:nerdtree_tabs_focus_on_files = 1
|
||||
let g:NERDTreeMapOpenInTabSilent = '<RightMouse>'
|
||||
let g:NERDTreeWinSize = 50
|
||||
set wildignore+=*/tmp/*,*.so,*.swp,*.zip,*.pyc,*.db,*.sqlite,*node_modules/,*vendor/
|
||||
@@ -267,14 +351,14 @@ xmap <leader>c <Plug>(coc-codeaction-selected)
|
||||
|
||||
let g:wordy#ring = [
|
||||
\ 'weak',
|
||||
\ ['being', 'passive-voice', ],
|
||||
\ [ 'being', 'passive-voice', ],
|
||||
\ 'business-jargon',
|
||||
\ 'weasel',
|
||||
\ 'puffery',
|
||||
\ ['problematic', 'redundant', ],
|
||||
\ ['colloquial', 'idiomatic', 'similies', ],
|
||||
\ [ 'problematic', 'redundant', ],
|
||||
\ [ 'colloquial', 'idiomatic', 'similies', ],
|
||||
\ 'art-jargon',
|
||||
\ ['contractions', 'opinion', 'vague-time', 'said-synonyms', ],
|
||||
\ [ 'contractions', 'opinion', 'vague-time', 'said-synonyms', ],
|
||||
\ 'adjectives',
|
||||
\ 'adverbs',
|
||||
\ ]
|
||||
@@ -303,13 +387,6 @@ endif
|
||||
"" Custom configs
|
||||
"*****************************************************************************
|
||||
|
||||
" ale
|
||||
let g:ale_linters = {
|
||||
\ "vim": [ "vint" ]
|
||||
\}
|
||||
let g:ale_fixers = {
|
||||
\}
|
||||
|
||||
" javascript
|
||||
let g:javascript_enable_domhtmlcss = 1
|
||||
|
||||
@@ -339,11 +416,14 @@ let g:jedi#smart_auto_mappings = 0
|
||||
|
||||
" ale
|
||||
:call extend(g:ale_linters, {
|
||||
\ 'python': [ 'flake8' ],
|
||||
\ 'python': [ 'black' ],
|
||||
\ })
|
||||
|
||||
:call extend(g:ale_fixers, {
|
||||
\ '*': ['remove_trailing_lines', 'trim_whitespace']
|
||||
\ '*': [ 'remove_trailing_lines', 'trim_whitespace' ],
|
||||
\ 'python': [ 'autopep8', 'isort' ],
|
||||
\ })
|
||||
|
||||
let g:ale_sign_column_always = 1
|
||||
let g:ale_fix_on_save = 1
|
||||
|
||||
|
||||
@@ -1,9 +1,18 @@
|
||||
local wezterm = require 'wezterm'
|
||||
local config = wezterm.config_builder()
|
||||
|
||||
config.set_environment_variables = {
|
||||
COLORTERM = 'truecolor',
|
||||
}
|
||||
|
||||
-- Font and font size
|
||||
config.font_size = 14.0
|
||||
config.font = wezterm.font_with_fallback {
|
||||
{
|
||||
family = 'Operator Mono',
|
||||
weight = 'Book',
|
||||
},
|
||||
'Operator Mono',
|
||||
'JetBrainsMonoNL NFM Light',
|
||||
'JetBrains Mono',
|
||||
'Symbols Nerd Font Mono',
|
||||
|
||||
@@ -27,7 +27,8 @@
|
||||
},
|
||||
"homepage": "https://github.com/ivuorinen/dotfiles#readme",
|
||||
"devDependencies": {
|
||||
"@ivuorinen/base-configs": "^2.0.0"
|
||||
"@ivuorinen/base-configs": "^2.0.0",
|
||||
"bundle-audit": "^0.1.0"
|
||||
},
|
||||
"packageManager": "yarn@1.22.22"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user