From 413b353b3341a0a1c2780a2a190fce9a85d4cabb Mon Sep 17 00:00:00 2001 From: Will Ehrendreich Date: Wed, 22 May 2024 14:04:31 -0500 Subject: [PATCH] feat(config): added fcs.transparentCompiler.enabled --- lua/ionide/init.lua | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/lua/ionide/init.lua b/lua/ionide/init.lua index f271aba..bd5b65e 100644 --- a/lua/ionide/init.lua +++ b/lua/ionide/init.lua @@ -283,7 +283,7 @@ M.DefaultServerSettings = { -- { AutomaticWorkspaceInit: bool option AutomaticWorkspaceInit = false -- WorkspaceModePeekDeepLevel: int option WorkspaceModePeekDeepLevel = 2 workspaceModePeekDeepLevel = 4, - + fcs = { transparentCompiler = { enabled = true } }, fsac = { attachDebugger = false, cachedTypeCheckCount = 200, @@ -540,6 +540,29 @@ local function unHtmlify(input) -- print("unHtmlify result: " .. result) return result end +-- Your HTML string +-- local html = "Open the documentation" +-- -- local html = "Open the documentation" +-- -- vim.notify(html) +-- -- Extract the href attribute using Lua string pattern matching +-- -- local href = html:match("href='command:fsharp.showDocumentation%?(.-)'") +-- local href = html:match("href='(.-)'") +-- -- vim.notify(html) +-- -- Remove the 'command:fsharp.showDocumentation?' prefix and decode the URL +-- local json_str = unHtmlify(href:gsub("command:fsharp.showDocumentation%?", "")) +-- -- local json_str = unHtmlify(href) +-- -- vim.notify(json_str) +-- -- Parse the JSON +-- local obj = vim.fn.json_decode(json_str) +-- -- vim.notify((obj)) +-- vim.notify(vim.inspect(obj)) +-- -- Extract the XmlDocSig and AssemblyName values +-- local xmlDocSig = obj[1]["XmlDocSig"] +-- local assemblyName = obj[1]["AssemblyName"] +-- -- Generate the new Markdown link +-- local markdown_link = string.format("[Open the documentation](nvim://definition/%s/%s)", xmlDocSig, assemblyName) +-- vim.notify(markdown_link) + --- gets the various parts given by hover request and returns them ---@param input_string string ---function name @@ -700,6 +723,19 @@ M["textDocument/hover"] = function(error, result, context, config) -- vim.lsp.handlers.hover(error or {}, result or {}, context or {}, config or {}) end +M["fsharp/showDocumentation"] = function(error, result, context, config) + M.notify( + "handling " + .. "fsharp/showDocumentation" + .. " | " + .. "result is: \n" + .. vim.inspect({ error or "", result or "", context or "", config or "" }) + ) + if result then + if result.content then + end + end +end M["fsharp/documentationSymbol"] = function(error, result, context, config) -- M.notify( -- "handling "