deomorxsy / deorice

Ricing dotfiles

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

deorice

dotfiles for *nix setup ricing

Lua Neovim

PS: I recommend any readers to create your own configuration based on these dotfiles, it's not "production-ready" since part of it is built from scratch or by just customizing parts of the system.

PS 2: The following documentation in this README.md assumes the reader as a noob and tries to make them confortable with the idea of not being confortable, by searching for the main root cause of any future errors in the setup. As a general advice, even though there are scripts for automation in the repository, if you have time, try to make errors on purpose just to understand more of the system.

Editors

vim

The config is pretty straight-forward: just edit the ~/.vimrc with vimscript/vimL syntax, place it in $HOME and next time you open vim it is already working. Search for the basics: the 7 vim modes, vimscript syntax, commands, etc. Read the errors and try to find the root cause. It's the best way to get out of future possible circles of the dependency hell.

neovim

neovim adopts the ~/.config/nvim/init.vim or ~/.config/nvim/init.lua file as the default config file. It is also compatible with the vimrc; that explains the source.

This repository in specific migrates from the vimrc, used in vim, directly to the init.lua that uses the syntax of the language lua to program the editor. The runtime is the LuaJIT embedded in neovim and you can learn more in the docs.

To use the base configuration, run the playbooks (wip), execute the scripts (wip) or do it manually:

  1. clone repository
git clone git@github.com:deomorxsy/deorice.git
cd ./deorice/
  1. copy nvim to the $HOME config dotfile:
cp -r ./.config/nvim/ ~/.config/
  1. install packer and open nvim.
git clone --depth 1 https://github.com/wbthomason/packer.nvim\
 ~/.local/share/nvim/site/pack/packer/start/packer.nvim
  1. Open nvim and enter in Command-Line Mode. Synchronize plugins in the configuration with packer and restart nvim session.
:PackerSync
  1. for provider-related errors, specifically about python (ultisnips), setup using ./.config/nvim/scripts/neovim-setup.sh or executing manually the following, which sets up the python provider $PATH based in the hack path that python uses with the virtualenv. Based on the docs.
# setup python3 provider
python -m venv ~/.config/nvim/venv_nvim/neovim3

source ~/.config/nvim/venv_nvim/neovim3/bin/activate
python3 -m pip install neovim

# returns the relative $PATH of the python binary installed on the virtualenv
pyvm=$(which python)

# checks if the placeholder exists on file
roco=$(awk 'FNR==14 && $3==p3hp_placeholder' ~/.config/nvim/init.lua)

# using @ as sed delimiter since the bash variable expansion already uses
# the slash "/" character for the path
[ -n $roco ] && sed -e "s@p3hp_placeholder@$pyvm@g" ~/.config/nvim/init.lua

# deactivate virtualenv
deactivate

main plugins used:

  • telescope or chadtree for fuzzy search. The second is a whole completion client spawning sqlite vms in memory and integrating with other external programs;
  • nvim-R to run a R interpreter inside neovim (checkout the tmux integration)
  • vimtex for latex local editions;
  • lsp-zero as a Language Server Protocols manager (literally acts as a package manager), which are external to neovim;
  • nvim-treesitter to parse all the code in the editor, which builds an incremental tree that is useful for a bunch of tasks related to programming language constructs, like highlighting, indenting, folding of these constructs, text-object manipulation and others. Also fast af;

About

Ricing dotfiles

License:GNU General Public License v3.0


Languages

Language:Lua 61.5%Language:Vim Script 22.7%Language:Shell 8.8%Language:C 6.8%Language:Dockerfile 0.2%