-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: client capabilities && refactor debouncer
- Loading branch information
1 parent
ee2f812
commit a5b109d
Showing
12 changed files
with
18,713 additions
and
107 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#[derive(clap::ValueEnum, Debug, Clone, PartialEq, Eq, Hash)] | ||
pub enum ClientCapability { | ||
#[value(name = "readFile")] | ||
ReadFile, | ||
} | ||
|
||
#[derive(Debug, Clone)] | ||
pub struct ClientCapabilities { | ||
read_file: bool, | ||
} | ||
|
||
impl ClientCapabilities { | ||
pub fn new(client_capabilities: &[ClientCapability]) -> Self { | ||
let mut c = ClientCapabilities { read_file: false }; | ||
for capability in client_capabilities { | ||
match capability { | ||
ClientCapability::ReadFile => c.read_file = true, | ||
} | ||
} | ||
c | ||
} | ||
pub fn can_read_file(&self) -> bool { | ||
self.read_file | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.