[go: up one dir, main page]

Skip to content

Commit

Permalink
build(deps): drop unused bundled bash, python parsers and queries
Browse files Browse the repository at this point in the history
Problem: Neovim bundles treesitter parsers for bash and python but does
not use them by default. This dilutes the messaging about the bundled
parsers being required for functionality or reasonable out-of-the-box
experience. It also increases the risk of query incompatibilities for no
gain.

Solution: Stop bundling bash and python parser and queries.
(cherry picked from commit 51d85f7)
  • Loading branch information
clason committed Jul 9, 2024
1 parent 46d2906 commit ba90b54
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 746 deletions.
2 changes: 1 addition & 1 deletion BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ cmake --build build
### How to build without "bundled" dependencies

1. Manually install the dependencies:
- libuv libluv libvterm luajit lua-lpeg lua-mpack msgpack-c tree-sitter tree-sitter-bash tree-sitter-c tree-sitter-lua tree-sitter-markdown tree-sitter-python tree-sitter-query tree-sitter-vim tree-sitter-vimdoc unibilium
- libuv libluv libvterm luajit lua-lpeg lua-mpack msgpack-c tree-sitter tree-sitter-c tree-sitter-lua tree-sitter-markdown tree-sitter-query tree-sitter-vim tree-sitter-vimdoc unibilium
2. Run CMake:
```sh
cmake -B build -G Ninja -D CMAKE_BUILD_TYPE=RelWithDebInfo
Expand Down
2 changes: 1 addition & 1 deletion cmake.deps/cmake/BuildTreesitterParsers.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function(BuildTSParser)
${EXTERNALPROJECT_OPTIONS})
endfunction()

foreach(lang c lua vim vimdoc query python bash)
foreach(lang c lua vim vimdoc query)
BuildTSParser(LANG ${lang})
endforeach()
BuildTSParser(LANG markdown CMAKE_FILE MarkdownParserCMakeLists.txt)
4 changes: 0 additions & 4 deletions cmake.deps/deps.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ TREESITTER_VIMDOC_URL https://github.com/neovim/tree-sitter-vimdoc/archive/v3.0.
TREESITTER_VIMDOC_SHA256 a639bf92bf57bfa1cdc90ca16af27bfaf26a9779064776dd4be34c1ef1453f6c
TREESITTER_QUERY_URL https://github.com/tree-sitter-grammars/tree-sitter-query/archive/v0.4.0.tar.gz
TREESITTER_QUERY_SHA256 d3a423ab66dc62b2969625e280116678a8a22582b5ff087795222108db2f6a6e
TREESITTER_PYTHON_URL https://github.com/tree-sitter/tree-sitter-python/archive/v0.21.0.tar.gz
TREESITTER_PYTHON_SHA256 720304a603271fa89e4430a14d6a81a023d6d7d1171b1533e49c0ab44f1e1c13
TREESITTER_BASH_URL https://github.com/tree-sitter/tree-sitter-bash/archive/v0.21.0.tar.gz
TREESITTER_BASH_SHA256 f0515efda839cfede851adb24ac154227fbc0dfb60c6c11595ecfa9087d43ceb
TREESITTER_MARKDOWN_URL https://github.com/MDeiml/tree-sitter-markdown/archive/v0.2.3.tar.gz
TREESITTER_MARKDOWN_SHA256 4909d6023643f1afc3ab219585d4035b7403f3a17849782ab803c5f73c8a31d5
TREESITTER_URL https://github.com/tree-sitter/tree-sitter/archive/v0.22.6.tar.gz
Expand Down
4 changes: 2 additions & 2 deletions runtime/doc/news.txt
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,8 @@ The following new features were added.
|default-autocmds|

• Treesitter:
• Bundled parsers and queries (highlight, folds) for Markdown, Python, and
Bash.
• Bundled parsers and queries (highlight, folds) for Markdown (used for LSP
hover).
|:InspectTree| shows root nodes.
|:InspectTree| now supports |folding|.
|:InspectTree| shows node ranges in 0-based instead of 1-based indexing.
Expand Down
9 changes: 0 additions & 9 deletions runtime/queries/bash/folds.scm

This file was deleted.

232 changes: 0 additions & 232 deletions runtime/queries/bash/highlights.scm

This file was deleted.

3 changes: 0 additions & 3 deletions runtime/queries/bash/injections.scm

This file was deleted.

28 changes: 0 additions & 28 deletions runtime/queries/python/folds.scm

This file was deleted.

Loading

0 comments on commit ba90b54

Please sign in to comment.