diff options
author | pommicket <pommicket@gmail.com> | 2022-12-25 21:55:42 -0500 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-12-25 21:55:42 -0500 |
commit | 9602ae4d8582c3ccdb9e8c1561ad306491713be4 (patch) | |
tree | f3f02a332daa19ace69dbc9c0a9a63be85a41ad9 /ted.c | |
parent | 4bd6bbe54b291d8d65997e998a2a3946293adcdf (diff) |
global lsp-enabled setting
Diffstat (limited to 'ted.c')
-rw-r--r-- | ted.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -92,6 +92,10 @@ Settings *ted_get_settings(Ted *ted, const char *path, Language language) { } LSP *ted_get_lsp(Ted *ted, const char *path, Language language) { + Settings *settings = ted_get_settings(ted, path, language); + if (!settings->lsp_enabled) + return NULL; + int i; for (i = 0; i < TED_LSP_MAX; ++i) { LSP *lsp = ted->lsps[i]; @@ -105,7 +109,6 @@ LSP *ted_get_lsp(Ted *ted, const char *path, Language language) { } if (i == TED_LSP_MAX) return NULL; // why are there so many LSP open??? - Settings *settings = ted_get_settings(ted, path, language); if (*settings->lsp) { // start up this LSP char *root_dir = settings_get_root_dir(settings, path); |