diff --git a/src/ast.ts b/src/ast.ts index 167d733..01d8626 100644 --- a/src/ast.ts +++ b/src/ast.ts @@ -4,9 +4,9 @@ import { Emitter, Range, RequestType, - StaticFeature, - TextDocumentIdentifier, - TreeDataProvider, + type StaticFeature, + type TextDocumentIdentifier, + type TreeDataProvider, TreeItem, TreeItemCollapsibleState, Uri, @@ -14,7 +14,7 @@ import { window, workspace, } from 'coc.nvim'; -import { Ctx } from './ctx'; +import type { Ctx } from './ctx'; // The wire format: we send a position, and get back a tree of ASTNode. interface ASTParams { diff --git a/src/cmds.ts b/src/cmds.ts index 02d407f..f81c4a3 100644 --- a/src/cmds.ts +++ b/src/cmds.ts @@ -1,7 +1,7 @@ -import * as fs from 'fs'; -import * as path from 'path'; -import { RequestType, TextDocumentIdentifier, TextDocumentPositionParams, Uri, window, workspace } from 'coc.nvim'; -import { Ctx } from './ctx'; +import * as fs from 'node:fs'; +import * as path from 'node:path'; +import { RequestType, type TextDocumentIdentifier, type TextDocumentPositionParams, Uri, window, workspace } from 'coc.nvim'; +import type { Ctx } from './ctx'; namespace SwitchSourceHeaderRequest { export const type = new RequestType('textDocument/switchSourceHeader'); diff --git a/src/config.ts b/src/config.ts index 109a5b8..9e33ce4 100644 --- a/src/config.ts +++ b/src/config.ts @@ -1,4 +1,4 @@ -import { WorkspaceConfiguration, workspace } from 'coc.nvim'; +import { type WorkspaceConfiguration, workspace } from 'coc.nvim'; export class Config { private cfg: WorkspaceConfiguration; diff --git a/src/ctx.ts b/src/ctx.ts index 11b0286..05e928d 100644 --- a/src/ctx.ts +++ b/src/ctx.ts @@ -1,18 +1,18 @@ -import { existsSync } from 'fs'; -import { join } from 'path'; +import { existsSync } from 'node:fs'; +import { join } from 'node:path'; import { CompletionItemKind, - Disposable, - DocumentSelector, - Executable, - ExtensionContext, + type Disposable, + type DocumentSelector, + type Executable, + type ExtensionContext, InsertTextFormat, LanguageClient, - LanguageClientOptions, - LinesTextDocument, - ServerOptions, - StaticFeature, - TextEdit, + type LanguageClientOptions, + type LinesTextDocument, + type ServerOptions, + type StaticFeature, + type TextEdit, services, workspace, } from 'coc.nvim'; diff --git a/src/file-status.ts b/src/file-status.ts index 02280fc..4f61c2a 100644 --- a/src/file-status.ts +++ b/src/file-status.ts @@ -1,5 +1,5 @@ -import { Disposable, StatusBarItem, window, workspace } from 'coc.nvim'; -import { Config } from './config'; +import { type Disposable, type StatusBarItem, window, workspace } from 'coc.nvim'; +import type { Config } from './config'; export interface Status { uri: string; diff --git a/src/index.ts b/src/index.ts index b911e90..54a2983 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,8 +1,8 @@ -import { ExtensionContext, State, commands, services, window, workspace } from 'coc.nvim'; +import { type ExtensionContext, State, commands, services, window, workspace } from 'coc.nvim'; import { ASTFeature } from './ast'; import * as cmds from './cmds'; import { ClangdExtensionFeature, Ctx } from './ctx'; -import { FileStatus, Status } from './file-status'; +import { FileStatus, type Status } from './file-status'; import { InlayHintsFeature } from './inlay-hints'; import * as install from './install'; import { MemoryUsageFeature } from './memory-usage'; diff --git a/src/inlay-hints.ts b/src/inlay-hints.ts index 33068c7..d9e7287 100644 --- a/src/inlay-hints.ts +++ b/src/inlay-hints.ts @@ -1,19 +1,19 @@ import { - CancellationToken, - FeatureState, - InlayHint, + type CancellationToken, + type FeatureState, + type InlayHint, InlayHintKind, - InlayHintsProvider, - LinesTextDocument, - Position, - Range, + type InlayHintsProvider, + type LinesTextDocument, + type Position, + type Range, RequestType, - StaticFeature, - TextDocumentIdentifier, + type StaticFeature, + type TextDocumentIdentifier, languages, } from 'coc.nvim'; -import { Ctx, documentSelector } from './ctx'; +import { type Ctx, documentSelector } from './ctx'; namespace protocol { export interface InlayHint { diff --git a/src/install.ts b/src/install.ts index 64286a9..2c01ca7 100644 --- a/src/install.ts +++ b/src/install.ts @@ -1,4 +1,4 @@ -import { homedir } from 'os'; +import { homedir } from 'node:os'; import * as common from '@clangd/install'; import * as coc from 'coc.nvim'; import { find } from 'fs-jetpack'; diff --git a/src/memory-usage.ts b/src/memory-usage.ts index 541635c..6ae20f6 100644 --- a/src/memory-usage.ts +++ b/src/memory-usage.ts @@ -1,7 +1,7 @@ // Implements the "memory usage" feature. -import { RequestType0, StaticFeature, commands, window } from 'coc.nvim'; -import { Ctx } from './ctx'; +import { RequestType0, type StaticFeature, commands, window } from 'coc.nvim'; +import type { Ctx } from './ctx'; // LSP wire format for this clangd feature. interface WireTree {