all repos

dotfiles @ 093639a

my dotfiles
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,18 +1,18 @@

<h1 align="center">dotfiles</h1> -#### System configuration +### System configuration - `OS` Arch - `WM` bspwm - `Terminal` kitty - `Shell` zsh - `Editor` nvim, vscode - `File manager` ranger -- `Browser` firefox, chrome +- `Browser` chrome - `Font` Jatbrains Mono - `Icon font` Font Awesome - `Launcher` rofi -#### Install config +### Install config Since i use **[rcm](https://github.com/thoughtbot/rcm)** set it: ```bash yay -S rcm
M config/bspwm/bspwmrc

@@ -50,4 +50,4 @@ R Nemo desktop='^5' focus=on follow=on

R Zathura desktop='^5' focus=on follow=on state=tiled R discord desktop='^6' focus=on follow=off R TelegramDesktop desktop='^6' focus=off follow=on -R KeePassXC desktop='^7' focus=on follow=on +R KeePassXC desktop='^7' focus=on follow=on
M config/nvim/README.md

@@ -1,9 +1,24 @@

# NVIM -### Install LSP +## Install nvim +```bash +yay -S neovim-nightly-bin +``` + +## Install plugin manager(`vim-plug`) +```bash +sh -c 'curl -fLo "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/autoload/plug.vim --create-dirs \ + https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim' +``` + +## Install LSP servers ```bash # tsserver(JS/TS) npm i -g typescript typescript-language-server + # Go(gopls) go get golang.org/x/tools/gopls@latest + +# Python(pyls) +pip install python-language-server ```
M config/nvim/init.vim

@@ -1,28 +1,33 @@

-call plug#begin('~/.vim/plugged') + call plug#begin('~/.vim/plugged') + Plug 'Smirnov-O/nten.vim' + Plug 'b3nj5m1n/kommentary' + " Plug 'mattn/emmet-vim', {'on': 'EmmetInstall'} + Plug 'nvim-lua/plenary.nvim' + Plug 'nvim-lua/popup.nvim' + " Plug 'editorconfig/editorconfig-vim' + Plug 'norcalli/nvim-colorizer.lua' + Plug 'kyazdani42/nvim-web-devicons' + " Status line && Tab line + Plug 'hoob3rt/lualine.nvim' + Plug 'romgrk/barbar.nvim' " LSP && Completion Plug 'neovim/nvim-lspconfig' Plug 'hrsh7th/nvim-compe' Plug 'jiangmiao/auto-pairs' - Plug 'mattn/emmet-vim', {'on': 'EmmetInstall'} + " Git + Plug 'TimUntersberger/neogit' + Plug 'lewis6991/gitsigns.nvim' " File explorer - Plug 'junegunn/fzf.vim' Plug 'kyazdani42/nvim-tree.lua' - " Git - Plug 'lewis6991/gitsigns.nvim' - " Theme - Plug 'Smirnov-O/nten.vim' - " Status line && Tab line - Plug 'hoob3rt/lualine.nvim' - Plug 'romgrk/barbar.nvim' + Plug 'nvim-telescope/telescope.nvim' " Better syntax hl Plug 'sheerun/vim-polyglot' - Plug 'norcalli/nvim-colorizer.lua' - " Other - Plug 'nvim-lua/plenary.nvim' + Plug 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'} call plug#end() colo codedark let mapleader=";" +set termguicolors "== Tab(or spaces) set ts=4 sw=4 sts=4

@@ -35,18 +40,10 @@ com! Notes :Files ~/notes

com! GoFmt :sil !gofmt -w % "== Configs +luafile $HOME/.config/nvim/lua/plugins.lua source $HOME/.config/nvim/vimscript/config.vim source $HOME/.config/nvim/vimscript/barbar.vim source $HOME/.config/nvim/vimscript/emmet.vim -source /home/sasha/.config/nvim/vimscript/compe.vim +source $HOME/.config/nvim/vimscript/compe.vim +source $HOME/.config/nvim/vimscript/filetypes.vim source $HOME/.config/nvim/vimscript/mappings.vim -luafile $HOME/.config/nvim/lua/n-compe.lua -luafile $HOME/.config/nvim/lua/n-lualine.lua -luafile $HOME/.config/nvim/lua/n-nvimtree.lua -luafile $HOME/.config/nvim/lua/n-gitsigns.lua -luafile $HOME/.config/nvim/lua/n-colorizer.lua - -"== Custom setting for another files -au FileType python,elm setl sw=4 ts=4 sts=2 -au FileType javascript,html,vue,jst,pug,css,less,scss,json,yaml,lua setl sw=2 ts=2 sts=2 -au FileType go setl noet sw=4 ts=4 sts=2
D config/nvim/lua/n-colorizer.lua

@@ -1,13 +0,0 @@

-require'colorizer'.setup( - {'*';}, { - mode = 'background'; - RGB = true; -- #RGB hex codes - RRGGBB = true; -- #RRGGBB hex codes - RRGGBBAA = false; -- #RRGGBBAA hex codes - rgb_fn = true; -- CSS rgb() and rgba() functions - hsl_fn = false; -- CSS hsl() and hsla() functions - css = false; -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB - css_fn = true; -- Enable all CSS *functions*: rgb_fn, hsl_fn - names = false; -- "Name" codes like Blue - } -)
D config/nvim/lua/n-compe.lua

@@ -1,13 +0,0 @@

-require'lspconfig'.tsserver.setup {} -require'lspconfig'.gopls.setup {} -require'lspconfig'.pyls.setup {} - -require'compe'.setup { - enabled = true, - autocomplete = true, - source = { - path = true, - buffer = true, - nvim_lsp = true, - }; -}
M config/nvim/lua/n-nvimtree.luaconfig/nvim/lua/plug/nvimtree.lua

@@ -2,7 +2,7 @@ local S = vim.g

-- Settings S.nvim_tree_side = "left" -S.nvim_tree_ignore = {".git", ".cache", "node_modules", "venv"} +S.nvim_tree_ignore = {".git", ".cache", "node_modules", "venv", "env"} S.nvim_tree_auto_close = 0 S.nvim_tree_quit_on_open = 0 S.nvim_tree_width = 24
A config/nvim/lua/plug/colorizer.lua

@@ -0,0 +1,11 @@

+require'colorizer'.setup({'*';}, { + mode = 'background'; + RGB = true; + RRGGBB = true; + RRGGBBAA = false; + rgb_fn = true; + hsl_fn = false; + css = false; + css_fn = true; + names = false; +})
A config/nvim/lua/plug/compe.lua

@@ -0,0 +1,9 @@

+require'compe'.setup { + enabled = true, + autocomplete = true, + source = { + path = true, + buffer = true, + nvim_lsp = true, + }; +}
A config/nvim/lua/plug/lspconfig.lua

@@ -0,0 +1,3 @@

+require'lspconfig'.tsserver.setup {} +require'lspconfig'.gopls.setup {} +require'lspconfig'.pyls.setup {}
A config/nvim/lua/plug/neogit.lua

@@ -0,0 +1,1 @@

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

@@ -0,0 +1,13 @@

+local actions = require('telescope.actions') + +require('telescope').setup{ + defaults = { + prompt_prefix = "Search > ", + selection_caret = " ", + entry_prefix = " ", + file_ignore_patterns = {"node_modules", "env", ".cache"}, + mappings = { + i = {["<esc>"] = actions.close} + }; + }; +}
A config/nvim/lua/plug/treesitter.lua

@@ -0,0 +1,5 @@

+require'nvim-treesitter.configs'.setup { + ensure_installed = {'javascript', 'typescript', 'python', 'go'}; + highlight = { enable = true }; + indent = { enable = true }; +}
A config/nvim/lua/plugins.lua

@@ -0,0 +1,9 @@

+require'plug.compe' +require'plug.lspconfig' +require'plug.nvimtree' +require'plug.lualine' +require'plug.gitsigns' +require'plug.neogit' +require'plug.treesitter' +require'plug.telescope' +require'plug.colorizer'
M config/nvim/vimscript/barbar.vim

@@ -1,6 +1,5 @@

" Settings let bufferline = get(g:, 'bufferline', {}) -let bufferline.icons = v:false let bufferline.icon_close_tab = '🗴' " Mappings

@@ -15,5 +14,5 @@ nno <A-8> :BufferGoto 8<cr>

nno <A-9> :BufferGoto 9<cr> nno <C-w> :BufferClose<cr> nno <S-x> :BufferClose!<cr> -nno <leader> :BufferMoveNext<cr> -nno <leader> :BufferMovePrevious<cr> +nno <leader><right> :BufferMoveNext<cr> +nno <leader><left> :BufferMovePrevious<cr>
M config/nvim/vimscript/config.vim

@@ -1,6 +1,6 @@

"== Vim config set termguicolors " GUI colors -set nu rnu cul " Line numbers & cursor line highlight +set nu rnu nocul " Line numbers & cursor line highlight set nolbr nowrap " Line wrap set mouse=a mh " Mouse set history=500 " Set history size
M config/nvim/vimscript/emmet.vim

@@ -5,5 +5,5 @@ let g:user_emmet_leader = ","

let g:user_emmet_settings = { \ 'javascript': {'extends': 'jsx'}} -"== Auto load +"== Load au FileType html,jst,pug,vue,css,less,scss :EmmetInstall
A config/nvim/vimscript/filetypes.vim

@@ -0,0 +1,3 @@

+au FileType python,elm setl sw=4 ts=4 sts=2 +au FileType go setl noet sw=4 ts=4 sts=2 +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,7 +2,9 @@ nno <C-s> :w<cr>

nno <space> :noh<cr> nno <leader>t :Term<cr> nno <leader>e :NvimTreeToggle<cr> -nno <leader>; :Files<cr> +nno <leader>; :Telescope fd<cr> +nno <leader>: :Telescope git_files<cr> +nno <leader>g :Neogit<cr> " Buffer nno <leader>j :bn<cr>
M config/ranger/rc.conf

@@ -38,4 +38,3 @@ map sa shell zip -r archive.zip %s

map ss shell tar -czvf archive.tar.gz %s map sd shell 7z a archive.7z %s map se shell extract %s -
D config/ranger/rifle.conf

@@ -1,52 +0,0 @@

-# vim:ft=cfg - -#== Web -ext x?html?, has google-chrome, X, flag f = google-chrome $@ -ext x?html?, has firefox, X, flag f = firefox -- "$@" - -#== Script -ext py = python -- "$1" -ext js = node -- "$1" -ext sh = bash -- "$1" - -#== Misc -#mime ^text, lable editor = $EDITOR -- "$@" -#mime ^text, label pager = $PAGER -- "$@" - - -!mime ^text, label editor, ext json|csv|tex|py|rb|js|sh = ${EDITOR} -- "$@" -!mime ^text, label pager, ext json|csv|tex|py|rb|js|sh = "$PAGER" -- "$@" -name ^[mM]akefile$ = make - - -#== Video/Audio -mime ^video, has mpv, X, flag f = mpv -- "$@" -mime ^video, has mpv, X, flag f = mpv --fs -- "$@" -mime ^video|audio, has vlc, X, flag f = vlc -- "$@" - -#== Documents -ext pptx?|od[dfgpst]|docx?|sxc|xlsx?|xlt|xlw|gnm|gnumeric, has libreoffice, X, flag f = libreoffice "$@" -ext pdf, has zathura, X, flag f = zathura -- "$@" -ext djvu, has zathura, X, flag f = zathura -- "$@" -ext epub, has zathura, X, flag f = zathura -- "$@" - -#== Images -mime ^image/svg, has inkscape, X, flag f = inkscape -- "$@" -mime ^image, has feh, X, flag f = feh -- "$@" -mime ^image, has ristretto, X, flag f = ristretto "$@" -mime ^image, has gimp, X, flag f = gimp -- "$@" -ext xcf, X, flag f = gimp -- "$@" - -#== Archives -ext 7z, has 7z = 7z -p l "$@" | "$PAGER" -ext ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --list --each -- "$@" | "$PAGER" -ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --list --each -- "$@" | "$PAGER" -ext 7z|ace|ar|arc|bz2?|cab|cpio|cpt|deb|dgc|dmg|gz, has atool = atool --extract --each -- "$@" -ext iso|jar|msi|pkg|rar|shar|tar|tgz|xar|xpi|xz|zip, has atool = atool --extract --each -- "$@" -ext tar|gz|bz2|xz, has tar = tar vvtf "$1" | "$PAGER" -ext tar|gz|bz2|xz, has tar = for file in "$@"; do tar vvxf "$file"; done -ext bz2, has bzip2 = for file in "$@"; do bzip2 -dk "$file"; done -ext zip, has unzip = unzip -l "$1" | less -ext zip, has unzip = for file in "$@"; do unzip -d "${file%.*}" "$file"; done -ext rar, has unrar = unrar l "$1" | less -ext rar, has unrar = for file in "$@"; do unrar x "$file"; done
M vscode/settings.json

@@ -1,6 +1,7 @@

{ "update.showReleaseNotes": false, "window.menuBarVisibility": "hidden", + "workbench.iconTheme": "vs-seti", "workbench.sideBar.location": "right", "workbench.editor.untitled.hint": "hidden",

@@ -37,19 +38,17 @@

"extensions.ignoreRecommendations": true, "docker.showStartPage": false, "prettier.semi": false, + "javascript.suggestionActions.enabled": false, + "typescript.suggestionActions.enabled": false, - "emmet.includeLanguages": {"javascript": "javascriptreact"}, - "[javascript]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.tabSize": 2, - }, - "[javascriptreact]": { - "editor.defaultFormatter": "esbenp.prettier-vscode", - "editor.tabSize": 2, - }, "files.exclude": { "**/.cache": true, "**/node_modules": true }, + "emmet.includeLanguages": {"javascript": "javascriptreact"}, + "[javascript]": { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.tabSize": 2, + } }
M zshrc

@@ -6,9 +6,6 @@ export GOPATH="$HOME/go"

export PATH="$HOME/bin:$HOME/.local/bin:$HOME/.golang/bin:$GOPATH/bin:$PATH" export EDITOR="nvim" -## FZF -export FZF_DEFAULT_COMMAND="fd -t f -E node_modules" - ## Oh my zsh plugins=(dotenv) ZSH_THEME="simple"

@@ -20,7 +17,6 @@ bindkey -s "^g" "lazygit\n"

## FNM eval $(fnm env) -eval $(fnm completions) ## Aliases alias cls="clear" cp="cp -r" mkdir="mkdir -p"