Compare commits

...

117 Commits

Author SHA1 Message Date
7079e870f8 [nvim] :W-:w :Q-:q aliases 2025-11-28 22:22:00 +03:00
Dmitrii Chumak
4fe6739d9d [nvim] avante plugin 2025-08-31 12:57:05 +03:00
Dmitrii Chumak
2fa073ea87 Merge branch 'master' of https://git.venya.tech/mega_venik/dotfiles 2025-07-24 18:05:38 +03:00
Dmitrii Chumak
880bbd18e0 [vim] migration to 0.11 and native lsp client 2025-07-24 18:04:28 +03:00
ebe143ee28 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2025-07-04 00:52:24 +03:00
ba7cec969f [nvim] smth 2025-07-04 00:52:22 +03:00
Dmitrii Chumak
e2bdd71b08 gitignore 2025-06-02 14:32:15 +03:00
Dmitry Chumak
966b7c74ef [shell] alias to listen mac ports 2025-05-29 13:45:45 +05:00
Dmitry Chumak
a3c78dfcba [alacritty] fontsize conflict fix 2025-05-25 23:20:05 +03:00
Dmitry Chumak
622ae698cd Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2025-05-25 23:19:26 +03:00
Dmitry Chumak
6a20ac709a [alacritty] fontsize increase + mac docs 2025-05-25 23:18:57 +03:00
Dmitry Chumak
386257dd6e [tmux] #3 command prompt color fix 2025-05-25 23:18:05 +03:00
e0f933c26c [alacritty] font size decrease 2025-05-01 22:45:08 +03:00
Dmitry Chumak
352a8c3c97 [nvim] codecompanion plugin 2025-04-23 21:20:22 +03:00
Dmitry Chumak
bcba0e372a Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2025-04-23 20:21:18 +03:00
Dmitry Chumak
909acaa69f alacritty fixes 2025-04-23 20:21:06 +03:00
Dmitrii Chumak
72b38584ef [nvim] telescope for references + ya gopls config 2025-04-08 19:56:17 +03:00
Dmitrii Chumak
3e4452cf24 Merge branch 'master' of https://git.venya.tech/mega_venik/dotfiles 2025-04-08 19:53:30 +03:00
Dmitry Chumak
04aef1e179 alacritty alt fixes for mac + togglemaximized 2025-04-08 19:46:07 +03:00
Dmitry Chumak
bcca54a031 alacritty colorscheme + vim cursor bgcolor 2025-04-08 11:31:06 +03:00
Dmitry Chumak
491aae86da alacritty moved to dir + themes submodule 2025-04-07 15:59:19 +03:00
Dmitry Chumak
d271383341 alacritty renamed + macos bindings remap 2025-04-07 15:34:36 +03:00
90f29dcec2 alacritty config 2025-04-07 14:28:04 +03:00
Dmitrii Chumak
186bb40650 [nvim] disabled editorconfig, added cue.lua 2025-03-25 20:12:19 +03:00
de04ddd511 [nvim] func to add descriptions to keymap opts tables 2025-03-16 21:35:17 +03:00
836a80c332 [nvim] symbols navigation plugin, tabs navigation keymap 2025-03-16 20:04:02 +03:00
8de9883cbe [nvim] kinda fixed gitsigns public url 2025-03-13 22:46:05 +03:00
Dmitry Chumak
5b562a12da [nvim] gitsigns 2025-03-13 19:48:19 +03:00
Dmitry Chumak
63250216bb [nvim] Ctrl-hjkl to move between panes 2025-03-11 12:35:47 +03:00
Dmitry Chumak
4bf35a7004 [nvim] which-key plugin added, pyright fixed 2025-03-10 22:09:13 +03:00
Dmitry Chumak
4a89901c68 [nvim] added pyright lsp 2025-03-10 16:58:39 +03:00
Dmitry Chumak
957a62b72e [nvim] enabled current line highlight 2025-03-09 21:54:17 +03:00
860e52b19d [nvim] removed unused border variable 2025-03-09 21:18:22 +03:00
3dd4270e9b merge 2025-03-09 21:06:42 +03:00
db287b99f2 [vim] go support 2025-03-09 21:01:58 +03:00
f8deaa5f64 neovim install link 2025-03-09 21:01:18 +03:00
e1ce4b2fa8 gdscript support added 2025-03-09 21:00:41 +03:00
972a43b01f neovim config 2025-03-09 20:59:55 +03:00
Dmitry Chumak
d8a74ec472 system-dependant coc-settings 2025-02-27 20:32:38 +03:00
Dmitry Chumak
6c69e5e6eb Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2025-02-27 19:26:43 +03:00
Dmitry Chumak
993dbd7fa1 updates from ya macbook 2025-02-27 19:26:30 +03:00
bdab2117f3 Add README.md 2024-08-05 12:07:17 +00:00
Dmitry Chumak
3ca34914a5 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2024-07-31 15:04:09 +03:00
Dmitry Chumak
108fdaae99 [vim] vim-go, vim-terraform 2024-07-31 15:03:54 +03:00
274c9f2bab [shell] eng locale for lazygit alias 2024-07-28 16:29:33 +03:00
9876c30d6d [shell] moved to a single directory + alias.sh 2024-07-28 16:18:45 +03:00
Dmitry Chumak
2de1ebcfef [zsh] reverted check of the zshrc_local existance 2024-07-13 20:03:20 +03:00
Dmitry Chumak
9b60dd3c82 [vim] added coc-go 2024-07-13 20:02:44 +03:00
Dmitry Chumak
84c92e76a2 [zsh] fixed local config import 2024-07-13 18:21:57 +03:00
Dmitry Chumak
34de0841b9 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2024-07-11 12:57:50 +03:00
Dmitry Chumak
2dd4b82d87 [zsh] eval brew 2024-07-11 12:56:46 +03:00
Dmitry Chumak
98f19403cc [tmux] copy to clipboard separated for linux and mac 2024-07-05 12:28:41 +03:00
Dmitry Chumak
a72751e4f0 [vim] removed coc-flutter 2024-07-05 12:20:52 +03:00
c5981f5eb2 [zsh] fix importing local config 2024-07-04 21:48:46 +03:00
2ae741def7 [zsh] git status in prompt 2024-07-04 21:44:40 +03:00
835fad3214 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2024-07-04 20:56:25 +03:00
9d23b67d7a [tmux] fix startup error "no window found" 2024-07-04 20:55:32 +03:00
e0c8deda25 [bash] added bash configs for linux setups 2024-07-04 20:54:57 +03:00
09eba0e76e [zsh] ignore repeated duplicates 2024-07-04 20:42:03 +03:00
d8763db08d [tmux] increased scrollback up to 10k lines 2024-07-04 20:28:05 +03:00
26528c66e1 zsh tmux history sharing 2024-07-04 20:27:39 +03:00
b36d591496 [vim] yaml.ansible ftplugin 2024-03-21 12:09:22 +03:00
c04e8f79a5 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2023-09-30 00:54:19 +03:00
e672a42060 [tmux] added alternative window nav hotkeys 2023-09-30 00:53:58 +03:00
04964316e8 [vim] vim-sneak plugin added 2023-09-30 00:09:42 +03:00
98799dc3a6 disabling fokin inlay typehints for coc 2023-09-30 00:09:19 +03:00
e9fdee74a6 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2023-09-21 23:15:23 +03:00
0201a41408 dotbot-asdf submodule added 2023-09-21 23:15:14 +03:00
6badd231f8 [win] added autohotkey config file 2023-09-12 00:58:34 +03:00
d2ab3ad16e Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2023-09-12 00:53:29 +03:00
65c799f574 [vim] noswapfile enabled 2023-09-12 00:51:40 +03:00
f8b2a60425 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2023-06-20 13:27:37 +03:00
8b2081d3f5 [vim] commented out codeium plugin 2023-06-20 13:26:46 +03:00
3ea4f8d9b6 [vim] set nocompatible 2023-06-09 13:43:53 +03:00
96ce5d056b [vim] use system clipboard 2023-05-05 15:44:44 +03:00
e675f6563d Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2023-02-13 18:17:24 +03:00
796ed77d85 [vim] json plugin 2023-02-13 18:14:17 +03:00
d66e7899d4 [vim] docstrings and readme generator 2023-02-13 18:12:23 +03:00
3633c5bf6a [vim] flutter and dart config 2023-02-13 17:57:40 +03:00
f83547919e [vim] json files config 2023-02-13 17:56:41 +03:00
9758e40086 [dotfiles] added zhsrc 2023-02-13 17:41:12 +03:00
cda84ff163 Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2022-11-22 01:01:51 +03:00
a8eb8d46b0 [vim] coc-sh added 2022-11-22 01:01:43 +03:00
5deea3cdd3 [vim] disable swapfile 2022-11-22 01:00:23 +03:00
ad142af07d Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2022-09-17 19:56:33 +03:00
800713fd5c [vim] php indentation config 2022-09-17 19:56:09 +03:00
a33332de1c Merge branch 'master' of git.venya.tech:mega_venik/dotfiles 2022-09-16 20:02:32 +03:00
152117c4b7 [vim] disable default vim conseal for json 2022-09-16 20:00:22 +03:00
65c4c6486d [vim] coc disabled inline hints
For some reason they frozen the editor in WSL
2022-09-16 19:59:59 +03:00
b22190cbd3 [vim] vimrc tabs to spaces 2022-09-16 19:58:53 +03:00
e3aea319ab [tmux] finally disabled suspend-client hotkey 2022-09-16 19:57:49 +03:00
ed506ce6c0 [vim] coc enabled only for list of extensions 2022-09-08 12:18:35 +03:00
432dd88a1c [vim] ripgrep disable using .gitignore to ignore grepped files 2022-09-08 12:17:57 +03:00
b3b907c408 [vim] git push/pull commands through a vim internal pane 2022-09-08 12:17:14 +03:00
b3d099122a [tmux] pane borders background reset to default 2022-09-08 12:13:50 +03:00
c2b0525451 [vim] commentary plugin added 2022-09-02 20:22:05 +03:00
7d1a30b96b [vim] disabled tmp and backup files 2022-09-02 20:20:56 +03:00
ce6446b119 [vim] python files execute selection 2022-09-02 20:16:36 +03:00
1cadbbcf64 [vim] coc-nvim plugin added, plus pyright extension 2022-09-02 20:13:33 +03:00
2c43674eb1 [vim] git pull command added 2022-08-27 16:32:04 +03:00
5a69be144b [vim] fzf Rg command hidden and ignore ops added 2022-08-27 16:31:02 +03:00
58b51d0b8c [vim] nnoremap fixed inline comments
Added "|" at the end of involved commands https://stackoverflow.com/a/24717020/1044605
2022-08-27 16:27:12 +03:00
a350909de6 [vim] fzf preview window size increase 2022-08-27 16:24:24 +03:00
709892b079 [vim] ansible-vim plugin added 2022-08-22 12:34:44 +03:00
157b130473 [vim] disabled <leader>g hotkey for fzf git search 2022-08-22 12:34:24 +03:00
73e4328b95 [vim] helm auto-indent on newline 2022-08-21 23:56:14 +03:00
e1a2bde564 [vim] vim configfile styleguide 2022-08-21 17:11:07 +03:00
832aec46d7 [vim] revamped somehow broken AirlineTheme command 2022-08-21 17:10:48 +03:00
acd1c57e9b [vim] merge 2022-08-21 16:55:23 +03:00
25815ca406 [vim] todos list 2022-08-21 16:46:22 +03:00
16d36a36e7 [vim] NERDTree hidden files enabled by default 2022-08-21 16:45:42 +03:00
1d7c0c682f [vim] helm ftplugin unused statement removed 2022-08-21 16:44:11 +03:00
418931a37f [vim] git revert hunk hotkey added 2022-08-21 16:42:21 +03:00
d915a88a8a [vim] atom dark theme cleaned a bit
Vertical splits style moved from main config to theme file
2022-08-21 16:41:15 +03:00
2b34d08bf5 [vim] New light colorscheme added with toggle option 2022-08-21 16:38:20 +03:00
05c40d2882 tmux 256 color mode enabled 2022-08-21 16:35:04 +03:00
65b8cd89a7 hotkey for file grep changed 2022-08-17 17:18:44 +03:00
54 changed files with 2248 additions and 158 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
*.swp
*.swo
.netrwhist

6
.gitmodules vendored
View File

@@ -2,3 +2,9 @@
path = dotbot
url = https://github.com/anishathalye/dotbot
ignore = dirty
[submodule "dotbot-asdf"]
path = dotbot-asdf
url = https://github.com/sobolevn/dotbot-asdf.git
[submodule "alacritty/themes"]
path = alacritty/themes
url = https://github.com/alacritty/alacritty-theme.git

3
README.md Normal file
View File

@@ -0,0 +1,3 @@
### Firefox
Для более вменяемого плавного скролла на вейланде включаем параметр `apz.gtk.kinetic_scroll.enabled`, а `apz.fling_friction` выставляем в 0.008. [Источник](https://support.mozilla.org/bm/questions/1437281).

114
alacritty/alacritty.toml Normal file
View File

@@ -0,0 +1,114 @@
colors.draw_bold_text_with_bright_colors = false
#custom_cursor_colors = true
[general]
import = [
"~/.config/alacritty/themes/themes/hardhacker.toml"
]
live_config_reload = true
[window]
option_as_alt = "Both" # fixing Alt for MacOS
dynamic_padding = true
decorations = "None"
startup_mode = "Maximized"
opacity = 0.95
blur = true
[window.dimensions]
columns = 100
lines = 85
[window.padding]
x = 10
y = 5
[scrolling]
history = 0
multiplier = 3
[font]
size = 14
# use_thin_strokes = true
# on mac - https://petar.dev/notes/crisp-fonts-alacritty/
[font.normal]
family = "RecMonoLinear Nerd Font Mono"
style = "Regular"
[font.bold]
family = "RecMonoLinear Nerd Font Mono"
style = "Bold"
[font.italic]
family = "RecMonoLinear Nerd Font Mono"
style = "Regular Italic"
[font.offset]
x = 0
y = 3
[font.glyph_offset]
x = 0
y = 0
[colors.cursor]
text = 'CellBackground'
cursor = '#c7ccd1'
[bell]
animation = "EaseOutExpo"
color = "0xffffff"
duration = 0
[mouse]
hide_when_typing = false
[cursor]
style = "Block"
unfocused_hollow = true
[keyboard]
bindings = [
{ key = "A", mods = "Command", chars = "\u0001" },
{ key = "C", mods = "Command", chars = "\u0003" },
{ key = "D", mods = "Command", chars = "\u0004" },
{ key = "E", mods = "Command", chars = "\u0005" },
# to make Command-H work in MacOS one need to go to
# Settings > keyboard > Hotkeys > Apps' hotkeys
# and create some other hotkey for Alacritty's
# "Hide alacritty"
{ key = "H", mods = "Command", chars = "\u0008" },
{ key = "I", mods = "Command", chars = "\u0009" },
{ key = "J", mods = "Command", chars = "\u000a" },
{ key = "K", mods = "Command", chars = "\u000b" },
{ key = "L", mods = "Command", chars = "\u000c" },
{ key = "O", mods = "Command", chars = "\u000f" },
{ key = "R", mods = "Command", chars = "\u0012" },
{ key = "T", mods = "Command", chars = "\u0014" },
{ key = "U", mods = "Command", chars = "\u0015" },
{ key = "W", mods = "Command", chars = "\u0017" },
{ key = "X", mods = "Command", chars = "\u0018" },
{ key = "Y", mods = "Command", chars = "\u0019" },
{ key = "Z", mods = "Command", chars = "\u001a" },
# Ctrl-LeftArrow escape sequence, ^[[1;5D
# \u001b: ESCAPE character
# \u005b: LEFT SQUARE BRACKET [
# \u0031: DIGIT ONE 1
# \u003b: SEMICOLON ;
# \u0035: DIGIT FIVE 5
# \u0044: LATIN CAPITAL LETTER D
{ key = "ArrowLeft", mods = "Command", chars = "\u001b\u005b\u0031\u003b\u0035\u0044" },
# Ctrl-RightArrow escape sequence, ^[[1;5D
# ^[[1;5C 27 0033 0x1b
# 91 0133 0x5b
# 49 0061 0x31
# 59 0073 0x3b
# 53 0065 0x35
# 67 0103 0x43
{ key = "ArrowRight", mods = "Command", chars = "\u001b\u005b\u0031\u003b\u0035\u0043" },
{ key = "ArrowDown", mods = "Command", chars = "\u001b\u005b\u0031\u003b\u0035\u0042" },
{ key = "F", mods = "Control", action = "ToggleMaximized" },
]

1
alacritty/themes Submodule

Submodule alacritty/themes added at 86c578469e

1
dotbot-asdf Submodule

Submodule dotbot-asdf added at 3153c946e8

611
git/git-prompt.sh Normal file
View File

@@ -0,0 +1,611 @@
# bash/zsh git prompt support
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
# Distributed under the GNU General Public License, version 2.0.
#
# This script allows you to see repository status in your prompt.
#
# To enable:
#
# 1) Copy this file to somewhere (e.g. ~/.git-prompt.sh).
# 2) Add the following line to your .bashrc/.zshrc:
# source ~/.git-prompt.sh
# 3a) Change your PS1 to call __git_ps1 as
# command-substitution:
# Bash: PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ '
# ZSH: setopt PROMPT_SUBST ; PS1='[%n@%m %c$(__git_ps1 " (%s)")]\$ '
# the optional argument will be used as format string.
# 3b) Alternatively, for a slightly faster prompt, __git_ps1 can
# be used for PROMPT_COMMAND in Bash or for precmd() in Zsh
# with two parameters, <pre> and <post>, which are strings
# you would put in $PS1 before and after the status string
# generated by the git-prompt machinery. e.g.
# Bash: PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "'
# will show username, at-sign, host, colon, cwd, then
# various status string, followed by dollar and SP, as
# your prompt.
# ZSH: precmd () { __git_ps1 "%n" ":%~$ " "|%s" }
# will show username, pipe, then various status string,
# followed by colon, cwd, dollar and SP, as your prompt.
# Optionally, you can supply a third argument with a printf
# format string to finetune the output of the branch status
#
# The repository status will be displayed only if you are currently in a
# git repository. The %s token is the placeholder for the shown status.
#
# The prompt status always includes the current branch name.
#
# In addition, if you set GIT_PS1_SHOWDIRTYSTATE to a nonempty value,
# unstaged (*) and staged (+) changes will be shown next to the branch
# name. You can configure this per-repository with the
# bash.showDirtyState variable, which defaults to true once
# GIT_PS1_SHOWDIRTYSTATE is enabled.
#
# You can also see if currently something is stashed, by setting
# GIT_PS1_SHOWSTASHSTATE to a nonempty value. If something is stashed,
# then a '$' will be shown next to the branch name.
#
# If you would like to see if there're untracked files, then you can set
# GIT_PS1_SHOWUNTRACKEDFILES to a nonempty value. If there're untracked
# files, then a '%' will be shown next to the branch name. You can
# configure this per-repository with the bash.showUntrackedFiles
# variable, which defaults to true once GIT_PS1_SHOWUNTRACKEDFILES is
# enabled.
#
# If you would like to see the difference between HEAD and its upstream,
# set GIT_PS1_SHOWUPSTREAM="auto". A "<" indicates you are behind, ">"
# indicates you are ahead, "<>" indicates you have diverged and "="
# indicates that there is no difference. You can further control
# behaviour by setting GIT_PS1_SHOWUPSTREAM to a space-separated list
# of values:
#
# verbose show number of commits ahead/behind (+/-) upstream
# name if verbose, then also show the upstream abbrev name
# legacy don't use the '--count' option available in recent
# versions of git-rev-list
# git always compare HEAD to @{upstream}
# svn always compare HEAD to your SVN upstream
#
# By default, __git_ps1 will compare HEAD to your SVN upstream if it can
# find one, or @{upstream} otherwise. Once you have set
# GIT_PS1_SHOWUPSTREAM, you can override it on a per-repository basis by
# setting the bash.showUpstream config variable.
#
# You can change the separator between the branch name and the above
# state symbols by setting GIT_PS1_STATESEPARATOR. The default separator
# is SP.
#
# When there is an in-progress operation such as a merge, rebase,
# revert, cherry-pick, or bisect, the prompt will include information
# related to the operation, often in the form "|<OPERATION-NAME>".
#
# When the repository has a sparse-checkout, a notification of the form
# "|SPARSE" will be included in the prompt. This can be shortened to a
# single '?' character by setting GIT_PS1_COMPRESSSPARSESTATE, or omitted
# by setting GIT_PS1_OMITSPARSESTATE.
#
# If you would like to see a notification on the prompt when there are
# unresolved conflicts, set GIT_PS1_SHOWCONFLICTSTATE to "yes". The
# prompt will include "|CONFLICT".
#
# If you would like to see more information about the identity of
# commits checked out as a detached HEAD, set GIT_PS1_DESCRIBE_STYLE
# to one of these values:
#
# contains relative to newer annotated tag (v1.6.3.2~35)
# branch relative to newer tag or branch (master~4)
# describe relative to older annotated tag (v1.6.3.1-13-gdd42c2f)
# tag relative to any older tag (v1.6.3.1-13-gdd42c2f)
# default exactly matching tag
#
# If you would like a colored hint about the current dirty state, set
# GIT_PS1_SHOWCOLORHINTS to a nonempty value. The colors are based on
# the colored output of "git status -sb".
#
# If you would like __git_ps1 to do nothing in the case when the current
# directory is set up to be ignored by git, then set
# GIT_PS1_HIDE_IF_PWD_IGNORED to a nonempty value. Override this on the
# repository level by setting bash.hideIfPwdIgnored to "false".
# check whether printf supports -v
__git_printf_supports_v=
printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
# stores the divergence from upstream in $p
# used by GIT_PS1_SHOWUPSTREAM
__git_ps1_show_upstream ()
{
local key value
local svn_remote svn_url_pattern count n
local upstream_type=git legacy="" verbose="" name=""
svn_remote=()
# get some config options from git-config
local output="$(git config -z --get-regexp '^(svn-remote\..*\.url|bash\.showupstream)$' 2>/dev/null | tr '\0\n' '\n ')"
while read -r key value; do
case "$key" in
bash.showupstream)
GIT_PS1_SHOWUPSTREAM="$value"
if [[ -z "${GIT_PS1_SHOWUPSTREAM}" ]]; then
p=""
return
fi
;;
svn-remote.*.url)
svn_remote[$((${#svn_remote[@]} + 1))]="$value"
svn_url_pattern="$svn_url_pattern\\|$value"
upstream_type=svn+git # default upstream type is SVN if available, else git
;;
esac
done <<< "$output"
# parse configuration values
local option
for option in ${GIT_PS1_SHOWUPSTREAM-}; do
case "$option" in
git|svn) upstream_type="$option" ;;
verbose) verbose=1 ;;
legacy) legacy=1 ;;
name) name=1 ;;
esac
done
# Find our upstream type
case "$upstream_type" in
git) upstream_type="@{upstream}" ;;
svn*)
# get the upstream from the "git-svn-id: ..." in a commit message
# (git-svn uses essentially the same procedure internally)
local -a svn_upstream
svn_upstream=($(git log --first-parent -1 \
--grep="^git-svn-id: \(${svn_url_pattern#??}\)" 2>/dev/null))
if [[ 0 -ne ${#svn_upstream[@]} ]]; then
svn_upstream=${svn_upstream[${#svn_upstream[@]} - 2]}
svn_upstream=${svn_upstream%@*}
local n_stop="${#svn_remote[@]}"
for ((n=1; n <= n_stop; n++)); do
svn_upstream=${svn_upstream#${svn_remote[$n]}}
done
if [[ -z "$svn_upstream" ]]; then
# default branch name for checkouts with no layout:
upstream_type=${GIT_SVN_ID:-git-svn}
else
upstream_type=${svn_upstream#/}
fi
elif [[ "svn+git" = "$upstream_type" ]]; then
upstream_type="@{upstream}"
fi
;;
esac
# Find how many commits we are ahead/behind our upstream
if [[ -z "$legacy" ]]; then
count="$(git rev-list --count --left-right \
"$upstream_type"...HEAD 2>/dev/null)"
else
# produce equivalent output to --count for older versions of git
local commits
if commits="$(git rev-list --left-right "$upstream_type"...HEAD 2>/dev/null)"
then
local commit behind=0 ahead=0
for commit in $commits
do
case "$commit" in
"<"*) ((behind++)) ;;
*) ((ahead++)) ;;
esac
done
count="$behind $ahead"
else
count=""
fi
fi
# calculate the result
if [[ -z "$verbose" ]]; then
case "$count" in
"") # no upstream
p="" ;;
"0 0") # equal to upstream
p="=" ;;
"0 "*) # ahead of upstream
p=">" ;;
*" 0") # behind upstream
p="<" ;;
*) # diverged from upstream
p="<>" ;;
esac
else # verbose, set upstream instead of p
case "$count" in
"") # no upstream
upstream="" ;;
"0 0") # equal to upstream
upstream="|u=" ;;
"0 "*) # ahead of upstream
upstream="|u+${count#0 }" ;;
*" 0") # behind upstream
upstream="|u-${count% 0}" ;;
*) # diverged from upstream
upstream="|u+${count#* }-${count% *}" ;;
esac
if [[ -n "$count" && -n "$name" ]]; then
__git_ps1_upstream_name=$(git rev-parse \
--abbrev-ref "$upstream_type" 2>/dev/null)
if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
upstream="$upstream \${__git_ps1_upstream_name}"
else
upstream="$upstream ${__git_ps1_upstream_name}"
# not needed anymore; keep user's
# environment clean
unset __git_ps1_upstream_name
fi
fi
fi
}
# Helper function that is meant to be called from __git_ps1. It
# injects color codes into the appropriate gitstring variables used
# to build a gitstring. Colored variables are responsible for clearing
# their own color.
__git_ps1_colorize_gitstring ()
{
if [[ -n ${ZSH_VERSION-} ]]; then
local c_red='%F{red}'
local c_green='%F{green}'
local c_lblue='%F{blue}'
local c_clear='%f'
else
# Using \001 and \002 around colors is necessary to prevent
# issues with command line editing/browsing/completion!
local c_red=$'\001\e[31m\002'
local c_green=$'\001\e[32m\002'
local c_lblue=$'\001\e[1;34m\002'
local c_clear=$'\001\e[0m\002'
fi
local bad_color=$c_red
local ok_color=$c_green
local flags_color="$c_lblue"
local branch_color=""
if [ $detached = no ]; then
branch_color="$ok_color"
else
branch_color="$bad_color"
fi
if [ -n "$c" ]; then
c="$branch_color$c$c_clear"
fi
b="$branch_color$b$c_clear"
if [ -n "$w" ]; then
w="$bad_color$w$c_clear"
fi
if [ -n "$i" ]; then
i="$ok_color$i$c_clear"
fi
if [ -n "$s" ]; then
s="$flags_color$s$c_clear"
fi
if [ -n "$u" ]; then
u="$bad_color$u$c_clear"
fi
}
# Helper function to read the first line of a file into a variable.
# __git_eread requires 2 arguments, the file path and the name of the
# variable, in that order.
__git_eread ()
{
test -r "$1" && IFS=$'\r\n' read -r "$2" <"$1"
}
# see if a cherry-pick or revert is in progress, if the user has committed a
# conflict resolution with 'git commit' in the middle of a sequence of picks or
# reverts then CHERRY_PICK_HEAD/REVERT_HEAD will not exist so we have to read
# the todo file.
__git_sequencer_status ()
{
local todo
if test -f "$g/CHERRY_PICK_HEAD"
then
r="|CHERRY-PICKING"
return 0;
elif test -f "$g/REVERT_HEAD"
then
r="|REVERTING"
return 0;
elif __git_eread "$g/sequencer/todo" todo
then
case "$todo" in
p[\ \ ]|pick[\ \ ]*)
r="|CHERRY-PICKING"
return 0
;;
revert[\ \ ]*)
r="|REVERTING"
return 0
;;
esac
fi
return 1
}
# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
# when called from PS1 using command substitution
# in this mode it prints text to add to bash PS1 prompt (includes branch name)
#
# __git_ps1 requires 2 or 3 arguments when called from PROMPT_COMMAND (pc)
# in that case it _sets_ PS1. The arguments are parts of a PS1 string.
# when two arguments are given, the first is prepended and the second appended
# to the state string when assigned to PS1.
# The optional third parameter will be used as printf format string to further
# customize the output of the git-status string.
# In this mode you can request colored hints using GIT_PS1_SHOWCOLORHINTS=true
__git_ps1 ()
{
# preserve exit status
local exit=$?
local pcmode=no
local detached=no
local ps1pc_start='\u@\h:\w '
local ps1pc_end='\$ '
local printf_format=' (%s)'
case "$#" in
2|3) pcmode=yes
ps1pc_start="$1"
ps1pc_end="$2"
printf_format="${3:-$printf_format}"
# set PS1 to a plain prompt so that we can
# simply return early if the prompt should not
# be decorated
PS1="$ps1pc_start$ps1pc_end"
;;
0|1) printf_format="${1:-$printf_format}"
;;
*) return $exit
;;
esac
# ps1_expanded: This variable is set to 'yes' if the shell
# subjects the value of PS1 to parameter expansion:
#
# * bash does unless the promptvars option is disabled
# * zsh does not unless the PROMPT_SUBST option is set
# * POSIX shells always do
#
# If the shell would expand the contents of PS1 when drawing
# the prompt, a raw ref name must not be included in PS1.
# This protects the user from arbitrary code execution via
# specially crafted ref names. For example, a ref named
# 'refs/heads/$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' might cause the
# shell to execute 'sudo rm -rf /' when the prompt is drawn.
#
# Instead, the ref name should be placed in a separate global
# variable (in the __git_ps1_* namespace to avoid colliding
# with the user's environment) and that variable should be
# referenced from PS1. For example:
#
# __git_ps1_foo=$(do_something_to_get_ref_name)
# PS1="...stuff...\${__git_ps1_foo}...stuff..."
#
# If the shell does not expand the contents of PS1, the raw
# ref name must be included in PS1.
#
# The value of this variable is only relevant when in pcmode.
#
# Assume that the shell follows the POSIX specification and
# expands PS1 unless determined otherwise. (This is more
# likely to be correct if the user has a non-bash, non-zsh
# shell and safer than the alternative if the assumption is
# incorrect.)
#
local ps1_expanded=yes
[ -z "${ZSH_VERSION-}" ] || [[ -o PROMPT_SUBST ]] || ps1_expanded=no
[ -z "${BASH_VERSION-}" ] || shopt -q promptvars || ps1_expanded=no
local repo_info rev_parse_exit_code
repo_info="$(git rev-parse --git-dir --is-inside-git-dir \
--is-bare-repository --is-inside-work-tree --show-ref-format \
--short HEAD 2>/dev/null)"
rev_parse_exit_code="$?"
if [ -z "$repo_info" ]; then
return $exit
fi
local short_sha=""
if [ "$rev_parse_exit_code" = "0" ]; then
short_sha="${repo_info##*$'\n'}"
repo_info="${repo_info%$'\n'*}"
fi
local ref_format="${repo_info##*$'\n'}"
repo_info="${repo_info%$'\n'*}"
local inside_worktree="${repo_info##*$'\n'}"
repo_info="${repo_info%$'\n'*}"
local bare_repo="${repo_info##*$'\n'}"
repo_info="${repo_info%$'\n'*}"
local inside_gitdir="${repo_info##*$'\n'}"
local g="${repo_info%$'\n'*}"
if [ "true" = "$inside_worktree" ] &&
[ -n "${GIT_PS1_HIDE_IF_PWD_IGNORED-}" ] &&
[ "$(git config --bool bash.hideIfPwdIgnored)" != "false" ] &&
git check-ignore -q .
then
return $exit
fi
local sparse=""
if [ -z "${GIT_PS1_COMPRESSSPARSESTATE-}" ] &&
[ -z "${GIT_PS1_OMITSPARSESTATE-}" ] &&
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
sparse="|SPARSE"
fi
local r=""
local b=""
local step=""
local total=""
if [ -d "$g/rebase-merge" ]; then
__git_eread "$g/rebase-merge/head-name" b
__git_eread "$g/rebase-merge/msgnum" step
__git_eread "$g/rebase-merge/end" total
r="|REBASE"
else
if [ -d "$g/rebase-apply" ]; then
__git_eread "$g/rebase-apply/next" step
__git_eread "$g/rebase-apply/last" total
if [ -f "$g/rebase-apply/rebasing" ]; then
__git_eread "$g/rebase-apply/head-name" b
r="|REBASE"
elif [ -f "$g/rebase-apply/applying" ]; then
r="|AM"
else
r="|AM/REBASE"
fi
elif [ -f "$g/MERGE_HEAD" ]; then
r="|MERGING"
elif __git_sequencer_status; then
:
elif [ -f "$g/BISECT_LOG" ]; then
r="|BISECTING"
fi
if [ -n "$b" ]; then
:
elif [ -h "$g/HEAD" ]; then
# symlink symbolic ref
b="$(git symbolic-ref HEAD 2>/dev/null)"
else
local head=""
case "$ref_format" in
files)
if ! __git_eread "$g/HEAD" head; then
return $exit
fi
if [[ $head == "ref: "* ]]; then
head="${head#ref: }"
else
head=""
fi
;;
*)
head="$(git symbolic-ref HEAD 2>/dev/null)"
;;
esac
if test -z "$head"; then
detached=yes
b="$(
case "${GIT_PS1_DESCRIBE_STYLE-}" in
(contains)
git describe --contains HEAD ;;
(branch)
git describe --contains --all HEAD ;;
(tag)
git describe --tags HEAD ;;
(describe)
git describe HEAD ;;
(* | default)
git describe --tags --exact-match HEAD ;;
esac 2>/dev/null)" ||
b="$short_sha..."
b="($b)"
else
b="$head"
fi
fi
fi
if [ -n "$step" ] && [ -n "$total" ]; then
r="$r $step/$total"
fi
local conflict="" # state indicator for unresolved conflicts
if [[ "${GIT_PS1_SHOWCONFLICTSTATE-}" == "yes" ]] &&
[[ $(git ls-files --unmerged 2>/dev/null) ]]; then
conflict="|CONFLICT"
fi
local w=""
local i=""
local s=""
local u=""
local h=""
local c=""
local p="" # short version of upstream state indicator
local upstream="" # verbose version of upstream state indicator
if [ "true" = "$inside_gitdir" ]; then
if [ "true" = "$bare_repo" ]; then
c="BARE:"
else
b="GIT_DIR!"
fi
elif [ "true" = "$inside_worktree" ]; then
if [ -n "${GIT_PS1_SHOWDIRTYSTATE-}" ] &&
[ "$(git config --bool bash.showDirtyState)" != "false" ]
then
git diff --no-ext-diff --quiet || w="*"
git diff --no-ext-diff --cached --quiet || i="+"
if [ -z "$short_sha" ] && [ -z "$i" ]; then
i="#"
fi
fi
if [ -n "${GIT_PS1_SHOWSTASHSTATE-}" ] &&
git rev-parse --verify --quiet refs/stash >/dev/null
then
s="$"
fi
if [ -n "${GIT_PS1_SHOWUNTRACKEDFILES-}" ] &&
[ "$(git config --bool bash.showUntrackedFiles)" != "false" ] &&
git ls-files --others --exclude-standard --directory --no-empty-directory --error-unmatch -- ':/*' >/dev/null 2>/dev/null
then
u="%${ZSH_VERSION+%}"
fi
if [ -n "${GIT_PS1_COMPRESSSPARSESTATE-}" ] &&
[ "$(git config --bool core.sparseCheckout)" = "true" ]; then
h="?"
fi
if [ -n "${GIT_PS1_SHOWUPSTREAM-}" ]; then
__git_ps1_show_upstream
fi
fi
local z="${GIT_PS1_STATESEPARATOR-" "}"
b=${b##refs/heads/}
if [ $pcmode = yes ] && [ $ps1_expanded = yes ]; then
__git_ps1_branch_name=$b
b="\${__git_ps1_branch_name}"
fi
if [ -n "${GIT_PS1_SHOWCOLORHINTS-}" ]; then
__git_ps1_colorize_gitstring
fi
local f="$h$w$i$s$u$p"
local gitstring="$c$b${f:+$z$f}${sparse}$r${upstream}${conflict}"
if [ $pcmode = yes ]; then
if [ "${__git_printf_supports_v-}" != yes ]; then
gitstring=$(printf -- "$printf_format" "$gitstring")
else
printf -v gitstring -- "$printf_format" "$gitstring"
fi
PS1="$ps1pc_start$gitstring$ps1pc_end"
else
printf -- "$printf_format" "$gitstring"
fi
return $exit
}

View File

@@ -12,4 +12,4 @@ cd "${BASEDIR}"
git -C "${DOTBOT_DIR}" submodule sync --quiet --recursive
git submodule update --init --recursive "${DOTBOT_DIR}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" -c "${CONFIG}" "${@}"
"${BASEDIR}/${DOTBOT_DIR}/${DOTBOT_BIN}" -d "${BASEDIR}" --plugin-dir dotbot-asdf -c "${CONFIG}" "${@}"

View File

@@ -7,6 +7,20 @@
- link:
~/.tmux.conf: tmux.conf
~/.vim: vim
~/.zshrc: shell/zsh/zshrc
~/.bashrc: shell/bash/bashrc
~/.config/nvim: nvim
~/.config/alacritty: alacritty
- asdf:
- plugin: vim
global: 9.0.1473
versions:
- 9.0.1473
- plugin: nodejs
global: 19.0.0
versions:
- 19.0.0
- shell:
- [git submodule update --init --recursive, Installing submodules]

View File

@@ -0,0 +1,3 @@
vim.opt_local.tabstop = 4
vim.opt_local.shiftwidth = 4
vim.opt_local.expandtab = false

View File

@@ -0,0 +1 @@
vim.cmd [[autocmd BufWritePre *.go lua vim.lsp.buf.format()]]

View File

@@ -0,0 +1,14 @@
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
vim.opt_local.expandtab = true
-- vim.api.nvim_create_autocmd("FileType", {
-- pattern = { "javascript", "javascriptreact" },
-- callback = function()
-- -- Your JS/JSX settings here
-- vim.bo.tabstop = 2
-- vim.bo.shiftwidth = 2
-- vim.bo.softtabstop = 2
-- vim.bo.expandtab = true
-- end
-- })

View File

@@ -0,0 +1,7 @@
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*.json",
callback = function()
-- vim.cmd([[%!jq . 2>/dev/null || cat]])
vim.cmd([[%!jq . ]])
end,
})

View File

@@ -0,0 +1,4 @@
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
vim.opt_local.expandtab = true

View File

@@ -0,0 +1,4 @@
vim.opt_local.tabstop = 2
vim.opt_local.shiftwidth = 2
vim.opt_local.softtabstop = 2
vim.opt_local.expandtab = true

5
nvim/init.lua Normal file
View File

@@ -0,0 +1,5 @@
require("funcs")
require("options")
require("keymap")
require("plugins/init")
require("lsp-config")

21
nvim/lazy-lock.json Normal file
View File

@@ -0,0 +1,21 @@
{
"LuaSnip": { "branch": "master", "commit": "3d5bced1b9ae69fa3f9b1942e28af5dbc537f946" },
"avante.nvim": { "branch": "main", "commit": "2fc63d4128d2dc2fef0913c7480b4586959ebe4e" },
"cmp-buffer": { "branch": "main", "commit": "b74fab3656eea9de20a9b8116afa3cfc4ec09657" },
"cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" },
"cmp-path": { "branch": "main", "commit": "e52e640b7befd8113b3350f46e8cfcfe98fcf730" },
"codecompanion.nvim": { "branch": "main", "commit": "e23e8e5a5643b089607f21f576f6e63174cc44dc" },
"fzf-lua": { "branch": "main", "commit": "4ee42b241e57b77b4f3c61a018f496219f246901" },
"github-theme": { "branch": "main", "commit": "c106c9472154d6b2c74b74565616b877ae8ed31d" },
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "bb3a17efc797c34c054463174e5522442576ebd8" },
"mason.nvim": { "branch": "main", "commit": "8024d64e1330b86044fed4c8494ef3dcd483a67c" },
"nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" },
"nvim-cmp": { "branch": "main", "commit": "b5311ab3ed9c846b585c0c15b7559be131ec4be9" },
"nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" },
"outline.nvim": { "branch": "main", "commit": "0eb9289ab39c91caf8b3ed0e3a17764809d69558" },
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
"telescope-file-browser.nvim": { "branch": "master", "commit": "7bf55ed0ff5be182ad3301cff266581fc1c56cce" },
"telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" },
"which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }
}

25
nvim/lsp/basedpyright.lua Normal file
View File

@@ -0,0 +1,25 @@
return {
cmd = { 'basedpyright-langserver', '--stdio' },
filetypes = { 'python' },
root_markers = {
'pyrightconfig.json',
'ya.make',
'pyproject.toml',
'setup.py',
'setup.cfg',
'requirements.txt',
'Pipfile',
'.git',
},
settings = {
python = {
analysis = {
autoSearchPaths = false,
useLibraryCodeForTypes = true,
diagnosticMode = 'openFilesOnly',
include = {
}
},
},
},
}

25
nvim/lsp/bashls.lua Normal file
View File

@@ -0,0 +1,25 @@
return {
cmd = { 'bash-language-server', 'start' },
filetypes = { 'bash', 'sh', 'zsh' },
root_markers = { '.git', vim.uv.cwd() },
settings = {
bashIde = {
globPattern = vim.env.GLOB_PATTERN or '*@(.sh|.inc|.bash|.command)',
-- Modern formatting options (requires shfmt)
tabSize = 2,
insertSpaces = true,
-- Enable comprehensive features like Ruby LSP
enableSourceErrorDiagnostics = true,
enableCodeLens = true,
includeAllWorkspaceSymbols = true,
-- Background analysis for better performance
backgroundAnalysisMaxFiles = 500,
-- ShellCheck integration for linting
shellcheckPath = 'shellcheck',
shellcheckArguments = {
'--shell=bash',
'--format=json',
},
},
},
}

20
nvim/lsp/gopls.lua Normal file
View File

@@ -0,0 +1,20 @@
return {
cmd = { "/home/dmchumak/.ya/tools/v3/gopls-linux/gopls" },
filetypes = { "go", "gotempl", "gowork", "gomod" },
root_markers = { "ya.make", "YAOWNERS", ".arcadia.root", ".cloudia.root", "go.work", "go.mod", ".git" },
-- settings = {
-- gopls = {
-- completeUnimported = true,
-- usePlaceholders = true,
-- analyses = {
-- unusedparams = true,
-- },
-- ["ui.inlayhint.hints"] = {
-- compositeLiteralFields = true,
-- constantValues = true,
-- parameterNames = true,
-- rangeVariableTypes = true,
-- },
-- },
-- },
}

33
nvim/lsp/lua_ls.lua Normal file
View File

@@ -0,0 +1,33 @@
return {
cmd = { "lua-language-server" },
root_markers = { ".luarc.json", ".git", "init.lua" },
filetypes = { "lua" },
settings = {
Lua = {
format = {
enable = true,
defaultConfig = {
indent_style = "space",
indent_size = "2",
}
},
runtime = {
-- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
version = "LuaJIT",
},
diagnostics = {
-- Get the language server to recognize the `vim` global
globals = { "vim" },
},
workspace = {
-- Make the server aware of Neovim runtime files
library = vim.api.nvim_get_runtime_file("", true),
},
-- Do not send telemetry data containing a randomized but unique identifier
telemetry = {
enable = false,
},
}
}
}

19
nvim/lua/funcs.lua Normal file
View File

@@ -0,0 +1,19 @@
function Contains(list, element)
for _, v in ipairs(list) do
if element == v then
return true
end
end
return false
end
---comment
---@param list table
---@param key string
---@param value any
---@return table
function Append(list, key, value)
local new_list = {unpack(list)}
new_list[key] = value
return new_list
end

5
nvim/lua/keymap.lua Normal file
View File

@@ -0,0 +1,5 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<space><space>", "<cmd> :noh<CR>", { desc = "Clear search highlighting" })
-- Find and replace visual selection using CTRL-r
vim.keymap.set("v", "<C-r>", "\"hy:%s/<C-r>h//gc<left><left><left>")

75
nvim/lua/lsp-config.lua Normal file
View File

@@ -0,0 +1,75 @@
require("mason").setup()
require("mason-lspconfig").setup({
ensure_installed = {
'lua_ls',
'gopls',
'bashls',
'basedpyright',
},
automatic_installation = true,
automatic_enable = false
})
local opts = { noremap = true, silent = true }
local keymap = vim.keymap.set
vim.api.nvim_create_autocmd("LspAttach", {
callback = function(ev)
local bufnr = ev.buf
local bufopts = { noremap = true, silent = true, buffer = bufnr }
local client = vim.lsp.get_client_by_id(ev.data.client_id)
if not client then
return
end
local lsp = vim.lsp
local function opt(desc, others)
return vim.tbl_extend("force", bufopts, { desc = desc }, others or {})
end
-- See `:help vim.lsp.*` for documentation on any of the below functions
keymap("n", "gD", lsp.buf.declaration, opt('[G]o to [d]eclaration'))
keymap("n", "gd", lsp.buf.definition, opt("[G]o to [d]efinition"))
keymap("n", "<leader>D", lsp.buf.type_definition, opt("Go to Type [D]efinition"))
keymap("n", "K", lsp.buf.hover, bufopts)
keymap("n", "gi", lsp.buf.implementation, opt("[G]o to [i]mplementation"))
keymap("n", "gr", require'telescope.builtin'.lsp_references, opt("[G]o to [r]eferences"))
keymap("n", "<C-k>", lsp.buf.signature_help, bufopts)
keymap("n", "<leader>wa", lsp.buf.add_workspace_folder, bufopts)
keymap("n", "<leader>wr", lsp.buf.remove_workspace_folder, bufopts)
keymap("n", "<leader>wl", function()
print(vim.inspect(lsp.buf.list_workspace_folders()))
end, bufopts)
keymap("n", "<leader>rn", lsp.buf.rename, opt("[l]sp [R]ename"))
keymap("n", "<leader>lc", lsp.buf.code_action, opt("[l]sp [C]ode Action"))
keymap("n", "<leader>lf", function()
lsp.buf.format({
async = true,
})
end, opt("[l]sp [f]ormat buffer"))
end
})
-- Add the border on hover and on signature help popup window
vim.o.winborder = 'rounded'
-- Add border to the diagnostic popup window
vim.diagnostic.config({
virtual_text = {
prefix = '', -- Could be '●', '▎', 'x', '■', , 
},
signs = false, -- Show signs in the gutter
underline = true,
update_in_insert = false, -- Don't update diagnostics in insert mode
severity_sort = true, -- Sort diagnostics by severity
jump = { float = true },
})
keymap("n", "<leader>e", vim.diagnostic.open_float, opts)
keymap("n", "<leader>q", vim.diagnostic.setloclist, opts)
vim.lsp.enable("lua_ls")
vim.lsp.enable("bashls")
vim.lsp.enable("gopls")
vim.lsp.enable("basedpyright")

49
nvim/lua/options.lua Normal file
View File

@@ -0,0 +1,49 @@
vim.g.editorconfig = false
IsYandex = Contains({"i113855042", "dmchumak-dev.sas.yp-c.yandex.net"}, vim.fn.hostname())
vim.g.mapleader = ' '
vim.g.maplocalleader = ' '
-- case insensitive search
vim.opt.ignorecase = true
vim.opt.smartcase = true
-- show line numbers
vim.opt.number = true
vim.opt.relativenumber = false
vim.opt.cursorline = true
-- show trailing whitespace
vim.opt.list = true
vim.opt.listchars = {
tab = '',
multispace = '',
trail = '·',
extends = '',
precedes = ''
}
vim.cmd([[match errorMsg /\s\+$/]])
-- Configuring movement between panes
-- using Ctrl/Cmd-hjkl
vim.keymap.set("n", "<C-h>", "<C-w>h")
vim.keymap.set("n", "<C-j>", "<C-w>j")
vim.keymap.set("n", "<C-k>", "<C-w>k")
vim.keymap.set("n", "<C-l>", "<C-w>l")
-- Keymap to copy to system buffer
vim.keymap.set('n','<leader>y','"+yy')
vim.keymap.set('v','<leader>y','"+y')
-- Keymap to navigate between tabs
vim.keymap.set('n', 'H', 'gT')
vim.keymap.set('n', 'L', 'gt')
-- Makeing :W and :Q work same as :w and :q
vim.cmd("command! -bar -nargs=* -complete=file -range=% -bang W <line1>,<line2>write<bang> <args>")
vim.cmd("command! -bar -nargs=* -complete=file -range=% -bang Write <line1>,<line2>write<bang> <args>")
vim.cmd("command! -bar -nargs=* -complete=file -range=% -bang Wq <line1>,<line2>wq<bang> <args>")
vim.cmd("command! -bar -bang Q quit<bang>")
vim.cmd("command! -bar -bang Qall qall<bang>")
vim.cmd("command! -bar -bang Qa qall<bang>")

View File

@@ -0,0 +1,37 @@
require("codecompanion").setup({
strategies = {
chat = {
adapter = "deepseek",
},
inline = {
adapter = "deepseek",
},
cmd = {
adapter = "deepseek",
}
},
adapters = {
deepseek = function()
return require("codecompanion.adapters").extend("deepseek", {
env = {
api_key = (function()
local path = os.getenv("HOME") .. "/.config/deepseek_api_key"
local file = io.open(path, "r")
if not file then
vim.notify("Deepseek API key not found at " .. path, vim.log.levels.WARN)
return nil
end
local content = file:read("*a"):gsub("%s+", "")
file:close()
return content
end)(),
},
schema = {
model = {
default = "deepseek-chat",
},
},
})
end,
},
})

View File

@@ -0,0 +1,62 @@
vim.opt.completeopt = { 'menu', 'menuone', 'noselect' }
-- Set up nvim-cmp
local cmp = require('cmp')
local luasnip = require('luasnip')
local select_opts = { behavior = cmp.SelectBehavior.Select }
cmp.setup({
snippet = {
expand = function(args)
luasnip.lsp_expand(args.body)
end
},
preselect = cmp.PreselectMode.None;
window = {
documentation = cmp.config.window.bordered(),
completion = { border = 'rounded' }
},
formatting = {
fields = { 'menu', 'abbr', 'kind' },
format = function(entry, item)
local menu_icon = {
nvim_lsp = 'λ',
luasnip = '',
buffer = 'Ω',
path = '🖫',
}
item.menu = menu_icon[entry.source.name]
return item
end,
},
mapping = {
-- Trigger completion menu with <Tab>
['<Tab>'] = cmp.mapping(function(fallback)
local col = vim.fn.col('.') - 1
if cmp.visible() then
cmp.select_next_item(select_opts)
elseif col == 0 or vim.fn.getline('.'):sub(col, col):match('%s') then
fallback()
else
cmp.complete()
end
end, { 'i', 's' }),
-- Trigger completion menu with <C-Space>
['<C-Space>'] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), -- Open completion menu
-- Navigate completion menu with <C-n> and <C-p>
['<C-n>'] = cmp.mapping.select_next_item(), -- Next item
['<C-p>'] = cmp.mapping.select_prev_item(), -- Previous item
-- Confirm selection with <CR> (Enter)
['<CR>'] = cmp.mapping.confirm({ select = true }), -- Confirm selection
},
sources = cmp.config.sources({
{ name = 'nvim_lsp' }, -- LSP source
{ name = 'buffer' }, -- Buffer source
{ name = 'path' }, -- Path source
{ name = 'luasnip' }, -- Path source
}),
})

View File

@@ -0,0 +1,22 @@
require('gitsigns').setup(
{
signs = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '-' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
signs_staged = {
add = { text = '+' },
change = { text = '~' },
delete = { text = '-' },
topdelete = { text = '' },
changedelete = { text = '~' },
untracked = { text = '' },
},
}
)
vim.keymap.set('n', '<leader>vb', ':Gitsigns blame_line<CR>', {desc = "Blame current line (git/arc)"})

134
nvim/lua/plugins/init.lua Normal file
View File

@@ -0,0 +1,134 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
local plugins = {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
{
'projekt0n/github-nvim-theme',
name = 'github-theme',
lazy = false, -- make sure we load this during startup if it is your main colorscheme
priority = 1000, -- make sure to load this before all the other start plugins
config = function()
require('github-theme').setup({
-- ...
})
-- vim.cmd('colorscheme github_light_colorblind')
-- vim.cmd('colorscheme github_light')
vim.cmd('colorscheme github_dark_colorblind')
-- vim.cmd('colorscheme github_dark')
end,
},
{
"nvim-telescope/telescope-file-browser.nvim",
dependencies = { "nvim-telescope/telescope.nvim", "nvim-lua/plenary.nvim" }
},
{
'hrsh7th/nvim-cmp', -- Auto-completion plugin
dependencies = {
'hrsh7th/cmp-nvim-lsp', -- LSP source for nvim-cmp
'hrsh7th/cmp-buffer', -- Buffer source for nvim-cmp
'hrsh7th/cmp-path', -- Path source for nvim-cmp
'L3MON4D3/LuaSnip',
},
},
{
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
preset = "modern",
show_help = false, -- workaround for border glitch https://github.com/folke/which-key.nvim/issues/967#issuecomment-2842309305
},
keys = {
{
"<leader>?",
function()
require("which-key").show({ global = false })
end,
desc = "Buffer Local Keymaps (which-key)",
},
},
},
-- GitSigns
{
(not IsYandex) and "lewis6991/gitsigns.nvim" or nil,
dir = (IsYandex) and "~/arcadia/contrib/tier1/gitsigns.arc.nvim" or nil,
},
{
"hedyhli/outline.nvim",
lazy = true,
cmd = { "Outline", "OutlineOpen" },
keys = { -- Example mapping to toggle outline
{ "<leader>o", "<cmd>Outline<CR>", desc = "Toggle outline" },
},
opts = {
outline_window = {
position = "left",
}
-- Your setup opts here
},
},
{
"olimorris/codecompanion.nvim",
opts = {},
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-treesitter/nvim-treesitter",
},
},
{
"yetone/avante.nvim",
build = vim.fn.has("win32") ~= 0
and "powershell -ExecutionPolicy Bypass -File Build.ps1 -BuildFromSource false"
or "make",
event = "VeryLazy",
version = false, -- Never set this value to "*"! Never!
---@module 'avante'
---@type avante.Config
opts = {
provider = "yadeepseek",
providers = {
yadeepseek = {
__inherited_from = "openai",
api_key_name = "cmd:cat ~/.config/eliza_api_key",
endpoint = "https://api.eliza.yandex.net/raw/internal/deepseek/v1",
model = "deepseek-0324",
},
},
},
dependencies = {
"nvim-lua/plenary.nvim",
"MunifTanjim/nui.nvim",
--- The below dependencies are optional,
"nvim-telescope/telescope.nvim", -- for file_selector provider telescope
"hrsh7th/nvim-cmp", -- autocompletion for avante commands and mentions
"ibhagwan/fzf-lua", -- for file_selector provider fzf
-- "stevearc/dressing.nvim", -- for input provider dressing
-- "folke/snacks.nvim", -- for input provider snacks
-- "nvim-tree/nvim-web-devicons", -- or echasnovski/mini.icons
},
}
}
require("lazy").setup(plugins)
vim.cmd([[
set termguicolors
hi Cursor guifg=red guibg=green
set guicursor=n-v-c:block-Cursor/lCursor,i-ci-ve:ver25-Cursor/lCursor,r-cr:hor20-Cursor/lCursor,o:hor50-Cursor/lCursor,a:blinkwait700-blinkoff400-blinkon250-Cursor/lCursor,sm:block-blinkwait175-blinkoff150-blinkon175-Cursor/lCursor
]])
require("plugins/telescope")
require("plugins/completions")
require("plugins/gitsigns")
require("plugins/codecompanion")

View File

@@ -0,0 +1,20 @@
require("telescope").setup {
extensions = {
file_browser = {
initial_mode = "normal",
-- ...
},
},
}
require("telescope").load_extension "file_browser"
-- require("telescope").load_extension "find_files"
-- vim.keymap.set("n", "<space>fb", ":Telescope file_browser<CR>")
-- open file_browser with the path of the current buffer
vim.keymap.set("n", "<space>fb", ":Telescope file_browser path=%:p:h select_buffer=true<CR>")
local builtin = require('telescope.builtin')
vim.keymap.set('n', '<leader>ff', builtin.find_files, { desc = 'Telescope find files' })
vim.keymap.set('n', '<leader>fg', builtin.live_grep, { desc = 'Telescope live grep' })
vim.keymap.set('n', '<leader>b', builtin.buffers, { desc = 'Telescope buffers' })
vim.keymap.set('n', '<leader>fh', builtin.help_tags, { desc = 'Telescope help tags' })

248
nvim/lua/ytils.lua Normal file
View File

@@ -0,0 +1,248 @@
local M = {}
local NIL = "<NIL>"
local unpack = table.unpack or unpack
M.ARC_REPO_ROOT_ENV = "ARC_ROOT"
M._arc_repo_roots = {
"/home/dmchumak/arcadia/",
}
local is_windows = vim.loop.os_uname().version:match("Windows")
M.table = (function()
-- finds the index of value in the table
---@param t table
---@param value any
---@return integer?
local function find(t, value)
for ix, ix_value in ipairs(t) do
if ix_value == value then
return ix
end
end
return nil
end
return {
find = find,
}
end)()
M.path = (function()
-- stolen form
-- https://github.com/neovim/nvim-lspconfig/tree/71b39616b14c152da34fcc787fa27f09bf280e72/lua/lspconfig/util.lua#L124
local function is_fs_root(path)
if is_windows then
return path:match("^%a:$")
else
return path == "/"
end
end
-- stolen from https://github.com/neovim/nvim-lspconfig/tree/71b39616b14c152da34fcc787fa27f09bf280e72/lua/lspconfig/util.lua#L142
---@param path string
---@return string?
local function dirname(path)
local strip_dir_pat = "/([^/]+)$"
local strip_sep_pat = "/$"
if not path or #path == 0 then
return
end
local result = path:gsub(strip_sep_pat, ""):gsub(strip_dir_pat, "")
if #result == 0 then
if is_windows then
return path:sub(1, 2):upper()
else
return "/"
end
end
return result
end
return {
is_fs_root = is_fs_root,
dirname = dirname,
}
end)()
if os.getenv(M.ARC_REPO_ROOT_ENV) then
table.insert(M._arc_repo_roots, 1, os.getenv(M.ARC_REPO_ROOT_ENV))
end
function M.is_inside_arc(path)
for _, prefix in ipairs(M._arc_repo_roots) do
if path:find(prefix, 1, true) == 1 then
return true
end
end
return false
end
function M.is_ok_root_dir(path)
-- local util = require("dgronskiy_nvim.util")
if M.path.is_fs_root(path) then
return false
end
if path == os.getenv("HOME") then
return false
end
-- No-Go's:
-- * /data/a/trunk
-- * /data/a/dev
-- * /data/a/MLDWH-XXX
local path_and_parent = { path, M.path.dirname(path) }
for _, check_against in ipairs(M._arc_repo_roots) do
if M.table.find(path_and_parent, check_against) then
return false
end
end
return true
end
-- TODO: move ok_root_dirs into global config file
-- root_dir function in terms of `lspconfig`. Get inspiration here:
-- https://github.com/neovim/nvim-lspconfig/tree/bfdf2e91e7297a54bcc09d3e092a12bff69a1cf4/lua/lspconfig/util.lua#L268
function M.guarded_pyright_root_directory(startpath)
local is_inside_arc = M.is_inside_arc(startpath)
local root_dir = nil
if is_inside_arc then
local util = require("lspconfig.util")
root_dir = util.root_pattern("pyrightconfig.json")(startpath)
else
-- use default from here
-- https://github.com/neovim/nvim-lspconfig/blob/d1871c84b218931cc758dbbde1fec8e90c6d465c/lua/lspconfig/configs/pyright.lua#L47
root_dir = require("lspconfig.configs.pyright").default_config.root_dir(startpath)
end
local is_ok_root_dir = M.is_ok_root_dir(root_dir)
root_dir = is_ok_root_dir and root_dir or nil
-- if not M.is_ok_root_dir(root_dir) then
-- logger:warn("patching
-- vim.notify(
-- "Inside Arc="
-- .. tostring(is_inside_arc)
-- .. "\nFile= "
-- .. startpath
-- .. "\nRoot dir= "
-- .. root_dir
-- .. "\n\nPatching root_dir to nil"
-- )
-- root_dir = nil
-- end
return root_dir
end
-- func! GetArcanumLink(mode)
-- let l:root = system("arc root")
-- let l:link = "https://a.yandex-team.ru/arc_vcs/" . expand("%:p")[len(l:root):]
-- if a:mode == "normal"
-- return l:link . "\\#L" . getcurpos()[1]
-- else
-- let l:start = getpos("'<")
-- let l:finish = getpos("'>")
-- return l:link . "\\#L" . l:start[1] . "-" . l:finish[1]
-- endif
-- endf
---comment
---@return string? # nil in case of an error
function M.GetArcRoot()
local stdout = vim.fn.system("arc root 2>/dev/null")
if vim.api.nvim_get_vvar("shell_error") ~= 0 then
print(stdout)
return
end
return stdout:gsub("\n", "")
end
---
---@param file_path string
---@param arc_root string
---@return string? # nil in case of en error
function M.GetArcRelativePath(file_path, arc_root)
if string.sub(arc_root, -1, -1) ~= "/" then
arc_root = arc_root .. "/"
end
if string.sub(file_path, 1, string.len(arc_root)) ~= arc_root then
print(string.format("file_path [%s] is not in the repo [%s]", file_path, arc_root))
return
end
local file_relative_path = string.sub(file_path, string.len(arc_root) + 1)
return file_relative_path
end
---
---@return string? # nil in case of an error
function M.GetArcHeadCommit()
local stdout = vim.fn.system("arc rev-parse HEAD 2>/dev/null")
if vim.api.nvim_get_vvar("shell_error") ~= 0 then
print(stdout)
return
end
return stdout:gsub("\n", "")
end
---comment
---@return string? # nil in case of an error
function M.GetArcanumLink(opts)
local url_lines_requester = (function(opts)
local line1, line2
if opts and opts.linerange then
line1, line2 = unpack(opts.linerange)
else
line1 = vim.api.nvim_win_get_cursor(0)[1]
line2 = line1
end
-- print(vim.inspect(line1))
line1, line2 = math.min(line1, line2), math.max(line1, line2)
if line1 == line2 then
return "#L" .. tostring(line1)
else
return "#L" .. tostring(line1) .. "-" .. tostring(line2)
end
end)(opts)
local arc_root = M.GetArcRoot()
if not arc_root then
return
end
local file_path = vim.fn.expand("%:p") ---@type string
local file_relative_path = M.GetArcRelativePath(file_path, arc_root)
if not file_relative_path then
return
end
local revision = M.GetArcHeadCommit()
revision = revision and ("?rev=" .. revision) or ""
local url = "https://a.yandex-team.ru/arcadia/" .. file_relative_path .. revision .. url_lines_requester
return url
-- return "https://a.yandex-team.ru/arcadia/" .. .. "#L"
--?rev=r14586396#L10
end
---@param link string
---@return nil
function M.ArcLinkOpen(link)
-- https://a.yandex-team.ru/arcadia/ads/libs/py_rearrange/__init__.py#L96
local prefix = "https://a.yandex-team.ru/arcadia"
end
return M

5
shell/alias.sh Normal file
View File

@@ -0,0 +1,5 @@
alias l="ls -lahG"
alias lg="LANG=en_US-UTF-8 lazygit"
alias v="vim"
alias n="nvim"
alias mac-listen="sudo lsof -iTCP -sTCP:LISTEN -n -P"

25
shell/bash/bashrc Normal file
View File

@@ -0,0 +1,25 @@
source ~/.dotfiles/git/git-prompt.sh
source ~/.dotfiles/shell/alias.sh
PROMPT_COMMAND='PS1_CMD1=$(__git_ps1 " [%s]")'; PS1='\[\e[38;5;117m\]\u\[\e[0m\] \w${PS1_CMD1}\$ '
PATH="$PATH:~/go/bin"
#
# tmux history preservation
#
# Avoid duplicates
HISTCONTROL=ignoredups:erasedups # Ubuntu default is ignoreboth
# When the shell exits, append to the history file instead of overwriting it
shopt -s histappend # In Ubuntu this is already set by default
# After each command, append to the history file and reread it
PROMPT_COMMAND="${PROMPT_COMMAND:+$PROMPT_COMMAND$'\n'}history -a; history -c; history -r"
#
# tmux autostart
#
# [[ $- == *i* ]] is to check if the current seession is interactive - https://superuser.com/a/1777888/136716
if command -v tmux &> /dev/null && [ -n "$PS1" ] && [[ $- == *i* ]] && [[ ! "$TERM" =~ screen ]] && [[ ! "$TERM" =~ tmux ]] && [ -z "$TMUX" ]; then
exec tmux new-session -As0
fi

28
shell/zsh/zshrc Normal file
View File

@@ -0,0 +1,28 @@
source ~/.dotfiles/shell/alias.sh
eval "$(/opt/homebrew/bin/brew shellenv)"
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
setopt appendhistory # Append history to the history file (no overwriting)
setopt incappendhistory # Immediately append to the history file, not just when a term is killed
setopt histignoredups
source ~/.dotfiles/git/git-prompt.sh
setopt PROMPT_SUBST ; PS1='%n@%m %c$(__git_ps1 " [%s]")\$ '
if [ -f ~/.zshrc_local ]
then
source ~/.zshrc_local
fi
# The next line updates PATH for CLI.
if [ -f '/Users/dmchumak/yandex-cloud/path.bash.inc' ]; then source '/Users/dmchumak/yandex-cloud/path.bash.inc'; fi
# The next line enables shell command completion for yc.
if [ -f '/Users/dmchumak/yandex-cloud/completion.zsh.inc' ]; then source '/Users/dmchumak/yandex-cloud/completion.zsh.inc'; fi

View File

@@ -1,15 +1,20 @@
set -g default-terminal "xterm-256color"
set-option -gas terminal-overrides "*:Tc"
set-option -gas terminal-overrides "*:RGB"
set -g mouse on
set -g set-clipboard external
set -g escape-time 10 # https://www.johnhawthorn.com/2012/09/vi-escape-delays/
set -g history-limit 10000
set-option -g status-position top
set-window-option -g allow-rename off
set allow-rename off
set -g allow-rename off
# remap prefix from 'C-b' to 'C-x', 0x18 hex code for iterm2
unbind C-b
set-option -g prefix C-x
bind-key C-x send-prefix
unbind C-z # https://superuser.com/questions/1291278/accidentally-stop-the-tmux-job-via-remote-shell
# reload config file (change file location to your the tmux.conf you want to use)
bind r source-file ~/.tmux.conf \; display "Reloaded!"
@@ -24,6 +29,10 @@ unbind %
bind -n S-down new-window
bind -n S-left prev
bind -n S-right next
# and for split-keyboard
bind -n C-down new-window
bind -n C-left prev
bind -n C-right next
# resizing panes using Ctrl-Alt-arrows without prefix
bind -n C-M-Up resize-pane -U 2
@@ -62,15 +71,15 @@ bind -T copy-mode-emacs C-WheelDownPane send-keys -X halfpage-down
# color status bar
set -g status-style fg=white,bg=colour235
# color of message bar
set -g message-style fg=white,bold,bg=green
set -g message-style fg=black,bold,bg=colour107
# highlight current window
setw -g window-status-style fg=cyan,bg=colour235
setw -g window-status-current-style fg=white,bold,bg=red
setw -g window-status-current-style fg=black,bold,bg=cyan
# set color of active pane
set -g pane-border-style fg=colour240,bg=black
set -g pane-active-border-style fg=green,bg=black
set -g pane-border-style fg=colour240,bg=default
set -g pane-active-border-style fg=green,bg=default
# To copy, left click and drag to highlight text in yellow,
# once you release left click yellow text will disappear and will automatically be available in clibboard
@@ -78,5 +87,10 @@ set -g pane-active-border-style fg=green,bg=black
setw -g mode-keys vi
# Update default binding of `Enter` to also use copy-pipe
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
if-shell '[[ $(uname -s) = Linux ]]' {
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard"
} {
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"
}

3
vim/README.md Normal file
View File

@@ -0,0 +1,3 @@
https://unix.stackexchange.com/questions/110251/how-to-put-current-line-at-top-center-bottom-of-screen-in-vim
https://www.thegeekstuff.com/2009/03/8-essential-vim-editor-navigation-fundamentals/
https://vi.stackexchange.com/questions/14403/how-to-go-to-previous-open-buffer-from-vim-command-line

View File

@@ -0,0 +1,14 @@
{
"inlayHints.enable": false,
"pyright.inlayHints.functionReturnTypes": false,
"pyright.inlayHints.variableTypes": false,
"go.goplsOptions": {
"standaloneTags": ["ignore"],
"arcadiaIndexDirs": [
"cli/",
"api/",
"gateway/"
]
},
"go.goplsPath": "/Users/dmchumak/.ya/tools/v4/gopls-darwin-arm64/gopls"
}

View File

@@ -0,0 +1,12 @@
{
"inlayHints.enable": false,
"pyright.inlayHints.functionReturnTypes": false,
"pyright.inlayHints.variableTypes": false,
"languageserver": {
"godot": {
"host": "127.0.0.1",
"filetypes": ["gdscript"],
"port": 6005
}
}
}

61
vim/coc-lsp/coc.vim Normal file
View File

@@ -0,0 +1,61 @@
inoremap <silent><expr> <TAB>
\ coc#pum#visible() ? coc#pum#next(1):
\ CheckBackspace() ? "\<Tab>" :
\ coc#refresh()
inoremap <expr><S-TAB> coc#pum#visible() ? coc#pum#prev(1) : "\<C-h>"
" Make <CR> to accept selected completion item or notify coc.nvim to format
" <C-g>u breaks current undo, please make your own choice.
inoremap <silent><expr> <CR> coc#pum#visible() ? coc#pum#confirm()
\: "\<C-g>u\<CR>\<c-r>=coc#on_enter()\<CR>"
function! CheckBackspace() abort
let col = col('.') - 1
return !col || getline('.')[col - 1] =~# '\s'
endfunction
" " Use <c-space> to trigger completion.
" if has('nvim')
" inoremap <silent><expr> <c-space> coc#refresh()
" else
" inoremap <silent><expr> <Leader>c coc#refresh()
" endif
function! ShowDocumentation()
if CocAction('hasProvider', 'hover')
call CocActionAsync('doHover')
else
call feedkeys('K', 'in')
endif
endfunction
" [docs] Coc-vim hotkeys
" Use K to show documentation in preview window.
nnoremap <silent> K :call ShowDocumentation()<CR>
" Use `[g` and `]g` to navigate diagnostics
" Use `:CocDiagnostics` to get all diagnostics of current buffer in location list.
nmap <silent> [g <Plug>(coc-diagnostic-prev)
nmap <silent> ]g <Plug>(coc-diagnostic-next)
" GoTo code navigation.
nmap <silent> gd <Plug>(coc-definition)
nmap <silent> gy <Plug>(coc-type-definition)
nmap <silent> gi <Plug>(coc-implementation)
nmap <silent> gr <Plug>(coc-references)
" Remap keys for applying refactor code actions
nmap <silent> <leader>re <Plug>(coc-codeaction-refactor)
xmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
nmap <silent> <leader>r <Plug>(coc-codeaction-refactor-selected)
"set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')}
" Applying codeAction to the selected region.
" Example: `<leader>aap` for current paragraph
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)
" Remap keys for applying codeAction to the current buffer.
nmap <leader>ac <Plug>(coc-codeaction)
" Apply AutoFix to problem on the current line.
nmap <leader>qf <Plug>(coc-fix-current)

209
vim/colors/antiphoton.vim Normal file
View File

@@ -0,0 +1,209 @@
" Name: antiphoton.vim
" Author: Alex Vear <alex@vear.uk>
" Webpage: https://github.com/axvr/photon.vim
" Description: An elegant, light colour scheme with minimal syntax highlighting
" Licence: MIT (2020)
" Last Change: 2021-08-16
hi clear
if exists("syntax_on")
syntax reset
endif
let colors_name = "antiphoton"
" if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running")
if has("gui_running") || (&t_Co == 256 && (&term ==# "xterm" || &term =~# "^screen") )
hi Normal ctermbg=231 ctermfg=233 cterm=NONE guibg=#ffffff guifg=#121212 gui=NONE
set background=light
echo "Light 256"
hi NonText ctermbg=bg ctermfg=253 cterm=NONE guibg=bg guifg=#dadada gui=NONE
hi Comment ctermbg=bg ctermfg=246 cterm=NONE guibg=bg guifg=#949494 gui=NONE
hi Conceal ctermbg=bg ctermfg=242 cterm=NONE guibg=bg guifg=#6c6c6c gui=NONE
hi Constant ctermbg=bg ctermfg=134 cterm=NONE guibg=bg guifg=#af5fd7 gui=NONE
hi Identifier ctermbg=bg ctermfg=233 cterm=NONE guibg=bg guifg=#121212 gui=NONE
hi Statement ctermbg=bg ctermfg=242 cterm=NONE guibg=bg guifg=#6c6c6c gui=NONE
hi Operator ctermbg=bg ctermfg=233 cterm=NONE guibg=bg guifg=#121212 gui=NONE
hi PreProc ctermbg=bg ctermfg=242 cterm=NONE guibg=bg guifg=#6c6c6c gui=NONE
hi Type ctermbg=bg ctermfg=233 cterm=NONE guibg=bg guifg=#121212 gui=NONE
hi Special ctermbg=NONE ctermfg=242 cterm=NONE guibg=NONE guifg=#6c6c6c gui=NONE
hi Error ctermbg=NONE ctermfg=124 cterm=NONE guibg=NONE guifg=#af0000 gui=NONE
hi Warning ctermbg=NONE ctermfg=166 cterm=NONE guibg=NONE guifg=#d75f00 gui=NONE
hi ModeMsg ctermbg=NONE ctermfg=242 cterm=NONE guibg=NONE guifg=#6c6c6c gui=NONE
hi Todo ctermbg=NONE ctermfg=203 cterm=bold guibg=NONE guifg=#d75f5f gui=bold
hi Underlined ctermbg=NONE ctermfg=233 cterm=underline guibg=NONE guifg=#121212 gui=underline
hi StatusLine ctermbg=254 ctermfg=134 cterm=bold guibg=#e4e4e4 guifg=#af5fd7 gui=bold
hi StatusLineNC ctermbg=255 ctermfg=242 cterm=NONE guibg=#eeeeee guifg=#6c6c6c gui=NONE
hi TabLine ctermbg=253 ctermfg=242 cterm=NONE guibg=#dadada guifg=#6c6c6c gui=NONE
hi TabLineSel ctermbg=255 ctermfg=134 cterm=bold guibg=#eeeeee guifg=#af5fd7 gui=bold
hi WildMenu ctermbg=203 ctermfg=231 cterm=NONE guibg=#d75f5f guifg=#ffffff gui=NONE
hi VertSplit ctermbg=255 ctermfg=255 cterm=NONE guibg=#eeeeee guifg=#eeeeee gui=NONE
hi Title ctermbg=NONE ctermfg=233 cterm=bold guibg=NONE guifg=#121212 gui=bold
hi LineNr ctermbg=NONE ctermfg=246 cterm=NONE guibg=NONE guifg=#949494 gui=NONE
hi CursorLineNr ctermbg=255 ctermfg=134 cterm=NONE guibg=#eeeeee guifg=#af5fd7 gui=NONE
hi Cursor ctermbg=134 ctermfg=233 cterm=NONE guibg=#af5fd7 guifg=#121212 gui=NONE
hi CursorLine ctermbg=255 ctermfg=NONE cterm=NONE guibg=#eeeeee guifg=NONE gui=NONE
hi SignColumn ctermbg=NONE ctermfg=242 cterm=NONE guibg=NONE guifg=#6c6c6c gui=NONE
hi Visual ctermbg=254 ctermfg=NONE cterm=NONE guibg=#e4e4e4 guifg=NONE gui=NONE
hi VisualNOS ctermbg=253 ctermfg=NONE cterm=NONE guibg=#dadada guifg=NONE gui=NONE
hi Pmenu ctermbg=255 ctermfg=242 cterm=NONE guibg=#eeeeee guifg=#6c6c6c gui=NONE
hi PmenuSbar ctermbg=254 ctermfg=NONE cterm=NONE guibg=#e4e4e4 guifg=NONE gui=NONE
hi PmenuSel ctermbg=254 ctermfg=134 cterm=bold guibg=#e4e4e4 guifg=#af5fd7 gui=bold
hi PmenuThumb ctermbg=203 ctermfg=NONE cterm=NONE guibg=#d75f5f guifg=NONE gui=NONE
hi Folded ctermbg=253 ctermfg=242 cterm=NONE guibg=#dadada guifg=#6c6c6c gui=NONE
hi FoldColumn ctermbg=NONE ctermfg=166 cterm=NONE guibg=NONE guifg=#d75f00 gui=NONE
hi SpecialKey ctermbg=NONE ctermfg=242 cterm=NONE guibg=NONE guifg=#6c6c6c gui=NONE
hi IncSearch ctermbg=203 ctermfg=231 cterm=NONE guibg=#d75f5f guifg=#ffffff gui=NONE
hi Search ctermbg=134 ctermfg=231 cterm=NONE guibg=#af5fd7 guifg=#ffffff gui=NONE
hi Directory ctermbg=NONE ctermfg=134 cterm=NONE guibg=NONE guifg=#af5fd7 gui=NONE
hi MatchParen ctermbg=NONE ctermfg=203 cterm=bold guibg=NONE guifg=#d75f5f gui=bold
hi SpellBad ctermbg=NONE ctermfg=124 cterm=underline guibg=NONE guifg=#af0000 gui=underline
hi SpellCap ctermbg=NONE ctermfg=28 cterm=underline guibg=NONE guifg=#008700 gui=underline
hi SpellLocal ctermbg=NONE ctermfg=166 cterm=underline guibg=NONE guifg=#d75f00 gui=underline
hi QuickFixLine ctermbg=253 ctermfg=NONE cterm=NONE guibg=#dadada guifg=NONE gui=NONE
hi DiffAdd ctermbg=255 ctermfg=28 cterm=NONE guibg=#eeeeee guifg=#008700 gui=NONE
hi DiffChange ctermbg=255 ctermfg=NONE cterm=NONE guibg=#eeeeee guifg=NONE gui=NONE
hi DiffDelete ctermbg=255 ctermfg=124 cterm=NONE guibg=#eeeeee guifg=#af0000 gui=NONE
hi DiffText ctermbg=255 ctermfg=166 cterm=NONE guibg=#eeeeee guifg=#d75f00 gui=NONE
hi helpHyperTextJump ctermbg=bg ctermfg=134 cterm=NONE guibg=bg guifg=#af5fd7 gui=NONE
elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16
" set t_Co=16
hi Normal ctermbg=white ctermfg=black cterm=NONE
echo "light 8"
set background=light
hi NonText ctermbg=bg ctermfg=grey cterm=NONE
hi Comment ctermbg=bg ctermfg=gray cterm=NONE
hi Conceal ctermbg=bg ctermfg=darkgray cterm=NONE
hi Constant ctermbg=bg ctermfg=darkmagenta cterm=NONE
hi Identifier ctermbg=bg ctermfg=black cterm=NONE
hi Statement ctermbg=bg ctermfg=darkgray cterm=NONE
hi Operator ctermbg=bg ctermfg=black cterm=NONE
hi PreProc ctermbg=bg ctermfg=darkgray cterm=NONE
hi Type ctermbg=bg ctermfg=black cterm=NONE
hi Special ctermbg=NONE ctermfg=darkgray cterm=NONE
hi Error ctermbg=NONE ctermfg=darkred cterm=NONE
hi Warning ctermbg=NONE ctermfg=darkyellow cterm=NONE
hi ModeMsg ctermbg=NONE ctermfg=darkgray cterm=NONE
hi Todo ctermbg=NONE ctermfg=red cterm=bold
hi Underlined ctermbg=NONE ctermfg=black cterm=underline
hi StatusLine ctermbg=white ctermfg=darkmagenta cterm=bold
hi StatusLineNC ctermbg=white ctermfg=darkgray cterm=NONE
hi TabLine ctermbg=grey ctermfg=darkgray cterm=NONE
hi TabLineSel ctermbg=white ctermfg=darkmagenta cterm=bold
hi WildMenu ctermbg=red ctermfg=white cterm=NONE
hi VertSplit ctermbg=white ctermfg=white cterm=NONE
hi Title ctermbg=NONE ctermfg=black cterm=bold
hi LineNr ctermbg=NONE ctermfg=gray cterm=NONE
hi CursorLineNr ctermbg=white ctermfg=darkmagenta cterm=NONE
hi Cursor ctermbg=darkmagenta ctermfg=black cterm=NONE
hi CursorLine ctermbg=white ctermfg=NONE cterm=NONE
hi SignColumn ctermbg=NONE ctermfg=darkgray cterm=NONE
hi Visual ctermbg=white ctermfg=NONE cterm=NONE
hi VisualNOS ctermbg=grey ctermfg=NONE cterm=NONE
hi Pmenu ctermbg=white ctermfg=darkgray cterm=NONE
hi PmenuSbar ctermbg=white ctermfg=NONE cterm=NONE
hi PmenuSel ctermbg=white ctermfg=darkmagenta cterm=bold
hi PmenuThumb ctermbg=red ctermfg=NONE cterm=NONE
hi Folded ctermbg=grey ctermfg=darkgray cterm=NONE
hi FoldColumn ctermbg=NONE ctermfg=darkyellow cterm=NONE
hi SpecialKey ctermbg=NONE ctermfg=darkgray cterm=NONE
hi IncSearch ctermbg=red ctermfg=white cterm=NONE
hi Search ctermbg=darkmagenta ctermfg=white cterm=NONE
hi Directory ctermbg=NONE ctermfg=darkmagenta cterm=NONE
hi MatchParen ctermbg=NONE ctermfg=red cterm=bold
hi SpellBad ctermbg=NONE ctermfg=darkred cterm=underline
hi SpellCap ctermbg=NONE ctermfg=darkgreen cterm=underline
hi SpellLocal ctermbg=NONE ctermfg=darkyellow cterm=underline
hi QuickFixLine ctermbg=grey ctermfg=NONE cterm=NONE
hi DiffAdd ctermbg=white ctermfg=darkgreen cterm=NONE
hi DiffChange ctermbg=white ctermfg=NONE cterm=NONE
hi DiffDelete ctermbg=white ctermfg=darkred cterm=NONE
hi DiffText ctermbg=white ctermfg=darkyellow cterm=NONE
hi helpHyperTextJump ctermbg=bg ctermfg=darkmagenta cterm=NONE
endif
hi! link Character Constant
hi! link Number Constant
hi! link Float Number
hi! link Boolean Constant
hi! link String Constant
hi! link Function Identifier
hi! link Conditonal Statement
hi! link Repeat Statement
hi! link Label Statement
hi! link Keyword Statement
hi! link Exception Statement
hi! link Include PreProc
hi! link Define PreProc
hi! link Macro PreProc
hi! link PreCondit PreProc
hi! link StorageClass Type
hi! link Structure Type
hi! link Typedef Type
hi! link SpecialChar Special
hi! link Tag Special
hi! link Delimiter Special
hi! link SpecialComment Special
hi! link Debug Special
hi! link ErrorMsg Error
hi! link WarningMsg Warning
hi! link MoreMsg ModeMsg
hi! link Question ModeMsg
hi! link Ignore NonText
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link TabLineFill TabLine
hi! link CursorColumn CursorLine
hi! link ColorColumn CursorColumn
hi! link SpellRare SpellLocal
hi! link diffAdded DiffAdd
hi! link diffRemoved DiffDelete
hi! link htmlTag htmlTagName
hi! link htmlEndTag htmlTag
hi! link gitcommitSummary Title
if has('nvim')
let g:terminal_color_0 = '#303030'
let g:terminal_color_1 = '#af0000'
let g:terminal_color_2 = '#008700'
let g:terminal_color_3 = '#a2734c'
let g:terminal_color_4 = '#12488b'
let g:terminal_color_5 = '#a347ba'
let g:terminal_color_6 = '#2aa1b3'
let g:terminal_color_7 = '#949494'
let g:terminal_color_8 = '#4e4e4e'
let g:terminal_color_9 = '#d75f5f'
let g:terminal_color_10 = '#33d17a'
let g:terminal_color_11 = '#d75f00'
let g:terminal_color_12 = '#2a7bde'
let g:terminal_color_13 = '#af5fd7'
let g:terminal_color_14 = '#33c7de'
let g:terminal_color_15 = '#e4e4e4'
else
let g:terminal_ansi_colors = [
\ '#303030',
\ '#af0000',
\ '#008700',
\ '#a2734c',
\ '#12488b',
\ '#a347ba',
\ '#2aa1b3',
\ '#949494',
\ '#4e4e4e',
\ '#d75f5f',
\ '#33d17a',
\ '#d75f00',
\ '#2a7bde',
\ '#af5fd7',
\ '#33c7de',
\ '#e4e4e4',
\ ]
endif
" Generated with RNB (https://github.com/romainl/vim-rnb)

View File

@@ -308,7 +308,7 @@ elseif has("gui_running") || (&t_Co == 256 && (&term ==# "xterm" || &term =~# "^
CSAHi Question term=NONE cterm=bold ctermbg=bg ctermfg=117 gui=bold guibg=bg guifg=#66D9EF
CSAHi StatusLine term=bold,reverse cterm=NONE ctermbg=231 ctermfg=66 gui=NONE guibg=fg guifg=#455354
CSAHi StatusLineNC term=reverse cterm=reverse ctermbg=244 ctermfg=232 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=244 ctermfg=232 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=bg ctermfg=bg gui=reverse guibg=bg guifg=bg
CSAHi Title term=bold cterm=NONE ctermbg=bg ctermfg=189 gui=NONE guibg=bg guifg=#B6B7EB
CSAHi Visual term=reverse cterm=NONE ctermbg=59 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
CSAHi VisualNOS term=NONE cterm=NONE ctermbg=59 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
@@ -628,7 +628,7 @@ elseif has("gui_running") || (&t_Co == 256 && (&term ==# "xterm" || &term =~# "^
CSAHi Question term=NONE cterm=bold ctermbg=bg ctermfg=123 gui=bold guibg=bg guifg=#66D9EF
CSAHi StatusLine term=bold,reverse cterm=NONE ctermbg=255 ctermfg=102 gui=NONE guibg=fg guifg=#455354
CSAHi StatusLineNC term=reverse cterm=reverse ctermbg=244 ctermfg=232 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=244 ctermfg=232 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=bg ctermfg=bg gui=reverse guibg=bg guifg=bg
CSAHi Title term=bold cterm=NONE ctermbg=bg ctermfg=189 gui=NONE guibg=bg guifg=#B6B7EB
CSAHi Visual term=reverse cterm=NONE ctermbg=95 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
CSAHi VisualNOS term=NONE cterm=NONE ctermbg=95 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
@@ -948,7 +948,7 @@ elseif has("gui_running") || &t_Co == 256
CSAHi Question term=NONE cterm=bold ctermbg=bg ctermfg=81 gui=bold guibg=bg guifg=#66D9EF
CSAHi StatusLine term=bold,reverse cterm=NONE ctermbg=231 ctermfg=59 gui=NONE guibg=fg guifg=#455354
CSAHi StatusLineNC term=reverse cterm=reverse ctermbg=244 ctermfg=232 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=244 ctermfg=232 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=bg ctermfg=bg gui=reverse guibg=bg guifg=bg
CSAHi Title term=bold cterm=NONE ctermbg=bg ctermfg=146 gui=NONE guibg=bg guifg=#B6B7EB
CSAHi Visual term=reverse cterm=NONE ctermbg=59 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
CSAHi VisualNOS term=NONE cterm=NONE ctermbg=59 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
@@ -1268,7 +1268,7 @@ elseif has("gui_running") || &t_Co == 88
CSAHi Question term=NONE cterm=bold ctermbg=bg ctermfg=43 gui=bold guibg=bg guifg=#66D9EF
CSAHi StatusLine term=bold,reverse cterm=NONE ctermbg=79 ctermfg=21 gui=NONE guibg=fg guifg=#455354
CSAHi StatusLineNC term=reverse cterm=reverse ctermbg=83 ctermfg=16 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=83 ctermfg=16 gui=reverse guibg=#080808 guifg=#808080
CSAHi VertSplit term=reverse cterm=reverse ctermbg=bg ctermfg=bg gui=reverse guibg=bg guifg=bg
CSAHi Title term=bold cterm=NONE ctermbg=bg ctermfg=59 gui=NONE guibg=bg guifg=#B6B7EB
CSAHi Visual term=reverse cterm=NONE ctermbg=80 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
CSAHi VisualNOS term=NONE cterm=NONE ctermbg=80 ctermfg=fg gui=NONE guibg=#403D3D guifg=fg
@@ -1293,7 +1293,7 @@ elseif has("gui_running") || &t_Co == 88
CSAHi LightLineLeft_insert_1_2 term=NONE cterm=NONE ctermbg=21 ctermfg=22 gui=NONE guibg=#005f87 guifg=#0087af
CSAHi LightLineLeft_insert_1_tabsel term=NONE cterm=NONE ctermbg=80 ctermfg=22 gui=NONE guibg=#262626 guifg=#0087af
CSAHi LightLineLeft_insert_tabsel_1 term=NONE cterm=NONE ctermbg=22 ctermfg=80 gui=NONE guibg=#0087af guifg=#262626
CSAHi LightLineMiddle_insert term=NONE cterm=NONE ctermbg=21 ctermfg=43 gui=NONE guibg=#005f87 guifg=#87dfff
CSAHi LightLineMiddle_insert term=NONE cterm=NONE ctermbg=22 ctermfg=43 gui=NONE guibg=#005f87 guifg=#87dfff
CSAHi LightLineRight_insert_0_1 term=NONE cterm=NONE ctermbg=22 ctermfg=43 gui=NONE guibg=#0087af guifg=#87dfff
CSAHi vimNormCmds term=NONE cterm=NONE ctermbg=bg ctermfg=fg gui=NONE guibg=bg guifg=fg
CSAHi Folded term=NONE cterm=NONE ctermbg=16 ctermfg=81 gui=NONE guibg=#000000 guifg=#465457

View File

@@ -1,116 +0,0 @@
" Vim color file
"
" Author: Federico Ramirez
" https://github.com/gosukiwi/vim-atom-dark
"
" Note: Based on the Monokai theme variation by Tomas Restrepo
" https://github.com/tomasr/molokai
hi clear
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="atom-dark"
hi Boolean guifg=#99CC99
hi Character guifg=#A8FF60
hi Number guifg=#99CC99
hi String guifg=#A8FF60
hi Conditional guifg=#92C5F7 gui=none
hi Constant guifg=#99CC99 gui=none
hi Cursor guifg=#F1F1F1 guibg=#777777
hi iCursor guifg=#F1F1F1 guibg=#777777
hi Debug guifg=#BCA3A3 gui=none
hi Define guifg=#66D9EF
hi Delimiter guifg=#8F8F8F
hi DiffAdd guibg=#13354A
hi DiffChange guifg=#89807D guibg=#4C4745
hi DiffDelete guifg=#960050 guibg=#1E0010
hi DiffText guibg=#4C4745 gui=none
hi Directory guifg=#AAAAAA gui=none
hi Error guifg=#A8FF60 guibg=#1E0010
hi ErrorMsg guifg=#92C5F7 guibg=#232526 gui=none
hi Exception guifg=#DAD085 gui=none
hi Float guifg=#99CC99
hi FoldColumn guifg=#465457 guibg=#000000
hi Folded guifg=#465457 guibg=#000000
hi Function guifg=#DAD085
hi Identifier guifg=#B6B7EB
hi Ignore guifg=#808080 guibg=bg
hi IncSearch guifg=#C4BE89 guibg=#000000
hi Keyword guifg=#92C5F7 gui=none
hi Label guifg=#A8FF60 gui=none
hi Macro guifg=#C4BE89 gui=none
hi SpecialKey guifg=#66D9EF gui=none
hi MatchParen guifg=#B7B9B8 guibg=#444444 gui=none
hi ModeMsg guifg=#A8FF60
hi MoreMsg guifg=#A8FF60
hi Operator guifg=#92C5F7
" complete menu
hi Pmenu guifg=#66D9EF guibg=#000000
hi PmenuSel guibg=#808080
hi PmenuSbar guibg=#080808
hi PmenuThumb guifg=#66D9EF
hi PreCondit guifg=#DAD085 gui=none
hi PreProc guifg=#DAD085
hi Question guifg=#66D9EF
hi Repeat guifg=#92C5F7 gui=none
hi Search guifg=#000000 guibg=#B4EC85
" marks
hi SignColumn guifg=#DAD085 guibg=#232526
hi SpecialChar guifg=#92C5F7 gui=none
hi SpecialComment guifg=#7C7C7C gui=none
hi Special guifg=#66D9EF guibg=bg gui=none
if has("spell")
hi SpellBad guisp=#FF0000 gui=undercurl
hi SpellCap guisp=#7070F0 gui=undercurl
hi SpellLocal guisp=#70F0F0 gui=undercurl
hi SpellRare guisp=#FFFFFF gui=undercurl
endif
hi Statement guifg=#92C5F7 gui=none
hi StatusLine guifg=#455354 guibg=fg gui=none
hi StatusLineNC guifg=#808080 guibg=#080808
hi StorageClass guifg=#B6B7EB gui=none
hi Structure guifg=#66D9EF
hi Tag guifg=#92C5F7 gui=none
hi Title guifg=#B6B7EB gui=none
hi Todo guifg=#FFFFFF guibg=bg gui=none
hi Typedef guifg=#66D9EF
hi Type guifg=#66D9EF gui=none
hi Underlined guifg=#808080 gui=underline
hi VertSplit guifg=#808080 guibg=#080808
hi VisualNOS guibg=#403D3D
hi Visual guibg=#403D3D
hi WarningMsg guifg=#FFFFFF guibg=#333333
hi WildMenu guifg=#66D9EF guibg=#000000
hi TabLineFill guifg=#1D1F21 guibg=#1D1F21
hi TabLine guibg=#1D1F21 guifg=#808080 gui=none
hi Normal guifg=#F8F8F2 guibg=#1D1F21
hi Comment guifg=#7C7C7C
hi CursorLine guibg=#293739
hi CursorLineNr guifg=#B6B7EB gui=none
hi CursorColumn guibg=#293739
hi ColorColumn guifg=#B62323 guibg=#232526
hi LineNr guifg=#465457 guibg=#232526
hi NonText guifg=#465457
hi SpecialKey guifg=#465457
" Must be at the end, because of ctermbg=234 bug.
" https://groups.google.com/forum/#!msg/vim_dev/afPqwAFNdrU/nqh6tOM87QUJ
set background=dark

7
vim/ftplugin/dart.vim Normal file
View File

@@ -0,0 +1,7 @@
set tabstop=2
set shiftwidth=2
set expandtab
set smartindent
xmap <leader>a <Plug>(coc-codeaction-selected)
nmap <leader>a <Plug>(coc-codeaction-selected)

View File

@@ -0,0 +1,8 @@
" to use folding provided by plugin
setlocal foldmethod=expr
setlocal shiftwidth=4
setlocal tabstop=4
nnoremap <buffer> <F4> :GodotRunLast<CR>
nnoremap <buffer> <F5> :GodotRun<CR>
nnoremap <buffer> <F6> :GodotRunCurrent<CR>
nnoremap <buffer> <F7> :GodotRunFZF<CR>

2
vim/ftplugin/go.vim Normal file
View File

@@ -0,0 +1,2 @@
let g:go_imports_autosave = 1
" au BufWritePre,FileWritePre *.go :GoFmt

View File

@@ -1,4 +1,5 @@
filetype plugin indent on
set autoindent
set cindent
" show existing tab with 2 spaces width
set tabstop=2
" when indenting with '>', use 2 spaces width

13
vim/ftplugin/json.vim Normal file
View File

@@ -0,0 +1,13 @@
" au! BufRead,BufNewFile *.json set filetype=json
" augroup json_autocmd
" autocmd!
" autocmd FileType json set autoindent
" autocmd FileType json set formatoptions=tcq2l
" autocmd FileType json set textwidth=78 shiftwidth=2
" autocmd FileType json set softtabstop=2 tabstop=2
" autocmd FileType json set expandtab
" autocmd FileType json set foldmethod=syntax
" augroup END
set conceallevel=0
let g:indentLine_setConceal = 0
autocmd FileType json setlocal ts=2 sts=2 sw=2 expandtab

6
vim/ftplugin/php.vim Normal file
View File

@@ -0,0 +1,6 @@
" show existing tab with 4 spaces width
set tabstop=4
" when indenting with '>', use 4 spaces width
set shiftwidth=4
" On pressing tab, insert 4 spaces
set expandtab

6
vim/ftplugin/python.vim Normal file
View File

@@ -0,0 +1,6 @@
fu PyRun() range
echo system('python -c ' . shellescape(join(getline(a:firstline, a:lastline), "\n")))
endf
vmap <F5> :call PyRun()<CR>

7
vim/ftplugin/vim.vim Normal file
View File

@@ -0,0 +1,7 @@
" show existing tab with 2 spaces width
set tabstop=2
" when indenting with '>', use 2 spaces width
set shiftwidth=2
" On pressing tab, insert 2 spaces
set expandtab

View File

@@ -0,0 +1,25 @@
" vim-plug example
"call plug#begin('~/.vim/bundle')
"Plug 'pearofducks/ansible-vim'
"call plug#end()
let g:ansible_goto_role_paths = './roles,../_common/roles'
function! FindAnsibleRoleUnderCursor()
echo "test!"
if exists("g:ansible_goto_role_paths")
let l:role_paths = g:ansible_goto_role_paths
else
let l:role_paths = "./roles"
endif
let l:tasks_main = expand("<cfile>") . "/tasks/main.yml"
let l:found_role_path = findfile(l:tasks_main, l:role_paths)
if l:found_role_path == ""
echo l:tasks_main . " not found"
else
execute "edit " . fnameescape(l:found_role_path)
endif
endfunction
nnoremap <leader>gd :call FindAnsibleRoleUnderCursor()<CR>
vnoremap <leader>gd :call FindAnsibleRoleUnderCursor()<CR>

45
vim/readme.py Normal file
View File

@@ -0,0 +1,45 @@
import re
config = [line.strip() for line in open("coc.vim", "r").readlines()]
def string_to_reject(string):
result = False
if string in ["\""]:
result = True
return result
def string_to_accept(string):
result = False
accepted_keywords = ["nnoremap", "nmap", "noremap", "\""]
result = any(subs in string for subs in accepted_keywords)
return result
def header(string):
string = re.sub(r"^\" \[docs\]", "###", string)
return f"\n{string}\n"
doc_block_started = False
doc_lines = []
for line in config:
if "[docs]" in line:
doc_block_started = True
doc_lines.append(header(line))
continue
elif line == "":
doc_block_started = False
continue
if doc_block_started and string_to_accept(line) and not string_to_reject(line):
if not line.startswith("\"") and not line.startswith("#"):
line = f" {line}"
else:
line = re.sub(r"^\"\s*", "", line)
line = f"{line}\n"
doc_lines.append(line)
print("\n".join(doc_lines))

168
vim/vimrc
View File

@@ -1,25 +1,45 @@
" TODO: fzf enable search through hidden files - https://www.reddit.com/r/neovim/comments/fzeccx/how_can_i_make_fzf_include_hidden_directories/
" * fixed for Rg, but not for Files yet
" TODO: fix fzf search the same dir in different windows https://vimways.org/2019/vim-and-the-working-directory/
" TODO: create readme file about navigation
filetype plugin indent on "Включает определение типа файла, загрузку...
"... соответствующих ему плагинов и файлов отступов
set encoding=utf-8 "Ставит кодировку UTF-8
set nobackup
set nowritebackup
set noswapfile
set encoding=utf-8
syntax enable
set term=xterm-256color
set timeoutlen=200 ttimeoutlen=0 " https://www.johnhawthorn.com/2012/09/vi-escape-delays/
colorscheme atom-dark-256
set timeoutlen=300 ttimeoutlen=0 " https://www.johnhawthorn.com/2012/09/vi-escape-delays/
set clipboard=unnamed
set nocompatible
" For coc-vim. Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
set signcolumn=yes
" linenumbers, in relative manner
set number relativenumber
set splitbelow
set splitright
" [docs] split navigation
" switching between splits
nnoremap <C-j> <C-w>j
nnoremap <C-k> <C-w>k
nnoremap <C-l> <C-w>l
nnoremap <C-h> <C-w>h
" resizing splits
noremap <silent> <C-Left> :vertical resize +3<CR>
noremap <silent> <C-Right> :vertical resize -3<CR>
noremap <silent> <C-Up> :resize +3<CR>
noremap <silent> <C-Down> :resize -3<CR>
set backspace=indent,eol,start
filetype plugin indent on
" Changing <leader> key from \ to <space>
nnoremap <SPACE> <Nop>
let mapleader=" "
" Folding params
set foldlevelstart=20
" Hiding unnecessary vertical split lines
set fillchars+=vert:\ "White space at the end
highlight VertSplit ctermbg=bg ctermfg=bg
highlight VertSplit guibg=bg guifg=bg
let hostname = substitute(system('hostname'), '\n', '', '')
if empty(glob('~/.vim/autoload/plug.vim')) "Если vim-plug не стоит
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs
@@ -31,15 +51,58 @@ endif
call plug#begin('~/.vim/bundle') "Начать искать плагины в этой директории
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'Yggdroot/indentLine'
Plug 'tpope/vim-commentary'
Plug 'airblade/vim-gitgutter'
Plug 'jreybert/vimagit'
Plug 'preservim/nerdtree'
Plug 'towolf/vim-helm'
Plug 'junegunn/fzf', { 'do': { -> fzf#install() } }
Plug 'junegunn/fzf.vim'
Plug 'justinmk/vim-sneak'
Plug 'towolf/vim-helm'
Plug 'pearofducks/ansible-vim'
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'elzr/vim-json'
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'hashivim/vim-terraform'
" Plug 'Exafunction/codeium.vim'
Plug 'habamax/vim-godot'
call plug#end() "Перестать это делать
"
" Colors configuration
"
set term=xterm-256color
colorscheme atom-dark-256
let g:airline_theme='dark'
function ToggleColors()
if (g:colors_name == "atom-dark-256")
colorscheme antiphoton
let g:airline_theme='light'
else
colorscheme atom-dark-256
let g:airline_theme='dark'
endif
endfunction
nnoremap <C-b> :call ToggleColors()<CR>
" [docs] tabs navigation
" go left
nnoremap H gT
" go right
nnoremap L gt
" Changing <leader> key from \ to <space>
nnoremap <SPACE> <Nop>
let mapleader=" "
" Folding params
set foldlevelstart=20
"
" Vim-Airline plugin config
"
@@ -48,28 +111,34 @@ call plug#end() "Перестать это делать
let g:airline_powerline_fonts = 0 " Disable powerline fonts
let g:airline#extensions#keymap#enabled = 0 " Do not show keyboard mapping
let g:airline_section_z = "㏑:%l/%L:%c" " Custom minimalistic current position section
" let g:airline_section_y = '{…}%3{codeium#GetStatusString()}'
let g:Powerline_symbols='unicode' " Unicode support
"
" Gitgutter plugin config
" [docs] Gitgutter plugin config
"
let g:gitgutter_override_sign_column_highlight = 1
highlight SignColumn term=underline cterm=NONE ctermbg=235 ctermfg=66 gui=NONE guibg=#232526 guifg=#465457
set updatetime=100
nnoremap <leader>gu :GitGutterUndoHunk<CR>| " undo git change under the line
"
" Magit plugin config
" [docs] Magit plugin config
"
nnoremap <leader>gs :Magit<CR> " git status
nnoremap <leader>gp :! git push<CR> " git Push
nnoremap <leader>gs :Magit<CR>| " git status
function GitPullPush(cmd)
echo system('git '.a:cmd)
" redraw!
endfunction
nnoremap <leader>gp :call GitPullPush("push")<CR>| " git Push
nnoremap <leader>gP :call GitPullPush("pull")<CR>| " git Pull
"
" NERDTree plugin config
" [docs] NERDTree plugin config
"
nnoremap <leader>n :NERDTreeFocus<CR>
nnoremap <C-n> :NERDTree<CR>
nnoremap <C-t> :NERDTreeToggle<CR>
highlight VertSplit cterm=none
let NERDTreeShowHidden=1
" Exit Vim if NERDTree is the only window remaining in the only tab.
autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTree') && b:NERDTree.isTabTree() | quit | endif
@@ -77,19 +146,64 @@ autocmd BufEnter * if tabpagenr('$') == 1 && winnr('$') == 1 && exists('b:NERDTr
" fzf plugin config
"
let g:fzf_preview_window = 'right:50%'
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.6 } }
let g:fzf_layout = { 'window': { 'width': 0.9, 'height': 0.8 } }
command! -bang -nargs=* Rg call
\fzf#vim#grep('rg
\ --hidden
\ --no-ignore
\ -g !node_modules/ -g !.git/
\ --column --line-number --no-heading --color=always --smart-case '.shellescape(<q-args>),
\1,
\fzf#vim#with_preview({'options': '--exact --delimiter : --nth 4..'}), <bang>0) " is for strict search by default and other unknown stuff is to exclude filenames from search results
" [docs] fzf hotkeys
nnoremap <silent> <Leader>ag :Rg <C-R><C-W><CR>| " searching for word ander cursor
nnoremap <silent> <Leader>b :Buffers<CR>
nnoremap <silent> <Leader>f :Files<CR>
nnoremap <silent> <Leader>cf :Rg<CR>
nnoremap <silent> <Leader>gr :Rg<CR>
nnoremap <silent> <Leader>/ :BLines<CR>
nnoremap <silent> <Leader>' :Marks<CR>
nnoremap <silent> <Leader>g :Commits<CR>
"nnoremap <silent> <Leader>g :Commits<CR>
nnoremap <silent> <Leader>H :Helptags<CR>
nnoremap <silent> <Leader>hh :History<CR>
nnoremap <silent> <Leader>h: :History:<CR>
nnoremap <silent> <Leader>h/ :History/<CR>
"
" Ansible plugin config
"
let g:ansible_unindent_after_newline = 1
let g:ansible_attribute_highlight = "ob"
let g:ansible_extra_keywords_highlight = 1
let g:ansible_name_highlight = 'b'
let g:ansible_yamlKeyName = 'yamlKey'
"
" CoC plugin settings
"
if hostname == "i113855042"
let g:coc_user_config = '~/.vim/coc-lsp/coc-settings-cloudia.json'
else
let g:coc_user_config = '~/.vim/coc-lsp/coc-settings.json'
endif
let g:coc_global_extensions = ['coc-pyright', 'coc-sh', 'coc-go']
function! s:enable_coc_for_type()
let l:filesuffix_whitelist = ['py', 'sh', 'go', 'gd', 'gdscript']
if index(l:filesuffix_whitelist, expand('%:e')) == -1
let b:coc_enabled = 0
endif
endfunction
autocmd BufRead,BufNewFile * call s:enable_coc_for_type()
source ~/.vim/coc-lsp/coc.vim
"
" vim-sneak plugin settings
"
let g:sneak#label = 1
" YAML files config
autocmd FileType yaml,yml setlocal ts=2 sts=2 sw=2 expandtab
let g:indentLine_char = '⦙'
" vim-go settings
let g:go_fmt_autosave = 1

17
windows/keyboard.ahk Normal file
View File

@@ -0,0 +1,17 @@
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
; Ctrl-Space to emit Win-Space which is used to switch keyboard layout
^space::#space
LCtrl & Tab:: AltTab
; remapping Ctrl-<num> to emit Win-<num> to switch between pinned apps
; on task panel
^1::Send #{1}
^2::Send #{2}
^3::Send #{3}
^4::Send #{4}
^5::Send #{5}