aboutsummaryrefslogtreecommitdiffstats
path: root/lua
diff options
context:
space:
mode:
authorMarin Usalj <marin2211@gmail.com>2020-03-30 18:52:44 +0200
committerMarin Usalj <marin2211@gmail.com>2020-04-06 17:14:42 +0200
commitf81621a2e91679e3f6aacce9ec7698a6e8299159 (patch)
treea3165f9e86aff78ca2eeccda727c99c9f593f888 /lua
parentAdd CodeQL support (#138) (diff)
downloadnvim-lspconfig-f81621a2e91679e3f6aacce9ec7698a6e8299159.tar
nvim-lspconfig-f81621a2e91679e3f6aacce9ec7698a6e8299159.tar.gz
nvim-lspconfig-f81621a2e91679e3f6aacce9ec7698a6e8299159.tar.bz2
nvim-lspconfig-f81621a2e91679e3f6aacce9ec7698a6e8299159.tar.lz
nvim-lspconfig-f81621a2e91679e3f6aacce9ec7698a6e8299159.tar.xz
nvim-lspconfig-f81621a2e91679e3f6aacce9ec7698a6e8299159.tar.zst
nvim-lspconfig-f81621a2e91679e3f6aacce9ec7698a6e8299159.zip
Add Swift support through sourcekit-lsp
This is still experimental, and requires you to have sourcekit-lsp in your PATH. You can find the binary with `xcrun --find sourcekit-lsp`
Diffstat (limited to 'lua')
-rw-r--r--lua/nvim_lsp/sourcekit.lua25
1 files changed, 25 insertions, 0 deletions
diff --git a/lua/nvim_lsp/sourcekit.lua b/lua/nvim_lsp/sourcekit.lua
new file mode 100644
index 00000000..7791f7d8
--- /dev/null
+++ b/lua/nvim_lsp/sourcekit.lua
@@ -0,0 +1,25 @@
+local configs = require 'nvim_lsp/configs'
+local util = require 'nvim_lsp/util'
+
+configs.sourcekit = {
+ default_config = {
+ cmd = {"xcrun", "sourcekit-lsp"};
+ filetypes = {"swift"};
+ root_dir = util.root_pattern("Package.swift", ".git")
+ };
+ -- on_new_config = function(new_config) end;
+ -- on_attach = function(client, bufnr) end;
+ docs = {
+ package_json = "https://github.com/apple/sourcekit-lsp/blob/master/Editors/vscode/package.json";
+ description = [[
+https://github.com/apple/sourcekit-lsp
+
+Language server for Swift and C/C++/Objective-C.
+ ]];
+ default_config = {
+ root_dir = [[root_pattern("Package.swift", ".git")]];
+ };
+ };
+};
+
+-- vim:et ts=2 sw=2