From e9283b20b432d40782bcf78423ef770289f6a013 Mon Sep 17 00:00:00 2001 From: Gokul Soumya Date: Sun, 12 Jun 2022 06:23:58 +0530 Subject: Add docstring for language_server!() macro (#2750) --- helix-term/src/commands/lsp.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'helix-term/src/commands/lsp.rs') diff --git a/helix-term/src/commands/lsp.rs b/helix-term/src/commands/lsp.rs index 93ae2353..b6bea8d6 100644 --- a/helix-term/src/commands/lsp.rs +++ b/helix-term/src/commands/lsp.rs @@ -16,6 +16,11 @@ use crate::{ use std::borrow::Cow; +/// Gets the language server that is attached to a document, and +/// if it's not active displays a status message. Using this macro +/// in a context where the editor automatically queries the LSP +/// (instead of when the user explicitly does so via a keybind like +/// `gd`) will spam the "LSP inactive" status message confusingly. #[macro_export] macro_rules! language_server { ($editor:expr, $doc:expr) => { -- cgit v1.2.3-70-g09d2