Repository: sublimelsp/LSP

Issue:
Use of monospace font in Symbol References quick_panel
To start with, this is a nice feature that I appreciate!

Though, I feel the use of monospace font (`sublime.MONOSPACE_FONT` flag) makes things look worse than simply using the default quick_panel style.

![Screenshot 2019-04-02 at 20 33 40](https://user-images.githubusercontent.com/172663/55430989-49e1ee00-5587-11e9-87ce-fbb15234e48d.png)

vs.

![Screenshot 2019-04-02 at 20 31 58](https://user-images.githubusercontent.com/172663/55430994-4d757500-5587-11e9-97f1-7a18428eba9c.png)

Don't you agree?

cc @alin23 


Discussion:
I think this is a personal preference and it is best solved by implementing a setting like 
```js
"quick_panel_monospace_font": false
```

I'd be glad if you could open a PR for that ^_^
Many built-in quick panels use the regular sans-serif font, so I feel like we introduced an exception here. I guess the argument is that we're showing code in it?

Monospace fonts are optimised for typing/legibility at small point sizes, and the quick panel size for me a few steps larger than editor text. It's a bit jarring compared to reading nicely kerned text.

I'm for changing the default (to match Sublime) and adding an option for monospace if needed.

Resolving patch:
diff --git a/plugin/core/settings.py b/plugin/core/settings.py
--- a/plugin/core/settings.py
+++ b/plugin/core/settings.py
@@ -65,6 +65,7 @@ def update_settings(settings: Settings, settings_obj: sublime.Settings):
     settings.completion_hint_type = read_str_setting(settings_obj, "completion_hint_type", "auto")
     settings.resolve_completion_for_snippets = read_bool_setting(settings_obj, "resolve_completion_for_snippets", False)
     settings.show_references_in_quick_panel = read_bool_setting(settings_obj, "show_references_in_quick_panel", False)
+    settings.quick_panel_monospace_font = read_bool_setting(settings_obj, "quick_panel_monospace_font", False)
     settings.log_debug = read_bool_setting(settings_obj, "log_debug", False)
     settings.log_server = read_bool_setting(settings_obj, "log_server", True)
     settings.log_stderr = read_bool_setting(settings_obj, "log_stderr", False)
diff --git a/plugin/core/types.py b/plugin/core/types.py
--- a/plugin/core/types.py
+++ b/plugin/core/types.py
@@ -35,6 +35,7 @@ def __init__(self) -> None:
         self.completion_hint_type = "auto"
         self.resolve_completion_for_snippets = False
         self.show_references_in_quick_panel = False
+        self.quick_panel_monospace_font = False
         self.log_debug = True
         self.log_server = True
         self.log_stderr = False
diff --git a/plugin/references.py b/plugin/references.py
--- a/plugin/references.py
+++ b/plugin/references.py
@@ -65,10 +65,13 @@ def handle_response(self, response: 'Optional[List[Dict]]', pos) -> None:
         formatted_references = self._get_formatted_references(response, base_dir)
 
         if settings.show_references_in_quick_panel:
+            flags = sublime.KEEP_OPEN_ON_FOCUS_LOST
+            if settings.quick_panel_monospace_font:
+                flags |= sublime.MONOSPACE_FONT
             window.show_quick_panel(
                 self.reflist,
                 lambda index: self.on_ref_choice(base_dir, index),
-                sublime.MONOSPACE_FONT | sublime.KEEP_OPEN_ON_FOCUS_LOST,
+                flags,
                 self.get_current_ref(base_dir, word_region.begin()),
                 lambda index: self.on_ref_highlight(base_dir, index)
             )


Test patch: