updated nvim autocmd

This commit is contained in:
2023-11-07 08:15:20 -05:00
parent ff870c0f1b
commit 8e46610a7b

View File

@@ -60,22 +60,22 @@ createCmd(
) )
-- Swift -- Swift
createCmd( -- createCmd(
"FileType", -- "FileType",
{ -- {
pattern = { 'swift' }, -- pattern = { 'swift' },
callback = function() -- callback = function()
local root_dir = vim.fs.dirname(vim.fs.find({ -- local root_dir = vim.fs.dirname(vim.fs.find({
"Package.swift", -- "Package.swift",
".git", -- ".git",
}, { upward = true })[1]) -- }, { upward = true })[1])
local client = vim.lsp.start({ -- local client = vim.lsp.start({
name = "sourcekit-lsp", -- name = "sourcekit-lsp",
cmd = { "sourcekit-lsp" }, -- cmd = { "sourcekit-lsp" },
root_dir = root_dir -- root_dir = root_dir
}) -- })
vim.lsp.buf_attach_client(0, client) -- vim.lsp.buf_attach_client(0, client)
end, -- end,
group = swiftGroup -- group = swiftGroup
} -- }
) -- )