pylsp.schema.json 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  1. {
  2. "title": "Python Language Server Configuration",
  3. "description": "Note, a value of `null` means that we do not set a value and thus use the plugin's default value.",
  4. "type": "object",
  5. "properties": {
  6. "pylsp.configurationSources": {
  7. "type": "array",
  8. "default": ["pycodestyle"],
  9. "description": "List of configuration sources to use.",
  10. "items": {
  11. "type": "string",
  12. "enum": ["pycodestyle", "flake8"]
  13. },
  14. "uniqueItems": true
  15. },
  16. "pylsp.plugins.autopep8.enabled": {
  17. "type": "boolean",
  18. "default": true,
  19. "description": "Enable or disable the plugin (disabling required to use `yapf`)."
  20. },
  21. "pylsp.plugins.flake8.config": {
  22. "type": ["string", "null"],
  23. "default": null,
  24. "description": "Path to the config file that will be the authoritative config source."
  25. },
  26. "pylsp.plugins.flake8.enabled": {
  27. "type": "boolean",
  28. "default": false,
  29. "description": "Enable or disable the plugin."
  30. },
  31. "pylsp.plugins.flake8.exclude": {
  32. "type": "array",
  33. "default": [],
  34. "items": {
  35. "type": "string"
  36. },
  37. "description": "List of files or directories to exclude."
  38. },
  39. "pylsp.plugins.flake8.extendIgnore": {
  40. "type": "array",
  41. "default": [],
  42. "items": {
  43. "type": "string"
  44. },
  45. "description": "List of errors and warnings to append to ignore list."
  46. },
  47. "pylsp.plugins.flake8.extendSelect": {
  48. "type": "array",
  49. "default": [],
  50. "items": {
  51. "type": "string"
  52. },
  53. "description": "List of errors and warnings to append to select list."
  54. },
  55. "pylsp.plugins.flake8.executable": {
  56. "type": "string",
  57. "default": "flake8",
  58. "description": "Path to the flake8 executable."
  59. },
  60. "pylsp.plugins.flake8.filename": {
  61. "type": ["string", "null"],
  62. "default": null,
  63. "description": "Only check for filenames matching the patterns in this list."
  64. },
  65. "pylsp.plugins.flake8.hangClosing": {
  66. "type": ["boolean", "null"],
  67. "default": null,
  68. "description": "Hang closing bracket instead of matching indentation of opening bracket's line."
  69. },
  70. "pylsp.plugins.flake8.ignore": {
  71. "type": "array",
  72. "default": [],
  73. "items": {
  74. "type": "string"
  75. },
  76. "description": "List of errors and warnings to ignore (or skip)."
  77. },
  78. "pylsp.plugins.flake8.maxComplexity": {
  79. "type": ["integer", "null"],
  80. "default": null,
  81. "description": "Maximum allowed complexity threshold."
  82. },
  83. "pylsp.plugins.flake8.maxLineLength": {
  84. "type": ["integer", "null"],
  85. "default": null,
  86. "description": "Maximum allowed line length for the entirety of this run."
  87. },
  88. "pylsp.plugins.flake8.indentSize": {
  89. "type": ["integer", "null"],
  90. "default": null,
  91. "description": "Set indentation spaces."
  92. },
  93. "pylsp.plugins.flake8.perFileIgnores": {
  94. "type": ["array"],
  95. "default": [],
  96. "items": {
  97. "type": "string"
  98. },
  99. "description": "A pairing of filenames and violation codes that defines which violations to ignore in a particular file, for example: `[\"file_path.py:W305,W304\"]`)."
  100. },
  101. "pylsp.plugins.flake8.select": {
  102. "type": ["array", "null"],
  103. "default": null,
  104. "items": {
  105. "type": "string"
  106. },
  107. "uniqueItems": true,
  108. "description": "List of errors and warnings to enable."
  109. },
  110. "pylsp.plugins.jedi.auto_import_modules": {
  111. "type": "array",
  112. "default": ["numpy"],
  113. "items": {
  114. "type": "string"
  115. },
  116. "description": "List of module names for jedi.settings.auto_import_modules."
  117. },
  118. "pylsp.plugins.jedi.extra_paths": {
  119. "type": "array",
  120. "default": [],
  121. "items": {
  122. "type": "string"
  123. },
  124. "description": "Define extra paths for jedi.Script."
  125. },
  126. "pylsp.plugins.jedi.prioritize_extra_paths": {
  127. "type": "boolean",
  128. "default": false,
  129. "description": "Whether to place extra_paths at the beginning (true) or end (false) of `sys.path`"
  130. },
  131. "pylsp.plugins.jedi.env_vars": {
  132. "type": ["object", "null"],
  133. "default": null,
  134. "description": "Define environment variables for jedi.Script and Jedi.names."
  135. },
  136. "pylsp.plugins.jedi.environment": {
  137. "type": ["string", "null"],
  138. "default": null,
  139. "description": "Define environment for jedi.Script and Jedi.names."
  140. },
  141. "pylsp.plugins.jedi_completion.enabled": {
  142. "type": "boolean",
  143. "default": true,
  144. "description": "Enable or disable the plugin."
  145. },
  146. "pylsp.plugins.jedi_completion.include_params": {
  147. "type": "boolean",
  148. "default": true,
  149. "description": "Auto-completes methods and classes with tabstops for each parameter."
  150. },
  151. "pylsp.plugins.jedi_completion.include_class_objects": {
  152. "type": "boolean",
  153. "default": false,
  154. "description": "Adds class objects as a separate completion item."
  155. },
  156. "pylsp.plugins.jedi_completion.include_function_objects": {
  157. "type": "boolean",
  158. "default": false,
  159. "description": "Adds function objects as a separate completion item."
  160. },
  161. "pylsp.plugins.jedi_completion.fuzzy": {
  162. "type": "boolean",
  163. "default": false,
  164. "description": "Enable fuzzy when requesting autocomplete."
  165. },
  166. "pylsp.plugins.jedi_completion.eager": {
  167. "type": "boolean",
  168. "default": false,
  169. "description": "Resolve documentation and detail eagerly."
  170. },
  171. "pylsp.plugins.jedi_completion.resolve_at_most": {
  172. "type": "integer",
  173. "default": 25,
  174. "description": "How many labels and snippets (at most) should be resolved?"
  175. },
  176. "pylsp.plugins.jedi_completion.cache_for": {
  177. "type": "array",
  178. "items": {
  179. "type": "string"
  180. },
  181. "default": ["pandas", "numpy", "tensorflow", "matplotlib"],
  182. "description": "Modules for which labels and snippets should be cached."
  183. },
  184. "pylsp.plugins.jedi_definition.enabled": {
  185. "type": "boolean",
  186. "default": true,
  187. "description": "Enable or disable the plugin."
  188. },
  189. "pylsp.plugins.jedi_definition.follow_imports": {
  190. "type": "boolean",
  191. "default": true,
  192. "description": "The goto call will follow imports."
  193. },
  194. "pylsp.plugins.jedi_definition.follow_builtin_imports": {
  195. "type": "boolean",
  196. "default": true,
  197. "description": "If follow_imports is True will decide if it follow builtin imports."
  198. },
  199. "pylsp.plugins.jedi_definition.follow_builtin_definitions": {
  200. "type": "boolean",
  201. "default": true,
  202. "description": "Follow builtin and extension definitions to stubs."
  203. },
  204. "pylsp.plugins.jedi_hover.enabled": {
  205. "type": "boolean",
  206. "default": true,
  207. "description": "Enable or disable the plugin."
  208. },
  209. "pylsp.plugins.jedi_references.enabled": {
  210. "type": "boolean",
  211. "default": true,
  212. "description": "Enable or disable the plugin."
  213. },
  214. "pylsp.plugins.jedi_signature_help.enabled": {
  215. "type": "boolean",
  216. "default": true,
  217. "description": "Enable or disable the plugin."
  218. },
  219. "pylsp.plugins.jedi_symbols.enabled": {
  220. "type": "boolean",
  221. "default": true,
  222. "description": "Enable or disable the plugin."
  223. },
  224. "pylsp.plugins.jedi_symbols.all_scopes": {
  225. "type": "boolean",
  226. "default": true,
  227. "description": "If True lists the names of all scopes instead of only the module namespace."
  228. },
  229. "pylsp.plugins.jedi_symbols.include_import_symbols": {
  230. "type": "boolean",
  231. "default": true,
  232. "description": "If True includes symbols imported from other libraries."
  233. },
  234. "pylsp.plugins.jedi_type_definition.enabled": {
  235. "type": "boolean",
  236. "default": true,
  237. "description": "Enable or disable the plugin."
  238. },
  239. "pylsp.plugins.mccabe.enabled": {
  240. "type": "boolean",
  241. "default": true,
  242. "description": "Enable or disable the plugin."
  243. },
  244. "pylsp.plugins.mccabe.threshold": {
  245. "type": "integer",
  246. "default": 15,
  247. "description": "The minimum threshold that triggers warnings about cyclomatic complexity."
  248. },
  249. "pylsp.plugins.preload.enabled": {
  250. "type": "boolean",
  251. "default": true,
  252. "description": "Enable or disable the plugin."
  253. },
  254. "pylsp.plugins.preload.modules": {
  255. "type": "array",
  256. "default": [],
  257. "items": {
  258. "type": "string"
  259. },
  260. "uniqueItems": true,
  261. "description": "List of modules to import on startup"
  262. },
  263. "pylsp.plugins.pycodestyle.enabled": {
  264. "type": "boolean",
  265. "default": true,
  266. "description": "Enable or disable the plugin."
  267. },
  268. "pylsp.plugins.pycodestyle.exclude": {
  269. "type": "array",
  270. "default": [],
  271. "items": {
  272. "type": "string"
  273. },
  274. "uniqueItems": true,
  275. "description": "Exclude files or directories which match these patterns."
  276. },
  277. "pylsp.plugins.pycodestyle.filename": {
  278. "type": "array",
  279. "default": [],
  280. "items": {
  281. "type": "string"
  282. },
  283. "uniqueItems": true,
  284. "description": "When parsing directories, only check filenames matching these patterns."
  285. },
  286. "pylsp.plugins.pycodestyle.select": {
  287. "type": ["array", "null"],
  288. "default": null,
  289. "items": {
  290. "type": "string"
  291. },
  292. "uniqueItems": true,
  293. "description": "Select errors and warnings"
  294. },
  295. "pylsp.plugins.pycodestyle.ignore": {
  296. "type": "array",
  297. "default": [],
  298. "items": {
  299. "type": "string"
  300. },
  301. "uniqueItems": true,
  302. "description": "Ignore errors and warnings"
  303. },
  304. "pylsp.plugins.pycodestyle.hangClosing": {
  305. "type": ["boolean", "null"],
  306. "default": null,
  307. "description": "Hang closing bracket instead of matching indentation of opening bracket's line."
  308. },
  309. "pylsp.plugins.pycodestyle.maxLineLength": {
  310. "type": ["integer", "null"],
  311. "default": null,
  312. "description": "Set maximum allowed line length."
  313. },
  314. "pylsp.plugins.pycodestyle.indentSize": {
  315. "type": ["integer", "null"],
  316. "default": null,
  317. "description": "Set indentation spaces."
  318. },
  319. "pylsp.plugins.pydocstyle.enabled": {
  320. "type": "boolean",
  321. "default": false,
  322. "description": "Enable or disable the plugin."
  323. },
  324. "pylsp.plugins.pydocstyle.convention": {
  325. "type": ["string", "null"],
  326. "default": null,
  327. "enum": ["pep257", "numpy", "google", null],
  328. "description": "Choose the basic list of checked errors by specifying an existing convention."
  329. },
  330. "pylsp.plugins.pydocstyle.addIgnore": {
  331. "type": "array",
  332. "default": [],
  333. "items": {
  334. "type": "string"
  335. },
  336. "uniqueItems": true,
  337. "description": "Ignore errors and warnings in addition to the specified convention."
  338. },
  339. "pylsp.plugins.pydocstyle.addSelect": {
  340. "type": "array",
  341. "default": [],
  342. "items": {
  343. "type": "string"
  344. },
  345. "uniqueItems": true,
  346. "description": "Select errors and warnings in addition to the specified convention."
  347. },
  348. "pylsp.plugins.pydocstyle.ignore": {
  349. "type": "array",
  350. "default": [],
  351. "items": {
  352. "type": "string"
  353. },
  354. "uniqueItems": true,
  355. "description": "Ignore errors and warnings"
  356. },
  357. "pylsp.plugins.pydocstyle.select": {
  358. "type": ["array", "null"],
  359. "default": null,
  360. "items": {
  361. "type": "string"
  362. },
  363. "uniqueItems": true,
  364. "description": "Select errors and warnings"
  365. },
  366. "pylsp.plugins.pydocstyle.match": {
  367. "type": "string",
  368. "default": "(?!test_).*\\.py",
  369. "description": "Check only files that exactly match the given regular expression; default is to match files that don't start with 'test_' but end with '.py'."
  370. },
  371. "pylsp.plugins.pydocstyle.matchDir": {
  372. "type": "string",
  373. "default": "[^\\.].*",
  374. "description": "Search only dirs that exactly match the given regular expression; default is to match dirs which do not begin with a dot."
  375. },
  376. "pylsp.plugins.pyflakes.enabled": {
  377. "type": "boolean",
  378. "default": true,
  379. "description": "Enable or disable the plugin."
  380. },
  381. "pylsp.plugins.pylint.enabled": {
  382. "type": "boolean",
  383. "default": false,
  384. "description": "Enable or disable the plugin."
  385. },
  386. "pylsp.plugins.pylint.args": {
  387. "type": "array",
  388. "default": [],
  389. "items": {
  390. "type": "string"
  391. },
  392. "uniqueItems": false,
  393. "description": "Arguments to pass to pylint."
  394. },
  395. "pylsp.plugins.pylint.executable": {
  396. "type": ["string", "null"],
  397. "default": null,
  398. "description": "Executable to run pylint with. Enabling this will run pylint on unsaved files via stdin. Can slow down workflow. Only works with python3."
  399. },
  400. "pylsp.plugins.ruff.enabled": {
  401. "type": "boolean",
  402. "default": true,
  403. "description": "Enable or disable the plugin (python-lsp-ruff)."
  404. },
  405. "pylsp.plugins.ruff.executable": {
  406. "type": ["string", "null"],
  407. "default": null,
  408. "description": "Custom path to the ruff executable."
  409. },
  410. "pylsp.plugins.ruff.config": {
  411. "type": ["string", "null"],
  412. "default": null,
  413. "description": "Path to a ruff configuration file."
  414. },
  415. "pylsp.plugins.ruff.exclude": {
  416. "type": ["array", "null"],
  417. "default": null,
  418. "items": {
  419. "type": "string"
  420. },
  421. "description": "List of file patterns to exclude."
  422. },
  423. "pylsp.plugins.ruff.extendIgnore": {
  424. "type": ["array", "null"],
  425. "default": null,
  426. "items": {
  427. "type": "string"
  428. },
  429. "description": "List of additional rule codes to ignore."
  430. },
  431. "pylsp.plugins.ruff.extendSelect": {
  432. "type": ["array", "null"],
  433. "default": null,
  434. "items": {
  435. "type": "string"
  436. },
  437. "description": "List of additional rule codes to enable."
  438. },
  439. "pylsp.plugins.ruff.format": {
  440. "type": ["array", "null"],
  441. "default": null,
  442. "items": {
  443. "type": "string"
  444. },
  445. "description": "List of rule codes to apply when formatting."
  446. },
  447. "pylsp.plugins.ruff.formatEnabled": {
  448. "type": "boolean",
  449. "default": true,
  450. "description": "Enable ruff formatting."
  451. },
  452. "pylsp.plugins.ruff.ignore": {
  453. "type": ["array", "null"],
  454. "default": null,
  455. "items": {
  456. "type": "string"
  457. },
  458. "description": "List of rule codes to ignore."
  459. },
  460. "pylsp.plugins.ruff.lineLength": {
  461. "type": ["integer", "null"],
  462. "default": null,
  463. "description": "Set the line-length for length-associated rules and formatting."
  464. },
  465. "pylsp.plugins.ruff.perFileIgnores": {
  466. "type": ["object", "null"],
  467. "default": null,
  468. "description": "Map of file pattern to rule codes to ignore."
  469. },
  470. "pylsp.plugins.ruff.preview": {
  471. "type": "boolean",
  472. "default": false,
  473. "description": "Enable ruff preview mode."
  474. },
  475. "pylsp.plugins.ruff.select": {
  476. "type": ["array", "null"],
  477. "default": null,
  478. "items": {
  479. "type": "string"
  480. },
  481. "description": "List of rule codes to enable."
  482. },
  483. "pylsp.plugins.ruff.severities": {
  484. "type": ["object", "null"],
  485. "default": null,
  486. "description": "Map of rule codes to LSP diagnostic severities."
  487. },
  488. "pylsp.plugins.ruff.targetVersion": {
  489. "type": ["string", "null"],
  490. "default": null,
  491. "description": "The minimum Python version to target (e.g. 'py310')."
  492. },
  493. "pylsp.plugins.ruff.unfixable": {
  494. "type": ["array", "null"],
  495. "default": null,
  496. "items": {
  497. "type": "string"
  498. },
  499. "description": "List of rule codes to consider unfixable."
  500. },
  501. "pylsp.plugins.ruff.unsafeFixes": {
  502. "type": "boolean",
  503. "default": false,
  504. "description": "Allow ruff to apply unsafe fixes."
  505. },
  506. "pylsp.plugins.rope_autoimport.enabled": {
  507. "type": "boolean",
  508. "default": false,
  509. "description": "Enable or disable autoimport. If false, neither completions nor code actions are enabled. If true, the respective features can be enabled or disabled individually."
  510. },
  511. "pylsp.plugins.rope_autoimport.completions.enabled": {
  512. "type": "boolean",
  513. "default": true,
  514. "description": "Enable or disable autoimport completions."
  515. },
  516. "pylsp.plugins.rope_autoimport.code_actions.enabled": {
  517. "type": "boolean",
  518. "default": true,
  519. "description": "Enable or disable autoimport code actions (e.g. for quick fixes)."
  520. },
  521. "pylsp.plugins.rope_autoimport.memory": {
  522. "type": "boolean",
  523. "default": false,
  524. "description": "Make the autoimport database memory only. Drastically increases startup time."
  525. },
  526. "pylsp.plugins.rope_completion.enabled": {
  527. "type": "boolean",
  528. "default": false,
  529. "description": "Enable or disable the plugin."
  530. },
  531. "pylsp.plugins.rope_completion.eager": {
  532. "type": "boolean",
  533. "default": false,
  534. "description": "Resolve documentation and detail eagerly."
  535. },
  536. "pylsp.plugins.yapf.enabled": {
  537. "type": "boolean",
  538. "default": true,
  539. "description": "Enable or disable the plugin."
  540. },
  541. "pylsp.rope.extensionModules": {
  542. "type": ["string", "null"],
  543. "default": null,
  544. "description": "Builtin and c-extension modules that are allowed to be imported and inspected by rope."
  545. },
  546. "pylsp.rope.ropeFolder": {
  547. "type": ["array", "null"],
  548. "default": null,
  549. "items": {
  550. "type": "string"
  551. },
  552. "uniqueItems": true,
  553. "description": "The name of the folder in which rope stores project configurations and data. Pass `null` for not using such a folder at all."
  554. },
  555. "pylsp.signature.formatter": {
  556. "type": ["string", "null"],
  557. "enum": ["black", "ruff", null],
  558. "default": "black",
  559. "description": "Formatter to use for reformatting signatures in docstrings."
  560. },
  561. "pylsp.signature.line_length": {
  562. "type": "integer",
  563. "default": 88,
  564. "description": "Maximum line length in signatures."
  565. }
  566. }
  567. }