all repos

dotfiles @ eb4f1a5b5a6db5b93560103ed62604accb1ed4bc

i use rach linux btw
14 files changed, 170 insertions(+), 73 deletions(-)
convert init.vim in modules, update zsh && git
Author: Smirnov Alexander ss2316544@gmail.com
Committed at: 2021-06-02 19:40:42 +0300
Parent: a453290
A config/nvim/README.md
···
                
                1
                +# NVIM

              
                
                2
                +

              
                
                3
                +### Install LSP

              
                
                4
                +```bash

              
                
                5
                +# tsserver(JS/TS)

              
                
                6
                +npm i -g typescript typescript-language-server

              
                
                7
                +# Go(gopls)

              
                
                8
                +go get golang.org/x/tools/gopls@latest

              
                
                9
                +```

              
M config/nvim/init.vim
···
                1
                1
                 call plug#begin('~/.vim/plugged')

              
                2
                
                -  Plug 'sheerun/vim-polyglot'

              
                3
                2
                   " LSP && Completion

              
                4
                3
                   Plug 'neovim/nvim-lspconfig'

              
                5
                4
                   Plug 'hrsh7th/nvim-compe'

              
                6
                
                -  Plug 'mattn/emmet-vim', {'on': ['EmmetInstall', 'Emmet']}

              
                7
                5
                   Plug 'jiangmiao/auto-pairs'

              
                
                6
                +  Plug 'mattn/emmet-vim', {'on': 'EmmetInstall'}

              
                
                7
                +  " File explorer

              
                
                8
                +  Plug 'junegunn/fzf.vim'

              
                
                9
                +  Plug 'kyazdani42/nvim-tree.lua'

              
                
                10
                +  " Git

              
                
                11
                +  Plug 'lewis6991/gitsigns.nvim'

              
                8
                12
                   " Theme

              
                9
                13
                   Plug 'Smirnov-O/nten.vim'

              
                10
                14
                   " Status line & Buffer line

              
                11
                15
                   Plug 'hoob3rt/lualine.nvim'

              
                12
                16
                   Plug 'romgrk/barbar.nvim'

              
                
                17
                +  " Better syntax hl

              
                
                18
                +  Plug 'sheerun/vim-polyglot'

              
                
                19
                +  Plug 'norcalli/nvim-colorizer.lua'

              
                
                20
                +  " Editor config

              
                
                21
                +  Plug 'editorconfig/editorconfig-vim'

              
                
                22
                +  " Other

              
                
                23
                +  Plug 'vimwiki/vimwiki'

              
                
                24
                +  Plug 'nvim-lua/plenary.nvim'

              
                13
                25
                 call plug#end()

              
                14
                26
                 

              
                15
                
                -"== General

              
                16
                
                -colo codedark         " Color scheme

              
                17
                
                -set termguicolors     " GUI colors

              
                18
                
                -set nu rnu cul        " Line numbers & cursor line highlight

              
                19
                
                -set nolbr nowrap      " Line wrap

              
                20
                
                -set mouse=a mh        " Mouse

              
                21
                
                -set history=500       " Set history size

              
                22
                
                -set autoread          " Auto read file on change

              
                23
                
                -set hidden            " Change buffet without warning

              
                24
                
                -set visualbell t_vb=  " Disable sounds

              
                25
                
                -set pumheight=8       " Maximum items in pop up

              
                26
                
                -set modeline          " Enable modeline

              
                27
                
                -set nosmd             " Disable show mode

              
                28
                
                -set nobk noswf noudf  " Swap files

              
                29
                
                -set is ic scs         " Search

              
                30
                
                -let mapleader=";"     " Set leader key

              
                31
                
                -set spr               " Split

              
                32
                
                -set scrolloff=3

              
                33
                
                -set enc=utf-8 fenc=utf-8  " Encoding

              
                34
                
                -set list listchars=tab:\|·,trail:~,space:·

              
                
                27
                +colo nvcode

              
                
                28
                +let mapleader=";"

              
                35
                29
                 

              
                36
                30
                 "== Tab(or spaces)

              
                37
                31
                 set ts=4 sw=4 sts=4

              
                38
                32
                 set sta et ai

              
                39
                33
                 

              
                
                34
                +"== Vim config

              
                
                35
                +source $HOME/.config/nvim/vimscript/config.vim

              
                
                36
                +

              
                40
                37
                 "== Tab line

              
                41
                
                -let bufferline = get(g:, 'bufferline', {})

              
                42
                
                -let g:bufferline.icons = v:false

              
                43
                
                -let g:bufferline.icon_close_tab = '🗴'

              
                
                38
                +source $HOME/.config/nvim/vimscript/barbar.vim

              
                44
                39
                 

              
                45
                40
                 "== Status line

              
                46
                
                -lua require'lualine'.setup({options = {

              
                47
                
                -\     theme = "codedark"

              
                48
                
                -\ }})

              
                
                41
                +luafile $HOME/.config/nvim/lua/n-lualine.lua

              
                
                42
                +

              
                
                43
                +"== File explorer

              
                
                44
                +luafile $HOME/.config/nvim/lua/n-nvimtree.lua

              
                
                45
                +

              
                
                46
                +"== Git

              
                
                47
                +luafile $HOME/.config/nvim/lua/n-gitsigns.lua

              
                49
                48
                 

              
                50
                49
                 "== Emmet

              
                51
                
                -let g:user_emmet_mode = "inc"

              
                52
                
                -let g:user_emmet_leader_key=','

              
                53
                
                -let g:user_emmet_settings = {'javascript': {

              
                54
                
                -\   'extends': 'jsx'

              
                55
                
                -\ }}

              
                
                50
                +source $HOME/.config/nvim/vimscript/emmet.vim

              
                
                51
                +

              
                
                52
                +"== Colorizer

              
                
                53
                +luafile $HOME/.config/nvim/lua/n-colorizer.lua

              
                
                54
                +

              
                
                55
                +"== Notes

              
                
                56
                +let g:vimwiki_list = [{'path': '~/notes', 'syntax': 'markdown', 'ext': '.md'}]

              
                56
                57
                 

              
                57
                58
                 "== Completion(LSP)

              
                58
                59
                 ino <expr> <tab> pumvisible() ? "\<C-n>" : "\<tab>"

              
                59
                60
                 ino <expr> <s-tab> pumvisible() ? "\<C-p>" : "\<tab>"

              
                60
                
                -ino <expr> <CR> compe#confirm('<CR>')

              
                
                61
                +ino <expr> <cr> compe#confirm('<CR>')

              
                61
                62
                 nno sr :lua vim.lsp.buf.rename()<cr>

              
                62
                63
                 nno sh :lua vim.lsp.buf.hover()<cr>

              
                63
                64
                 nno si :lua vim.lsp.buf.definition()<cr>

              ···
                77
                78
                 }

              
                78
                79
                 EOF

              
                79
                80
                 

              
                80
                
                -"== Netrw file tree

              
                81
                
                -let g:netrw_liststyle = 3

              
                82
                
                -let g:netrw_banner = 0

              
                83
                
                -let g:netrw_dirhistmax = 0

              
                84
                81
                 

              
                85
                82
                 "== Custom setting for another files

              
                86
                83
                 au FileType python,elm setl sw=4 ts=4

              
                87
                
                -au FileType javascript,javascriptreact,json,yaml setl sw=2 ts=2

              
                88
                
                -au FileType javascript,javascriptreact,css,scss,less EmmetInstall

              
                
                84
                +au FileType javascript,json,yaml,lua setl sw=2 ts=2

              
                
                85
                +au FileType javascript,vue,html,css,scss :EmmetInstall

              
                89
                86
                 au FileType go setl noet sw=4 ts=4

              
                90
                87
                 

              
                91
                88
                 "== Custom commands

              
                92
                89
                 com! Prettier :sil !prettier -w %

              
                93
                90
                 com! Term  :vs|winc L|se nonu nornu|start|term

              
                94
                91
                 com! GoFmt :sil !gofmt -w %

              
                95
                
                -com! Black :sil !black %

              
                96
                92
                 

              
                97
                93
                 "== Mapping

              
                98
                
                -nn <C-s>   :w<cr>

              
                99
                
                -nn <space> :noh<cr>

              
                100
                
                -tno <esc>  <c-\><c-n>

              
                101
                
                -nn <leader>t :Term<cr>

              
                102
                
                -nn <leader>e :Ex<cr>

              
                103
                
                -nn <leader>j :bn<cr>

              
                104
                
                -nn <leader>k :bp<cr>

              
                105
                
                -nn <leader>w :bd<cr>

              
                106
                
                -nn <leader>; :FZF<cr>

              
                107
                
                -

              
                108
                
                -nn <C-h> :wincmd h<cr>

              
                109
                
                -nn <C-j> :wincmd j<cr>

              
                110
                
                -nn <C-k> :wincmd k<cr>

              
                111
                
                -nn <C-l> :wincmd l<cr>

              
                112
                
                -

              
                113
                
                -nn spv :vs<cr>

              
                114
                
                -nn sph :sp<cr>

              
                115
                
                -nn spk :winc K<cr>

              
                116
                
                -nn spl :winc L<cr>

              
                
                94
                +source $HOME/.config/nvim/vimscript/mappings.vim

              
A config/nvim/lua/n-colorizer.lua
···
                
                1
                +require'colorizer'.setup(

              
                
                2
                +  {'*';}, {

              
                
                3
                +    mode     = 'foreground';

              
                
                4
                +    RGB      = true;    -- #RGB hex codes

              
                
                5
                +    RRGGBB   = true;    -- #RRGGBB hex codes

              
                
                6
                +    RRGGBBAA = false;   -- #RRGGBBAA hex codes

              
                
                7
                +    rgb_fn   = true;    -- CSS rgb() and rgba() functions

              
                
                8
                +    hsl_fn   = false;   -- CSS hsl() and hsla() functions

              
                
                9
                +    css      = false;   -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB

              
                
                10
                +    css_fn   = true;    -- Enable all CSS *functions*: rgb_fn, hsl_fn

              
                
                11
                +    names    = false;   -- "Name" codes like Blue

              
                
                12
                +  }

              
                
                13
                +)

              
A config/nvim/lua/n-gitsigns.lua
···
                
                1
                +require'gitsigns'.setup {

              
                
                2
                +  signs = {

              
                
                3
                +    add          = {hl = 'GitSignsAdd',    text = '│'};

              
                
                4
                +    change       = {hl = 'GitSignsChange', text = '│'};

              
                
                5
                +    delete       = {hl = 'GitSignsDelete', text = '_'};

              
                
                6
                +    topdelete    = {hl = 'GitSignsDelete', text = '‾'};

              
                
                7
                +    changedelete = {hl = 'GitSignsChange', text = '~'};

              
                
                8
                +  };

              
                
                9
                +  watch_index = {

              
                
                10
                +    interval = 1000

              
                
                11
                +  };

              
                
                12
                +  current_line_blame = true,

              
                
                13
                +  sign_priority = 6,

              
                
                14
                +  update_debounce = 100,

              
                
                15
                +  status_formatter = nil,

              
                
                16
                +  use_decoration_api = true,

              
                
                17
                +  use_internal_diff = true,

              
                
                18
                +}

              
A config/nvim/lua/n-lualine.lua
···
                
                1
                +require'lualine'.setup {

              
                
                2
                +  options = {

              
                
                3
                +    theme = "codedark"

              
                
                4
                +  };

              
                
                5
                +}

              
A config/nvim/lua/n-nvimtree.lua
···
                
                1
                +local S = vim.g

              
                
                2
                +

              
                
                3
                +-- Settings

              
                
                4
                +S.nvim_tree_side = "right"

              
                
                5
                +S.nvim_tree_ignore = {".git", "node_modules", "venv"}

              
                
                6
                +S.nvim_tree_auto_close = 0

              
                
                7
                +S.nvim_tree_quit_on_open = 0

              
                
                8
                +S.nvim_tree_width = 24

              
A config/nvim/vimscript/barbar.vim
···
                
                1
                +" Settings

              
                
                2
                +let bufferline = get(g:, 'bufferline', {})

              
                
                3
                +let bufferline.icons = v:false

              
                
                4
                +let bufferline.icon_close_tab = '🗴'

              
                
                5
                +

              
                
                6
                +" Mappings

              
                
                7
                +nno <A-1> :BufferGoto 1<cr>

              
                
                8
                +nno <A-2> :BufferGoto 2<cr>

              
                
                9
                +nno <A-3> :BufferGoto 3<cr>

              
                
                10
                +nno <A-4> :BufferGoto 4<cr>

              
                
                11
                +nno <A-5> :BufferGoto 5<cr>

              
                
                12
                +nno <A-6> :BufferGoto 6<cr>

              
                
                13
                +nno <A-7> :BufferGoto 7<cr>

              
                
                14
                +nno <A-8> :BufferGoto 8<cr>

              
                
                15
                +nno <A-9> :BufferGoto 9<cr>

              
                
                16
                +nno <C-w> :BufferClose<cr>

              
                
                17
                +nno <S-x> :BufferClose!<cr>

              
A config/nvim/vimscript/config.vim
···
                
                1
                +"== Vim config

              
                
                2
                +set termguicolors         " GUI colors

              
                
                3
                +set nu rnu cul            " Line numbers & cursor line highlight

              
                
                4
                +set nolbr nowrap          " Line wrap

              
                
                5
                +set mouse=a mh            " Mouse

              
                
                6
                +set history=500           " Set history size

              
                
                7
                +set autoread              " Auto read file on change

              
                
                8
                +set hidden                " Change buffet without warning

              
                
                9
                +set visualbell t_vb=      " Disable sounds

              
                
                10
                +set pumheight=8           " Maximum items in pop up

              
                
                11
                +set modeline              " Enable modeline

              
                
                12
                +set nosmd                 " Disable show mode

              
                
                13
                +set nobk noswf noudf      " Swap files

              
                
                14
                +set is ic scs             " Search

              
                
                15
                +set spr                   " Split

              
                
                16
                +set enc=utf-8 fenc=utf-8  " Encoding

              
                
                17
                +set scrolloff=3

              
                
                18
                +set list listchars=tab:\|·,trail:~,space:·

              
                
                19
                +

              
                
                20
                +"== Netrw file tree

              
                
                21
                +let g:netrw_liststyle = 3

              
                
                22
                +let g:netrw_banner = 0

              
                
                23
                +let g:netrw_dirhistmax = 0

              
A config/nvim/vimscript/emmet.vim
···
                
                1
                +let g:user_emmet_mode = "in"

              
                
                2
                +let g:user_emmet_leader_key=','

              
                
                3
                +let g:user_emmet_settings = {

              
                
                4
                +\ 'javascript': {

              
                
                5
                +\   'extends': 'jsx'

              
                
                6
                +\ }}

              
A config/nvim/vimscript/mappings.vim
···
                
                1
                +nno <C-s>   :w<cr>

              
                
                2
                +nno <space> :noh<cr>

              
                
                3
                +nno <leader>t :Term<cr>

              
                
                4
                +nno <leader>e :NvimTreeToggle<cr>

              
                
                5
                +nno <leader>; :Files<cr>

              
                
                6
                +

              
                
                7
                +" Buffer

              
                
                8
                +nno <leader>j :bn<cr>

              
                
                9
                +nno <leader>k :bp<cr>

              
                
                10
                +

              
                
                11
                +" Terminal

              
                
                12
                +tno <esc>  <c-\><c-n>

              
                
                13
                +tno <C-h>  <c-\><cmd>:winc h<cr>

              
                
                14
                +tno <C-j>  <c-\><cmd>:winc j<cr>

              
                
                15
                +tno <C-k>  <c-\><cmd>:winc k<cr>

              
                
                16
                +tno <C-l>  <c-\><cmd>:winc k<cr>

              
                
                17
                +

              
                
                18
                +" Split

              
                
                19
                +nno <C-h> :winc h<cr>

              
                
                20
                +nno <C-j> :winc j<cr>

              
                
                21
                +nno <C-k> :winc k<cr>

              
                
                22
                +nno <C-l> :winc l<cr>

              
                
                23
                +

              
                
                24
                +nno spv :vs<cr>

              
                
                25
                +nno sph :sp<cr>

              
                
                26
                +nno spk :winc K<cr>

              
                
                27
                +nno spl :winc L<cr>

              
M gitconfig
···
                8
                8
                 [core]

              
                9
                9
                   editor = nvim

              
                10
                10
                 

              
                
                11
                +[init]

              
                
                12
                +  defaultBranch = main

              
                
                13
                +

              
                11
                14
                 [alias]

              
                12
                15
                   ad = add -A

              
                13
                16
                   cm = commit -m

              
M vscode/README.md
···
                4
                4
                 ```bash

              
                5
                5
                 mv ~/vscode/settings.json ~/.config/Code/User

              
                6
                6
                 ```

              
                7
                
                -

              
                8
                
                -Extensions

              
                9
                
                -- `ESlint` - eslint integration

              
                10
                
                -- `Prettier` - JS code formater

              
                11
                
                -- `GitLens` - Git integration

              
                12
                
                -- `Code spell` - Spell checker

              
                13
                
                -- `Ayu` - Color scheme

              
                14
                
                -- `Vim` - Vim mode

              
M vscode/settings.json
···
                5
                5
                   "workbench.sideBar.location": "right",

              
                6
                6
                   "workbench.editor.untitled.hint": "hidden",

              
                7
                7
                   "workbench.iconTheme": "vs-minimal",

              
                
                8
                +  "workbench.startupEditor": "none",

              
                8
                9
                 

              
                9
                10
                   "explorer.compactFolders": false,

              
                10
                11
                   "explorer.confirmDragAndDrop": false,

              ···
                35
                36
                 

              
                36
                37
                   "extensions.ignoreRecommendations": true,

              
                37
                38
                 

              
                38
                
                -  "tabnine.experimentalAutoImports": true,

              
                39
                
                -

              
                40
                39
                   "prettier.semi": false,

              
                41
                
                -  "html.format.enable": false,

              
                42
                40
                 

              
                43
                41
                   "emmet.includeLanguages": {"javascript": "javascriptreact"},

              
                44
                42
                   "[javascript]": {

              ···
                48
                46
                   "[javascriptreact]": {

              
                49
                47
                     "editor.defaultFormatter": "esbenp.prettier-vscode",

              
                50
                48
                     "editor.tabSize": 2,

              
                51
                
                -  }

              
                
                49
                +  },

              
                52
                50
                 }

              
M zshrc
···
                7
                7
                 export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$GOPATH/bin:$PATH"

              
                8
                8
                 

              
                9
                9
                 ## Oh my zsh

              
                10
                
                -plugins=(dotenv)

              
                
                10
                +plugins=(dotenv z)

              
                11
                11
                 ZSH_THEME="simple"

              
                12
                12
                 source "$HOME/.oh-my-zsh/oh-my-zsh.sh"

              
                13
                13