~/talk

Understanding Language Server Protocol - autocomplete, formatting

Talkat GopherCon UK 2023 · 2023-08-16..08-18· [go]
slides:none on file

Shows how to implement a real Language Server in Go that reads/writes stdio JSON-RPC messages, implements a multiplexer for methods vs notifications, and wires initialize/DidOpen/DidChange for diagnostics and completion. Demonstrates using gopls as a backend proxy for a templating language so positions remap correctly, runs in Neovim/VS Code/JetBrains, and logs to a file. Includes a unit-tested parser and the passer library for incremental parsing; the example LSP and template proxy are functional and available as sample code.

AI-written summary · about

  1. 0:00Introduction to LSP
  2. 1:04Protocol functionality
  3. 2:53LSP data transmission
  4. 4:26Message structure
  5. 7:11Notifications and flow
  6. 8:21Implementing the server
  7. 12:38Building a multiplexer
  8. 15:19Processing messages
  9. 17:22Initialization handshake
  10. 20:43Document synchronization
  11. 24:31Editor integration
  12. 28:45Building a custom server
  13. 31:14Diagnostics and parsing
  14. 36:04Autocomplete implementation
  15. 39:55Logging and debugging
  16. 41:48Advanced LSP techniques
  17. 44:51Introspection and parsing
  18. 48:09Conclusion and resources
~/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.