diff --git a/lib/next_ls.ex b/lib/next_ls.ex index e268abc9..20116c50 100644 --- a/lib/next_ls.ex +++ b/lib/next_ls.ex @@ -1,60 +1,10 @@ defmodule NextLS do @moduledoc false use GenLSP + use NextLS.Aliases import NextLS.DB.Query - alias GenLSP.Enumerations.CodeActionKind - alias GenLSP.Enumerations.CompletionItemKind - alias GenLSP.Enumerations.ErrorCodes - alias GenLSP.Enumerations.FileChangeType - alias GenLSP.Enumerations.MessageType - alias GenLSP.Enumerations.SymbolKind - alias GenLSP.Enumerations.TextDocumentSyncKind - alias GenLSP.ErrorResponse - alias GenLSP.Notifications.Exit - alias GenLSP.Notifications.Initialized - alias GenLSP.Notifications.TextDocumentDidChange - alias GenLSP.Notifications.TextDocumentDidOpen - alias GenLSP.Notifications.TextDocumentDidSave - alias GenLSP.Notifications.WindowShowMessage - alias GenLSP.Notifications.WorkspaceDidChangeWatchedFiles - alias GenLSP.Notifications.WorkspaceDidChangeWorkspaceFolders - alias GenLSP.Requests.Initialize - alias GenLSP.Requests.Shutdown - alias GenLSP.Requests.TextDocumentCodeAction - alias GenLSP.Requests.TextDocumentCompletion - alias GenLSP.Requests.TextDocumentDefinition - alias GenLSP.Requests.TextDocumentDocumentSymbol - alias GenLSP.Requests.TextDocumentFormatting - alias GenLSP.Requests.TextDocumentHover - alias GenLSP.Requests.TextDocumentReferences - alias GenLSP.Requests.WorkspaceApplyEdit - alias GenLSP.Requests.WorkspaceSymbol - alias GenLSP.Structures.ApplyWorkspaceEditParams - alias GenLSP.Structures.CodeActionContext - alias GenLSP.Structures.CodeActionOptions - alias GenLSP.Structures.CodeActionParams - alias GenLSP.Structures.Diagnostic - alias GenLSP.Structures.DidChangeWatchedFilesParams - alias GenLSP.Structures.DidChangeWorkspaceFoldersParams - alias GenLSP.Structures.DidOpenTextDocumentParams - alias GenLSP.Structures.InitializeParams - alias GenLSP.Structures.InitializeResult - alias GenLSP.Structures.Location - alias GenLSP.Structures.MessageActionItem - alias GenLSP.Structures.Position - alias GenLSP.Structures.Range - alias GenLSP.Structures.SaveOptions - alias GenLSP.Structures.ServerCapabilities - alias GenLSP.Structures.ShowMessageParams - alias GenLSP.Structures.SymbolInformation - alias GenLSP.Structures.TextDocumentIdentifier - alias GenLSP.Structures.TextDocumentItem - alias GenLSP.Structures.TextDocumentSyncOptions - alias GenLSP.Structures.TextEdit - alias GenLSP.Structures.WorkspaceEdit - alias GenLSP.Structures.WorkspaceFoldersChangeEvent alias NextLS.ASTHelpers.Variables alias NextLS.Commands.Pipe alias NextLS.DB diff --git a/lib/next_ls/aliases.ex b/lib/next_ls/aliases.ex new file mode 100644 index 00000000..126b44bc --- /dev/null +++ b/lib/next_ls/aliases.ex @@ -0,0 +1,59 @@ +defmodule NextLS.Aliases do + @moduledoc false + # necessary evil, just way too many aliases + defmacro __using__(_) do + quote do + alias GenLSP.Enumerations.CodeActionKind + alias GenLSP.Enumerations.CompletionItemKind + alias GenLSP.Enumerations.ErrorCodes + alias GenLSP.Enumerations.FileChangeType + alias GenLSP.Enumerations.MessageType + alias GenLSP.Enumerations.SymbolKind + alias GenLSP.Enumerations.TextDocumentSyncKind + alias GenLSP.ErrorResponse + alias GenLSP.Notifications.Exit + alias GenLSP.Notifications.Initialized + alias GenLSP.Notifications.TextDocumentDidChange + alias GenLSP.Notifications.TextDocumentDidOpen + alias GenLSP.Notifications.TextDocumentDidSave + alias GenLSP.Notifications.WindowShowMessage + alias GenLSP.Notifications.WorkspaceDidChangeWatchedFiles + alias GenLSP.Notifications.WorkspaceDidChangeWorkspaceFolders + alias GenLSP.Requests.Initialize + alias GenLSP.Requests.Shutdown + alias GenLSP.Requests.TextDocumentCodeAction + alias GenLSP.Requests.TextDocumentCompletion + alias GenLSP.Requests.TextDocumentDefinition + alias GenLSP.Requests.TextDocumentDocumentSymbol + alias GenLSP.Requests.TextDocumentFormatting + alias GenLSP.Requests.TextDocumentHover + alias GenLSP.Requests.TextDocumentReferences + alias GenLSP.Requests.WorkspaceApplyEdit + alias GenLSP.Requests.WorkspaceSymbol + alias GenLSP.Structures.ApplyWorkspaceEditParams + alias GenLSP.Structures.CodeActionContext + alias GenLSP.Structures.CodeActionOptions + alias GenLSP.Structures.CodeActionParams + alias GenLSP.Structures.Diagnostic + alias GenLSP.Structures.DidChangeWatchedFilesParams + alias GenLSP.Structures.DidChangeWorkspaceFoldersParams + alias GenLSP.Structures.DidOpenTextDocumentParams + alias GenLSP.Structures.InitializeParams + alias GenLSP.Structures.InitializeResult + alias GenLSP.Structures.Location + alias GenLSP.Structures.MessageActionItem + alias GenLSP.Structures.Position + alias GenLSP.Structures.Range + alias GenLSP.Structures.SaveOptions + alias GenLSP.Structures.ServerCapabilities + alias GenLSP.Structures.ShowMessageParams + alias GenLSP.Structures.SymbolInformation + alias GenLSP.Structures.TextDocumentIdentifier + alias GenLSP.Structures.TextDocumentItem + alias GenLSP.Structures.TextDocumentSyncOptions + alias GenLSP.Structures.TextEdit + alias GenLSP.Structures.WorkspaceEdit + alias GenLSP.Structures.WorkspaceFoldersChangeEvent + end + end +end