浏览代码

Show treesitter icon only with supported filetype (#1512)

luetage 3 年之前
父节点
当前提交
0834517008
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lua/core/lualine/components.lua

+ 2 - 1
lua/core/lualine/components.lua

@@ -71,7 +71,8 @@ return {
   },
   treesitter = {
     function()
-      if next(vim.treesitter.highlighter.active) then
+      local b = vim.api.nvim_get_current_buf()
+      if next(vim.treesitter.highlighter.active[b]) then
         return "  "
       end
       return ""