~/talk

LSP Demystified - How towrite an LSP server in Python

Talkat PyCon US 2024 · 2024-05-15..05-23· [developer-experience]
links:none on file
slides:none on file

Shows an actual Python LSP server that parses SQL with SQLFluff, speaks over JSON-RPC in stdio mode, and publishes diagnostics via textDocument/publishDiagnostics. Completion answers use the AST for context (table vs column) and include documentation and hover info; the server also runs and explains queries and executes them against a database. Deployment uses pip (pip install sql-lsp) and the implementation uses pygls; the client needs only a ~10‑line patch, not heavyweight editor plugins.

AI-written summary · about

  1. 0:00LSP introduction
  2. 1:05Writing LSP server in Python
  3. 3:59Language Server Protocol
  4. 6:31Parsing code into an abstract syntax tree
  5. 7:53Linting errors with SQL fluff
  6. 10:01Smart autocomplete
  7. 12:11Adding docs to autocomplete
  8. 13:36LSP capabilities
  9. 15:24Live demo: SQL LSP
  10. 18:12Summary of implementation
  11. 18:56Q&A: distribution & testing
  12. 21:05Performance & debouncing
  13. 22:30GitHub repo & structure
  14. 23:56Extending LSP features
  15. 24:59Code actions for refactor
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.