summaryrefslogtreecommitdiff
path: root/.config/nvim/after
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-11-16 23:06:48 +0100
committerThomas Voss <mail@thomasvoss.com> 2023-11-16 23:06:48 +0100
commit56556a10b09f5c120bcede44d576e5715026c63c (patch)
tree49928e1a54e81177d9c3ef2d428345131259e866 /.config/nvim/after
parent0a7365d6fc4d87790d791449dc650b6d88e75acf (diff)
nvim: Move netrw config to its own file
Diffstat (limited to '.config/nvim/after')
-rw-r--r--.config/nvim/after/plugin/netrw.vim13
1 files changed, 13 insertions, 0 deletions
diff --git a/.config/nvim/after/plugin/netrw.vim b/.config/nvim/after/plugin/netrw.vim
new file mode 100644
index 0000000..f9e0f9a
--- /dev/null
+++ b/.config/nvim/after/plugin/netrw.vim
@@ -0,0 +1,13 @@
+function! s:gitignore_files()
+ silent! !git rev-parse --is-inside-work-tree
+ if v:shell_error == 0
+ return netrw_gitignore#Hide()
+ endif
+ return '^$' " Shouldn’t match anything
+endfunction
+
+let g:netrw_banner = 0
+let g:netrw_bufsettings = 'noma nomod nu nobl nowrap ro' " Enables line-numbers
+let g:netrw_list_hide = s:gitignore_files()
+ \ .. ',^\(\.\|\.\.\)/\?$'
+ \ .. ',.*\.o$'