Giter Site home page Giter Site logo

Comments (5)

deevus avatar deevus commented on July 22, 2024 4

Full path for filename component would be appreciated. I've found myself missing that.

from lualine.nvim.

 avatar commented on July 22, 2024 3

For full file path, it would be great if it had an option to use pathshorten if the window size get lower than a defined value.
This is what I have been using so far:

local function filepath()
  local path = vim.fn.expand('%')
  if vim.fn.winwidth(0) <= 84 then
    path = vim.fn.pathshorten(path)
  end
  return path
end
lualine.sections.lualine_c = { filepath }

from lualine.nvim.

 avatar commented on July 22, 2024 2

I have always used relative path. I find it more convenient since you are, in most cases, working in a project folder (maybe even set with vim-rooter).
But since we are discussing about options, it would be cool having both.. the only difference would be expand('%:p') instead of expand('%').
Also looking for the string lenght is a great idea! 😊

from lualine.nvim.

shadmansaleh avatar shadmansaleh commented on July 22, 2024

For full file path, it would be great if it had an option to use pathshorten if the window size get lower than a defined value.-

good idea i'll add it to #60. Maybe we should see the lenght of file path too for shorting it .
By the way should we have relative filepath or complete filepath from root for full filename . What do you guys think?

from lualine.nvim.

shadmansaleh avatar shadmansaleh commented on July 22, 2024

But since we are discussing about options, it would be cool having both.. the only difference would be expand('%:p') instead of expand('%')

I've added a relative option that can be set to false to have full_path from root otherwise it will show relative path . Also added path shortning.

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.