Learn By Building: Language Server Protocol

TJ DeVries March 19, 2024
Video Thumbnail
TJ DeVries Logo

TJ DeVries

View Channel

About

Live coder who sometimes remembers to upload his VODs

Video Description

In this video, we build an entire Language Server from an empty Go project with literally no dependencies. Along the way, we'll use Go's standard library, builtin unit testing and Neovim to learn the most effective way that I know - by building something. There's no "Fill in the rest of the owl" - it's each step along the way. Hopefully by the end you really understand what's happening with Language Servers Leave a like or comment, and subscribe of course! ;) Repo Link: https://github.com/tjdevries/educationalsp Neovim: Neovim btw 00:00:00 - Introduction 00:00:50 - Read the Friendly Manual 00:01:44 - Transport Mechanism 00:03:02 - RPC Encode 00:05:39 - RPC Encode Test 00:08:15 - RPC Decode 00:12:27 - RPC Decode Test 00:13:38 - Decoding Method 00:17:18 - Decoding Content 00:18:04 - Building 00:18:58 - Building main.go 00:20:50 - Split Function 00:21:49 - Split Function Impl 00:25:49 - Logging 00:28:35 - Add basic Logging 00:29:16 - VERY FIRST MESSAGE 00:32:24 - Server life cycle 00:39:19 - More decoding 00:41:32 - Decoding Initialize 00:46:08 - Initialize Response 00:52:06 - Language Server Things 00:53:17 - Text Document Synchronization 00:56:18 - Start of "compiler" 01:02:22 - Start of "Analysis" 01:05:11 - Syncing State 01:10:25 - Changing Documents 01:13:19 - Hover Structu 01:19:08 - First Hover Response 01:23:26 - Making Hover Interactive 01:26:47 - Goto Definition 01:33:17 - Code Actions Demo 01:34:44 - Code Actions Explained 01:38:59 - Completion 01:47:59 - Diagnostics 01:58:16 - Conclusion ### Links Twitch: https://twitch.tv/teej_dv Twitter: https://twitter.com/teej_dv Github: https://github.com/tjdevries

You May Also Like

Essential 3D Printer Upgrades

AI-recommended products based on this video

Loading...
OVERTURE PLA Filament 1.75mm PLA 3D Printer Filament, 1kg Cardboard Spool (2.2lbs), Dimensional Accuracy +/- 0.02mm, Fit Most FDM Printer (White 1-Pack)

OVERTURE PLA Filament 1.75mm PLA 3D Printer Filament, 1kg Cardboard Spool (2.2lbs), Dimensional Accuracy +/- 0.02mm, Fit Most FDM Printer (White 1-Pack)

(18,255)
$26.99
FREE delivery Sat, Jun 14 on your first order
200+ bought in past month
Loading...
SUNLU High Speed PLA Meta Filament, 4KG PLA 3D Printer Tougher Filament 1.75mm, Dimensional Accuracy +/- 0.02 mm, 4kg Total, 1kg per Spool, Pack of 4, Sky Blue+Mint Green+Sunny Orange+Lemon Yellow

SUNLU High Speed PLA Meta Filament, 4KG PLA 3D Printer Tougher Filament 1.75mm, Dimensional Accuracy +/- 0.02 mm, 4kg Total, 1kg per Spool, Pack of 4, Sky Blue+Mint Green+Sunny Orange+Lemon Yellow

(2,468)
$62.99
Loading...
OVERTURE PLA Filament 1.75mm PLA 3D Printer Filament, 1kg Cardboard Spool (2.2lbs), Dimensional Accuracy +/- 0.02mm, Fit Most FDM Printer (White 1-Pack)

OVERTURE PLA Filament 1.75mm PLA 3D Printer Filament, 1kg Cardboard Spool (2.2lbs), Dimensional Accuracy +/- 0.02mm, Fit Most FDM Printer (White 1-Pack)

(18,255)
$26.99
FREE delivery Sat, Jun 14 on your first order
200+ bought in past month
Loading...
SUNLU High Speed PLA Meta Filament, 4KG PLA 3D Printer Tougher Filament 1.75mm, Dimensional Accuracy +/- 0.02 mm, 4kg Total, 1kg per Spool, Pack of 4, Sky Blue+Mint Green+Sunny Orange+Lemon Yellow

SUNLU High Speed PLA Meta Filament, 4KG PLA 3D Printer Tougher Filament 1.75mm, Dimensional Accuracy +/- 0.02 mm, 4kg Total, 1kg per Spool, Pack of 4, Sky Blue+Mint Green+Sunny Orange+Lemon Yellow

(2,468)
$62.99
Loading...
10FT Offset Patio Umbrella - Cantilever Umbrella with Easy Lift & Tilt Adjustment, 8-Rib Sun Umbrella with UV Protection for Backyard, Pool, Garden, Hanging Outdoor Market Patio Umbrella

10FT Offset Patio Umbrella - Cantilever Umbrella with Easy Lift & Tilt Adjustment, 8-Rib Sun Umbrella with UV Protection for Backyard, Pool, Garden, Hanging Outdoor Market Patio Umbrella

(0)
$119.99
FREE delivery Fri, Jun 20
Loading...
Sylfairy Toddler Sun Hat Kids Sun Hat for Girls UV Protection Summer Hat Ponytail Beach Bucket Cap for 3-8 Years

Sylfairy Toddler Sun Hat Kids Sun Hat for Girls UV Protection Summer Hat Ponytail Beach Bucket Cap for 3-8 Years

(1,104)
$17.09
FREE delivery Sat, Jun 14 on your first order
50+ bought in past month
Loading...
DEAFRAIN Kids Polarized Sunglasses TPEE Unbreakable Flexible Sport Glasses UV Protection for Boys Girls Age 3-7

DEAFRAIN Kids Polarized Sunglasses TPEE Unbreakable Flexible Sport Glasses UV Protection for Boys Girls Age 3-7

(1,453)
$23.99
FREE delivery Sat, Jun 14 on your first order
Loading...
HENGOSEN Sunglasses-for-Men Polarized Mens Sunglasses: Retro Sun glasses with UV Protection for Driving Fishing

HENGOSEN Sunglasses-for-Men Polarized Mens Sunglasses: Retro Sun glasses with UV Protection for Driving Fishing

(35)
$29.99
FREE delivery Sat, Jun 14 on your first order
Loading...
Expandable Garden Hose Set 100FT Upgraded Flexible Water Hose 3/4" Solid Brass Fittings with 10 Function Sprayer Nozzle Gardening Flexible Hose Pipe with Storage Bag Red

Expandable Garden Hose Set 100FT Upgraded Flexible Water Hose 3/4" Solid Brass Fittings with 10 Function Sprayer Nozzle Gardening Flexible Hose Pipe with Storage Bag Red

(51)
$35.19
FREE delivery Tue, Jul 1
500+ bought in past month
Loading...
GUKOK 50 FT Expandable Garden Hose, Water Hose with 10-Function High-Pressure Spray Nozzle, Heavy Duty Flexible Hose, 3/4" Solid Brass Fitting

GUKOK 50 FT Expandable Garden Hose, Water Hose with 10-Function High-Pressure Spray Nozzle, Heavy Duty Flexible Hose, 3/4" Solid Brass Fitting

(2,372)
$33.99$23.00
FREE delivery Sat, Jun 28 on your first order
1K+ bought in past month
Loading...
Expandable Garden Hose 50ft Water Hoses with 10 Function Spray Nozzle, 2025 New Superior Strength Flexible Hose, 3/4 Brass Connectors- Leakproof Lightweight Water Pipe for Gardening(Blue Black)

Expandable Garden Hose 50ft Water Hoses with 10 Function Spray Nozzle, 2025 New Superior Strength Flexible Hose, 3/4 Brass Connectors- Leakproof Lightweight Water Pipe for Gardening(Blue Black)

(98)
$32.45
FREE delivery Wed, Jun 25 on your first order
1K+ bought in past month
Loading...
Gardguard 50ft Expandable Garden Hose Water Hose - Kink Free Flexible Expending Hose 50ft with 10 Function Nozzle and 3-Layers Latex, 3/4 Solid Solid Fittings, Lightweight Pipe (Blue)

Gardguard 50ft Expandable Garden Hose Water Hose - Kink Free Flexible Expending Hose 50ft with 10 Function Nozzle and 3-Layers Latex, 3/4 Solid Solid Fittings, Lightweight Pipe (Blue)

(0)
$37.99
Loading...
SUNLU High Speed PLA Meta Filament, 4KG PLA 3D Printer Tougher Filament 1.75mm, Dimensional Accuracy +/- 0.02 mm, 4kg Total, 1kg per Spool, Pack of 4, Sky Blue+Mint Green+Sunny Orange+Lemon Yellow

SUNLU High Speed PLA Meta Filament, 4KG PLA 3D Printer Tougher Filament 1.75mm, Dimensional Accuracy +/- 0.02 mm, 4kg Total, 1kg per Spool, Pack of 4, Sky Blue+Mint Green+Sunny Orange+Lemon Yellow

(2,468)
$62.99
Loading...
OVERTURE PLA Filament 1.75mm PLA 3D Printer Filament, 1kg Cardboard Spool (2.2lbs), Dimensional Accuracy +/- 0.02mm, Fit Most FDM Printer (White 1-Pack)

OVERTURE PLA Filament 1.75mm PLA 3D Printer Filament, 1kg Cardboard Spool (2.2lbs), Dimensional Accuracy +/- 0.02mm, Fit Most FDM Printer (White 1-Pack)

(18,255)
$26.99
FREE delivery Sat, Jun 14 on your first order
200+ bought in past month
Loading...
Little Ouchies Pain Fidget (4PCS), Pain Stim Fidget Toy for Adults & Teens, 3D Printed Spiky Grippie Stim Keychain, Sensory Toy for Stress Relief & Focus, Office Workers Novelty Gifts for Men (Laser)

Little Ouchies Pain Fidget (4PCS), Pain Stim Fidget Toy for Adults & Teens, 3D Printed Spiky Grippie Stim Keychain, Sensory Toy for Stress Relief & Focus, Office Workers Novelty Gifts for Men (Laser)

(38)
$17.99
FREE delivery Wed, Aug 20 on your first order
200+ bought in past month