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...

Descripción completa

Detalles Bibliográficos
Otros Autores: Gunasinghe, Nadeeshaan, author (author), Marcus, Nipuna, author
Formato: Libro electrónico
Idioma:Inglés
Publicado: [Berkeley, Calif.] : Apress [2022]
Materias:
Ver en Biblioteca Universitat Ramon Llull:https://discovery.url.edu/permalink/34CSUC_URL/1im36ta/alma991009635731806719
Tabla de Contenidos:
  • 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
  • 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.