Ver código fonte

fix(breadcrumbs): make sure winbar_filetype_exclude is customizable (#3221)

Abouzar Parvan 2 anos atrás
pai
commit
09cbce44e5
1 arquivos alterados com 27 adições e 26 exclusões
  1. 27 26
      lua/lvim/core/breadcrumbs.lua

+ 27 - 26
lua/lvim/core/breadcrumbs.lua

@@ -8,6 +8,32 @@ M.config = function()
   lvim.builtin.breadcrumbs = {
   lvim.builtin.breadcrumbs = {
     active = true,
     active = true,
     on_config_done = nil,
     on_config_done = nil,
+    winbar_filetype_exclude = {
+      "help",
+      "startify",
+      "dashboard",
+      "packer",
+      "neo-tree",
+      "neogitstatus",
+      "NvimTree",
+      "Trouble",
+      "alpha",
+      "lir",
+      "Outline",
+      "spectre_panel",
+      "toggleterm",
+      "DressingSelect",
+      "Jaq",
+      "harpoon",
+      "dap-repl",
+      "dap-terminal",
+      "dapui_console",
+      "lab",
+      "Markdown",
+      "notify",
+      "noice",
+      "",
+    },
     options = {
     options = {
       icons = {
       icons = {
         Array = icons.Array .. " ",
         Array = icons.Array .. " ",
@@ -67,31 +93,6 @@ M.setup = function()
   end
   end
 end
 end
 
 
-M.winbar_filetype_exclude = {
-  "help",
-  "startify",
-  "dashboard",
-  "packer",
-  "neo-tree",
-  "neogitstatus",
-  "NvimTree",
-  "Trouble",
-  "alpha",
-  "lir",
-  "Outline",
-  "spectre_panel",
-  "toggleterm",
-  "DressingSelect",
-  "Jaq",
-  "harpoon",
-  "dap-repl",
-  "dap-terminal",
-  "dapui_console",
-  "lab",
-  "Markdown",
-  "",
-}
-
 M.get_filename = function()
 M.get_filename = function()
   local filename = vim.fn.expand "%:t"
   local filename = vim.fn.expand "%:t"
   local extension = vim.fn.expand "%:e"
   local extension = vim.fn.expand "%:e"
@@ -161,7 +162,7 @@ local get_gps = function()
 end
 end
 
 
 local excludes = function()
 local excludes = function()
-  if vim.tbl_contains(M.winbar_filetype_exclude, vim.bo.filetype) then
+  if vim.tbl_contains(lvim.builtin.breadcrumbs.winbar_filetype_exclude, vim.bo.filetype) then
     return true
     return true
   end
   end
   return false
   return false