Python

Install Syntax Highlighting

:TSInstall python
1

Install Language Server

:LspInstall python
1

Formatters

The configured formatter(s) must be installed separately.

Configuration in ~/.config/lvim/config.lua:

-- exe value can be "black", "yapf", or "isort"
lvim.lang.python.formatters = { { exe = "black" } }
1
2

Linters

The configured linter must be installed separately.

Configuration in ~/.config/lvim/config.lua:

lvim.lang.python.linters = { { exe = "flake8" } }
1

LSP Settings

:NlspConfig pyright
1

Debugger

:DIInstall python
1
-- ~/.config/lvim/ftplugin/python.lua
local dap_install = require "dap-install"
dap_install.config("python", {})
1
2
3