aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-08-27 22:13:07 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-08-27 22:16:15 +0200
commit87edef4dff8ab931a9ec85de9a11cbd4cc7d6247 (patch)
tree05a401a210a2952a29f9e8de438eb8953c05acf6
parent1bd1416c89f92f637ca5e22c94b3479f8d32f2d7 (diff)
downloadvis-lspc-87edef4dff8ab931a9ec85de9a11cbd4cc7d6247.tar.gz
vis-lspc-87edef4dff8ab931a9ec85de9a11cbd4cc7d6247.zip
move the fzf detection snippet into lspc.lua
It changes a default setting keep it in the file where the default settings are defined.
-rw-r--r--init.lua5
-rw-r--r--lspc.lua9
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,