feat: add highlight for executable files

Problem: executable files were visually indistinguishable from regular
files in oil buffers.

Solution: add OilExecutable highlight group (linked to DiagnosticOk)
that detects executables via Unix permission bits (S_IXUSR|S_IXGRP|
S_IXOTH) and Windows executable extensions (.exe, .bat, .cmd, .com,
.ps1). Applied to both regular files and symlink targets.

Based on: stevearc/oil.nvim#698
Closes stevearc/oil.nvim#679
This commit is contained in:
Barrett Ruth 2026-02-20 16:54:11 -05:00
parent 950d3d1ad2
commit 41556ec87f
Signed by: barrett
GPG key ID: A6C96C9349D2FC81
3 changed files with 43 additions and 1 deletions

View file

@ -923,6 +923,11 @@ M._get_highlights = function()
link = "OilHidden",
desc = "Hidden normal files in an oil buffer",
},
{
name = "OilExecutable",
link = "DiagnosticOk",
desc = "Executable files in an oil buffer",
},
{
name = "OilCreate",
link = "DiagnosticInfo",