diff options
author | Philipp Mildenberger | 2023-03-18 19:33:17 +0000 |
---|---|---|
committer | Philipp Mildenberger | 2023-05-18 19:48:32 +0000 |
commit | 1122928c2adef0a1c34e90d140c61f84beeb7418 (patch) | |
tree | 65ed74cdef29859b69e9c44feb85e4b29320078f /helix-view/src | |
parent | ec2f9091a06d07a8c4faa7533b814bdf59e36c35 (diff) |
Add method doc.supports_language_server for better readability
Diffstat (limited to 'helix-view/src')
-rw-r--r-- | helix-view/src/document.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/helix-view/src/document.rs b/helix-view/src/document.rs index 4b075293..5fec3361 100644 --- a/helix-view/src/document.rs +++ b/helix-view/src/document.rs @@ -1456,6 +1456,10 @@ impl Document { }) } + pub fn supports_language_server(&self, id: usize) -> bool { + self.language_servers().any(|l| l.id() == id) + } + pub fn diff_handle(&self) -> Option<&DiffHandle> { self.diff_handle.as_ref() } |