Language server protocol and implementation : supporting language-smart editing and programming tools /
Understand the important aspects of implementing a production-grade language server in support of language-smart tools such as code editors and other programming utilities. This book shows you how to create a single implementation of a language server that can be used by multiple tools, enabling you...
| Main Authors: | , |
|---|---|
| Format: | eBook |
| Language: | English |
| Published: |
California :
Apress,
[2022]
|
| Subjects: | |
| Online Access: | Connect to the full text of this electronic book |
Table of Contents:
- Intro
- Table of Contents
- About the Authors
- About the Technical Reviewer
- Acknowledgments
- Introduction
- Chapter 1: Developer Tools and Language Services
- Early Programmable Computers
- Code Forms and Punched Cards
- Text Editors vs. Source Code Editors
- Why IDEs
- Language Intelligence
- Summary
- Chapter 2: Understanding the Language Server Protocol
- Understanding JSON-RPC
- Request Object
- jsonrpc
- method
- params
- id
- Notification
- Response Object
- jsonrpc
- result
- error
- id
- Error Object
- code
- message
- data
- Batch
- Understanding the Base Protocol
- Header Part
- Content Part
- Communication Model
- General Messages
- Outline Placeholder
- window
- telemetry
- workspace
- textDocument
- Summary
- Chapter 3: Implementing a Language Server
- Tools and Dependencies
- Building the Project
- Compatibility with Ballerina
- Debugging the Client and the Server
- Understanding the Main Components
- Server API
- Server Core
- Client Implementation
- Summary
- Chapter 4: General Messages
- General Messages
- Initialize
- Generating the InitializeResult
- Initialized
- Shutdown
- Exit
- Window Operations
- ShowMessage
- ShowMessageRequest
- Generating the Request
- ShowDocument
- Generating the Request
- LogMessage
- Progress/Create
- Progress/Cancel
- Summary
- Chapter 5: Text Synchronization
- General Capabilities
- didOpen
- Indexing and Project Initialization
- didChange
- willSave
- willSaveWaitUntil
- didSave
- didClose
- Summary
- Chapter 6: Diagnostics, Smart Editing, and Documentation
- Diagnostics
- Initialization and Capabilities
- Publishing the Diagnostics
- Completion
- Initialization and Capabilities
- Client Capabilities
- Server Capabilities
- Generating the Completions
- Text Insertion
- Documentation and Additional Information
- Sorting and Filtering
- Completion Resolve
- Signature Help
- Initialization and Capabilities
- Client Capabilities
- Server Capabilities
- Generating the Signature Help
- Hover
- Initialization and Capabilities
- Client Capabilities
- Generating the Hover
- Summary
- Chapter 7: Refactoring and Code Fixes
- Rename
- Initialization and Capabilities
- Client Capabilities
- Server Capabilities
- Generating the Workspace Edit
- Prepare Rename
- Formatting
- Initialization and Capabilities
- Client Capabilities
- Server Capabilities
- Generating the Formatting TextEdits
- Range Formatting
- Initialization and Capabilities
- Generating the Range Formatting TextEdits
- On Type Formatting
- Initialization and Capabilities
- Client Capabilities
- Server Capabilities
- Generating the On Type Formatting TextEdits
- Code Actions
- Initialization and Capabilities
- Client Capabilities
- Server Capabilities
- Generating the CodeAction
- Request Parameters
- Generating the Response
- Code Actions Resolve
- CodeLens