Skip to content

Commit

Permalink
fix(sourcekit-lsp): use git as last resort for sourcekit-lsp. (#3192)
Browse files Browse the repository at this point in the history
* fix(sourcekit-lsp): use git as last resort for sourcekit-lsp

* fix: updated documentation for sourcekit-lsp as well
  • Loading branch information
dirtyhabits97 authored Jun 5, 2024
1 parent 74e1480 commit cf72c64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lua/lspconfig/server_configurations/sourcekit.lua
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ return {
root_dir = function(filename, _)
return util.root_pattern 'buildServer.json'(filename)
or util.root_pattern('*.xcodeproj', '*.xcworkspace')(filename)
or util.find_git_ancestor(filename)
-- better to keep it at the end, because some modularized apps contain multiple Package.swift files
or util.root_pattern('compile_commands.json', 'Package.swift')(filename)
or util.find_git_ancestor(filename)
end,
},
docs = {
Expand All @@ -19,7 +19,7 @@ https://github.com/apple/sourcekit-lsp
Language server for Swift and C/C++/Objective-C.
]],
default_config = {
root_dir = [[root_pattern("buildServer.json", "*.xcodeproj", "*.xcworkspace", ".git", "compile_commands.json", "Package.swift")]],
root_dir = [[root_pattern("buildServer.json", "*.xcodeproj", "*.xcworkspace", "compile_commands.json", "Package.swift", ".git")]],
},
},
}

0 comments on commit cf72c64

Please sign in to comment.