Skip to content

Commit

Permalink
feat(neovim): bundled neoclide/neovim
Browse files Browse the repository at this point in the history
Closes #5194
  • Loading branch information
fannheyward committed Nov 21, 2024
1 parent dbfa1c9 commit 07ea101
Show file tree
Hide file tree
Showing 191 changed files with 3,190 additions and 229 deletions.
17 changes: 6 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"vscode-languageserver": "^9.0.1"
},
"dependencies": {
"@chemzqm/neovim": "^6.1.2",
"@chemzqm/msgpack-lite": "^0.1.29",
"ansi-styles": "^5.2.0",
"bytes": "^3.1.2",
"cli-table": "^0.3.11",
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/client/diagnostics.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import os from 'os'
import path from 'path'
import { v4 as uuid } from 'uuid'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/client/progressPart.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Emitter, Event, NotificationHandler, WorkDoneProgressBegin, WorkDoneProgressEnd, WorkDoneProgressReport } from 'vscode-languageserver-protocol'
import { ProgressContext, ProgressPart } from '../../language-client/progressPart'
import helper from '../helper'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/client/textSynchronization.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import fs from 'fs'
import os from 'os'
import path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/completion/basic.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, Disposable, Position, TextEdit } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import completion, { Completion } from '../../completion'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/completion/float.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import Floating from '../../completion/floating'
import { getInsertWord, prefixWord } from '../../completion/pum'
import sources from '../../completion/sources'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/completion/language.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, Disposable } from 'vscode-languageserver-protocol'
import { CompletionItem, CompletionItemKind, CompletionList, InsertReplaceEdit, InsertTextFormat, InsertTextMode, Position, Range, TextEdit } from 'vscode-languageserver-types'
import commandManager from '../../commands'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/completion/sources.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import path from 'path'
import os from 'os'
import fs from 'fs'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/completion/util.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, CompletionItem, CompletionItemKind, CompletionItemTag, Disposable, InsertTextFormat, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import { caseScore, matchScore, matchScoreWithPositions } from '../../completion/match'
import sources from '../../completion/sources'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/autocmds.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, Emitter } from 'vscode-languageserver-protocol'
import { URI } from 'vscode-uri'
import { createCommand } from '../../core/autocmds'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/documents.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import fs from 'fs'
import os from 'os'
import path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/editors.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import Editors, { TextEditor, renamed } from '../../core/editors'
import workspace from '../../workspace'
import window from '../../window'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/files.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Buffer, Neovim } from '@chemzqm/neovim'
import { Buffer, Neovim } from '../../neovim'
import fs from 'fs'
import os from 'os'
import path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/keymaps.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import workspace from '../../workspace'
import Keymaps, { getBufnr, getKeymapModifier } from '../../core/keymaps'
import helper from '../helper'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/locations.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import os from 'os'
import path from 'path'
import { Location, Position, Range } from 'vscode-languageserver-protocol'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/terminals.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import os from 'os'
import path from 'path'
import which from 'which'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/ui.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Position, Range } from 'vscode-languageserver-types'
import * as ui from '../../core/ui'
import helper from '../helper'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/core/workspaceFolder.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import fs from 'fs'
import os from 'os'
import path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/callHierarchy.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, CallHierarchyItem, SymbolKind, Range, SymbolTag, CancellationToken, Position } from 'vscode-languageserver-protocol'
import CallHierarchyHandler from '../../handler/callHierarchy'
import languages from '../../languages'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/codeActions.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, CodeAction, CodeActionContext, CodeActionKind, Command, Disposable, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import { TextDocument } from 'vscode-languageserver-textdocument'
import commands from '../../commands'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/codelens.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, CodeLens, Command, Disposable, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import events from '../../events'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/commands.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable } from 'vscode-languageserver-protocol'
import commandManager from '../../commands'
import CommandsHandler from '../../handler/commands'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/documentColors.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, Color, ColorInformation, ColorPresentation, Disposable, Position, Range } from 'vscode-languageserver-protocol'
import { TextDocument } from 'vscode-languageserver-textdocument'
import commands from '../../commands'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/documentLinks.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, Disposable, DocumentLink, Range } from 'vscode-languageserver-protocol'
import { TextDocument } from 'vscode-languageserver-textdocument'
import events from '../../events'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/fold.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, CancellationTokenSource, Disposable, FoldingRange } from 'vscode-languageserver-protocol'
import FoldHandler from '../../handler/fold'
import languages from '../../languages'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/format.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, CancellationTokenSource, Disposable, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import Format from '../../handler/format'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/highlights.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, DocumentHighlightKind, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import Highlights from '../../handler/highlights'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/hover.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, MarkedString, Hover, Range, TextEdit, Position, CancellationToken, MarkupKind } from 'vscode-languageserver-protocol'
import HoverHandler, { addDefinitions, addDocument, isDocumentation, readLines } from '../../handler/hover'
import { URI } from 'vscode-uri'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, SymbolKind } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import Handler from '../../handler/index'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/inlayHint.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationTokenSource, Disposable, InlayHint, InlayHintKind, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import InlayHintHandler from '../../handler/inlayHint/index'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/inlineValue.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, Disposable, InlineValueText, Range } from 'vscode-languageserver-protocol'
import languages, { ProviderName } from '../../languages'
import { disposeAll } from '../../util'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/linkedEditing.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import LinkedEditingHandler from '../../handler/linkedEditing'
import languages from '../../languages'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/locations.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, LocationLink, Location, Range, Position, CancellationTokenSource, CancellationToken } from 'vscode-languageserver-protocol'
import LocationHandler from '../../handler/locations'
import languages from '../../languages'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/outline.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Buffer, Neovim } from '@chemzqm/neovim'
import { Buffer, Neovim } from '../../neovim'
import { CodeAction, CodeActionKind, Disposable, DocumentSymbol, Range, SymbolKind, SymbolTag, TextEdit } from 'vscode-languageserver-protocol'
import events from '../../events'
import Symbols from '../../handler/symbols/index'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/refactor.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import fs from 'fs'
import { Position, Range, TextDocumentEdit, TextEdit, WorkspaceEdit } from 'vscode-languageserver-types'
import { URI } from 'vscode-uri'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/rename.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, Disposable, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import { TextDocument } from 'vscode-languageserver-textdocument'
import commands from '../../commands'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/search.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import Refactor from '../../handler/refactor'
import Search, { getPathFromArgs } from '../../handler/refactor/search'
import helper from '../helper'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/selectionRange.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, Disposable, Position, Range, TextEdit } from 'vscode-languageserver-protocol'
import SelectionRange from '../../handler/selectionRange'
import languages from '../../languages'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/semanticTokens.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Buffer, Neovim } from '@chemzqm/neovim'
import { Buffer, Neovim } from '../../neovim'
import fs from 'fs'
import os from 'os'
import path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/signature.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable, ParameterInformation, SignatureInformation } from 'vscode-languageserver-protocol'
import commands from '../../commands'
import Signature from '../../handler/signature'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/symbols.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Buffer, Neovim } from '@chemzqm/neovim'
import { Buffer, Neovim } from '../../neovim'
import { CancellationToken, Disposable, Range, SymbolInformation, SymbolKind } from 'vscode-languageserver-protocol'
import events from '../../events'
import Symbols from '../../handler/symbols/index'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/typeHierarchy.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { CancellationToken, TypeHierarchyItem, Disposable, Range, SymbolKind, Position, SymbolTag } from 'vscode-languageserver-protocol'
import { URI } from 'vscode-uri'
import languages, { ProviderName } from '../../languages'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/handler/workspace.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import fs from 'fs'
import os from 'os'
import path from 'path'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/helper.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Buffer, Neovim, Window } from '@chemzqm/neovim'
import type { Buffer, Neovim, Window } from '../neovim'
import * as cp from 'child_process'
import { EventEmitter } from 'events'
import fs from 'fs'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/list/commandTask.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import path from 'path'
import { ListContext, ListTask } from '../../list/types'
import manager from '../../list/manager'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/list/manager.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim, Window } from '@chemzqm/neovim'
import { Neovim, Window } from '../../neovim'
import EventEmitter from 'events'
import path from 'path'
import { Range } from 'vscode-languageserver-types'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/list/mappings.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import path from 'path'
import { CancellationToken, Disposable } from 'vscode-languageserver-protocol'
import BasicList from '../../list/basic'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/list/session.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Disposable } from 'vscode-languageserver-protocol'
import BasicList from '../../list/basic'
import manager from '../../list/manager'
Expand Down
6 changes: 3 additions & 3 deletions src/__tests__/list/sources.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import fs from 'fs'
import os from 'os'
import { v4 as uuid } from 'uuid'
Expand Down Expand Up @@ -696,7 +696,7 @@ describe('list sources', () => {

const workspaceFolder = path.join(__dirname, 'workspace-folder1')
jest.spyOn(workspace, 'getWorkspaceFolder').mockReturnValue({
name : 'workspace-folder1',
name: 'workspace-folder1',
uri: URI.file(workspaceFolder).toString()
})
await manager.start(['diagnostics', '--workspace-folder'])
Expand All @@ -721,7 +721,7 @@ describe('list sources', () => {

const workspaceFolder = path.join(__dirname, 'workspace-folder4')
jest.spyOn(workspace, 'getWorkspaceFolder').mockReturnValue({
name : 'workspace-folder4',
name: 'workspace-folder4',
uri: URI.file(workspaceFolder).toString()
})
await manager.start(['diagnostics', '--workspace-folder'])
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/list/ui.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { EventEmitter } from 'events'
import { Disposable } from 'vscode-languageserver-protocol'
import BasicList from '../../list/basic'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/list/worker.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import styles from 'ansi-styles'
import { EventEmitter } from 'events'
import { CancellationToken, Disposable } from 'vscode-languageserver-protocol'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/modules/attach.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import events from '../../events'
import helper from '../helper'
import workspace from '../../workspace'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/modules/cursors.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { Position, Range, TextEdit } from 'vscode-languageserver-types'
import Cursors from '../../cursors'
import CursorsSession, { surrondChanges } from '../../cursors/session'
Expand Down
2 changes: 1 addition & 1 deletion src/__tests__/modules/diagnosticBuffer.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import helper from '../helper'
import { Neovim } from '@chemzqm/neovim'
import { Neovim } from '../../neovim'
import { DiagnosticBuffer } from '../../diagnostic/buffer'
import { Range, DiagnosticSeverity, Diagnostic, DiagnosticTag, Position, TextEdit } from 'vscode-languageserver-types'
import workspace from '../../workspace'
Expand Down
Loading

0 comments on commit 07ea101

Please sign in to comment.