/dotfiles

My dotfiles

Primary LanguageShell

My dotfiles

My dotfiles configurtion.

Vim configuration

Vimrc screenshot

tl; dr

curl -SL https://raw.githubusercontent.com/danpawlik/dotfiles/master/setup-vim.sh | bash

or use neovim nightly version:

curl -SL https://raw.githubusercontent.com/danpawlik/dotfiles/master/setup-vim.sh | NVIM_VERSION=nightly bash

If you want to install some other vim distribution, that works well on neovim like:

Use ansible to install dotfiles

sudo yum install -y git ansible
git clone https://github.com/danpawlik/dotfiles
ansible-galaxy collection install community.general
ansible-playbook --ask-become-pass dotfiles/ansible/playbooks/dotfiles.yml

Use ansible to install vim

sudo yum install -y git ansible
git clone https://github.com/danpawlik/dotfiles
ansible-playbook --ask-become-pass dotfiles/ansible/playbooks/vim.yml

On Centos 7, you can run it with:

ansible-playbook --ask-become-pass -e ansible_python_interpreter=/usr/bin/python2 ansible/playbooks/vim.yml

When you have an error:

No "python3" provider found. Run ":checkhealth provider"

Install pynvim package into python user environment for all Python3 releases. For example:

python3.10 -m pip install --user pynvim
python3.9 -m pip install --user pynvim

ZSH and others

tl; dr

curl -LO https://raw.githubusercontent.com/danpawlik/dotfiles/master/install.sh | bash

Tmux

tl;dr

curl -SL https://raw.githubusercontent.com/danpawlik/dotfiles/master/tmux/.tmux.conf > $HOME/.tmux.conf
git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm
$HOME/.tmux/plugins/tpm/bin/install_plugins

Tmux screenshot Tmux screenshot multiuser Tmux screenshot production

Vim alternative distributions

You can always install just neovim, then choose proper distribution:

Preparation

yum install -y git python3-pip
pip3 install -U setuptools pip
pip3 install ansible==2.9.13
export PATH=$PATH:/usr/local/bin
git clone https://github.com/danpawlik/dotfiles
ansible-playbook --ask-become-pass -e just_neovim=true dotfiles/ansible/playbooks/vim.yml

Or for Centos 7:

ansible-playbook --ask-become-pass \
  -e just_neovim=true \
  -e ansible_python_interpreter=/usr/bin/python2 \
  dotfiles/ansible/playbooks/vim.yml

Distros, for example:

https://github.com/AstroNvim/AstroNvim

git clone https://github.com/AstroNvim/AstroNvim ~/.config/nvim
nvim +PackerSync

Works well on Centos 7 and newer.

https://github.com/NvChad/NvChad

git clone https://github.com/NvChad/NvChad ~/.config/nvim --depth 1
nvim +'hi NormalFloat guibg=#1e222a' +PackerSync

NOTE: Replace vim with python some nvim-treesitter on Centos 7:

sed -i 's/      \"vim\",/      \"python\",/g' ~/.config/nvim/lua/plugins/configs/treesitter.lua

https://github.com/LunarVim/LunarVim

Before, install:

# if Centos
sudo yum install -y epel-relase
sudo yum install -y neovim cargo gcc-c++ gcc
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/install.sh) -y

And copy my config into the LunarVim dir:

cp vim-lua/lunar-vim.lua ~/.config/lvim/config.lua

NOTE: Disable some nvim-treesitter on Centos 7:

sed -i '/  \"javascript\"/d' ~/.config/lvim/config.lua
sed -i '/  \"typescript\"/d' ~/.config/lvim/config.lua
sed -i '/  \"tsx\"/d' ~/.config/lvim/config.lua

Post configuration

To disable mouse copy as visualization or remove whitespaces, add on the end to the ~/.config/nvim/init.lua

vim.cmd [[set mouse-=a]]

vim.api.nvim_create_autocmd({ "BufWritePre" }, {
  pattern = { "*" },
  command = [[%s/\s\+$//e]],
})

Install additional languages

Run inside the neovim distro:

:TSInstall bash cmake comment css dockerfile go graphql haskell html http javascript json make markdown python rst rust typescript vim yaml

or

:LspInstall ansible-language-server bash-language-server codespell commitlint dhall-lsp dockerfile-language-server dot-language-server eslint-lsp flake8 gitlint goimports golangci-lint gopls grammarly-languageserver graphql-language-service-cli html-lsp jq json-lsp markdownlint marksman prettier pylint pyright reason-language-server rstcheck rust-analyzer shellcheck shfmt yamlfmt

You can choose the Lsp packages to be installed via plugin manager and press "i" on desired plugin:

:Mason

Removing

# to uninstall just lvim
bash <(curl -s https://raw.githubusercontent.com/lunarvim/lunarvim/master/utils/installer/uninstall.sh)

# For vim config and neovim
sudo rm -rf ~/.local/nvim ~/.local/share/nvim ~/.cache/nvim ~/.config/nvim ~/.local/nodejs ~/.vim ~/.vimrc ~/.config/coc ~/.config/lvim ~/.local/share/lunarvim ~/.cache/lvim ~/.local/bin/node ~/.local/bin/npm ~/.local/bin/vim