From cca7d1d671348369ae4930bc723feeff5b6f34ae Mon Sep 17 00:00:00 2001 From: Christian Clason Date: Sun, 16 Jan 2022 11:02:16 +0100 Subject: fix(swift): switch to maintained parser upstream https://github.com/tree-sitter/tree-sitter-swift is abandoned. --- README.md | 2 +- lockfile.json | 2 +- lua/nvim-treesitter/parsers.lua | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index fbd1c7bb..1bd036ad 100644 --- a/README.md +++ b/README.md @@ -235,7 +235,7 @@ We are looking for maintainers to add more parsers and to write query files for - [x] [supercollider](https://github.com/madskjeldgaard/tree-sitter-supercollider) (maintained by @madskjeldgaard) - [x] [surface](https://github.com/connorlay/tree-sitter-surface) (maintained by @connorlay) - [x] [svelte](https://github.com/Himujjal/tree-sitter-svelte) (maintained by @elianiva) -- [ ] [swift](https://github.com/tree-sitter/tree-sitter-swift) +- [x] [swift](https://github.com/alex-pinkus/tree-sitter-swift) - [x] [teal](https://github.com/euclidianAce/tree-sitter-teal) (maintained by @euclidianAce) - [x] [tlaplus](https://github.com/tlaplus-community/tree-sitter-tlaplus) (maintained by @ahelwer) - [x] [toml](https://github.com/ikatyang/tree-sitter-toml) (maintained by @tk-shirasaka) diff --git a/lockfile.json b/lockfile.json index 88593361..d8b84f96 100644 --- a/lockfile.json +++ b/lockfile.json @@ -237,7 +237,7 @@ "revision": "98274d94ec33e994e8354d9ddfdef58cca471294" }, "swift": { - "revision": "a22fa5e19bae50098e2252ea96cba3aba43f4c58" + "revision": "05e21aac6b3abefd94cf7f01665390307820eecd" }, "teal": { "revision": "fcc5f6f4d194dede4e676834ff28a506e39e17b4" diff --git a/lua/nvim-treesitter/parsers.lua b/lua/nvim-treesitter/parsers.lua index 7352bae7..314efab4 100644 --- a/lua/nvim-treesitter/parsers.lua +++ b/lua/nvim-treesitter/parsers.lua @@ -370,9 +370,10 @@ list.ocamllex = { list.swift = { install_info = { - url = "https://github.com/tree-sitter/tree-sitter-swift", - files = { "src/parser.c" }, + url = "https://github.com/alex-pinkus/tree-sitter-swift", + files = { "src/parser.c", "src/scanner.c" }, requires_generate_from_grammar = true, + generate_requires_npm = true, }, } -- cgit v1.2.3