GithubHelp home page GithubHelp logo

Comments (2)

williamhCode avatar williamhCode commented on June 16, 2024

I tried doing removing the separator for tabline:

  tabline = {
    lualine_a = {
      {
        "tabs",
        separator = "",
        mode = 2,
        path = 0,
      },
    },
  },

Unfortunately did not work. I guess that's for the entire component, not the separator in between tabs.

from lualine.nvim.

daephx avatar daephx commented on June 16, 2024

You might be able to give the buffer component it's own explicit separators?

{
  "buffers",
  -- separators = { left = "", right = "" },
  component_separators = { left = "", right = "" },
  section_separators = { left = "", right = "" },
}

Alternatively, you could use the process_sections function from the master/examples/slanted-gaps.lua example theme if you need to modify the separators for all of the components in one of the tabline/statusline sections.

This has been what I have used for while.

---Override separators for all components
---@param sections table
---@return table
local function process_sections(sections)
  for _, section in pairs(sections) do
    for id, comp in ipairs(section) do
      if type(comp) ~= "table" then
        comp = { comp }
        section[id] = comp
      end
      comp.component_separators = { left = "", right = "" }
      comp.section_separators = { left = "", right = "" }
    end
  end
  return sections
end

If you're using lazy.nvim, you pass this into the config function and overwrite the opts.tabline table before loading lualine.

config = function(_, opts)
  -- NOTE: Modify separators before loading plugin
  -- opts.sections = process_sections(opts.sections)
  opts.tabline = process_sections(opts.tabline)
  require("lualine").setup(opts)
end

from lualine.nvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.