وبلاگ بلیان

LANGUAGE SERVER PROTOCOL AND IMPLEMENTATION : supporting language-smart editing and... programming tools

جلد کتاب LANGUAGE SERVER PROTOCOL AND IMPLEMENTATION : supporting language-smart editing and... programming tools

معرفی کتاب «LANGUAGE SERVER PROTOCOL AND IMPLEMENTATION : supporting language-smart editing and... programming tools» نوشتهٔ Nadeeshaan Gunasinghe, Nipuna Marcus، منتشرشده توسط نشر Apress : Imprint: Apress در سال 2021. این کتاب در فرمت pdf، زبان انگلیسی ارائه شده است.

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 to do the job once in a way that can be shared and reused. This book covers the language server protocol used for communication between programming tools and your language server. The book also provides an in-depth understanding of the design, implementation, and user experience aspects which should be considered when implementing a language server. The book walks you through an example language server implementation to illustrate the basic concepts, then goes on to cover advanced aspects of language server use such as progress reporting, launchers, and extension points. User experience is an important aspect of language server implementation and different tooling vendors strive to provide their own unique user experiences. This book explains how the protocol features can be leveraged to address the unique developer experience provided by different tooling vendors. The book also shows how to enhance the smoothness of the editing experience by orchestrating multiple features together. What You Will Learn Implement a language server from scratch Understand language server protocol and its data models Leverage the protocol while preserving the unique user experience of different editors Extend the protocol to support more than its standard capabilities Run a language server on top of launchers such as standard I/O and TCP socket Seamlessly incorporate language semantics into your protocol features Who This Book Is For Developers focused on and passionate about implementing language development tools such as plug-ins and extensions for interactive development environments (IDEs) or other tools that rely upon parsing of language statements and commands, and developers who need an in-depth understanding of the language server protocol as well as how to use the language server protocol to develop extensible language services 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 Initialization and Capabilities Client Capabilities Server Capabilities Generating the Response CodeLens Resolve CodeLens Refresh Summary Chapter 8: Code Navigation and Navigation Helpers Reference Client Capabilities Server Capabilities Generating the Response Definition Client Capabilities Server Capabilities Generating the Response Type Definition Client Capabilities Server Capabilities Generating the Response Implementation Client Capabilities Server Capabilities Generating the Response Declaration Client Capabilities Server Capabilities Generating the Response Document Symbol Client Capabilities Server Capabilities Generating the Response Using SymbolInformation Using DocumentSymbol Document Highlight Client Capabilities Server Capabilities Generating the Response Document Link Client Capabilities Server Capabilities Generating the Response Document Link Resolve Summary Chapter 9: Presentation and Selection Semantic Tokens Client Capabilities Server Capabilities Generating the Response Semantic Tokens for Whole Document – full Semantic Tokens for Whole Document – full/delta Semantic Tokens for a Range – range Encoding and Decoding a Token Document Color Client Capabilities Server Capabilities Generating the Response Color Presentation Generating the Response Folding Range Client Capabilities Server Capabilities Generating the Response Selection Range Client Capabilities Server Capabilities Generating the Response Linked Editing Range Client Capabilities Server Capabilities Generating the Response Prepare Call Hierarchy Client Capabilities Server Capabilities Generating the Response Call Hierarchy Incoming Generating the Response Call Hierarchy Outgoing Generating the Response Summary Chapter 10: Workspace Operations Workspace Folders Client Capabilities Server Capabilities Sending the Request Workspace Folders Change Notification Client Capabilities Server Capabilities Processing the Notification Notification of Configuration Change Client Capabilities Processing the Notification Configuration Client Capabilities Generating the Request Watched Files Change Notification Client Capabilities Registration Options Processing the Notification Workspace Symbol Client Capabilities Server Capabilities and Registration Options Generating the Response Execute Command Client Capabilities Server Capabilities Executing the Command Apply Edit Client Capabilities Sending the Request Will Create Files Client Capabilities Registration Options Generating the Response Did Create Files Client Capabilities Server Capabilities Handling the Notification Will Rename Files Client Capabilities Server Capabilities Generating the Response Did Rename Files Client Capabilities Server Capabilities Handling the Notification Will Delete Files Client Capabilities Server Capabilities Generating the Response Deleted Files Notification Client Capabilities Server Capabilities Handling the Notification Summary Chapter 11: Advanced Concepts Work Done Progress Begin Progress Report Progress End Progress Implementing the Server-Initiated Progress Partial Result Support Working with Launchers Extension Points Implementing and Extending Protocol Services Request Parameters Response Parameters Implementing the Service Supporting Multiple Languages Dynamic Registration of Capabilities Implementing a Delegator Mechanism Summary Index
دانلود کتاب LANGUAGE SERVER PROTOCOL AND IMPLEMENTATION : supporting language-smart editing and... programming tools