summaryrefslogtreecommitdiff
path: root/cli/lsp
diff options
context:
space:
mode:
Diffstat (limited to 'cli/lsp')
-rw-r--r--cli/lsp/analysis.rs10
-rw-r--r--cli/lsp/cache.rs8
-rw-r--r--cli/lsp/code_lens.rs4
-rw-r--r--cli/lsp/completions.rs2
-rw-r--r--cli/lsp/diagnostics.rs25
-rw-r--r--cli/lsp/documents.rs8
-rw-r--r--cli/lsp/language_server.rs30
-rw-r--r--cli/lsp/mod.rs2
-rw-r--r--cli/lsp/registries.rs22
-rw-r--r--cli/lsp/semantic_tokens.rs4
-rw-r--r--cli/lsp/tsc.rs46
-rw-r--r--cli/lsp/urls.rs2
12 files changed, 77 insertions, 86 deletions
diff --git a/cli/lsp/analysis.rs b/cli/lsp/analysis.rs
index c63b16ce6..f789cf2fc 100644
--- a/cli/lsp/analysis.rs
+++ b/cli/lsp/analysis.rs
@@ -173,7 +173,7 @@ fn check_specifier(
/// For a set of tsc changes, can them for any that contain something that looks
/// like an import and rewrite the import specifier to include the extension
-pub(crate) fn fix_ts_import_changes(
+pub fn fix_ts_import_changes(
referrer: &ModuleSpecifier,
changes: &[tsc::FileTextChanges],
documents: &Documents,
@@ -323,7 +323,7 @@ fn is_preferred(
/// Convert changes returned from a TypeScript quick fix action into edits
/// for an LSP CodeAction.
-pub(crate) async fn ts_changes_to_edit(
+pub async fn ts_changes_to_edit(
changes: &[tsc::FileTextChanges],
language_server: &language_server::Inner,
) -> Result<Option<lsp::WorkspaceEdit>, AnyError> {
@@ -366,7 +366,7 @@ pub struct CodeActionCollection {
}
impl CodeActionCollection {
- pub(crate) fn add_deno_fix_action(
+ pub fn add_deno_fix_action(
&mut self,
specifier: &ModuleSpecifier,
diagnostic: &lsp::Diagnostic,
@@ -376,7 +376,7 @@ impl CodeActionCollection {
Ok(())
}
- pub(crate) fn add_deno_lint_ignore_action(
+ pub fn add_deno_lint_ignore_action(
&mut self,
specifier: &ModuleSpecifier,
diagnostic: &lsp::Diagnostic,
@@ -539,7 +539,7 @@ impl CodeActionCollection {
}
/// Add a TypeScript code fix action to the code actions collection.
- pub(crate) async fn add_ts_fix_action(
+ pub async fn add_ts_fix_action(
&mut self,
specifier: &ModuleSpecifier,
action: &tsc::CodeFixAction,
diff --git a/cli/lsp/cache.rs b/cli/lsp/cache.rs
index f94faa419..bdf9db607 100644
--- a/cli/lsp/cache.rs
+++ b/cli/lsp/cache.rs
@@ -35,7 +35,7 @@ type Request = (
/// A "server" that handles requests from the language server to cache modules
/// in its own thread.
#[derive(Debug)]
-pub(crate) struct CacheServer(mpsc::UnboundedSender<Request>);
+pub struct CacheServer(mpsc::UnboundedSender<Request>);
impl CacheServer {
pub async fn new(
@@ -121,7 +121,7 @@ impl CacheServer {
}
/// Calculate a version for for a given path.
-pub(crate) fn calculate_fs_version(path: &Path) -> Option<String> {
+pub fn calculate_fs_version(path: &Path) -> Option<String> {
let metadata = fs::metadata(path).ok()?;
if let Ok(modified) = metadata.modified() {
if let Ok(n) = modified.duration_since(SystemTime::UNIX_EPOCH) {
@@ -146,7 +146,7 @@ fn parse_metadata(
}
#[derive(Debug, PartialEq, Eq, Hash)]
-pub(crate) enum MetadataKey {
+pub enum MetadataKey {
/// Represent the `x-deno-warning` header associated with the document
Warning,
}
@@ -158,7 +158,7 @@ struct Metadata {
}
#[derive(Debug, Default, Clone)]
-pub(crate) struct CacheMetadata {
+pub struct CacheMetadata {
cache: http_cache::HttpCache,
metadata: Arc<Mutex<HashMap<ModuleSpecifier, Metadata>>>,
}
diff --git a/cli/lsp/code_lens.rs b/cli/lsp/code_lens.rs
index 9a07cc21d..e750aadc0 100644
--- a/cli/lsp/code_lens.rs
+++ b/cli/lsp/code_lens.rs
@@ -377,7 +377,7 @@ async fn resolve_references_code_lens(
}
}
-pub(crate) async fn resolve_code_lens(
+pub async fn resolve_code_lens(
code_lens: lsp::CodeLens,
language_server: &language_server::Inner,
) -> Result<lsp::CodeLens, AnyError> {
@@ -393,7 +393,7 @@ pub(crate) async fn resolve_code_lens(
}
}
-pub(crate) async fn collect(
+pub async fn collect(
specifier: &ModuleSpecifier,
parsed_source: Option<ParsedSource>,
config: &Config,
diff --git a/cli/lsp/completions.rs b/cli/lsp/completions.rs
index 517d58199..b727c6198 100644
--- a/cli/lsp/completions.rs
+++ b/cli/lsp/completions.rs
@@ -124,7 +124,7 @@ fn to_narrow_lsp_range(
/// Given a specifier, a position, and a snapshot, optionally return a
/// completion response, which will be valid import completions for the specific
/// context.
-pub(crate) async fn get_import_completions(
+pub async fn get_import_completions(
specifier: &ModuleSpecifier,
position: &lsp::Position,
config: &ConfigSnapshot,
diff --git a/cli/lsp/diagnostics.rs b/cli/lsp/diagnostics.rs
index 8a515ef3c..59fc1c43b 100644
--- a/cli/lsp/diagnostics.rs
+++ b/cli/lsp/diagnostics.rs
@@ -36,7 +36,7 @@ use tokio::sync::Mutex;
use tokio::time::Duration;
use tokio_util::sync::CancellationToken;
-pub(crate) type SnapshotForDiagnostics =
+pub type SnapshotForDiagnostics =
(Arc<StateSnapshot>, Arc<ConfigSnapshot>, Option<LintConfig>);
pub type DiagnosticRecord =
(ModuleSpecifier, Option<i32>, Vec<lsp::Diagnostic>);
@@ -137,7 +137,7 @@ impl TsDiagnosticsStore {
}
#[derive(Debug)]
-pub(crate) struct DiagnosticsServer {
+pub struct DiagnosticsServer {
channel: Option<mpsc::UnboundedSender<SnapshotForDiagnostics>>,
ts_diagnostics: TsDiagnosticsStore,
client: Client,
@@ -160,7 +160,7 @@ impl DiagnosticsServer {
}
}
- pub(crate) fn get_ts_diagnostics(
+ pub fn get_ts_diagnostics(
&self,
specifier: &ModuleSpecifier,
document_version: Option<i32>,
@@ -168,16 +168,16 @@ impl DiagnosticsServer {
self.ts_diagnostics.get(specifier, document_version)
}
- pub(crate) fn invalidate(&self, specifiers: &[ModuleSpecifier]) {
+ pub fn invalidate(&self, specifiers: &[ModuleSpecifier]) {
self.ts_diagnostics.invalidate(specifiers);
}
- pub(crate) fn invalidate_all(&self) {
+ pub fn invalidate_all(&self) {
self.ts_diagnostics.invalidate_all();
}
#[allow(unused_must_use)]
- pub(crate) fn start(&mut self) {
+ pub fn start(&mut self) {
let (tx, mut rx) = mpsc::unbounded_channel::<SnapshotForDiagnostics>();
self.channel = Some(tx);
let client = self.client.clone();
@@ -320,7 +320,7 @@ impl DiagnosticsServer {
});
}
- pub(crate) fn update(
+ pub fn update(
&self,
message: SnapshotForDiagnostics,
) -> Result<(), AnyError> {
@@ -573,7 +573,7 @@ struct DiagnosticDataRedirect {
}
/// An enum which represents diagnostic errors which originate from Deno itself.
-pub(crate) enum DenoDiagnostic {
+pub enum DenoDiagnostic {
/// A `x-deno-warn` is associated with the specifier and should be displayed
/// as a warning to the user.
DenoWarn(String),
@@ -627,7 +627,7 @@ impl DenoDiagnostic {
/// A "static" method which for a diagnostic that originated from the
/// structure returns a code action which can resolve the diagnostic.
- pub(crate) fn get_code_action(
+ pub fn get_code_action(
specifier: &ModuleSpecifier,
diagnostic: &lsp::Diagnostic,
) -> Result<lsp::CodeAction, AnyError> {
@@ -713,7 +713,7 @@ impl DenoDiagnostic {
/// Given a reference to the code from an LSP diagnostic, determine if the
/// diagnostic is fixable or not
- pub(crate) fn is_fixable(code: &Option<lsp::NumberOrString>) -> bool {
+ pub fn is_fixable(code: &Option<lsp::NumberOrString>) -> bool {
if let Some(lsp::NumberOrString::String(code)) = code {
matches!(
code.as_str(),
@@ -726,10 +726,7 @@ impl DenoDiagnostic {
/// Convert to an lsp Diagnostic when the range the diagnostic applies to is
/// provided.
- pub(crate) fn to_lsp_diagnostic(
- &self,
- range: &lsp::Range,
- ) -> lsp::Diagnostic {
+ pub fn to_lsp_diagnostic(&self, range: &lsp::Range) -> lsp::Diagnostic {
let (severity, message, data) = match self {
Self::DenoWarn(message) => (lsp::DiagnosticSeverity::WARNING, message.to_string(), None),
Self::InvalidAssertType(assert_type) => (lsp::DiagnosticSeverity::ERROR, format!("The module is a JSON module and expected an assertion type of \"json\". Instead got \"{}\".", assert_type), None),
diff --git a/cli/lsp/documents.rs b/cli/lsp/documents.rs
index 13071157b..28ef19af9 100644
--- a/cli/lsp/documents.rs
+++ b/cli/lsp/documents.rs
@@ -96,7 +96,7 @@ impl deno_graph::SourceParser for SourceParser {
}
#[derive(Debug, Clone, PartialEq, Eq)]
-pub(crate) enum LanguageId {
+pub enum LanguageId {
JavaScript,
Jsx,
TypeScript,
@@ -527,7 +527,7 @@ impl Document {
}
}
-pub(crate) fn to_hover_text(result: &Resolved) -> String {
+pub fn to_hover_text(result: &Resolved) -> String {
match result {
Resolved::Ok { specifier, .. } => match specifier.scheme() {
"data" => "_(a data url)_".to_string(),
@@ -544,7 +544,7 @@ pub(crate) fn to_hover_text(result: &Resolved) -> String {
}
}
-pub(crate) fn to_lsp_range(range: &deno_graph::Range) -> lsp::Range {
+pub fn to_lsp_range(range: &deno_graph::Range) -> lsp::Range {
lsp::Range {
start: lsp::Position {
line: range.start.line as u32,
@@ -697,7 +697,7 @@ fn get_document_path(
}
#[derive(Debug, Clone, Default)]
-pub(crate) struct Documents {
+pub struct Documents {
/// The DENO_DIR that the documents looks for non-file based modules.
cache: HttpCache,
/// A flag that indicates that stated data is potentially invalid and needs to
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs
index 5db7011bb..ee69d59c4 100644
--- a/cli/lsp/language_server.rs
+++ b/cli/lsp/language_server.rs
@@ -72,7 +72,7 @@ pub struct LanguageServer(Arc<tokio::sync::Mutex<Inner>>);
/// Snapshot of the state used by TSC.
#[derive(Debug, Default)]
-pub(crate) struct StateSnapshot {
+pub struct StateSnapshot {
pub assets: AssetsSnapshot,
pub cache_metadata: cache::CacheMetadata,
pub documents: Documents,
@@ -80,7 +80,7 @@ pub(crate) struct StateSnapshot {
}
#[derive(Debug)]
-pub(crate) struct Inner {
+pub struct Inner {
/// Cached versions of "fixed" assets that can either be inlined in Rust or
/// are part of the TypeScript snapshot and have to be fetched out.
assets: Assets,
@@ -88,13 +88,13 @@ pub(crate) struct Inner {
/// which is used by the language server
cache_metadata: cache::CacheMetadata,
/// The LSP client that this LSP server is connected to.
- pub(crate) client: Client,
+ pub client: Client,
/// Configuration information.
- pub(crate) config: Config,
+ pub config: Config,
diagnostics_server: diagnostics::DiagnosticsServer,
/// The collection of documents that the server is currently handling, either
/// on disk or "open" within the client.
- pub(crate) documents: Documents,
+ pub documents: Documents,
/// Handles module registries, which allow discovery of modules
module_registries: ModuleRegistry,
/// The path to the module registries cache
@@ -108,11 +108,11 @@ pub(crate) struct Inner {
/// options.
maybe_config_file: Option<ConfigFile>,
/// An optional configuration for linter which has been taken from specified config file.
- pub(crate) maybe_lint_config: Option<LintConfig>,
+ pub maybe_lint_config: Option<LintConfig>,
/// An optional configuration for formatter which has been taken from specified config file.
maybe_fmt_config: Option<FmtConfig>,
/// An optional import map which is used to resolve modules.
- pub(crate) maybe_import_map: Option<Arc<ImportMap>>,
+ pub maybe_import_map: Option<Arc<ImportMap>>,
/// The URL for the import map which is used to determine relative imports.
maybe_import_map_uri: Option<Url>,
/// A collection of measurements which instrument that performance of the LSP.
@@ -120,9 +120,9 @@ pub(crate) struct Inner {
/// A memoized version of fixable diagnostic codes retrieved from TypeScript.
ts_fixable_diagnostics: Vec<String>,
/// An abstraction that handles interactions with TypeScript.
- pub(crate) ts_server: Arc<TsServer>,
+ pub ts_server: Arc<TsServer>,
/// A map of specifiers and URLs used to translate over the LSP.
- pub(crate) url_map: urls::LspUrlMap,
+ pub url_map: urls::LspUrlMap,
}
impl LanguageServer {
@@ -180,7 +180,7 @@ impl Inner {
/// Searches assets and open documents which might be performed asynchronously,
/// hydrating in memory caches for subsequent requests.
- pub(crate) async fn get_asset_or_document(
+ pub async fn get_asset_or_document(
&self,
specifier: &ModuleSpecifier,
) -> LspResult<AssetOrDocument> {
@@ -200,7 +200,7 @@ impl Inner {
/// Searches assets and open documents which might be performed asynchronously,
/// hydrating in memory caches for subsequent requests.
- pub(crate) async fn get_maybe_asset_or_document(
+ pub async fn get_maybe_asset_or_document(
&self,
specifier: &ModuleSpecifier,
) -> LspResult<Option<AssetOrDocument>> {
@@ -223,7 +223,7 @@ impl Inner {
/// Only searches already cached assets and documents. If
/// the asset or document cannot be found an error is returned.
- pub(crate) fn get_cached_asset_or_document(
+ pub fn get_cached_asset_or_document(
&self,
specifier: &ModuleSpecifier,
) -> LspResult<AssetOrDocument> {
@@ -242,7 +242,7 @@ impl Inner {
/// Only searches already cached assets and documents. If
/// the asset or document cannot be found, `None` is returned.
- pub(crate) fn get_maybe_cached_asset_or_document(
+ pub fn get_maybe_cached_asset_or_document(
&self,
specifier: &ModuleSpecifier,
) -> Option<AssetOrDocument> {
@@ -257,7 +257,7 @@ impl Inner {
}
}
- pub(crate) async fn get_navigation_tree(
+ pub async fn get_navigation_tree(
&mut self,
specifier: &ModuleSpecifier,
) -> Result<Arc<tsc::NavigationTree>, AnyError> {
@@ -384,7 +384,7 @@ impl Inner {
Ok(())
}
- pub(crate) fn snapshot(&self) -> Arc<StateSnapshot> {
+ pub fn snapshot(&self) -> Arc<StateSnapshot> {
Arc::new(StateSnapshot {
assets: self.assets.snapshot(),
cache_metadata: self.cache_metadata.clone(),
diff --git a/cli/lsp/mod.rs b/cli/lsp/mod.rs
index a9e27b851..afaf47548 100644
--- a/cli/lsp/mod.rs
+++ b/cli/lsp/mod.rs
@@ -16,7 +16,7 @@ mod completions;
mod config;
mod diagnostics;
mod documents;
-pub(crate) mod language_server;
+pub mod language_server;
mod logging;
mod lsp_custom;
mod parent_process_checker;
diff --git a/cli/lsp/registries.rs b/cli/lsp/registries.rs
index e4c4b8672..48a879185 100644
--- a/cli/lsp/registries.rs
+++ b/cli/lsp/registries.rs
@@ -341,7 +341,7 @@ fn validate_config(config: &RegistryConfigurationJson) -> Result<(), AnyError> {
}
#[derive(Debug, Clone, Deserialize)]
-pub(crate) struct RegistryConfigurationVariable {
+pub struct RegistryConfigurationVariable {
/// The name of the variable.
key: String,
/// An optional URL/API endpoint that can provide optional documentation for a
@@ -353,7 +353,7 @@ pub(crate) struct RegistryConfigurationVariable {
}
#[derive(Debug, Clone, Deserialize)]
-pub(crate) struct RegistryConfiguration {
+pub struct RegistryConfiguration {
/// A Express-like path which describes how URLs are composed for a registry.
schema: String,
/// The variables denoted in the `schema` should have a variable entry.
@@ -407,7 +407,7 @@ enum VariableItems {
}
#[derive(Debug, Default)]
-pub(crate) struct ModuleRegistryOptions {
+pub struct ModuleRegistryOptions {
pub maybe_root_path: Option<PathBuf>,
pub maybe_ca_stores: Option<Vec<String>>,
pub maybe_ca_file: Option<String>,
@@ -418,7 +418,7 @@ pub(crate) struct ModuleRegistryOptions {
/// registries and can provide completion information for URLs that match
/// one of the enabled registries.
#[derive(Debug, Clone)]
-pub(crate) struct ModuleRegistry {
+pub struct ModuleRegistry {
origins: HashMap<String, Vec<RegistryConfiguration>>,
file_fetcher: FileFetcher,
}
@@ -506,10 +506,7 @@ impl ModuleRegistry {
}
/// Check to see if the given origin has a registry configuration.
- pub(crate) async fn check_origin(
- &self,
- origin: &str,
- ) -> Result<(), AnyError> {
+ pub async fn check_origin(&self, origin: &str) -> Result<(), AnyError> {
let origin_url = Url::parse(origin)?;
let specifier = origin_url.join(CONFIG_PATH)?;
self.fetch_config(&specifier).await?;
@@ -592,10 +589,7 @@ impl ModuleRegistry {
Ok(())
}
- pub(crate) async fn get_hover(
- &self,
- dependency: &Dependency,
- ) -> Option<String> {
+ pub async fn get_hover(&self, dependency: &Dependency) -> Option<String> {
let maybe_code = dependency.get_code();
let maybe_type = dependency.get_type();
let specifier = match (maybe_code, maybe_type) {
@@ -647,7 +641,7 @@ impl ModuleRegistry {
/// For a string specifier from the client, provide a set of completions, if
/// any, for the specifier.
- pub(crate) async fn get_completions(
+ pub async fn get_completions(
&self,
current_specifier: &str,
offset: usize,
@@ -938,7 +932,7 @@ impl ModuleRegistry {
self.get_origin_completions(current_specifier, range)
}
- pub(crate) async fn get_documentation(
+ pub async fn get_documentation(
&self,
url: &str,
) -> Option<lsp::Documentation> {
diff --git a/cli/lsp/semantic_tokens.rs b/cli/lsp/semantic_tokens.rs
index dd3766c04..4937600d3 100644
--- a/cli/lsp/semantic_tokens.rs
+++ b/cli/lsp/semantic_tokens.rs
@@ -12,8 +12,8 @@ use lspower::lsp::SemanticTokens;
use lspower::lsp::SemanticTokensLegend;
use std::ops::{Index, IndexMut};
-pub(crate) const MODIFIER_MASK: u32 = 255;
-pub(crate) const TYPE_OFFSET: u32 = 8;
+pub const MODIFIER_MASK: u32 = 255;
+pub const TYPE_OFFSET: u32 = 8;
enum TokenType {
Class = 0,
diff --git a/cli/lsp/tsc.rs b/cli/lsp/tsc.rs
index eaeef7a51..e2aad4524 100644
--- a/cli/lsp/tsc.rs
+++ b/cli/lsp/tsc.rs
@@ -124,7 +124,7 @@ impl TsServer {
Self(tx)
}
- pub(crate) async fn request<R>(
+ pub async fn request<R>(
&self,
snapshot: Arc<StateSnapshot>,
req: RequestMethod,
@@ -137,7 +137,7 @@ impl TsServer {
.await
}
- pub(crate) async fn request_with_cancellation<R>(
+ pub async fn request_with_cancellation<R>(
&self,
snapshot: Arc<StateSnapshot>,
req: RequestMethod,
@@ -282,7 +282,7 @@ impl Assets {
self.assets.lock().get(k).cloned()
}
- pub(crate) async fn get(
+ pub async fn get(
&self,
specifier: &ModuleSpecifier,
// todo(dsherret): this shouldn't be a parameter, but instead retrieved via
@@ -774,7 +774,7 @@ fn display_parts_to_string(
}
impl QuickInfo {
- pub(crate) fn to_hover(
+ pub fn to_hover(
&self,
line_index: Arc<LineIndex>,
language_server: &language_server::Inner,
@@ -829,7 +829,7 @@ pub struct DocumentSpan {
}
impl DocumentSpan {
- pub(crate) async fn to_link(
+ pub async fn to_link(
&self,
line_index: Arc<LineIndex>,
language_server: &language_server::Inner,
@@ -927,7 +927,7 @@ pub struct NavigateToItem {
}
impl NavigateToItem {
- pub(crate) async fn to_symbol_information(
+ pub async fn to_symbol_information(
&self,
language_server: &mut language_server::Inner,
) -> Option<lsp::SymbolInformation> {
@@ -1131,7 +1131,7 @@ pub struct ImplementationLocation {
}
impl ImplementationLocation {
- pub(crate) fn to_location(
+ pub fn to_location(
&self,
line_index: Arc<LineIndex>,
language_server: &language_server::Inner,
@@ -1148,7 +1148,7 @@ impl ImplementationLocation {
}
}
- pub(crate) async fn to_link(
+ pub async fn to_link(
&self,
line_index: Arc<LineIndex>,
language_server: &language_server::Inner,
@@ -1175,7 +1175,7 @@ pub struct RenameLocations {
}
impl RenameLocations {
- pub(crate) async fn into_workspace_edit(
+ pub async fn into_workspace_edit(
self,
new_name: &str,
language_server: &language_server::Inner,
@@ -1265,7 +1265,7 @@ pub struct DefinitionInfoAndBoundSpan {
}
impl DefinitionInfoAndBoundSpan {
- pub(crate) async fn to_definition(
+ pub async fn to_definition(
&self,
line_index: Arc<LineIndex>,
language_server: &language_server::Inner,
@@ -1345,7 +1345,7 @@ pub struct FileTextChanges {
}
impl FileTextChanges {
- pub(crate) async fn to_text_document_edit(
+ pub async fn to_text_document_edit(
&self,
language_server: &language_server::Inner,
) -> Result<lsp::TextDocumentEdit, AnyError> {
@@ -1366,7 +1366,7 @@ impl FileTextChanges {
})
}
- pub(crate) async fn to_text_document_change_ops(
+ pub async fn to_text_document_change_ops(
&self,
language_server: &language_server::Inner,
) -> Result<Vec<lsp::DocumentChangeOperation>, AnyError> {
@@ -1603,7 +1603,7 @@ pub struct RefactorEditInfo {
}
impl RefactorEditInfo {
- pub(crate) async fn to_workspace_edit(
+ pub async fn to_workspace_edit(
&self,
language_server: &language_server::Inner,
) -> Result<Option<lsp::WorkspaceEdit>, AnyError> {
@@ -1668,7 +1668,7 @@ pub struct ReferenceEntry {
}
impl ReferenceEntry {
- pub(crate) fn to_location(
+ pub fn to_location(
&self,
line_index: Arc<LineIndex>,
url_map: &LspUrlMap,
@@ -1700,7 +1700,7 @@ pub struct CallHierarchyItem {
}
impl CallHierarchyItem {
- pub(crate) async fn try_resolve_call_hierarchy_item(
+ pub async fn try_resolve_call_hierarchy_item(
&self,
language_server: &language_server::Inner,
maybe_root_path: Option<&Path>,
@@ -1718,7 +1718,7 @@ impl CallHierarchyItem {
))
}
- pub(crate) fn to_call_hierarchy_item(
+ pub fn to_call_hierarchy_item(
&self,
line_index: Arc<LineIndex>,
language_server: &language_server::Inner,
@@ -1801,7 +1801,7 @@ pub struct CallHierarchyIncomingCall {
}
impl CallHierarchyIncomingCall {
- pub(crate) async fn try_resolve_call_hierarchy_incoming_call(
+ pub async fn try_resolve_call_hierarchy_incoming_call(
&self,
language_server: &language_server::Inner,
maybe_root_path: Option<&Path>,
@@ -1835,7 +1835,7 @@ pub struct CallHierarchyOutgoingCall {
}
impl CallHierarchyOutgoingCall {
- pub(crate) async fn try_resolve_call_hierarchy_outgoing_call(
+ pub async fn try_resolve_call_hierarchy_outgoing_call(
&self,
line_index: Arc<LineIndex>,
language_server: &language_server::Inner,
@@ -1876,7 +1876,7 @@ pub struct CompletionEntryDetails {
}
impl CompletionEntryDetails {
- pub(crate) fn as_completion_item(
+ pub fn as_completion_item(
&self,
original_item: &lsp::CompletionItem,
language_server: &language_server::Inner,
@@ -2285,7 +2285,7 @@ pub struct SignatureHelpItems {
}
impl SignatureHelpItems {
- pub(crate) fn into_signature_help(
+ pub fn into_signature_help(
self,
language_server: &language_server::Inner,
) -> lsp::SignatureHelp {
@@ -2314,7 +2314,7 @@ pub struct SignatureHelpItem {
}
impl SignatureHelpItem {
- pub(crate) fn into_signature_information(
+ pub fn into_signature_information(
self,
language_server: &language_server::Inner,
) -> lsp::SignatureInformation {
@@ -2362,7 +2362,7 @@ pub struct SignatureHelpParameter {
}
impl SignatureHelpParameter {
- pub(crate) fn into_parameter_information(
+ pub fn into_parameter_information(
self,
language_server: &language_server::Inner,
) -> lsp::ParameterInformation {
@@ -3252,7 +3252,7 @@ impl RequestMethod {
}
/// Send a request into a runtime and return the JSON value of the response.
-pub(crate) fn request(
+pub fn request(
runtime: &mut JsRuntime,
state_snapshot: Arc<StateSnapshot>,
method: RequestMethod,
diff --git a/cli/lsp/urls.rs b/cli/lsp/urls.rs
index 781fc8035..e30a3c5d6 100644
--- a/cli/lsp/urls.rs
+++ b/cli/lsp/urls.rs
@@ -16,7 +16,7 @@ use std::sync::Arc;
/// Used in situations where a default URL needs to be used where otherwise a
/// panic is undesired.
-pub(crate) static INVALID_SPECIFIER: Lazy<ModuleSpecifier> =
+pub static INVALID_SPECIFIER: Lazy<ModuleSpecifier> =
Lazy::new(|| ModuleSpecifier::parse("deno://invalid").unwrap());
/// Matches the `encodeURIComponent()` encoding from JavaScript, which matches