golang.org/x/tools/gopls@v0.15.3/internal/server/unimplemented.go (about) 1 // Copyright 2023 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 package server 6 7 // This file defines the LSP server methods that gopls does not currently implement. 8 9 import ( 10 "context" 11 "fmt" 12 13 "golang.org/x/tools/gopls/internal/protocol" 14 "golang.org/x/tools/internal/jsonrpc2" 15 ) 16 17 func (s *server) ColorPresentation(context.Context, *protocol.ColorPresentationParams) ([]protocol.ColorPresentation, error) { 18 return nil, notImplemented("ColorPresentation") 19 } 20 21 func (s *server) Declaration(context.Context, *protocol.DeclarationParams) (*protocol.Or_textDocument_declaration, error) { 22 return nil, notImplemented("Declaration") 23 } 24 25 func (s *server) Diagnostic(context.Context, *string) (*string, error) { 26 return nil, notImplemented("Diagnostic") 27 } 28 29 func (s *server) DiagnosticWorkspace(context.Context, *protocol.WorkspaceDiagnosticParams) (*protocol.WorkspaceDiagnosticReport, error) { 30 return nil, notImplemented("DiagnosticWorkspace") 31 } 32 33 func (s *server) DidChangeNotebookDocument(context.Context, *protocol.DidChangeNotebookDocumentParams) error { 34 return notImplemented("DidChangeNotebookDocument") 35 } 36 37 func (s *server) DidCloseNotebookDocument(context.Context, *protocol.DidCloseNotebookDocumentParams) error { 38 return notImplemented("DidCloseNotebookDocument") 39 } 40 41 func (s *server) DidCreateFiles(context.Context, *protocol.CreateFilesParams) error { 42 return notImplemented("DidCreateFiles") 43 } 44 45 func (s *server) DidDeleteFiles(context.Context, *protocol.DeleteFilesParams) error { 46 return notImplemented("DidDeleteFiles") 47 } 48 49 func (s *server) DidOpenNotebookDocument(context.Context, *protocol.DidOpenNotebookDocumentParams) error { 50 return notImplemented("DidOpenNotebookDocument") 51 } 52 53 func (s *server) DidRenameFiles(context.Context, *protocol.RenameFilesParams) error { 54 return notImplemented("DidRenameFiles") 55 } 56 57 func (s *server) DidSaveNotebookDocument(context.Context, *protocol.DidSaveNotebookDocumentParams) error { 58 return notImplemented("DidSaveNotebookDocument") 59 } 60 61 func (s *server) DocumentColor(context.Context, *protocol.DocumentColorParams) ([]protocol.ColorInformation, error) { 62 return nil, notImplemented("DocumentColor") 63 } 64 65 func (s *server) InlineCompletion(context.Context, *protocol.InlineCompletionParams) (*protocol.Or_Result_textDocument_inlineCompletion, error) { 66 return nil, notImplemented("InlineCompletion") 67 } 68 69 func (s *server) InlineValue(context.Context, *protocol.InlineValueParams) ([]protocol.InlineValue, error) { 70 return nil, notImplemented("InlineValue") 71 } 72 73 func (s *server) LinkedEditingRange(context.Context, *protocol.LinkedEditingRangeParams) (*protocol.LinkedEditingRanges, error) { 74 return nil, notImplemented("LinkedEditingRange") 75 } 76 77 func (s *server) Moniker(context.Context, *protocol.MonikerParams) ([]protocol.Moniker, error) { 78 return nil, notImplemented("Moniker") 79 } 80 81 func (s *server) OnTypeFormatting(context.Context, *protocol.DocumentOnTypeFormattingParams) ([]protocol.TextEdit, error) { 82 return nil, notImplemented("OnTypeFormatting") 83 } 84 85 func (s *server) PrepareTypeHierarchy(context.Context, *protocol.TypeHierarchyPrepareParams) ([]protocol.TypeHierarchyItem, error) { 86 return nil, notImplemented("PrepareTypeHierarchy") 87 } 88 89 func (s *server) Progress(context.Context, *protocol.ProgressParams) error { 90 return notImplemented("Progress") 91 } 92 93 func (s *server) RangeFormatting(context.Context, *protocol.DocumentRangeFormattingParams) ([]protocol.TextEdit, error) { 94 return nil, notImplemented("RangeFormatting") 95 } 96 97 func (s *server) RangesFormatting(context.Context, *protocol.DocumentRangesFormattingParams) ([]protocol.TextEdit, error) { 98 return nil, notImplemented("RangesFormatting") 99 } 100 101 func (s *server) Resolve(context.Context, *protocol.InlayHint) (*protocol.InlayHint, error) { 102 return nil, notImplemented("Resolve") 103 } 104 105 func (s *server) ResolveCodeLens(context.Context, *protocol.CodeLens) (*protocol.CodeLens, error) { 106 return nil, notImplemented("ResolveCodeLens") 107 } 108 109 func (s *server) ResolveCompletionItem(context.Context, *protocol.CompletionItem) (*protocol.CompletionItem, error) { 110 return nil, notImplemented("ResolveCompletionItem") 111 } 112 113 func (s *server) ResolveDocumentLink(context.Context, *protocol.DocumentLink) (*protocol.DocumentLink, error) { 114 return nil, notImplemented("ResolveDocumentLink") 115 } 116 117 func (s *server) ResolveWorkspaceSymbol(context.Context, *protocol.WorkspaceSymbol) (*protocol.WorkspaceSymbol, error) { 118 return nil, notImplemented("ResolveWorkspaceSymbol") 119 } 120 121 func (s *server) SemanticTokensFullDelta(context.Context, *protocol.SemanticTokensDeltaParams) (interface{}, error) { 122 return nil, notImplemented("SemanticTokensFullDelta") 123 } 124 125 func (s *server) SetTrace(context.Context, *protocol.SetTraceParams) error { 126 return notImplemented("SetTrace") 127 } 128 129 func (s *server) Subtypes(context.Context, *protocol.TypeHierarchySubtypesParams) ([]protocol.TypeHierarchyItem, error) { 130 return nil, notImplemented("Subtypes") 131 } 132 133 func (s *server) Supertypes(context.Context, *protocol.TypeHierarchySupertypesParams) ([]protocol.TypeHierarchyItem, error) { 134 return nil, notImplemented("Supertypes") 135 } 136 137 func (s *server) WillCreateFiles(context.Context, *protocol.CreateFilesParams) (*protocol.WorkspaceEdit, error) { 138 return nil, notImplemented("WillCreateFiles") 139 } 140 141 func (s *server) WillDeleteFiles(context.Context, *protocol.DeleteFilesParams) (*protocol.WorkspaceEdit, error) { 142 return nil, notImplemented("WillDeleteFiles") 143 } 144 145 func (s *server) WillRenameFiles(context.Context, *protocol.RenameFilesParams) (*protocol.WorkspaceEdit, error) { 146 return nil, notImplemented("WillRenameFiles") 147 } 148 149 func (s *server) WillSave(context.Context, *protocol.WillSaveTextDocumentParams) error { 150 return notImplemented("WillSave") 151 } 152 153 func (s *server) WillSaveWaitUntil(context.Context, *protocol.WillSaveTextDocumentParams) ([]protocol.TextEdit, error) { 154 return nil, notImplemented("WillSaveWaitUntil") 155 } 156 157 func notImplemented(method string) error { 158 return fmt.Errorf("%w: %q not yet implemented", jsonrpc2.ErrMethodNotFound, method) 159 }