Giter Site home page Giter Site logo

nvim's Introduction

My configuration for neovim

some import things...

install pyenv:

curl https://pyenv.run | bash

install pyenv-pyright

 git clone https://github.com/alefpereira/pyenv-pyright.git $(pyenv root)/plugins/pyenv-pyright

install neovim and ripgrep

brew install neovim ripgrep # Need ripgrep for telescope

make sure to have 246 colors in .bash_profile

# make sure we have 256 colors
export TERM=screen-256color

install the right python environment:

# python 3
pyenv install 3.9.7
pyenv virtualenv 3.9.7 neovim3
pyenv activate neovim3
pip install pynvim
# python 2
pyenv install 2.7.18
pyenv virtualenv 2.7.18 neovim2
pyenv activate neovim2
pip install pynvim

install the right nerd fonts

 brew install --cask font-hack-nerd-font

Make sure to have the right config in iterm. See screenshot: alt text

Make sure to remap the meta key. See screenshot: alt text

Alternatively install MesloLGS NF fonts. It is pretty nice with tokyonight themes.

make an alias for nvim

function nvim_env() {
 # If I have VIRTUAL_ENV and a local pyenv (to avoid creating pyrightconfig.json everywhere) but not the pyrightconfig.json create it
  if test -e "$VIRTUAL_ENV" && test -f .python-version && test ! -f pyrightconfig.json; then
    echo "VIRTUAL_ENV detected adding pyrightconfig.json"
    sleep 2
    pyenv pyright
  fi
  if [[ -e "$VIRTUAL_ENV" && -f "$VIRTUAL_ENV/bin/activate" ]]; then
    source "$VIRTUAL_ENV/bin/activate"
    command nvim "$@"
    deactivate
  else
    command nvim "$@"
  fi
}

# nvim aliases
alias vim="nvim_env"
alias nvim="nvim_env"
alias v="nvim_env"

nvim's People

Contributors

zippeurfou avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.