diff options
| author | Stephan Seitz <stephan.seitz@fau.de> | 2021-03-07 17:57:18 +0100 |
|---|---|---|
| committer | Kiyan <yazdani.kiyan@protonmail.com> | 2021-03-16 18:52:43 +0100 |
| commit | c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb (patch) | |
| tree | 553fd44fc93ba4f664ea012cb31f450b21066016 | |
| parent | Update ubuntu-20 (diff) | |
| download | nvim-treesitter-c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb.tar nvim-treesitter-c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb.tar.gz nvim-treesitter-c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb.tar.bz2 nvim-treesitter-c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb.tar.lz nvim-treesitter-c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb.tar.xz nvim-treesitter-c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb.tar.zst nvim-treesitter-c573cdd0a96fcc4c5b0ef2e1a382fa08ddc696fb.zip | |
Add CI hack
| -rw-r--r-- | .github/workflows/check_query_files.yml | 8 | ||||
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 5 |
2 files changed, 6 insertions, 7 deletions
diff --git a/.github/workflows/check_query_files.yml b/.github/workflows/check_query_files.yml index 468ec81d7..45019dab6 100644 --- a/.github/workflows/check_query_files.yml +++ b/.github/workflows/check_query_files.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: luacheck: name: Check Query Files - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 @@ -13,12 +13,6 @@ jobs: run: | sudo apt-get update sudo add-apt-repository universe - sudo apt-get install -y npm - mkdir ~/.npm-global - npm config set prefix '~/.npm-global' - export PATH=~/.npm-global/bin:$PATH - npm i -g tree-sitter - sudo cp ~/.npm-global/bin/tree-sitter /usr/bin/ wget https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage chmod u+x nvim.appimage mkdir -p ~/.local/share/nvim/site/pack/nvim-treesitter/start diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index 09eeb1d86..fbc264c0f 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -153,6 +153,11 @@ local function run_install(cache_folder, install_folder, lang, repo, with_sync, end local parser_lib_name = install_folder..path_sep..lang..".so" + if repo.requires_generate_from_grammar ~= 1 and vim.env.CI then + print("Skipping language "..lang.." on CI (requires npm)!") + return + end + generate_from_grammar = repo.requires_generate_from_grammar or generate_from_grammar if generate_from_grammar and vim.fn.executable('tree-sitter') ~= 1 then |
