From 8e086373a0acf842a4af8e6268f131ced56ddfe4 Mon Sep 17 00:00:00 2001 From: Takeshi Tsukamoto Date: Tue, 14 Jan 2020 16:54:11 +0900 Subject: [PATCH] Add pyls mypy config --- lsp-pyls.el | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lsp-pyls.el b/lsp-pyls.el index 2ca48d29080..27d6a85525e 100644 --- a/lsp-pyls.el +++ b/lsp-pyls.el @@ -347,6 +347,21 @@ parameters referenced in config." :group 'lsp-pyls :package-version '(lsp-mode . "6.3")) +(defcustom lsp-pyls-plugins-mypy-enabled t + "Enable or disable the plugin." + :type 'boolean + :group 'lsp-pyls + :package-version '(lsp-mode . "6.3")) + +(defcustom lsp-pyls-plugins-mypy-live-mode-enabled nil + "Enable or disable the mypy live-mode. live_mode provides type checking as you type, +but have some limitation, 1) Imports cannot be followed correctly. +2) Stub files are not validated correctly. Turning off live_mode means you must save +your changes for mypy diagnostics to update correctly." + :type 'boolean + :group 'lsp-pyls + :package-version '(lsp-mode . "6.3")) + (lsp-register-custom-settings '(("pyls.rope.ropeFolder" lsp-pyls-rope-rope-folder) ("pyls.rope.extensionModules" lsp-pyls-rope-extension-modules) @@ -392,6 +407,8 @@ parameters referenced in config." ("pyls.plugins.jedi_definition.enabled" lsp-pyls-plugins-jedi-definition-enabled t) ("pyls.plugins.jedi_completion.include_params" lsp-pyls-plugins-jedi-completion-include-params t) ("pyls.plugins.jedi_completion.enabled" lsp-pyls-plugins-jedi-completion-enabled t) + ("pyls.plugins.pyls_mypy.enabled" lsp-pyls-plugins-mypy-enabled t) + ("pyls.plugins.pyls_mypy.live_mode" lsp-pyls-plugins-mypy-live-mode-enabled nil) ("pyls.configurationSources" lsp-pyls-configuration-sources))) (lsp-register-client