mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-15 06:32:40 +00:00
updated nvim autocmd
This commit is contained in:
@@ -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
|
||||||
}
|
-- }
|
||||||
)
|
-- )
|
||||||
|
|||||||
Reference in New Issue
Block a user