Dockerized dev environment using neovim and language server protocol.
- LSP provider pyls
- Fast completion using HansPinckaers' speed hacks
- View documentation on hover or documentation as separate vim buffer
- Documentation template generation by pydocstring (using
doq
) -numpy
format default - Debugger support for python: run/debug python code within nvim
- Toggle breakpoints
- step into, step over
- virtual text updates values of variables in comments
- Treesitter based
- semantic highlighting
- code folding
- smart rename
- Linting: various providers incl. pylint, flake8, mccabe (code complexity), mypy (typing)
- Various deep learning packages
- Rope based python code refactoring via Jedi: quick rename
- Various convenience plugins
- Fast motion using easymotion
- Fuzzy list searching using fzf
- tags support for searching
- See tree of changes undotree
- Directory browser using nerdtree
- Code outline using Vista
- Disabled by default: Multiple choices for completions (Jedi, ALE)
- Rope based python code refactoring: extract methods, variables, constants
- Tabnine based completions
- Multi-select
- Snippets
git clone <this repo>
cd <this repo>
docker build -t <img name> .
docker run -ti --rm <img name>
Launch neovim using nvim
(Optional) Install plugins: :PlugInstall
inside nvim
Does not seem to work well with TMUX currently --- works fine with ctrl+A mapping instead of default ctrl+B
TODO
TODO
By default, <leader>
is \
(e.g., <leader>k
is \k
)
Completion:
Signature help while filling in function args:
Documentation on hover: Press K
Documentation in a buffer: Press <leader>k
Rename variable: <leader>rn
when cursor on variable (a_bp
in this example)
Add docstring template: <leader>-
for current line
Code fixing: long line corrected by yapf
Ignore type error in import using # type: ignore
annotation
Linter catches poor naming convention:
Code outline press <leader>t
Directory browser <leader>e
Toggle breakpoint: <leader>db
for current line
Start debug: <leader>dc
and press 1
Debugger stops are breakpoints (and exceptions/errors usually): (Note comments show values of vars)
Continue
debugged with <leader>dc
(Note comments show values of vars)
Open REPL if you want to interact with debugger using <leader>dro
Switch to the new REPL split per usual, enter insert mode to use it:
Hit continue again to finish the run <leader>dc
- see terminal split (bottom most split) has the output
Close REPL and terminal splits
Debugger keymaps in init.vim
:
Jedi keymaps in init.vim
(and defaults):
Mappings for FZF: <leader>o
to find by filename and <leader>f
to find by tag:
Easymotion trigger is s
followed by one character
More util mappings: Search buffers: <leader>bu
; undo tree <leader>u