From 87edef4dff8ab931a9ec85de9a11cbd4cc7d6247 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 27 Aug 2024 22:13:07 +0200 Subject: move the fzf detection snippet into lspc.lua It changes a default setting keep it in the file where the default settings are defined. --- init.lua | 5 ----- lspc.lua | 9 ++++++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 3b51dc9..97c3f9b 100644 --- a/init.lua +++ b/init.lua @@ -78,11 +78,6 @@ do end assert(vis_pid) --- check if fzf is available and use fzf instead of vis-menu per default -if os.execute('type fzf >/dev/null 2>/dev/null') then - lspc.menu_cmd = 'fzf' -end - -- mapping function between vis lexer names and LSP languageIds local function syntax_to_languageId(syntax) -- LuaFormatter off diff --git a/lspc.lua b/lspc.lua index 5ce9000..721199a 100644 --- a/lspc.lua +++ b/lspc.lua @@ -56,9 +56,11 @@ local lspc = { }, } --- ---- ClientCapabilities we tell the language server when calling "initialize" --- +-- check if fzf is available and use fzf instead of vis-menu per default +if os.execute('type fzf >/dev/null 2>/dev/null') then + lspc.menu_cmd = 'fzf' +end + local supported_markup_kind = {'markdown'} local goto_methods_capabilities = { @@ -66,6 +68,7 @@ local goto_methods_capabilities = { dynamicRegistration = false, } +--- ClientCapabilities we tell the language server when calling "initialize". local client_capabilites = { workspace = { configuration = true, -- cgit v1.2.3