diff options
author | Christian Chiarulli <[email protected]> | 2021-07-13 21:13:55 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2021-07-13 21:13:55 -0400 |
commit | a097fa4c04e6db34bb409e0dea302c20629da8ec (patch) | |
tree | fb1c5bdd14cac82a363ea6c25b03a475050305f2 /ftplugin/python.lua | |
parent | 04f9f53914a7dd999117ed73c5fa0ab3b0dc95e4 (diff) |
LunarVim 0.4.8 (#919)0.4.8
Diffstat (limited to 'ftplugin/python.lua')
-rw-r--r-- | ftplugin/python.lua | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/ftplugin/python.lua b/ftplugin/python.lua index 0cf7c1a7..d2ade7e2 100644 --- a/ftplugin/python.lua +++ b/ftplugin/python.lua @@ -1,6 +1,21 @@ +O.formatters.filetype["python"] = { + function() + return { + exe = O.lang.python.formatter.exe, + args = O.lang.python.formatter.args, + stdin = not (O.lang.python.formatter.stdin ~= nil), + } + end, +} + +require("formatter.config").set_defaults { + logging = false, + filetype = O.formatters.filetype, +} + local python_arguments = {} --- TODO replace with path argument +-- TODO: replace with path argument local flake8 = { LintCommand = "flake8 --ignore=E501 --stdin-display-name ${INPUT} -", lintStdin = true, @@ -25,6 +40,7 @@ if not require("lv-utils").check_lsp_client_active "efm" then -- init_options = {initializationOptions}, cmd = { DATA_PATH .. "/lspinstall/efm/efm-langserver" }, init_options = { documentFormatting = true, codeAction = false }, + root_dir = require("lspconfig").util.root_pattern(".git/", "requirements.txt"), filetypes = { "python" }, settings = { rootMarkers = { ".git/", "requirements.txt" }, @@ -63,7 +79,7 @@ if not require("lv-utils").check_lsp_client_active "pyright" then } end -if O.plugin.debug.active and O.plugin.dap_install.active then +if O.plugin.dap.active then local dap_install = require "dap-install" dap_install.config("python_dbg", {}) end |