summaryrefslogtreecommitdiff
path: root/ale_linters/swift
diff options
context:
space:
mode:
authorDan Loman <daniel.h.loman@gmail.com>2019-04-08 08:25:30 -0700
committerw0rp <w0rp@users.noreply.github.com>2019-04-08 16:25:30 +0100
commit864d0861e47568ca5e69c9cba82af655730ae0d7 (patch)
tree002fd2d5c44212694786baa19a19c9392a79c2b4 /ale_linters/swift
parent9a0ece1ecb4cddf9eebbc5bfa224764c4b5ad670 (diff)
downloadale-864d0861e47568ca5e69c9cba82af655730ae0d7.zip
[lsp] Add Swift / SourceKit-LSP support (#2420)
* [linter] Add LSP support for Swift via sourcekit-lsp
Diffstat (limited to 'ale_linters/swift')
-rw-r--r--ale_linters/swift/sourcekitlsp.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/ale_linters/swift/sourcekitlsp.vim b/ale_linters/swift/sourcekitlsp.vim
new file mode 100644
index 00000000..560893bf
--- /dev/null
+++ b/ale_linters/swift/sourcekitlsp.vim
@@ -0,0 +1,13 @@
+" Author: Dan Loman <https://github.com/namolnad>
+" Description: Support for sourcekit-lsp https://github.com/apple/sourcekit-lsp
+
+call ale#Set('sourcekit_lsp_executable', 'sourcekit-lsp')
+
+call ale#linter#Define('swift', {
+\ 'name': 'sourcekitlsp',
+\ 'lsp': 'stdio',
+\ 'executable': {b -> ale#Var(b, 'sourcekit_lsp_executable')},
+\ 'command': '%e',
+\ 'project_root': function('ale#swift#FindProjectRoot'),
+\ 'language': 'swift',
+\})