Skip to content

Fast, feature-rich setup for NeoVim 0.11.4+. Uses lazy.nvim and Mason for easy management. Includes optimized LSP, linting, and debugging for Python and its frameworks. Boost your coding speed!

License

Notifications You must be signed in to change notification settings

chabrovs/nvim-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nvim-py: NeoVim For Python🐍

Fast, feature-rich setup for NeoVim 0.11.4+. Uses lazy.nvim and Mason for easy management. Includes optimized LSP, linting, and debugging for Python and its frameworks. Boost your coding speed!

  • 🐍 Python-focused tools

  • 🚀 Lazy loading

  • 🛠️ Mason for LSPs/tools

  • ⚡ Fast performance

  • 🔧 Python Debugger

💾 Installation (step-by-step):

(Optional*) Install Prerequisites:

NOTE: *(If all prerequisites are already installed this step can be skipped.)

  1. Install Nvim binary:

    • Download Nvim binary from the Nvim official repository: https://github.com/neovim/neovim/releases
    • Install the binary:
      • In Linux:
        Execute these commands sequentially:

        mv ~/Downloads/<your_nvim> /usr/local/bin/nvim
        sudo chmod x+o /usr/local/bin/nvim
        
  2. Install npm:
    NOTE: NPM is required for Node.js
    sudo apt install npm

  3. Install nodejs:
    NOTE: NodeJS is required for LSP servers.
    Execute these commands sequentially:

    sudo apt install nodejs
    npm install -g n
    sudo n lts
    
  4. Install required system packages:

    sudo apt install ripgrep
    

(Required) Install the Nvim Config Itself:

  1. BackUp your current NVim config:
    mv ~/.config/nvim{,.bak}.

  2. Clone this repo:
    git clone git@github.com:chabrovs/nvim-py.git ~/.config/nvim.

  3. Run Nvim:
    nvim .
    NOTE: The lazy.vim package manager will take care of plugins, and Mason will take care of LSP servers aumatically.

Python Debugger installation:

There two options on how to setup a Python debugger in this configuration.

0️⃣ Execute pip install debugpy in your project's virtual environment.
1️⃣ Or, Install Python debugger globally for NVim:

  1. Go to the nvim directory: cd ~/.config/nvim;
  2. Create a new directory called .virtualenvs and cd in it cd ~/.config/nvim/.virtualenvs;
  3. Create a new virtual environment called debugpy in the .virualenvs directory: python3 -m venv debugpy and activate it: . .virtualenvs/debugpy/bin/activate
  4. Execute pip install debugpy
  5. It's done! Now Python debugger is available globally for your NVim configuration.

⌨️ ShortCuts:

📁 File finder & Fuzzy finder:

KeyMap Descripton Remender
<leader>pf Open Fuzzy Finder Project Find
<leader>ps Open Fuzzy Grep String Project Search
<leader>pg Open Fuzzy Live Grep Progect Grep
<leader><C-p> Open Fuzzy Finder for Git project
<leader><pv> Open File Explorer Project View

📑 Tabs:

KeyMap Description
<leader>t New tab
<leader>tt Open Terminal
<leader>right arrow Switch Tab
<leader>left arrow Switch Tab

🔎 Diagnostics:

KeyMap Descripton
<leader>do Open Diagnostics
<leader>dl List Diagnostics
<leader>dp Go to Previous Message
<leader>dn Go to New Message

🖊️ LSP & Formatters

KeyMap Descripton
<leader>m Hover
<leader>df Do to Definiiton
<leader>i Implemnetation
<leader>fx Show fix suggestiosn
<leader>rf Show References
<leader>mv Remane
<leader>f Format

🐍 Python Debugger:

KeyMap Descripton
<leader>Db Set break point
<leader>Ds Debugger Start
<leader>Do Debugger Open
<leader>Dc Debugger Close

About

Fast, feature-rich setup for NeoVim 0.11.4+. Uses lazy.nvim and Mason for easy management. Includes optimized LSP, linting, and debugging for Python and its frameworks. Boost your coding speed!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages