Repository: sublimelsp/LSP

Issue:
Emmet preview not working with LSP-html
**Describe the bug**
Emmet normally shows a preview of complex abbreviations. When LSP-html is active, the preview only flashes shortly or is missing completely.

**To Reproduce**
Steps to reproduce the behavior:
1. Install Emmet, LSP, LSP-html
2. Open an HTML file
3. Type a complex abbreviations

**Expected behavior**
The preview should be displayed

**Environment (please complete the following information):**
- OS: Arch Linux
- Sublime Text version: 4129
- LSP version: 1.16.1
- Language servers used: LSP-html

**Additional context**
none



Discussion:
Did you also open an issue at the emmet package?
I did not. Wasn't really sure if it is a LSP or Emmet Bug (or both). 
Emmet uses view.show_popup to display the completion. I don’t know what triggers the popup to disappear.
Can you enable sublime.log_commands(True) in the console and see if there is any correlation there?
Nothing correlated is logged. 

But I should mention that LSP complains that the file isn't inside window folders. That is the only message logged, besides deletes and character inserts. 
Just because it wasn't pointed out in the previous discussion yet; I believe this happens because of this line
https://github.com/sublimelsp/LSP/blob/36b0bc9a8b772569f06654ab4cae58e6af7f3cf8/plugin/documents.py#L577
which is called after each buffer modification if the language server supports signature help (and has triggerCharacters defined).

Resolving patch:
diff --git a/plugin/documents.py b/plugin/documents.py
--- a/plugin/documents.py
+++ b/plugin/documents.py
@@ -566,16 +566,17 @@ def do_signature_help_async(self, manual: bool) -> None:
             language_map = session.markdown_language_id_to_st_syntax_map()
             request = Request.signatureHelp(params, self.view)
             session.send_request_async(request, lambda resp: self._on_signature_help(resp, pos, language_map))
-        elif self.view.match_selector(pos, "meta.function-call.arguments"):
-            # Don't force close the signature help popup while the user is typing the parameters.
-            # See also: https://github.com/sublimehq/sublime_text/issues/5518
-            pass
-        else:
-            # TODO: Refactor popup usage to a common class. We now have sigHelp, completionDocs, hover, and diags
-            # all using a popup. Most of these systems assume they have exclusive access to a popup, while in
-            # reality there is only one popup per view.
-            self.view.hide_popup()
-            self._sighelp = None
+        elif self._sighelp:
+            if self.view.match_selector(pos, "meta.function-call.arguments"):
+                # Don't force close the signature help popup while the user is typing the parameters.
+                # See also: https://github.com/sublimehq/sublime_text/issues/5518
+                pass
+            else:
+                # TODO: Refactor popup usage to a common class. We now have sigHelp, completionDocs, hover, and diags
+                # all using a popup. Most of these systems assume they have exclusive access to a popup, while in
+                # reality there is only one popup per view.
+                self.view.hide_popup()
+                self._sighelp = None
 
     def _get_signature_help_session(self) -> Optional[Session]:
         # NOTE: We take the beginning of the region to check the previous char (see last_char variable). This is for


Test patch: