From 7c59b09bbde53c4c58b789491154e14efd1b78c3 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Sat, 16 Aug 2025 01:15:47 +0900 Subject: [PATCH] nvim automatic highlight opened file --- modules/nvim.nix | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/modules/nvim.nix b/modules/nvim.nix index 2fea6b6..59de8b0 100644 --- a/modules/nvim.nix +++ b/modules/nvim.nix @@ -193,8 +193,15 @@ # Additional Lua configuration for plugins that need custom setup extraConfigLua = '' - -- Nvim-tree setup with filters + -- Nvim-tree setup with filters and auto-sync require("nvim-tree").setup({ + sync_root_with_cwd = true, + respect_buf_cwd = true, + update_focused_file = { + enable = true, + update_root = true, + ignore_list = {}, + }, filters = { dotfiles = true, -- Hide dotfiles by default (H to toggle) git_ignored = false, -- Show gitignored files by default (I to toggle) @@ -202,6 +209,14 @@ ".DS_Store", }, }, + view = { + width = 30, + side = "left", + }, + renderer = { + highlight_opened_files = "all", + highlight_modified = "all", + }, }) -- Dictionary completion setup