Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
python-lsp-server
Fork of the python-language-server project, maintained by the Spyder IDE team and the community
-
nvim-dap-python
An extension for nvim-dap, providing default configurations for python and methods to debug individual test methods or classes.
-
ropevim
vim mode that uses rope library to provide features like python refactorings and code-assists
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
nvim-cmp for auto-completion
Something important to note is that you should activate your venv/virtualenv before you start Neovim (in the same shell) so that all the tools will have access to your codebase and third-party packages. If you don't want to manage that manually, I recommend looking at direnv. (This comes up repeatedly in this subreddit.)
python-lsp-server (pylsp) is still working on auto-import support.
For refactoring, I recommend refactoring.nvim. Here is my refactoring configuration; of specific interest to you are the mappings for 'Extract Function' and 'Extract Function to File'.
Have you considered using a debugger plugin? nvim-dap-python for example
rope-vim will get you extra automatic refactoring (LSP gets you renaming, extract method, extract variable, and inlining)
If you want the whole shebang of python IDE, with a bunch of features you are unlikely to use, then look no further than python-mode
Related posts
- General python LSP/completion advice
- nvim-rc: direnv like lua based project configuration
- Is it possible to make lspconfig fail silently in case there's no binary for the LSP?
- My first neovim plugin: Opener.nvim - quickly open directories/folders
- Are there any plugins available to fix exrc not working when you use init.lua?