瀏覽代碼

fix(indentblankline): make sure to use the new syntax for all options (#3058)

Abouzar Parvan 2 年之前
父節點
當前提交
538fbd6f68
共有 1 個文件被更改,包括 16 次插入17 次删除
  1. 16 17
      lua/lvim/core/indentlines.lua

+ 16 - 17
lua/lvim/core/indentlines.lua

@@ -1,27 +1,26 @@
 local M = {}
 
 M.config = function()
-  vim.g.indent_blankline_buftype_exclude = { "terminal", "nofile" }
-  vim.g.indent_blankline_filetype_exclude = {
-    "help",
-    "startify",
-    "dashboard",
-    "packer",
-    "neogitstatus",
-    "NvimTree",
-    "Trouble",
-    "text",
-  }
-  vim.g.indentLine_enabled = 1
-  vim.g.indent_blankline_char = "▏"
-  vim.g.indent_blankline_show_trailing_blankline_indent = false
-  vim.g.indent_blankline_show_first_indent_level = true
-  vim.g.indent_blankline_use_treesitter = false
-  vim.g.indent_blankline_show_current_context = true
   lvim.builtin.indentlines = {
     active = true,
     on_config_done = nil,
     options = {
+      enabled = true,
+      buftype_exclude = { "terminal", "nofile" },
+      filetype_exclude = {
+        "help",
+        "startify",
+        "dashboard",
+        "packer",
+        "neogitstatus",
+        "NvimTree",
+        "Trouble",
+        "text",
+      },
+      char = "▏",
+      show_trailing_blankline_indent = false,
+      show_first_indent_level = false,
+      use_treesitter = true,
       show_current_context = true,
     },
   }