An open API service indexing awesome lists of open source software.

https://github.com/chabrovs/nvim-py

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!
https://github.com/chabrovs/nvim-py

config configuration debugging-tool lua lua-script neovim python3 vim

Last synced: about 2 months ago
JSON representation

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!

Awesome Lists containing this project

README

          

# `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/ /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```

4. Install nodejs:
_NOTE: NodeJS is required for LSP servers._
__Execute these commands sequentially:__
```
sudo apt install nodejs
npm install -g n
sudo n lts
```

6. 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|
|-|-|-|
|__`pf`__|Open Fuzzy Finder|Project Find|
|__`ps`__|Open Fuzzy Grep String|Project Search|
|__`pg`__|Open Fuzzy Live Grep|Progect Grep|
|__``__|Open Fuzzy Finder for Git project||
|__``__|Open File Explorer|Project View|

### πŸ“‘ Tabs:
|KeyMap|Description
|-|-|
|__`t`__|New tab|
|__`tt`__|Open Terminal|
|__`right arrow`__|Switch Tab|
|__`left arrow`__|Switch Tab|

### πŸ”Ž Diagnostics:
|KeyMap|Descripton|
|-|-|
|__`do`__|Open Diagnostics|
|__`dl`__|List Diagnostics|
|__`dp`__|Go to Previous Message|
|__`dn`__|Go to New Message|

### πŸ–ŠοΈ LSP & Formatters
|KeyMap|Descripton|
|-|-|
|__`m`__|Hover|
|__`df`__|Do to Definiiton|
|__`i`__|Implemnetation|
|__`fx`__|Show fix suggestiosn|
|__`rf`__|Show References|
|__`mv`__|Remane|
|__`f`__|Format|

### 🐍 Python Debugger:
|KeyMap|Descripton|
|-|-|
|__`Db`__|Set break point|
|__`Ds`__|Debugger Start|
|__`Do`__|Debugger Open|
|__`Dc`__|Debugger Close|