nvim/lua/netrw-config.lua

38 lines
1.1 KiB
Lua

-- Netrw configuration for file browsing
-- Native Neovim file explorer (no plugins required)
-- Hide the banner (that annoying help text at the top)
vim.g.netrw_banner = 0
-- Tree view by default (3 = tree style)
-- Options: 0=thin, 1=long, 2=wide, 3=tree
vim.g.netrw_liststyle = 3
-- Preview in horizontal split (underneath)
vim.g.netrw_preview = 0
-- Open preview splits below (1=below, 0=above)
vim.g.netrw_alto = 0
-- Window size for preview splits (percentage for preview window)
-- 50% split when pressing 'p'
vim.g.netrw_winsize = 50
-- Keep the current directory and browsing directory synced
-- This makes netrw respect your current working directory
vim.g.netrw_keepdir = 0
-- Open files in the same window (replace netrw buffer)
-- Options: 0=same window, 1=horizontal split, 2=vertical split, 3=new tab, 4=previous window
-- Using 0 so Enter opens file in netrw window itself
vim.g.netrw_browse_split = 0
-- Sort order: name (empty), time (t), size (s), exten (e)
vim.g.netrw_sort_by = 'name'
-- Hide dotfiles by default (toggle with 'gh' in netrw)
vim.g.netrw_list_hide = [[^\.\.\=/\=$]]
-- Use human-readable file sizes
vim.g.netrw_sizestyle = 'H'