-- This is a VS Code like winbar that uses nvim-navic in order to get LSP context from your language server.

return {
  {
    "utilyre/barbecue.nvim",
    name = "barbecue",
    version = "*",
    dependencies = {
      "SmiteshP/nvim-navic",
      "nvim-tree/nvim-web-devicons",
    },
    event = { "BufReadPost", "BufNewFile" },
    config = function()
      require("barbecue").setup({
        -- Create autocmd to attach to LSP
        attach_navic = true,
        
        -- Create user commands
        create_autocmd = true,
        
        -- Whether to show/use file icons
        show_modified = false,
        
        -- Whether to show file path
        show_dirname = true,
        
        -- Whether to show basename
        show_basename = true,
        
        -- Filetypes to exclude
        exclude_filetypes = { "netrw", "toggleterm", "alpha", "NvimTree" },
        
        -- Modifiers to apply to dirname
        modifiers = {
          dirname = ":~:.",
          basename = "",
        },
        
        -- Whether to display path to file
        show_navic = true,
        
        -- Custom section
        custom_section = function()
          return " "
        end,
        
        -- Theme configuration
        theme = "auto", -- 'auto', 'tokyonight', 'catppuccin', etc.
        
        -- Symbols for different node kinds
        kinds = {
          File = "",
          Module = "",
          Namespace = "",
          Package = "",
          Class = "",
          Method = "",
          Property = "",
          Field = "",
          Constructor = "",
          Enum = "",
          Interface = "",
          Function = "",
          Variable = "",
          Constant = "",
          String = "",
          Number = "",
          Boolean = "",
          Array = "",
          Object = "",
          Key = "",
          Null = "",
          EnumMember = "",
          Struct = "",
          Event = "",
          Operator = "",
          TypeParameter = "",
        },
      })
    end,
  },
  {
    "SmiteshP/nvim-navic",
    dependencies = {
      "neovim/nvim-lspconfig",
    },
    opts = {
      lsp = {
        auto_attach = true,
        preference = nil,
      },
      highlight = true,
      separator = " > ",
      depth_limit = 0,
      depth_limit_indicator = "..",
      safe_output = true,
      lazy_update_context = false,
      click = false,
    },
  },
}
