summaryrefslogtreecommitdiff
path: root/ted.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-10-17 00:40:14 -0400
committerpommicket <pommicket@gmail.com>2023-10-17 00:40:14 -0400
commitfb4122bc9dd0bef071908371c6d4cf19b7efa8f1 (patch)
tree2493bcfaee932a966d5a6a370794db0b59c608df /ted.h
parent581a17d964e35cdbbe4e90a7bf0333ef73cd49a8 (diff)
new config system not working yet, but it compiels
Diffstat (limited to 'ted.h')
-rw-r--r--ted.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/ted.h b/ted.h
index 43e2409..f21bf3c 100644
--- a/ted.h
+++ b/ted.h
@@ -1182,17 +1182,15 @@ char *ted_get_root_dir_of(Ted *ted, const char *path);
///
/// The returned value should be freed.
char *ted_get_root_dir(Ted *ted);
+/// settings to use when no buffer is open
+Settings *ted_default_settings(Ted *ted);
/// the settings of the active buffer, or the default settings if there is no active buffer
Settings *ted_active_settings(Ted *ted);
-/// Get the settings for a file at the given path in the given language.
-Settings *ted_get_settings(Ted *ted, const char *path, Language language);
-/// Get LSP server which should be used for the given path and language.
-///
-/// If no running server would cover the path and language, a new one is
-/// started if possible.
-/// Returns `NULL` on failure (e.g. there is no LSP server
-/// specified for the given path and language).
-struct LSP *ted_get_lsp(Ted *ted, const char *path, Language language);
+/// Get LSP server which should be used for the given settings and path.
+///
+/// The server is started if necessary.
+/// Returns `NULL` on failure (e.g. there is no LSP server configured).
+struct LSP *ted_get_lsp(Ted *ted, Settings *settings, const char *path);
/// Get the LSP server of the active buffer or directory.
///
/// Returns `NULL` if there is no such server.