How to stop/restart all LSP plugins using the sublime text python API. Something like view.run_command(...)
or
class Xmrf(sublime_plugin.TextCommand):
# toggle allac
# window = sublime.active_window()
# window.run_command("lsp_enable_language_server_in_project")
# window.run_command("lsp_disable_language_server_in_project")
def run(self, edit):
view = self.view
global ISOFF
ISOFF = not ISOFF
if ISOFF:
view.set_status("2b_allac", f"AC(off)")
else:
view.set_status("2b_allac", f"AC(on)")
# id_settings = "Preferences.sublime-settings"
# id_key = "ignored_packages"
# settings = sublime.load_settings(id_settings)
# tmp = settings.get(id_key)
# for aa in ["LSP-pyright", "LSP-json", "LSP-clangd"]:
# if self.ison_lsp:
# if aa in tmp:
# tmp.remove(aa)
# else:
# tmp.append(aa)
# self.ison_lsp = not self.ison_lsp
# print("--------------------")
# print("ignored_packages", tmp)
# print("--------------------")
# settings.set(id_key, tmp)
# sublime.save_settings(id_settings)