Skip to content

Commit f43955f

Browse files
committed
show python LSP config
1 parent 742b2ec commit f43955f

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

content/en/modes/python.md

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,37 @@
22
title: Python
33
---
44

5+
**warning**: this documentation is a work in progress.
6+
57
## Features
68

79
`python-mode` supports:
810

911
- syntax highlighting
1012
- `M-x run-python` command
1113
- `M-x python-eval-region`
14+
- LSP with `python-lsp-server`
15+
16+
## Python LSP
17+
18+
This is the default Python LSP config.
19+
20+
Lem will try to install [python-lsp-server](https://github.com/python-lsp/python-lsp-server) for you with
21+
22+
pip install python-lsp-server
23+
24+
```lisp
25+
(in-package :lem-python-mode/lsp-config)
26+
27+
(lem-lsp-mode:define-language-spec (python-spec lem-python-mode:python-mode)
28+
:language-id "python"
29+
:root-uri-patterns '("setup.py" "pyproject.toml" "requirements.txt" "poetry.lock")
30+
:command '("pylsp")
31+
:install-command "pip install python-lsp-server"
32+
:readme-url "https://github.com/python-lsp/python-lsp-server"
33+
:connection-mode :stdio)
34+
```
35+
36+
See:
1237

13-
**warning**: this documentation is a work in progress.
38+
- [extensions/python-mode/lsp-config.lisp](https://github.com/lem-project/lem/blob/main/extensions/python-mode/lsp-config.lisp)

0 commit comments

Comments
 (0)