]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/rmz/util/init.lua
nvim: use nvim-origami for folds
[dotfiles.git] / nvim / lua / rmz / util / init.lua
index abf0c2130696a451af9a400b1e93e07d88e61089..54d8f6b7dec0ccf867d4333d175b6cd8dd83f76c 100644 (file)
@@ -21,21 +21,4 @@ function M.dedup(list)
   return ret
 end
 
   return ret
 end
 
-function M.foldexpr()
-  local buf = vim.api.nvim_get_current_buf()
-  if vim.b[buf].ts_folds == nil then
-    -- as long as we don't have a filetype, don't bother
-    -- checking if treesitter is available (it won't)
-    if vim.bo[buf].filetype == "" then
-      return "0"
-    end
-    if vim.bo[buf].filetype:find("dashboard") then
-      vim.b[buf].ts_folds = false
-    else
-      vim.b[buf].ts_folds = pcall(vim.treesitter.get_parser, buf)
-    end
-  end
-  return vim.b[buf].ts_folds and vim.treesitter.foldexpr() or "0"
-end
-
 return M
 return M