LazyVim.LazyVim/lua/lazyvim/util
Jamie Davies 1d4157e681
fix(lualine): apply highlight groups correctly to truncated pretty_paths (#4379)
## Description

This is a small fix to the path truncating in
`LazyVim.lualine.pretty_path()` to make the filename highlighting
actually apply to only the filename, rather than the filename and all
path elements after the inserted ellipsis (`…`).

This keeps it consistent with the behaviour exhibited when the path
isn't truncated, and is what I think most users would expect the
behaviour to be.

## Screenshots

Before this fix:

<img width="320" alt="image"
src="https://github.com/user-attachments/assets/d708a140-2b23-457a-a296-dd411d29d268">

```
   nvim/…/nvim/lua/plugins/lazyvim/ui.lua
   └──┬──┘└──────────────┬──────────────┘
directory_hl        filename_hl
```

After this fix:

<img width="319" alt="image"
src="https://github.com/user-attachments/assets/e9d13fdd-79a8-4e3d-942a-58d0e2bb8bca">

```
nvim/…/nvim/lua/plugins/lazyvim/ui.lua
└──────────────┬───────────────┘└─┬──┘
         directory_hl        filename_hl
```

## Checklist

- [x] I've read the
[CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md)
guidelines.
2024-11-07 16:26:17 +01:00
..
cmp.lua feat(extras): blink (#4680) 2024-11-02 09:54:55 +01:00
deprecated.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
extras.lua fix(extras): don't load pkgs when parsing specs for LazyExtras 2024-06-29 10:19:01 +02:00
format.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
init.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
inject.lua feat(util): set_upvalue 2024-05-16 21:25:51 +02:00
json.lua feat: allow a custom path for lazyvim.json. Fixes #3856 2024-06-29 21:19:15 +02:00
lsp.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
lualine.lua fix(lualine): apply highlight groups correctly to truncated pretty_paths (#4379) 2024-11-07 16:26:17 +01:00
mini.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
news.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
pick.lua fix(pick): get rid of "auto" picker and set better defaults for telescope find_files (#4024) 2024-07-14 07:52:00 +02:00
plugin.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
root.lua feat(root): provide vim.g.root_lsp_ignore to ignore LSP servers (#4332) 2024-10-03 15:55:25 +02:00
terminal.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00
ui.lua feat(core)!: move a bunch of LazyVim features to snacks.nvim (#4706) 2024-11-07 15:54:47 +01:00