Skip to content

Commit 5fb49bc

Browse files
committed
🐛 fixes space issue with zk, adds dart language server, disables format on save per default
1 parent 5daed6c commit 5fb49bc

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

main.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ function startServer(filetype, callback)
7171
rootUri = fmt.Sprintf("file://%s", wd)
7272
local envSettings, _ = go_os.Getenv("MICRO_LSP")
7373
local settings = config.GetGlobalOption("lsp.server")
74-
local fallback = "python=pylsp,go=gopls,typescript=deno lsp,javascript=deno lsp,markdown=deno lsp,json=deno lsp,jsonc=deno lsp,rust=rust-analyzer,lua=lua-lsp,c++=clangd"
74+
local fallback = "python=pylsp,go=gopls,typescript=deno lsp,javascript=deno lsp,markdown=deno lsp,json=deno lsp,jsonc=deno lsp,rust=rust-analyzer,lua=lua-language-server,c++=clangd,dart=dart language-server"
7575
if envSettings ~= nil and #envSettings > 0 then
7676
settings = envSettings
7777
end
@@ -111,8 +111,8 @@ function startServer(filetype, callback)
111111
end
112112

113113
function init()
114-
config.RegisterCommonOption("lsp", "server", "python=pylsp,go=gopls,typescript=deno lsp,javascript=deno lsp,markdown=deno lsp,json=deno lsp,jsonc=deno lsp,rust=rust-analyzer,lua=lua-lsp,c++=clangd")
115-
config.RegisterCommonOption("lsp", "formatOnSave", true)
114+
config.RegisterCommonOption("lsp", "server", "python=pylsp,go=gopls,typescript=deno lsp,javascript=deno lsp,markdown=deno lsp,json=deno lsp,jsonc=deno lsp,rust=rust-analyzer,lua=lua-language-server,c++=clangd,dart=dart language-server")
115+
config.RegisterCommonOption("lsp", "formatOnSave", false)
116116
config.RegisterCommonOption("lsp", "autocompleteDetails", false)
117117
config.RegisterCommonOption("lsp", "ignoreMessages", "")
118118
config.RegisterCommonOption("lsp", "tabcompletion", true)
@@ -469,7 +469,7 @@ function definitionActionResponse(bp, data)
469469
end
470470
if #results <= 0 then return; end
471471
local uri = (results[1].uri or results[1].targetUri)
472-
local doc = uri:gsub("^file://", "")
472+
local doc = uri:gsub("^file://", ""):gsub('%%[a-f0-9][a-f0-9]', function(x, y, z) print("X", x); return string.char(tonumber(x:gsub('%%', ''), 16)) end)
473473
local buf = bp.Buf
474474
if file ~= doc then
475475
-- it's from a different file, so open it as a new tab

0 commit comments

Comments
 (0)