X-Git-Url: https://git.madduck.net/etc/lazyvim.git/blobdiff_plain/0d13ce71e2a0f66f560af2eab64a258a3e8b09fb..dee3fe8f1625fda71643922691ac856ee822f3d6:/.config/lazyvim/after/ftplugin/python.lua diff --git a/.config/lazyvim/after/ftplugin/python.lua b/.config/lazyvim/after/ftplugin/python.lua index a420d50..bae3381 100644 --- a/.config/lazyvim/after/ftplugin/python.lua +++ b/.config/lazyvim/after/ftplugin/python.lua @@ -1,13 +1,13 @@ vim.g.python_highlight_all = true vim.g.linelength = 88 -vim.b.textwidth = vim.g.linelength +vim.opt_local.textwidth = vim.g.linelength -vim.b.sw = 4 -vim.b.sts = 4 -vim.b.autoindent = true +vim.opt_local.sw = 4 +vim.opt_local.sts = 4 +vim.opt_local.autoindent = true -vim.b.formatoptions = vim.opt.formatoptions + 'bl' +vim.opt_local.formatoptions = vim.opt.formatoptions + "bl" vim.b.ale_linters = { "mypy", "ruff" } vim.b.ale_fixers = { @@ -20,3 +20,8 @@ vim.keymap.set('i', 't', [[import ipdb; ipdb.set_trace() # noqa: E 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]] +)