all repos

dotfiles @ 093639a28a808fd789b149bb1a1f8c322e835b17

i use rach linux btw
25 files changed, 111 insertions(+), 128 deletions(-)
Update nvim
Author: Smirnov Alexander ss2316544@gmail.com
Committed at: 2021-06-10 19:09:35 +0300
Parent: a01c2ab
M README.md
···
                1
                1
                 <h1 align="center">dotfiles</h1>

              
                2
                2
                 

              
                3
                
                -#### System configuration

              
                
                3
                +### System configuration

              
                4
                4
                 - `OS` Arch

              
                5
                5
                 - `WM` bspwm

              
                6
                6
                 - `Terminal` kitty

              
                7
                7
                 - `Shell` zsh

              
                8
                8
                 - `Editor` nvim, vscode

              
                9
                9
                 - `File manager` ranger

              
                10
                
                -- `Browser` firefox, chrome

              
                
                10
                +- `Browser` chrome

              
                11
                11
                 - `Font` Jatbrains Mono

              
                12
                12
                 - `Icon font` Font Awesome

              
                13
                13
                 - `Launcher` rofi

              
                14
                14
                 

              
                15
                
                -#### Install config

              
                
                15
                +### Install config

              
                16
                16
                 Since i use **[rcm](https://github.com/thoughtbot/rcm)** set it:

              
                17
                17
                 ```bash

              
                18
                18
                 yay -S rcm

              
M config/bspwm/bspwmrc
···
                50
                50
                 R Zathura         desktop='^5' focus=on  follow=on state=tiled

              
                51
                51
                 R discord         desktop='^6' focus=on  follow=off

              
                52
                52
                 R TelegramDesktop desktop='^6' focus=off follow=on

              
                53
                
                -R KeePassXC        desktop='^7' focus=on  follow=on

              
                
                53
                +R KeePassXC       desktop='^7' focus=on  follow=on

              
M config/nvim/README.md
···
                1
                1
                 # NVIM

              
                2
                2
                 

              
                3
                
                -### Install LSP

              
                
                3
                +## Install nvim

              
                
                4
                +```bash

              
                
                5
                +yay -S neovim-nightly-bin

              
                
                6
                +```

              
                
                7
                +

              
                
                8
                +## Install plugin manager(`vim-plug`)

              
                
                9
                +```bash

              
                
                10
                +sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \

              
                
                11
                +       https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim'

              
                
                12
                +```

              
                
                13
                +

              
                
                14
                +## Install LSP servers

              
                4
                15
                 ```bash

              
                5
                16
                 # tsserver(JS/TS)

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

              
                
                18
                +

              
                7
                19
                 # Go(gopls)

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

              
                
                21
                +

              
                
                22
                +# Python(pyls)

              
                
                23
                +pip install python-language-server

              
                9
                24
                 ```

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

              
                
                1
                + call plug#begin('~/.vim/plugged')

              
                
                2
                +  Plug 'Smirnov-O/nten.vim'

              
                
                3
                +  Plug 'b3nj5m1n/kommentary'

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

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

              
                
                6
                +  Plug 'nvim-lua/popup.nvim'

              
                
                7
                +  " Plug 'editorconfig/editorconfig-vim'

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

              
                
                9
                +  Plug 'kyazdani42/nvim-web-devicons'

              
                
                10
                +  " Status line && Tab line

              
                
                11
                +  Plug 'hoob3rt/lualine.nvim'

              
                
                12
                +  Plug 'romgrk/barbar.nvim'

              
                2
                13
                   " LSP && Completion

              
                3
                14
                   Plug 'neovim/nvim-lspconfig'

              
                4
                15
                   Plug 'hrsh7th/nvim-compe'

              
                5
                16
                   Plug 'jiangmiao/auto-pairs'

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

              
                
                17
                +  " Git

              
                
                18
                +  Plug 'TimUntersberger/neogit'

              
                
                19
                +  Plug 'lewis6991/gitsigns.nvim'

              
                7
                20
                   " File explorer

              
                8
                
                -  Plug 'junegunn/fzf.vim'

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

              
                10
                
                -  " Git

              
                11
                
                -  Plug 'lewis6991/gitsigns.nvim'

              
                12
                
                -  " Theme

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

              
                14
                
                -  " Status line && Tab line

              
                15
                
                -  Plug 'hoob3rt/lualine.nvim'

              
                16
                
                -  Plug 'romgrk/barbar.nvim'

              
                
                22
                +  Plug 'nvim-telescope/telescope.nvim'

              
                17
                23
                   " Better syntax hl

              
                18
                24
                   Plug 'sheerun/vim-polyglot'

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

              
                20
                
                -  " Other

              
                21
                
                -  Plug 'nvim-lua/plenary.nvim'

              
                
                25
                +  Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}

              
                22
                26
                 call plug#end()

              
                23
                27
                 

              
                24
                28
                 colo codedark

              
                25
                29
                 let mapleader=";"

              
                
                30
                +set termguicolors

              
                26
                31
                 

              
                27
                32
                 "== Tab(or spaces)

              
                28
                33
                 set ts=4 sw=4 sts=4

              ···
                35
                40
                 com! GoFmt :sil !gofmt -w %

              
                36
                41
                 

              
                37
                42
                 "== Configs

              
                
                43
                +luafile $HOME/.config/nvim/lua/plugins.lua

              
                38
                44
                 source $HOME/.config/nvim/vimscript/config.vim

              
                39
                45
                 source $HOME/.config/nvim/vimscript/barbar.vim

              
                40
                46
                 source $HOME/.config/nvim/vimscript/emmet.vim

              
                41
                
                -source /home/sasha/.config/nvim/vimscript/compe.vim

              
                
                47
                +source $HOME/.config/nvim/vimscript/compe.vim

              
                
                48
                +source $HOME/.config/nvim/vimscript/filetypes.vim

              
                42
                49
                 source $HOME/.config/nvim/vimscript/mappings.vim

              
                43
                
                -luafile $HOME/.config/nvim/lua/n-compe.lua

              
                44
                
                -luafile $HOME/.config/nvim/lua/n-lualine.lua

              
                45
                
                -luafile $HOME/.config/nvim/lua/n-nvimtree.lua

              
                46
                
                -luafile $HOME/.config/nvim/lua/n-gitsigns.lua

              
                47
                
                -luafile $HOME/.config/nvim/lua/n-colorizer.lua

              
                48
                
                -

              
                49
                
                -"== Custom setting for another files

              
                50
                
                -au FileType python,elm setl sw=4 ts=4 sts=2

              
                51
                
                -au FileType javascript,html,vue,jst,pug,css,less,scss,json,yaml,lua setl sw=2 ts=2 sts=2

              
                52
                
                -au FileType go setl noet sw=4 ts=4 sts=2

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

              
                2
                
                -  {'*';}, {

              
                3
                
                -    mode     = 'background';

              
                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
                
                -)

              
D config/nvim/lua/n-compe.lua
···
                1
                
                -require'lspconfig'.tsserver.setup {}

              
                2
                
                -require'lspconfig'.gopls.setup {}

              
                3
                
                -require'lspconfig'.pyls.setup {}

              
                4
                
                -

              
                5
                
                -require'compe'.setup {

              
                6
                
                -  enabled = true,

              
                7
                
                -  autocomplete = true,

              
                8
                
                -  source = {

              
                9
                
                -    path = true,

              
                10
                
                -    buffer = true,

              
                11
                
                -    nvim_lsp = true,

              
                12
                
                -  };

              
                13
                
                -}

              
M config/nvim/lua/n-nvimtree.luaconfig/nvim/lua/plug/nvimtree.lua
···
                2
                2
                 

              
                3
                3
                 -- Settings

              
                4
                4
                 S.nvim_tree_side = "left"

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

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

              
                6
                6
                 S.nvim_tree_auto_close = 0

              
                7
                7
                 S.nvim_tree_quit_on_open = 0

              
                8
                8
                 S.nvim_tree_width = 24

              
A config/nvim/lua/plug/colorizer.lua
···
                
                1
                +require'colorizer'.setup({'*';}, {

              
                
                2
                +  mode     = 'background';

              
                
                3
                +  RGB      = true;

              
                
                4
                +  RRGGBB   = true;

              
                
                5
                +  RRGGBBAA = false;

              
                
                6
                +  rgb_fn   = true;

              
                
                7
                +  hsl_fn   = false;

              
                
                8
                +  css      = false;

              
                
                9
                +  css_fn   = true;

              
                
                10
                +  names    = false;

              
                
                11
                +})

              
A config/nvim/lua/plug/compe.lua
···
                
                1
                +require'compe'.setup {

              
                
                2
                +  enabled = true,

              
                
                3
                +  autocomplete = true,

              
                
                4
                +  source = {

              
                
                5
                +    path = true,

              
                
                6
                +    buffer = true,

              
                
                7
                +    nvim_lsp = true,

              
                
                8
                +  };

              
                
                9
                +}

              
A config/nvim/lua/plug/lspconfig.lua
···
                
                1
                +require'lspconfig'.tsserver.setup {}

              
                
                2
                +require'lspconfig'.gopls.setup {}

              
                
                3
                +require'lspconfig'.pyls.setup {}

              
A config/nvim/lua/plug/neogit.lua
···
                
                1
                +require'neogit'.setup {}

              
A config/nvim/lua/plug/telescope.lua
···
                
                1
                +local actions = require('telescope.actions')

              
                
                2
                +

              
                
                3
                +require('telescope').setup{

              
                
                4
                +  defaults = {

              
                
                5
                +    prompt_prefix = "Search > ",

              
                
                6
                +    selection_caret = " ",

              
                
                7
                +    entry_prefix = " ",

              
                
                8
                +    file_ignore_patterns = {"node_modules", "env", ".cache"},

              
                
                9
                +    mappings = {

              
                
                10
                +      i = {["<esc>"] = actions.close}

              
                
                11
                +    };

              
                
                12
                +  };

              
                
                13
                +}

              
A config/nvim/lua/plug/treesitter.lua
···
                
                1
                +require'nvim-treesitter.configs'.setup {

              
                
                2
                +  ensure_installed = {'javascript', 'typescript', 'python', 'go'};

              
                
                3
                +  highlight = { enable = true };

              
                
                4
                +  indent = { enable = true };

              
                
                5
                +}

              
A config/nvim/lua/plugins.lua
···
                
                1
                +require'plug.compe'

              
                
                2
                +require'plug.lspconfig'

              
                
                3
                +require'plug.nvimtree'

              
                
                4
                +require'plug.lualine'

              
                
                5
                +require'plug.gitsigns'

              
                
                6
                +require'plug.neogit'

              
                
                7
                +require'plug.treesitter'

              
                
                8
                +require'plug.telescope'

              
                
                9
                +require'plug.colorizer'

              
M config/nvim/vimscript/barbar.vim
···
                1
                1
                 " Settings

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

              
                3
                
                -let bufferline.icons = v:false

              
                4
                3
                 let bufferline.icon_close_tab = '🗴'

              
                5
                4
                 

              
                6
                5
                 " Mappings

              ···
                15
                14
                 nno <A-9> :BufferGoto 9<cr>

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

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

              
                18
                
                -nno <leader> :BufferMoveNext<cr>

              
                19
                
                -nno <leader> :BufferMovePrevious<cr>

              
                
                17
                +nno <leader><right> :BufferMoveNext<cr>

              
                
                18
                +nno <leader><left> :BufferMovePrevious<cr>

              
M config/nvim/vimscript/config.vim
···
                1
                1
                 "== Vim config

              
                2
                2
                 set termguicolors         " GUI colors

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

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

              
                4
                4
                 set nolbr nowrap          " Line wrap

              
                5
                5
                 set mouse=a mh            " Mouse

              
                6
                6
                 set history=500           " Set history size

              
M config/nvim/vimscript/emmet.vim
···
                5
                5
                 let g:user_emmet_settings = {

              
                6
                6
                 \ 'javascript': {'extends': 'jsx'}}

              
                7
                7
                 

              
                8
                
                -"== Auto load

              
                
                8
                +"== Load

              
                9
                9
                 au FileType html,jst,pug,vue,css,less,scss :EmmetInstall

              
A config/nvim/vimscript/filetypes.vim
···
                
                1
                +au FileType python,elm setl sw=4 ts=4 sts=2

              
                
                2
                +au FileType go setl noet sw=4 ts=4 sts=2

              
                
                3
                +au FileType javascript,html,jst,pug,css,less,scss,json,yaml,lua,vim setl sw=2 ts=2 sts=2

              
M config/nvim/vimscript/mappings.vim
···
                2
                2
                 nno <space> :noh<cr>

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

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

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

              
                
                5
                +nno <leader>; :Telescope fd<cr>

              
                
                6
                +nno <leader>: :Telescope git_files<cr>

              
                
                7
                +nno <leader>g :Neogit<cr>

              
                6
                8
                 

              
                7
                9
                 " Buffer

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

              
M config/ranger/rc.conf
···
                38
                38
                 map ss     shell tar -czvf archive.tar.gz %s

              
                39
                39
                 map sd     shell 7z a archive.7z %s

              
                40
                40
                 map se     shell extract %s

              
                41
                
                -

              
D config/ranger/rifle.conf
···
                1
                
                -# vim:ft=cfg

              
                2
                
                -

              
                3
                
                -#== Web

              
                4
                
                -ext x?html?, has google-chrome, X, flag f = google-chrome $@

              
                5
                
                -ext x?html?, has firefox,       X, flag f = firefox -- "$@"

              
                6
                
                -

              
                7
                
                -#== Script

              
                8
                
                -ext py = python -- "$1"

              
                9
                
                -ext js = node -- "$1"

              
                10
                
                -ext sh = bash -- "$1"

              
                11
                
                -

              
                12
                
                -#== Misc

              
                13
                
                -#mime ^text, lable editor = $EDITOR -- "$@"

              
                14
                
                -#mime ^text, label pager = $PAGER -- "$@"

              
                15
                
                -

              
                16
                
                -

              
                17
                
                -!mime ^text, label editor, ext json|csv|tex|py|rb|js|sh = ${EDITOR} -- "$@"

              
                18
                
                -!mime ^text, label pager,  ext json|csv|tex|py|rb|js|sh = "$PAGER" -- "$@"

              
                19
                
                -name ^[mM]akefile$ = make

              
                20
                
                -

              
                21
                
                -

              
                22
                
                -#== Video/Audio

              
                23
                
                -mime ^video,       has mpv,  X, flag f = mpv -- "$@"

              
                24
                
                -mime ^video,       has mpv,  X, flag f = mpv --fs -- "$@"

              
                25
                
                -mime ^video|audio, has vlc,  X, flag f = vlc -- "$@"

              
                26
                
                -

              
                27
                
                -#== Documents

              
                28
                
                -ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@"

              
                29
                
                -ext pdf, has zathura,       X, flag f = zathura -- "$@"

              
                30
                
                -ext djvu, has zathura,      X, flag f = zathura -- "$@"

              
                31
                
                -ext epub, has zathura,      X, flag f = zathura -- "$@"

              
                32
                
                -

              
                33
                
                -#== Images

              
                34
                
                -mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@"

              
                35
                
                -mime ^image, has feh,          X, flag f = feh      -- "$@"

              
                36
                
                -mime ^image, has ristretto,    X, flag f = ristretto "$@"

              
                37
                
                -mime ^image, has gimp,         X, flag f = gimp     -- "$@"

              
                38
                
                -ext xcf,                       X, flag f = gimp     -- "$@"

              
                39
                
                -

              
                40
                
                -#== Archives

              
                41
                
                -ext 7z, has 7z = 7z -p l "$@" | "$PAGER"

              
                42
                
                -ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,     has atool = atool --list --each -- "$@" | "$PAGER"

              
                43
                
                -ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER"

              
                44
                
                -ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz,  has atool = atool --extract --each -- "$@"

              
                45
                
                -ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@"

              
                46
                
                -ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER"

              
                47
                
                -ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done

              
                48
                
                -ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done

              
                49
                
                -ext zip, has unzip = unzip -l "$1" | less

              
                50
                
                -ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done

              
                51
                
                -ext rar, has unrar = unrar l "$1" | less

              
                52
                
                -ext rar, has unrar = for file in "$@"; do unrar x "$file"; done

              
M vscode/settings.json
···
                1
                1
                 {

              
                2
                2
                   "update.showReleaseNotes": false,

              
                3
                3
                   "window.menuBarVisibility": "hidden",

              
                
                4
                +  "workbench.iconTheme": "vs-seti",

              
                4
                5
                 

              
                5
                6
                   "workbench.sideBar.location": "right",

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

              ···
                37
                38
                   "extensions.ignoreRecommendations": true,

              
                38
                39
                   "docker.showStartPage": false,

              
                39
                40
                   "prettier.semi": false,

              
                
                41
                +  "javascript.suggestionActions.enabled": false,

              
                
                42
                +  "typescript.suggestionActions.enabled": false,

              
                40
                43
                 

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

              
                42
                
                -  "[javascript]": {

              
                43
                
                -    "editor.defaultFormatter": "esbenp.prettier-vscode",

              
                44
                
                -    "editor.tabSize": 2,

              
                45
                
                -  },

              
                46
                
                -  "[javascriptreact]": {

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

              
                48
                
                -    "editor.tabSize": 2,

              
                49
                
                -  },

              
                50
                44
                   "files.exclude": {

              
                51
                45
                     "**/.cache": true,

              
                52
                46
                     "**/node_modules": true

              
                53
                47
                   },

              
                54
                48
                 

              
                
                49
                +  "emmet.includeLanguages": {"javascript": "javascriptreact"},

              
                
                50
                +  "[javascript]": {

              
                
                51
                +    "editor.defaultFormatter": "esbenp.prettier-vscode",

              
                
                52
                +    "editor.tabSize": 2,

              
                
                53
                +  }

              
                55
                54
                 }

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

              
                7
                7
                 export EDITOR="nvim"

              
                8
                8
                 

              
                9
                
                -## FZF

              
                10
                
                -export FZF_DEFAULT_COMMAND="fd -t f -E node_modules"

              
                11
                
                -

              
                12
                9
                 ## Oh my zsh

              
                13
                10
                 plugins=(dotenv)

              
                14
                11
                 ZSH_THEME="simple"

              ···
                20
                17
                 

              
                21
                18
                 ## FNM

              
                22
                19
                 eval $(fnm env)

              
                23
                
                -eval $(fnm completions)

              
                24
                20
                 

              
                25
                21
                 ## Aliases

              
                26
                22
                 alias cls="clear" cp="cp -r" mkdir="mkdir -p"