X-Git-Url: https://git.madduck.net/etc/lazyvim.git/blobdiff_plain/dee3fe8f1625fda71643922691ac856ee822f3d6..4a4d8b8ec77a9edb85b9ecba820238451fd42c97:/.config/lazyvim/after/ftplugin/python.lua diff --git a/.config/lazyvim/after/ftplugin/python.lua b/.config/lazyvim/after/ftplugin/python.lua index bae3381..4cc925f 100644 --- a/.config/lazyvim/after/ftplugin/python.lua +++ b/.config/lazyvim/after/ftplugin/python.lua @@ -7,21 +7,22 @@ vim.opt_local.sw = 4 vim.opt_local.sts = 4 vim.opt_local.autoindent = true -vim.opt_local.formatoptions = vim.opt.formatoptions + "bl" +vim.opt_local.formatoptions:append("b") +vim.opt_local.formatoptions:append("l") vim.b.ale_linters = { "mypy", "ruff" } vim.b.ale_fixers = { "add_blank_lines_for_python_control_statements", "ruff", - "ruff_format" + "ruff_format", } -vim.keymap.set('i', 't', [[import ipdb; ipdb.set_trace() # noqa: E402 E702 I001 # fmt: skip]]) +vim.keymap.set("i", "t", [[import ipdb; ipdb.set_trace() # noqa: E402 E702 I001 # fmt: skip]]) -vim.keymap.set('i', 'm', [[if __name__ == "__main__":import syssys.exit()i]]) +vim.keymap.set("i", "m", [[if __name__ == "__main__":import syssys.exit()i]]) vim.keymap.set( "i", "a", - [[# needed < 3.14 so that annotations aren't evaluatedfrom __future__ import annotations]] + [[# needed < 3.14 so that annotations aren't evaluatedfrom __future__ import annotationsfrom typing import TYPE_CHECKINGif TYPE_CHECKING:pass]] )