diff options
| author | Christian Clason <c.clason@uni-graz.at> | 2024-04-22 19:27:12 +0200 |
|---|---|---|
| committer | Christian Clason <c.clason@uni-graz.at> | 2025-05-12 18:43:40 +0200 |
| commit | 054080bf5986b39128cc64fba6ab144e961d4e2d (patch) | |
| tree | c06086d24003a9c4552e8f8d84b84fe0d020a3d6 | |
| parent | feat(install)!: generate from json instead of requiring node (diff) | |
| download | nvim-treesitter-054080bf5986b39128cc64fba6ab144e961d4e2d.tar nvim-treesitter-054080bf5986b39128cc64fba6ab144e961d4e2d.tar.gz nvim-treesitter-054080bf5986b39128cc64fba6ab144e961d4e2d.tar.bz2 nvim-treesitter-054080bf5986b39128cc64fba6ab144e961d4e2d.tar.lz nvim-treesitter-054080bf5986b39128cc64fba6ab144e961d4e2d.tar.xz nvim-treesitter-054080bf5986b39128cc64fba6ab144e961d4e2d.tar.zst nvim-treesitter-054080bf5986b39128cc64fba6ab144e961d4e2d.zip | |
fix: vim.tbl_flatten is deprecated
| -rw-r--r-- | lua/nvim-treesitter/install.lua | 2 | ||||
| -rw-r--r-- | tests/indent/common.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lua/nvim-treesitter/install.lua b/lua/nvim-treesitter/install.lua index c501b0fa0..6918a1820 100644 --- a/lua/nvim-treesitter/install.lua +++ b/lua/nvim-treesitter/install.lua @@ -386,7 +386,7 @@ end ---@param compile_location string ---@return string? err local function do_compile(logger, repo, cc, compile_location) - local args = vim.tbl_flatten(select_compiler_args(repo, cc)) + local args = vim.iter(select_compiler_args(repo, cc)):flatten():totable() local cmd = vim.list_extend({ cc }, args) logger:info('Compiling parser') diff --git a/tests/indent/common.lua b/tests/indent/common.lua index f33a5908b..6add58c7f 100644 --- a/tests/indent/common.lua +++ b/tests/indent/common.lua @@ -183,7 +183,7 @@ function Runner:whole_file(dirs, opts) assert.is.same(1, vim.fn.isdirectory(dir.filename)) return dir.filename end, dirs) - local files = require('nvim-treesitter.compat').flatten(vim.tbl_map(scan_dir, dirs)) + local files = vim.iter(vim.tbl_map(scan_dir, dirs)):flatten():totable() for _, file in ipairs(files) do local relpath = Path:new(file):make_relative(self.base_dir.filename) self.it(relpath, function() |
