update nvim
This commit is contained in:
parent
a1f77fb47c
commit
60e8ec422b
4 changed files with 58 additions and 55 deletions
|
@ -328,5 +328,5 @@ map kitty_mod+k clear_terminal reset active
|
||||||
# map opt+cmd+h hide_macos_other_apps
|
# map opt+cmd+h hide_macos_other_apps
|
||||||
# map cmd+m minimize_macos_window
|
# map cmd+m minimize_macos_window
|
||||||
# map cmd+q quit
|
# map cmd+q quit
|
||||||
map F5 launch --location=hsplit --cwd=current
|
map kitty_mod+F5 launch --location=hsplit --cwd=current
|
||||||
map F6 launch --location=vsplit --cwd=current
|
map kitty_mod+F6 launch --location=vsplit --cwd=current
|
||||||
|
|
|
@ -10,10 +10,10 @@ map('n', '<leader>fg', '<cmd>Telescope live_grep<CR>', opts)
|
||||||
map('n', '<leader>fb', '<cmd>Telescope buffers<CR>', opts)
|
map('n', '<leader>fb', '<cmd>Telescope buffers<CR>', opts)
|
||||||
|
|
||||||
-- LSP
|
-- LSP
|
||||||
map('n', '<leader>e', vim.diagnostic.open_float, opts)
|
--map('n', '<leader>e', vim.diagnostic.open_float, opts)
|
||||||
map('n', '[d', vim.diagnostic.goto_prev, opts)
|
--map('n', '[d', vim.diagnostic.goto_prev, opts)
|
||||||
map('n', ']d', vim.diagnostic.goto_next, opts)
|
--map('n', ']d', vim.diagnostic.goto_next, opts)
|
||||||
map('n', '<leader>q', vim.diagnostic.setloclist, opts)
|
--map('n', '<leader>q', vim.diagnostic.setloclist, opts)
|
||||||
|
|
||||||
local on_attach = function(client, bufnr)
|
local on_attach = function(client, bufnr)
|
||||||
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
vim.api.nvim_buf_set_option(bufnr, 'omnifunc', 'v:lua.vim.lsp.omnifunc')
|
||||||
|
|
|
@ -4,6 +4,8 @@ if fn.empty(fn.glob(install_path)) > 0 then
|
||||||
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
packer_bootstrap = fn.system({'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path})
|
||||||
end
|
end
|
||||||
|
|
||||||
|
vim.cmd [[packadd packer.nvim]]
|
||||||
|
|
||||||
return require('packer').startup(function(use)
|
return require('packer').startup(function(use)
|
||||||
use 'wbthomason/packer.nvim'
|
use 'wbthomason/packer.nvim'
|
||||||
use 'nvim-lua/plenary.nvim'
|
use 'nvim-lua/plenary.nvim'
|
||||||
|
|
99
zsh/zshrc
99
zsh/zshrc
|
@ -28,7 +28,7 @@ export PATH=$HOME/.local/bin:/usr/local/bin:$HOME/go/bin:$PATH
|
||||||
# export GOROOT=$HOME/work/go
|
# export GOROOT=$HOME/work/go
|
||||||
export GOPATH=$HOME/go
|
export GOPATH=$HOME/go
|
||||||
export GOPROXY=https://proxy.neonxp.ru
|
export GOPROXY=https://proxy.neonxp.ru
|
||||||
export EDITOR="micro"
|
export EDITOR="nvim"
|
||||||
#export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
|
#export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/docker.sock
|
||||||
|
|
||||||
# Aliases
|
# Aliases
|
||||||
|
@ -36,14 +36,15 @@ alias ls="ls -F"
|
||||||
alias l="ls"
|
alias l="ls"
|
||||||
alias ll="ls -AFhl"
|
alias ll="ls -AFhl"
|
||||||
alias cp="cp -i" # Confirm before overwriting something
|
alias cp="cp -i" # Confirm before overwriting something
|
||||||
alias gitpush='git add . && git commit --amend --no-edit && git push -f'
|
alias gitpush="git add . && git commit --amend --no-edit && git push -f"
|
||||||
alias k='kubectl'
|
alias k="kubectl"
|
||||||
alias yu="ssh-add -e /usr/lib/x86_64-linux-gnu/libykcs11.so; ssh-add -s /usr/lib/x86_64-linux-gnu/libykcs11.so"
|
alias yu="ssh-add -e /usr/lib/x86_64-linux-gnu/libykcs11.so; ssh-add -s /usr/lib/x86_64-linux-gnu/libykcs11.so"
|
||||||
alias m='micro'
|
alias m="micro"
|
||||||
|
alias n="nvim"
|
||||||
alias cp="cp -i" # confirm before overwriting something
|
alias cp="cp -i" # confirm before overwriting something
|
||||||
alias df='df -h' # human-readable sizes
|
alias df="df -h" # human-readable sizes
|
||||||
alias free='free -m' # show sizes in MB
|
alias free="free -m" # show sizes in MB
|
||||||
alias np='nano -w PKGBUILD'
|
alias np="nano -w PKGBUILD"
|
||||||
alias more=less
|
alias more=less
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,38 +62,38 @@ setopt correct # Auto correct m
|
||||||
setopt extendedglob # Extended globbing. Allows using regular expressions with *
|
setopt extendedglob # Extended globbing. Allows using regular expressions with *
|
||||||
setopt nocaseglob # Case insensitive globbing
|
setopt nocaseglob # Case insensitive globbing
|
||||||
setopt rcexpandparam # Array expension with parameters
|
setopt rcexpandparam # Array expension with parameters
|
||||||
setopt nocheckjobs # Don't warn about running processes when exiting
|
setopt nocheckjobs # Don"t warn about running processes when exiting
|
||||||
setopt numericglobsort # Sort filenames numerically when it makes sense
|
setopt numericglobsort # Sort filenames numerically when it makes sense
|
||||||
setopt nobeep # No beep
|
setopt nobeep # No beep
|
||||||
setopt appendhistory # Immediately append history instead of overwriting
|
setopt appendhistory # Immediately append history instead of overwriting
|
||||||
setopt histignorealldups # If a new command is a duplicate, remove the older one
|
setopt histignorealldups # If a new command is a duplicate, remove the older one
|
||||||
setopt autocd # if only directory path is entered, cd there.
|
setopt autocd # if only directory path is entered, cd there.
|
||||||
setopt inc_append_history # save commands are added to the history immediately, otherwise only when shell exits.
|
setopt inc_append_history # save commands are added to the history immediately, otherwise only when shell exits.
|
||||||
setopt histignorespace # Don't save commands that start with space
|
setopt histignorespace # Don"t save commands that start with space
|
||||||
|
|
||||||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' # Case insensitive tab completion
|
zstyle ":completion:*" matcher-list "m:{a-zA-Z}={A-Za-z}" # Case insensitive tab completion
|
||||||
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
|
zstyle ":completion:*" list-colors "${(s.:.)LS_COLORS}" # Colored completion (different colors for dirs/files/etc)
|
||||||
zstyle ':completion:*' rehash true # automatically find new executables in path
|
zstyle ":completion:*" rehash true # automatically find new executables in path
|
||||||
# Speed up completions
|
# Speed up completions
|
||||||
zstyle ':completion:*' accept-exact '*(N)'
|
zstyle ":completion:*" accept-exact "*(N)"
|
||||||
zstyle ':completion:*' use-cache on
|
zstyle ":completion:*" use-cache on
|
||||||
zstyle ':completion:*' cache-path ~/.zsh/cache
|
zstyle ":completion:*" cache-path ~/.zsh/cache
|
||||||
|
|
||||||
zstyle ':completion:*:processes' command 'ps -ax'
|
zstyle ":completion:*:processes" command "ps -ax"
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;32'
|
zstyle ":completion:*:*:kill:*:processes" list-colors "=(#b) #([0-9]#)*=0=01;32"
|
||||||
zstyle ':completion:*:*:kill:*' menu yes select
|
zstyle ":completion:*:*:kill:*" menu yes select
|
||||||
zstyle ':completion:*:kill:*' force-list always
|
zstyle ":completion:*:kill:*" force-list always
|
||||||
|
|
||||||
zstyle ':completion:*:processes-names' command 'ps -e -o comm='
|
zstyle ":completion:*:processes-names" command "ps -e -o comm="
|
||||||
zstyle ':completion:*:*:killall:*' menu yes select
|
zstyle ":completion:*:*:killall:*" menu yes select
|
||||||
zstyle ':completion:*:killall:*' force-list always
|
zstyle ":completion:*:killall:*" force-list always
|
||||||
|
|
||||||
HISTFILE=~/.zsh_history
|
HISTFILE=~/.zsh_history
|
||||||
HISTSIZE=100000
|
HISTSIZE=100000
|
||||||
SAVEHIST=100000
|
SAVEHIST=100000
|
||||||
#export EDITOR=/usr/bin/nano
|
#export EDITOR=/usr/bin/nano
|
||||||
#export VISUAL=/usr/bin/nano
|
#export VISUAL=/usr/bin/nano
|
||||||
WORDCHARS=${WORDCHARS//\/[&.;]} # Don't consider certain characters part of the word
|
WORDCHARS=${WORDCHARS//\/[&.;]} # Don"t consider certain characters part of the word
|
||||||
|
|
||||||
autoload -U compinit colors zcalc
|
autoload -U compinit colors zcalc
|
||||||
compinit -d
|
compinit -d
|
||||||
|
@ -102,13 +103,13 @@ source ~/.config/zsh/conf.d/*.zsh
|
||||||
colors
|
colors
|
||||||
|
|
||||||
# Color man pages
|
# Color man pages
|
||||||
export LESS_TERMCAP_mb=$'\E[01;32m'
|
export LESS_TERMCAP_mb=$"\E[01;32m"
|
||||||
export LESS_TERMCAP_md=$'\E[01;32m'
|
export LESS_TERMCAP_md=$"\E[01;32m"
|
||||||
export LESS_TERMCAP_me=$'\E[0m'
|
export LESS_TERMCAP_me=$"\E[0m"
|
||||||
export LESS_TERMCAP_se=$'\E[0m'
|
export LESS_TERMCAP_se=$"\E[0m"
|
||||||
export LESS_TERMCAP_so=$'\E[01;47;34m'
|
export LESS_TERMCAP_so=$"\E[01;47;34m"
|
||||||
export LESS_TERMCAP_ue=$'\E[0m'
|
export LESS_TERMCAP_ue=$"\E[0m"
|
||||||
export LESS_TERMCAP_us=$'\E[01;36m'
|
export LESS_TERMCAP_us=$"\E[01;36m"
|
||||||
export LESS=-R
|
export LESS=-R
|
||||||
|
|
||||||
|
|
||||||
|
@ -121,34 +122,34 @@ export LESS=-R
|
||||||
zmodload zsh/terminfo
|
zmodload zsh/terminfo
|
||||||
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
bindkey "$terminfo[kcuu1]" history-substring-search-up
|
||||||
bindkey "$terminfo[kcud1]" history-substring-search-down
|
bindkey "$terminfo[kcud1]" history-substring-search-down
|
||||||
bindkey '^[[A' history-substring-search-up
|
bindkey "^[[A" history-substring-search-up
|
||||||
bindkey '^[[B' history-substring-search-down
|
bindkey "^[[B" history-substring-search-down
|
||||||
|
|
||||||
bindkey -e
|
bindkey -e
|
||||||
bindkey '^[[7~' beginning-of-line # Home key
|
bindkey "^[[7~" beginning-of-line # Home key
|
||||||
bindkey '^[[H' beginning-of-line # Home key
|
bindkey "^[[H" beginning-of-line # Home key
|
||||||
if [[ "${terminfo[khome]}" != "" ]]; then
|
if [[ "${terminfo[khome]}" != "" ]]; then
|
||||||
bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
|
bindkey "${terminfo[khome]}" beginning-of-line # [Home] - Go to beginning of line
|
||||||
fi
|
fi
|
||||||
bindkey '^[[8~' end-of-line # End key
|
bindkey "^[[8~" end-of-line # End key
|
||||||
bindkey '^[[F' end-of-line # End key
|
bindkey "^[[F" end-of-line # End key
|
||||||
if [[ "${terminfo[kend]}" != "" ]]; then
|
if [[ "${terminfo[kend]}" != "" ]]; then
|
||||||
bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
|
bindkey "${terminfo[kend]}" end-of-line # [End] - Go to end of line
|
||||||
fi
|
fi
|
||||||
bindkey '^[[2~' overwrite-mode # Insert key
|
bindkey "^[[2~" overwrite-mode # Insert key
|
||||||
bindkey '^[[3~' delete-char # Delete key
|
bindkey "^[[3~" delete-char # Delete key
|
||||||
bindkey '^[[C' forward-char # Right key
|
bindkey "^[[C" forward-char # Right key
|
||||||
bindkey '^[[D' backward-char # Left key
|
bindkey "^[[D" backward-char # Left key
|
||||||
bindkey '^[[5~' history-beginning-search-backward # Page up key
|
bindkey "^[[5~" history-beginning-search-backward # Page up key
|
||||||
bindkey '^[[6~' history-beginning-search-forward # Page down key
|
bindkey "^[[6~" history-beginning-search-forward # Page down key
|
||||||
|
|
||||||
# Navigate words with ctrl+arrow keys
|
# Navigate words with ctrl+arrow keys
|
||||||
bindkey '^[Oc' forward-word #
|
bindkey "^[Oc" forward-word #
|
||||||
bindkey '^[Od' backward-word #
|
bindkey "^[Od" backward-word #
|
||||||
bindkey '^[[1;5D' backward-word #
|
bindkey "^[[1;5D" backward-word #
|
||||||
bindkey '^[[1;5C' forward-word #
|
bindkey "^[[1;5C" forward-word #
|
||||||
bindkey '^H' backward-kill-word # delete previous word with ctrl+backspace
|
bindkey "^H" backward-kill-word # delete previous word with ctrl+backspace
|
||||||
bindkey '^[[Z' undo # Shift+tab undo last action
|
bindkey "^[[Z" undo # Shift+tab undo last action
|
||||||
|
|
||||||
# ctrl + space accept suggestion
|
# ctrl + space accept suggestion
|
||||||
bindkey '^ ' autosuggest-accept
|
bindkey "^ " autosuggest-accept
|
||||||
|
|
Loading…
Reference in a new issue