Python Language Server Configuration

December 6, 2025 ยท View on GitHub

This server can be configured using the workspace/didChangeConfiguration method. Each configuration option is described below. Note, a value of null means that we do not set a value and thus use the plugin's default value.

Configuration KeyTypeDescriptionDefault
pylsp.configurationSourcesarray of unique string (one of: 'pycodestyle', 'flake8') itemsList of configuration sources to use.["pycodestyle"]
pylsp.plugins.autopep8.enabledbooleanEnable or disable the plugin (disabling required to use yapf).true
pylsp.plugins.flake8.configstringPath to the config file that will be the authoritative config source.null
pylsp.plugins.flake8.enabledbooleanEnable or disable the plugin.false
pylsp.plugins.flake8.excludearray of string itemsList of files or directories to exclude.[]
pylsp.plugins.flake8.extendIgnorearray of string itemsList of errors and warnings to append to ignore list.[]
pylsp.plugins.flake8.extendSelectarray of string itemsList of errors and warnings to append to select list.[]
pylsp.plugins.flake8.executablestringPath to the flake8 executable."flake8"
pylsp.plugins.flake8.filenamestringOnly check for filenames matching the patterns in this list.null
pylsp.plugins.flake8.hangClosingbooleanHang closing bracket instead of matching indentation of opening bracket's line.null
pylsp.plugins.flake8.ignorearray of string itemsList of errors and warnings to ignore (or skip).[]
pylsp.plugins.flake8.maxComplexityintegerMaximum allowed complexity threshold.null
pylsp.plugins.flake8.maxLineLengthintegerMaximum allowed line length for the entirety of this run.null
pylsp.plugins.flake8.indentSizeintegerSet indentation spaces.null
pylsp.plugins.flake8.perFileIgnoresarray of string itemsA pairing of filenames and violation codes that defines which violations to ignore in a particular file, for example: ["file_path.py:W305,W304"]).[]
pylsp.plugins.flake8.selectarray of unique string itemsList of errors and warnings to enable.null
pylsp.plugins.jedi.auto_import_modulesarray of string itemsList of module names for jedi.settings.auto_import_modules.["numpy"]
pylsp.plugins.jedi.extra_pathsarray of string itemsDefine extra paths for jedi.Script.[]
pylsp.plugins.jedi.prioritize_extra_pathsbooleanWhether to place extra_paths at the beginning (true) or end (false) of sys.pathfalse
pylsp.plugins.jedi.env_varsobjectDefine environment variables for jedi.Script and Jedi.names.null
pylsp.plugins.jedi.environmentstringDefine environment for jedi.Script and Jedi.names.null
pylsp.plugins.jedi_completion.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.jedi_completion.include_paramsbooleanAuto-completes methods and classes with tabstops for each parameter.true
pylsp.plugins.jedi_completion.include_class_objectsbooleanAdds class objects as a separate completion item.false
pylsp.plugins.jedi_completion.include_function_objectsbooleanAdds function objects as a separate completion item.false
pylsp.plugins.jedi_completion.fuzzybooleanEnable fuzzy when requesting autocomplete.false
pylsp.plugins.jedi_completion.eagerbooleanResolve documentation and detail eagerly.false
pylsp.plugins.jedi_completion.resolve_at_mostintegerHow many labels and snippets (at most) should be resolved?25
pylsp.plugins.jedi_completion.cache_forarray of string itemsModules for which labels and snippets should be cached.["pandas", "numpy", "tensorflow", "matplotlib"]
pylsp.plugins.jedi_definition.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.jedi_definition.follow_importsbooleanThe goto call will follow imports.true
pylsp.plugins.jedi_definition.follow_builtin_importsbooleanIf follow_imports is True will decide if it follow builtin imports.true
pylsp.plugins.jedi_definition.follow_builtin_definitionsbooleanFollow builtin and extension definitions to stubs.true
pylsp.plugins.jedi_hover.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.jedi_references.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.jedi_signature_help.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.jedi_symbols.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.jedi_symbols.all_scopesbooleanIf True lists the names of all scopes instead of only the module namespace.true
pylsp.plugins.jedi_symbols.include_import_symbolsbooleanIf True includes symbols imported from other libraries.true
pylsp.plugins.jedi_type_definition.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.mccabe.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.mccabe.thresholdintegerThe minimum threshold that triggers warnings about cyclomatic complexity.15
pylsp.plugins.preload.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.preload.modulesarray of unique string itemsList of modules to import on startup[]
pylsp.plugins.pycodestyle.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.pycodestyle.excludearray of unique string itemsExclude files or directories which match these patterns.[]
pylsp.plugins.pycodestyle.filenamearray of unique string itemsWhen parsing directories, only check filenames matching these patterns.[]
pylsp.plugins.pycodestyle.selectarray of unique string itemsSelect errors and warningsnull
pylsp.plugins.pycodestyle.ignorearray of unique string itemsIgnore errors and warnings[]
pylsp.plugins.pycodestyle.hangClosingbooleanHang closing bracket instead of matching indentation of opening bracket's line.null
pylsp.plugins.pycodestyle.maxLineLengthintegerSet maximum allowed line length.null
pylsp.plugins.pycodestyle.indentSizeintegerSet indentation spaces.null
pylsp.plugins.pydocstyle.enabledbooleanEnable or disable the plugin.false
pylsp.plugins.pydocstyle.conventionstring (one of: 'pep257', 'numpy', 'google', None)Choose the basic list of checked errors by specifying an existing convention.null
pylsp.plugins.pydocstyle.addIgnorearray of unique string itemsIgnore errors and warnings in addition to the specified convention.[]
pylsp.plugins.pydocstyle.addSelectarray of unique string itemsSelect errors and warnings in addition to the specified convention.[]
pylsp.plugins.pydocstyle.ignorearray of unique string itemsIgnore errors and warnings[]
pylsp.plugins.pydocstyle.selectarray of unique string itemsSelect errors and warningsnull
pylsp.plugins.pydocstyle.matchstringCheck only files that exactly match the given regular expression; default is to match files that don't start with 'test_' but end with '.py'."(?!test_).*\\.py"
pylsp.plugins.pydocstyle.matchDirstringSearch only dirs that exactly match the given regular expression; default is to match dirs which do not begin with a dot."[^\\.].*"
pylsp.plugins.pyflakes.enabledbooleanEnable or disable the plugin.true
pylsp.plugins.pylint.enabledbooleanEnable or disable the plugin.false
pylsp.plugins.pylint.argsarray of non-unique string itemsArguments to pass to pylint.[]
pylsp.plugins.pylint.executablestringExecutable to run pylint with. Enabling this will run pylint on unsaved files via stdin. Can slow down workflow. Only works with python3.null
pylsp.plugins.rope_autoimport.enabledbooleanEnable or disable autoimport. If false, neither completions nor code actions are enabled. If true, the respective features can be enabled or disabled individually.false
pylsp.plugins.rope_autoimport.completions.enabledbooleanEnable or disable autoimport completions.true
pylsp.plugins.rope_autoimport.code_actions.enabledbooleanEnable or disable autoimport code actions (e.g. for quick fixes).true
pylsp.plugins.rope_autoimport.memorybooleanMake the autoimport database memory only. Drastically increases startup time.false
pylsp.plugins.rope_completion.enabledbooleanEnable or disable the plugin.false
pylsp.plugins.rope_completion.eagerbooleanResolve documentation and detail eagerly.false
pylsp.plugins.yapf.enabledbooleanEnable or disable the plugin.true
pylsp.rope.extensionModulesstringBuiltin and c-extension modules that are allowed to be imported and inspected by rope.null
pylsp.rope.ropeFolderarray of unique string itemsThe name of the folder in which rope stores project configurations and data. Pass null for not using such a folder at all.null
pylsp.signature.formatterstring (one of: 'black', 'ruff', None)Formatter to use for reformatting signatures in docstrings."black"
pylsp.signature.include_docstringbooleanInclude signature docstring.true
pylsp.signature.line_lengthnumberMaximum line length in signatures.88

This documentation was generated from pylsp/config/schema.json. Please do not edit this file directly.