mirror of
https://github.com/olexsmir/dotfiles.git
synced 2026-01-15 08:41:34 +02:00
update, neovim use build-in lsp
This commit is contained in:
parent
8aa92b589f
commit
fcb370ba0b
8 changed files with 152 additions and 156 deletions
11
README.md
11
README.md
|
|
@ -1,8 +1,5 @@
|
||||||
<h1 align="center">dotfiles</h1>
|
<h1 align="center">dotfiles</h1>
|
||||||
|
|
||||||

|
|
||||||
----------------------------
|
|
||||||
|
|
||||||
#### System configuration
|
#### System configuration
|
||||||
- `OS` Arch
|
- `OS` Arch
|
||||||
- `WM` bspwm
|
- `WM` bspwm
|
||||||
|
|
@ -10,7 +7,7 @@
|
||||||
- `Shell` zsh
|
- `Shell` zsh
|
||||||
- `Editor` nvim, vscode
|
- `Editor` nvim, vscode
|
||||||
- `File manager` ranger
|
- `File manager` ranger
|
||||||
- `Browser` firefox
|
- `Browser` firefox, chrome
|
||||||
- `Font` Jatbrains Mono
|
- `Font` Jatbrains Mono
|
||||||
- `Icon font` Font Awesome
|
- `Icon font` Font Awesome
|
||||||
- `Launcher` rofi
|
- `Launcher` rofi
|
||||||
|
|
@ -23,12 +20,12 @@ yay -S rcm
|
||||||
|
|
||||||
Install dependency:
|
Install dependency:
|
||||||
```bash
|
```bash
|
||||||
sudo pacman -S neovim tmux git dunst picom bspwm sxhkd kitty rofi zsh ranger ttf-jetbrains-mono ttf-font-awesome
|
sudo pacman -S git bspwm sxhkd dunst kitty picom rofi zsh ranger ttf-font-awesome ttf-jetbrains-mono
|
||||||
yay -S polybar
|
yay -S neovim-nightly-bin polybar
|
||||||
```
|
```
|
||||||
|
|
||||||
And install configs:
|
And install configs:
|
||||||
```bash
|
```bash
|
||||||
git clone --recursive https://github.com/Smirnov-O/dotfiles .dotfiles
|
git clone --recursive https://github.com/Smirnov-O/dotfiles .dotfiles
|
||||||
rcup
|
rcup rcrc && rcup
|
||||||
```
|
```
|
||||||
|
|
|
||||||
|
|
@ -1,38 +1,29 @@
|
||||||
# Smirnov-O <ss2316544@gmail.com>
|
#== Users hotkeys
|
||||||
# BSPWM/SXKBD config file
|
super + {_, shift} Return
|
||||||
|
|
||||||
## == USER keys
|
|
||||||
super + {_,shift} Return
|
|
||||||
{kitty, rofi -show drun}
|
{kitty, rofi -show drun}
|
||||||
|
|
||||||
super + shift + {w, e, f, s, t, z, q}
|
super + shift + {w, e, f, z, q}
|
||||||
{google-chrome-stable, \
|
{google-chrome-stable, \
|
||||||
code, \
|
code, \
|
||||||
nemo, \
|
nemo, \
|
||||||
.applications/simplenote.appimage, \
|
slock, \
|
||||||
.applications/todoist.appimage, \
|
xkill }
|
||||||
slock, \
|
|
||||||
xkill }
|
|
||||||
|
|
||||||
{_,shift,ctrl} Print
|
super + {equal, minus, shift + minus}
|
||||||
{scrot -s, \
|
|
||||||
scrot, \
|
|
||||||
scrot -u }
|
|
||||||
|
|
||||||
super + {equal, minus, shift+minus}
|
|
||||||
amixer sset Master {2%+, 2%-, toggle}
|
amixer sset Master {2%+, 2%-, toggle}
|
||||||
|
|
||||||
|
Print
|
||||||
|
flameshot gui
|
||||||
|
|
||||||
super + Escape
|
super + Escape
|
||||||
.config/rofi/script/powermenu.sh
|
.config/rofi/script/powermenu.sh
|
||||||
|
|
||||||
### == BSPWM keys
|
#== BSPWM
|
||||||
super + q
|
super + q
|
||||||
bspc node -c
|
bspc node -c
|
||||||
|
|
||||||
super + control + r
|
super + control + r
|
||||||
bspc wm -r \
|
bspc wm -r && pkill sxhkd && sxhkd -c ~/.config/bspwm/sxhkd
|
||||||
&& pkill sxhkd \
|
|
||||||
&& sxhkd -c ~/.config/bspwm/sxhkd
|
|
||||||
|
|
||||||
super + {_,shift + } {h,j,k,l}
|
super + {_,shift + } {h,j,k,l}
|
||||||
bspc node -{f,s} {west,south,north,east}
|
bspc node -{f,s} {west,south,north,east}
|
||||||
|
|
@ -43,10 +34,7 @@ super + ctrl + {h,j,k,l}
|
||||||
super + {_,shift + }{1-9}
|
super + {_,shift + }{1-9}
|
||||||
bspc {desktop -f,node -d} focused:'^{1-9}'
|
bspc {desktop -f,node -d} focused:'^{1-9}'
|
||||||
|
|
||||||
super + shift + {Tab, F11}
|
super + {t, f, e}
|
||||||
bspc node -t {floating,fullscreen}
|
bspc node -t {tiled, floating, fullscreen}
|
||||||
|
|
||||||
super + Tab
|
|
||||||
bspc node -t tiled
|
|
||||||
|
|
||||||
# vim: ft=sxhkdrc
|
# vim: ft=sxhkdrc
|
||||||
|
|
|
||||||
|
|
@ -1,48 +1,55 @@
|
||||||
font_family JetBrains Mono
|
font_family JetBrains Mono
|
||||||
disable_ligatures always
|
disable_ligatures always
|
||||||
font_size 11
|
enable_audio_bell no
|
||||||
repaint_delay 10
|
open_url_modifiers ctrl
|
||||||
|
|
||||||
# Cursor
|
|
||||||
cursor_text_color #4c566a
|
|
||||||
cursor_shape underline
|
|
||||||
cursor_underline_thickness 1.3
|
|
||||||
cursor_blink_interval 0
|
cursor_blink_interval 0
|
||||||
|
|
||||||
# Bell
|
## HotKeys
|
||||||
enable_audio_bell no
|
map ctrl+equal change_font_size all +2
|
||||||
window_alert_on_bell no
|
map ctrl+minus change_font_size all -2
|
||||||
bell_on_tab no
|
map ctrl+backspace change_font_size all 0
|
||||||
|
|
||||||
# Keyboard Shortcuts
|
## Theme
|
||||||
clear_all_shortcuts yes
|
#selection_background #303030
|
||||||
open_url_modifiers ctrl
|
#selection_foreground #202020
|
||||||
map ctrl+shift+c copy_to_clipboard
|
#background #202020
|
||||||
map ctrl+shift+v paste_from_clipboard
|
#foreground #d0d0d0
|
||||||
map ctrl+shift+u kitten unicode_input
|
#cursor #d0d0d0
|
||||||
map alt+k scroll_line_up
|
#color0 #151515
|
||||||
map alt+j scroll_line_down
|
#color8 #505050
|
||||||
map ctrl+equal change_font_size all +2.0
|
#color1 #ac4142
|
||||||
map ctrl+minus change_font_size all -2.0
|
#color9 #ac4142
|
||||||
map ctrl+backspace change_font_size all 0
|
#color2 #7e8d50
|
||||||
|
#color10 #7e8d50
|
||||||
|
#color3 #e5b566
|
||||||
|
#color11 #e5b566
|
||||||
|
#color4 #6c99ba
|
||||||
|
#color12 #6c99ba
|
||||||
|
#color5 #9e4e85
|
||||||
|
#color13 #9e4e85
|
||||||
|
#color6 #7dd5cf
|
||||||
|
#color14 #7dd5cf
|
||||||
|
#color7 #d0d0d0
|
||||||
|
#color15 #f5f5f5
|
||||||
|
color0 #232323
|
||||||
|
color1 #ff000f
|
||||||
|
color2 #8ce10b
|
||||||
|
color3 #ffb900
|
||||||
|
color4 #008df8
|
||||||
|
color5 #6d43a6
|
||||||
|
color6 #00d8eb
|
||||||
|
color7 #ffffff
|
||||||
|
color8 #444444
|
||||||
|
color9 #ff2740
|
||||||
|
color10 #abe15b
|
||||||
|
color11 #ffd242
|
||||||
|
color12 #0092ff
|
||||||
|
color13 #9a5feb
|
||||||
|
color14 #67fff0
|
||||||
|
color15 #ffffff
|
||||||
|
background #0e1019
|
||||||
|
selection_foreground #0e1019
|
||||||
|
cursor #ff0018
|
||||||
|
foreground #fffaf4
|
||||||
|
selection_background #fffaf4
|
||||||
|
|
||||||
# Theming
|
|
||||||
background #f6f6f6
|
|
||||||
foreground #2a2b33
|
|
||||||
cursor #d8dee9
|
|
||||||
color0 #3b4252
|
|
||||||
color8 #4c566a
|
|
||||||
color1 #bf616a
|
|
||||||
color9 #bf616a
|
|
||||||
color2 #a3be8c
|
|
||||||
color10 #a3be8c
|
|
||||||
color3 #ebcb8b
|
|
||||||
color11 #ebcb8b
|
|
||||||
color4 #81a1c1
|
|
||||||
color12 #81a1c1
|
|
||||||
color5 #b48ead
|
|
||||||
color13 #b48ead
|
|
||||||
color6 #88c0d0
|
|
||||||
color14 #88c0d0
|
|
||||||
color7 #e5e9f0
|
|
||||||
color15 #e5e9f0
|
|
||||||
|
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"javascript.suggestionActions.enabled": false,
|
|
||||||
"html.filetypes": ["ejs", "jst"],
|
|
||||||
"languageserver": {
|
|
||||||
"golang": {
|
|
||||||
"filetypes": ["go"],
|
|
||||||
"command": "gopls",
|
|
||||||
"rootPatterns": ["go.mod"],
|
|
||||||
"disableWorkspaceFolders": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
ino <expr> <Tab> pumvisible() ? "\<C-n>" : "\<Tab>"
|
|
||||||
ino <expr> <S-Tab> pumvisible() ? "\<C-p>" : "\<S-Tab>"
|
|
||||||
map <leader>s <Plug>(coc-rename)
|
|
||||||
|
|
||||||
let g:coc_global_config = "$HOME/.config/nvim/coc-settings.json"
|
|
||||||
let g:coc_global_extensions = [
|
|
||||||
\ "coc-tsserver",
|
|
||||||
\ "coc-html"
|
|
||||||
\ ]
|
|
||||||
|
|
@ -1,25 +1,31 @@
|
||||||
call plug#begin('~/.vim/plugged')
|
call plug#begin('~/.vim/plugged')
|
||||||
Plug 'Smirnov-O/nten.vim'
|
|
||||||
Plug 'jiangmiao/auto-pairs'
|
|
||||||
Plug 'sheerun/vim-polyglot'
|
Plug 'sheerun/vim-polyglot'
|
||||||
Plug 'neoclide/coc.nvim'
|
" Completion && LSP
|
||||||
Plug 'axvr/zepl.vim'
|
Plug 'neovim/nvim-lspconfig'
|
||||||
|
Plug 'hrsh7th/nvim-compe'
|
||||||
|
Plug 'jiangmiao/auto-pairs'
|
||||||
|
" Status line
|
||||||
|
Plug 'hoob3rt/lualine.nvim'
|
||||||
|
" Theme
|
||||||
|
Plug 'Smirnov-O/nten.vim'
|
||||||
call plug#end()
|
call plug#end()
|
||||||
|
|
||||||
"== General
|
"== General
|
||||||
colo nten-light " Color scheme
|
colo codedark " Color scheme
|
||||||
set nu rnu cul " Line numbers & cursor highlight
|
set termguicolors " GUI colors
|
||||||
set lbr wrap " Line wrap
|
set nu rnu cul " Line numbers & cursor highlight
|
||||||
set mouse=a mousehide " Mouse
|
set nolbr nowrap " Line wrap
|
||||||
set ruler laststatus=0 " Status line
|
set mouse=a mh " Mouse
|
||||||
set history=500 " Set history size
|
set history=500 " Set history size
|
||||||
set autoread " Auto read file on change
|
set autoread " Auto read file on change
|
||||||
set hidden " Change buffet without warning
|
set hidden " Change buffet without warning
|
||||||
set visualbell t_vb= " Disable sounds
|
set visualbell t_vb= " Disable sounds
|
||||||
set pumheight=8 " Maximum items in pop up
|
set pumheight=8 " Maximum items in pop up
|
||||||
set modeline " Enable modeline
|
set modeline " Enable modeline
|
||||||
set nobk noswf noudf " Swap files
|
set nobk noswf noudf " Swap files
|
||||||
set is ic scs " Search
|
set is ic scs " Search
|
||||||
|
let mapleader=";" " Set leader key
|
||||||
|
set spr " Split
|
||||||
set scrolloff=3
|
set scrolloff=3
|
||||||
set enc=utf-8 fenc=utf-8 " Encoding
|
set enc=utf-8 fenc=utf-8 " Encoding
|
||||||
set list listchars=tab:\|·,trail:~,space:·
|
set list listchars=tab:\|·,trail:~,space:·
|
||||||
|
|
@ -28,6 +34,34 @@ set list listchars=tab:\|·,trail:~,space:·
|
||||||
set ts=4 sw=4 sts=4
|
set ts=4 sw=4 sts=4
|
||||||
set sta et ai
|
set sta et ai
|
||||||
|
|
||||||
|
"== Status line
|
||||||
|
lua require'lualine'.setup({options = {
|
||||||
|
\ theme = "codedark"
|
||||||
|
\ }})
|
||||||
|
|
||||||
|
"== Completion(LSP)
|
||||||
|
ino <expr> <tab> pumvisible() ? "\<C-n>" : "\<tab>"
|
||||||
|
ino <expr> <s-tab> pumvisible() ? "\<C-p>" : "\<tab>"
|
||||||
|
ino <expr> <CR> compe#confirm('<CR>')
|
||||||
|
nno sr :lua vim.lsp.buf.rename()<cr>
|
||||||
|
nno sh :lua vim.lsp.buf.hover()<cr>
|
||||||
|
nno si :lua vim.lsp.buf.definition()<cr>
|
||||||
|
nno sa :lua vim.lsp.buf.code_action()<cr>
|
||||||
|
|
||||||
|
lua << EOF
|
||||||
|
require'lspconfig'.tsserver.setup{}
|
||||||
|
require'lspconfig'.gopls.setup{}
|
||||||
|
require'compe'.setup{
|
||||||
|
enabled = true,
|
||||||
|
autocomplete = true,
|
||||||
|
source = {
|
||||||
|
path = true,
|
||||||
|
buffer = true,
|
||||||
|
nvim_lsp = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
"== Netrw file tree
|
"== Netrw file tree
|
||||||
let g:netrw_liststyle = 3
|
let g:netrw_liststyle = 3
|
||||||
let g:netrw_banner = 0
|
let g:netrw_banner = 0
|
||||||
|
|
@ -36,37 +70,31 @@ let g:netrw_dirhistmax = 0
|
||||||
"== Custom setting for another files
|
"== Custom setting for another files
|
||||||
au FileType python,elm setl sw=4 ts=4
|
au FileType python,elm setl sw=4 ts=4
|
||||||
au FileType javascript,javascriptreact,json,yaml setl sw=2 ts=2
|
au FileType javascript,javascriptreact,json,yaml setl sw=2 ts=2
|
||||||
|
au FileType go setl noet sw=4 ts=4
|
||||||
|
|
||||||
"== Custom commands
|
"== Custom commands
|
||||||
com! -nargs=1 REpl :cal zepl#start("<args>")|winc L|se nonu nornu
|
|
||||||
com! Prettier :sil !prettier -w %
|
com! Prettier :sil !prettier -w %
|
||||||
com! Term :vs|winc L|se nonu nornu|term
|
com! Term :vs|winc L|se nonu nornu|start|term
|
||||||
com! GoFmt :sil !gofmt -w %
|
com! GoFmt :sil !gofmt -w %
|
||||||
com! Black :sil !black %
|
com! Black :sil !black %
|
||||||
|
|
||||||
"== Mapping
|
"== Mapping
|
||||||
let mapleader=";"
|
nn <C-s> :w<cr>
|
||||||
|
|
||||||
nn <C-s> :w<cr>
|
|
||||||
nn <space> :noh<cr>
|
nn <space> :noh<cr>
|
||||||
tno <esc> <c-\><c-n>
|
tno <esc> <c-\><c-n>
|
||||||
|
|
||||||
nn <leader>t :Term<cr>
|
nn <leader>t :Term<cr>
|
||||||
nn <leader>r :REpl<space>
|
|
||||||
nn <leader>e :Ex<cr>
|
nn <leader>e :Ex<cr>
|
||||||
nn <leader>j :bn<cr>
|
nn <leader>j :bn<cr>
|
||||||
nn <leader>k :bp<cr>
|
nn <leader>k :bp<cr>
|
||||||
nn <leader>w :bd<cr>
|
nn <leader>w :bd<cr>
|
||||||
|
nn <leader>; :FZF<cr>
|
||||||
|
|
||||||
nn <C-h> :wincmd h<cr>
|
nn <C-h> :wincmd h<cr>
|
||||||
nn <C-j> :wincmd j<cr>
|
nn <C-j> :wincmd j<cr>
|
||||||
nn <C-k> :wincmd k<cr>
|
nn <C-k> :wincmd k<cr>
|
||||||
nn <C-l> :wincmd l<cr>
|
nn <C-l> :wincmd l<cr>
|
||||||
|
|
||||||
nn cpp :ReplSend<cr>
|
|
||||||
vn cpp :ReplSend<cr>
|
|
||||||
nn spv :vs<cr>
|
nn spv :vs<cr>
|
||||||
nn sph :sp<cr>
|
nn sph :sp<cr>
|
||||||
|
nn spk :winc K<cr>
|
||||||
"== LSP(coc)
|
nn spl :winc L<cr>
|
||||||
so $HOME/.config/nvim/coc.vim
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"editor.fontFamily": "'Jetbrains Mono', 'Droid Sans Mono', 'monospace'",
|
"editor.fontFamily": "'Jetbrains Mono', 'Droid Sans Mono', 'monospace'",
|
||||||
"workbench.colorTheme": "Brackets Light Pro",
|
"workbench.colorTheme": "Brackets Light Pro",
|
||||||
"workbench.panel.defaultLocation": "right",
|
"workbench.panel.defaultLocation": "bottom",
|
||||||
"workbench.sideBar.location": "right",
|
"workbench.sideBar.location": "right",
|
||||||
"editor.wordWrap": "off",
|
"editor.wordWrap": "off",
|
||||||
"editor.fontSize": 14,
|
"editor.fontSize": 14,
|
||||||
|
|
@ -22,6 +22,8 @@
|
||||||
|
|
||||||
"prettier.semi": false,
|
"prettier.semi": false,
|
||||||
"tabnine.experimentalAutoImports": true,
|
"tabnine.experimentalAutoImports": true,
|
||||||
|
"html.format.enable": false,
|
||||||
|
|
||||||
|
|
||||||
"emmet.includeLanguages": {
|
"emmet.includeLanguages": {
|
||||||
"javascript": "javascriptreact"
|
"javascript": "javascriptreact"
|
||||||
|
|
@ -32,5 +34,5 @@
|
||||||
"[javascriptreact]":{
|
"[javascriptreact]":{
|
||||||
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
"editor.defaultFormatter": "esbenp.prettier-vscode",
|
||||||
},
|
},
|
||||||
"html.format.enable": false,
|
"workbench.startupEditor": "none"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
47
zshrc
47
zshrc
|
|
@ -1,33 +1,28 @@
|
||||||
export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$HOME/go/bin:$PATH"
|
## StartShip
|
||||||
export GOPATH="$HOME/go"
|
|
||||||
export EDITOR="nvim"
|
|
||||||
|
|
||||||
### StartShip
|
|
||||||
eval "$(starship init zsh)"
|
eval "$(starship init zsh)"
|
||||||
|
|
||||||
### FzF
|
## Variables
|
||||||
export FZF_DEFAULT_COMMAND="rg --files --ignore-vcs"
|
export GOPATH="$HOME/go"
|
||||||
|
export EDITOR="nvim"
|
||||||
|
export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$GOPATH/bin:$PATH"
|
||||||
|
|
||||||
### Oh my zsh
|
## Oh my zsh
|
||||||
export OMH="$HOME/.oh-my-zsh"
|
export OMH="$HOME/.oh-my-zsh"
|
||||||
# ZSH_THEME="simple"
|
# ZSH_THEME="simple"
|
||||||
DISABLE_AUTO_TITLE="true"
|
plugins=(dotenv)
|
||||||
plugins=(docker nvm npm)
|
|
||||||
source $OMH/oh-my-zsh.sh
|
source $OMH/oh-my-zsh.sh
|
||||||
|
|
||||||
### Aliases
|
## HotKets
|
||||||
alias cls="clear"
|
bindkey -s "^o" "ranger\n"
|
||||||
alias mkdir="mkdir -p"
|
bindkey -s "^v" 'nvim $(fzf)\n'
|
||||||
alias cp="cp -r"
|
bindkey -s "^f" 'cd $(fd -t directory | fzf)\n'
|
||||||
alias vim="nvim"
|
|
||||||
alias vi="vim"
|
## FNM
|
||||||
alias tmux="tmux -2"
|
eval $(fnm env)
|
||||||
alias e="$EDITOR"
|
|
||||||
alias :q="exit"
|
## Aliases
|
||||||
alias ...="cd ../.."
|
alias cls="clear" cp="cp -r" mkdir="mkdir -p"
|
||||||
alias .3="cd ../../.."
|
alias vim="nvim" vi="vim" e="$EDITOR"
|
||||||
alias gog="go get"
|
alias ...="cd ../.." .3="cd ../../.." .4="cd ../../../.."
|
||||||
alias gor="go run"
|
alias gor="go run" gob="go build" gog="go get" goi="go install"
|
||||||
alias gob="go build"
|
alias pac="sudo pacman" pacs="pac -S" pacr="pac -R" pacss="pac -Ss"
|
||||||
alias pacs="sudo pacman -S"
|
|
||||||
alias pacr="sudo pacman -R"
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue