Questions tagged [python]
Python is a general-purpose programming language. For questions on editing Python files, prefer [filetype-python]. For the Python interface to Vim, prefer [vimscript-python].
77 questions
0
votes
2
answers
70
views
Incorrect indent underneath open brackets in Python multiline strings
When I type gww or gqq on the following:
"""
Some multiline string with (some brackets and quite a long line which needs to be wrapped because it's long enough.)
"""
I ...
0
votes
1
answer
105
views
How to setup vim up for using latest version of python on the system [duplicate]
My system is Plasma KDE (Ubuntu), I have just installed opencv and tried it first on IDLE 3 which works fine the version is 3.13.3.
Then switch to my normal editor Vim and found that when running the ...
1
vote
3
answers
153
views
Vim python3 version referring to python3.8 instead of python3.13
Whenever I open vim and type :python3 import sys; print(sys.version), it returns python3.8. I want python3 in vim to refer to python3.13. How do I do this? I'm not using NeoVim.
-1
votes
1
answer
79
views
Change python version on vim [closed]
Whenever I open a file in vim and type :!python3, python3.8 opens. However, I want it to refer to python3.9.
How do I change it?
0
votes
0
answers
83
views
Can not compile VIM with python support for non-system python
I try to compile VIM with python interpreter enabled.
Yet, I've got Ubuntu 20.04 (can not update easily) with Python 3.8 as system version. I need VIM with Python >3.9.
I installed python3.10 and ...
0
votes
1
answer
2k
views
I can't get Python autocomplete to work with NvChad + python-lsp-server
I'm trying to use Neovim with Python, and I can't get autocomplete to work. I have created a minimal example of what I'm trying to do:
For this example, I'll run everything in a fresh Alpine container ...
0
votes
1
answer
732
views
Python formatter stop working in Neovim [closed]
No errors are being thrown for the code with a lot of issues.
I have tried black, ruff but nothing works. I have also tried reinstalling with mason.
I have disabled diagnostics for the lsp (pyright) ...
0
votes
1
answer
1k
views
How to configure pylsp installed by Mason with lsp-zero for nvim?
I want to disable a specific error/warning - E203.
This is my lsp.lua where I tried to add ignore config according to this doc from lsp-zero git
local lsp = require("lsp-zero")
lsp.preset(&...
2
votes
1
answer
820
views
Neovim shows python related error after installing semshi
I'm currently in the process of setting up my configuration for my Neovim environment and I'm struggling with some Python related issues.
I'm on macOS with nvim 0.9.4, installed over brew (if that ...
1
vote
1
answer
8k
views
Get ruff / ruff_lsp to work with neovim
I tried kickstart.nvimi to get to work with the ruff-lsp. It did not work, therefore I built a minimal example with only the default configuration from the documentation.
Here is the problem: When I ...
1
vote
1
answer
251
views
Remote neovim command that changes the selected range (python)
I want a simple command that changes the range that the user selected to a constant string I set (with possibly differently number of lines) - effectively adding lines if the constant string has more. ...
2
votes
1
answer
1k
views
Why does :!python3 differ from g:python3_host_prog?
I am using Ubuntu 22 and the default (OS) Python version is 3.10.6.
I don't need this python version; rather I need 3.8.16. I've installed it and
set the g:python3_host_prog to its path to use it when ...
0
votes
1
answer
166
views
coc-pyright is using buffers irresponsibly
I've been noticing that my buffer number increases really fast without me even using them. I rely on buffers quite a lot to switch between files, and it's really annoying when I open a second file and ...
1
vote
1
answer
367
views
How do I use the Vim code for Google's python style?
I found interesting code on GitHub at https://github.com/google/styleguide/blob/gh-pages/google_python_style.vim
I would like to use it, but when I just dropped it in my .vimrc, it interfered with ...
1
vote
1
answer
1k
views
nvim-dap debugging with IPython instead of the default REPL
I wanted to ask if it is possible to combine nvim-dap with IPython for debugging purposes in a reasonable way.
Now I am using the repl that is being opened by nvim-dap-ui. But it is not the most ...