Replies: 1 comment
|
That's an interesting idea! Luckily, this can be implemented relatively concisely with already present 'mini.files' capabilities. For example with something like this: -- Track which files are modified
local modified_files = {}
local register_modified = function(ev) modified_files[ev.match] = vim.bo[ev.buf].modified end
vim.api.nvim_create_autocmd('BufModifiedSet', { callback = register_modified })
-- Highlight file system entry in red if its file is modified
local my_highlight = function(fs_entry)
if modified_files[fs_entry.path] then return 'DiagnosticError' end
return MiniFiles.default_highlight(fs_entry)
end
require('mini.files').setup({ content = { highlight = my_highlight } }) |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
When browsing files with mini.files it is impossible to see which files have modified/unsaved changes.
A visual indicator (such as a different color or an icon) for modified files would greatly improve usability. Having an option to set this as a parameter in .setup() would be nice. I can open a PR if you dont mind merging it as a feature
All reactions