seong-hun / my-config

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

My Configuration File

This configuartion has only been tested on Mac!

Features

This configuration

  • uses Pyright and LspSaga to parse python files (to naviage to the definition, references, etc)
  • uses Black and Isort to auto-formatting
  • uses Telescope to file navigation
  • uses some beautiful themes (dashboard-nvim, tokyonight.nvim
  • uses vim-floaterm to emulate the terminal in a Neovim instance.

Installation

In the home directory, backup .config if it exists.

mv .config .config.bak

Download the repository.

git clone https://github.com/seong-hun/my-config.git .config

Node.js and Pyright

Download Node.js from the website.

Install Pyright using

sudo npm install -g pyright

Homebrew Packages

Install Homebrew using

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Update the Homebrew.

brew update

(Optional) Tmux and oh-my-tmux

brew install tmux

(Optional) oh-my-tmux

git clone https://github.com/gpakosz/.tmux.git
ln -s -f .tmux/.tmux.conf
ln -s -f .tmux/.tmux.conf.local

Install efm-langserver using

brew install efm-langserver

Install a font (I prefer the Hack Nerd Font).

brew tap homebrew/cask-fonts
brew install --cask font-hack-nerd-font

Change the font setting from the preference of iTerm2. Go to iTerm2 > Settings... or press <Command> + ,. Go to Profiles > Text > Font and change the font to Hack Nerd Font.

Black and Isort

In a prefered environment (e.g., a conda env), install the following packages.

pip install black isort

or in a conda env,

conda install black isort

Neovim

Install Neovim using

brew install neovim

Open Neovim and type the following command to install packages with packer.nvim.

:PackerSync

You may close all the vim instances and reopen/rerun the above command several times until no error messages appear.

Telescope dependencies:

brew install ripgrep
brew install lua-language-server

Install LuaFormatter for lua with efm:

brew install luarocks
brew install cmake
luarocks install --server=https://luarocks.org/dev luaformatter

Install prettierd for js with efm:

brew install prettierd
mkdir -p ~/.config/nvim/utils/linter-config
echo {}> ~/.config/nvim/utils/linter-config/.prettierrc.json

Latex

Install MacTex from the website.

Install Skim (a PDF reader) from the website. From the preference of SKim, Sync > PDF-TeX Sync support, set Preset field to Custom, type nvim in Command field, and type --headless -c "VimtexInverseSearch %line '%file'" in Arguments field.

Git

Install jannikis' git-ignore interactive CLI with

brew tap janniks/git-ignore
brew install git-ignore

Usage

LspSaga

Use LspSaga to navigate to definitions and references. Press <Leader>gh.

Telescope

Use Telescope to search and navigate to a file. Press <Leader>ff.

Black and Isort

Writing (:w) a python buffer in a Neovim instance, black and isort will be automatically executed and modify the buffer without writing.

Vimtex

Use Vimtex to work with tex files.

Press <Leader>ll to auto-compile, and <Leader>lv to forward search. The backward search will be performed with <Command> + <Shift> + <LMB>.

Press <Leader>ft to open a terminal window in a Neovim instance.

About


Languages

Language:Lua 94.4%Language:Vim Script 5.6%