mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
updated nvim autocmd
This commit is contained in:
@@ -60,22 +60,22 @@ createCmd(
|
||||
)
|
||||
|
||||
-- Swift
|
||||
createCmd(
|
||||
"FileType",
|
||||
{
|
||||
pattern = { 'swift' },
|
||||
callback = function()
|
||||
local root_dir = vim.fs.dirname(vim.fs.find({
|
||||
"Package.swift",
|
||||
".git",
|
||||
}, { upward = true })[1])
|
||||
local client = vim.lsp.start({
|
||||
name = "sourcekit-lsp",
|
||||
cmd = { "sourcekit-lsp" },
|
||||
root_dir = root_dir
|
||||
})
|
||||
vim.lsp.buf_attach_client(0, client)
|
||||
end,
|
||||
group = swiftGroup
|
||||
}
|
||||
)
|
||||
-- createCmd(
|
||||
-- "FileType",
|
||||
-- {
|
||||
-- pattern = { 'swift' },
|
||||
-- callback = function()
|
||||
-- local root_dir = vim.fs.dirname(vim.fs.find({
|
||||
-- "Package.swift",
|
||||
-- ".git",
|
||||
-- }, { upward = true })[1])
|
||||
-- local client = vim.lsp.start({
|
||||
-- name = "sourcekit-lsp",
|
||||
-- cmd = { "sourcekit-lsp" },
|
||||
-- root_dir = root_dir
|
||||
-- })
|
||||
-- vim.lsp.buf_attach_client(0, client)
|
||||
-- end,
|
||||
-- group = swiftGroup
|
||||
-- }
|
||||
-- )
|
||||
|
||||
Reference in New Issue
Block a user