Skip to content

Commit 9ffee3a

Browse files
ndmitchellfacebook-github-bot
authored andcommitted
Move the lsp pieces into lsp
Summary: These "analysis" pieces were extended by the people working on LSP. I don't entirely understand them, but by tucking them under LSP, it makes me feel less bad about understanding them. Also keeps the users closer to the code. Reviewed By: stepancheg Differential Revision: D43463234 fbshipit-source-id: b5277407b252ba36f602525ed378962a7f657fe6
1 parent 2bfd37b commit 9ffee3a

File tree

5 files changed

+11
-11
lines changed

5 files changed

+11
-11
lines changed

starlark/src/analysis/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,6 @@ pub use types::Lint;
2424
use crate::analysis::types::LintT;
2525
use crate::syntax::AstModule;
2626

27-
mod bind;
28-
pub(crate) mod definition;
2927
mod dubious;
3028
pub(crate) mod exported;
3129
mod find_call_name;
File renamed without changes.

starlark/src/analysis/definition.rs renamed to starlark/src/lsp/definition.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,15 @@
1717

1818
use std::iter;
1919

20-
use crate::analysis::bind::scope;
21-
use crate::analysis::bind::Assigner;
22-
use crate::analysis::bind::Bind;
23-
use crate::analysis::bind::Scope;
2420
use crate::codemap::CodeMap;
2521
use crate::codemap::Pos;
2622
use crate::codemap::ResolvedSpan;
2723
use crate::codemap::Span;
2824
use crate::codemap::Spanned;
25+
use crate::lsp::bind::scope;
26+
use crate::lsp::bind::Assigner;
27+
use crate::lsp::bind::Bind;
28+
use crate::lsp::bind::Scope;
2929
use crate::slice_vec_ext::SliceExt;
3030
use crate::syntax::ast::ArgumentP;
3131
use crate::syntax::ast::AssignP;

starlark/src/lsp/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
//! The server that allows IDEs to evaluate and interpret starlark code according
1919
//! to the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/).
2020
21+
mod bind;
22+
mod definition;
2123
pub mod server;
2224
mod symbols;
2325
#[cfg(all(test, not(windows)))]

starlark/src/lsp/server.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,11 @@ use serde::Deserializer;
6666
use serde::Serialize;
6767
use serde::Serializer;
6868

69-
use crate::analysis::definition::Definition;
70-
use crate::analysis::definition::DottedDefinition;
71-
use crate::analysis::definition::IdentifierDefinition;
72-
use crate::analysis::definition::LspModule;
7369
use crate::codemap::ResolvedSpan;
70+
use crate::lsp::definition::Definition;
71+
use crate::lsp::definition::DottedDefinition;
72+
use crate::lsp::definition::IdentifierDefinition;
73+
use crate::lsp::definition::LspModule;
7474
use crate::lsp::server::LoadContentsError::WrongScheme;
7575
use crate::syntax::AstModule;
7676

@@ -790,8 +790,8 @@ mod test {
790790
use lsp_types::Url;
791791
use textwrap::dedent;
792792

793-
use crate::analysis::definition::helpers::FixtureWithRanges;
794793
use crate::codemap::ResolvedSpan;
794+
use crate::lsp::definition::helpers::FixtureWithRanges;
795795
use crate::lsp::server::LspServerSettings;
796796
use crate::lsp::server::LspUrl;
797797
use crate::lsp::server::StarlarkFileContentsParams;

0 commit comments

Comments
 (0)