From ef60b339873f6c0168c28aa7d8141af64df1f3e2 Mon Sep 17 00:00:00 2001 From: Gustaf Rydholm Date: Sun, 30 Oct 2022 02:43:24 +0200 Subject: Add better netrw navs --- fnl/config/autocmd.fnl | 4 ++++ fnl/config/which-key.fnl | 1 + fnl/settings/options.fnl | 3 +++ 3 files changed, 8 insertions(+) (limited to 'fnl') diff --git a/fnl/config/autocmd.fnl b/fnl/config/autocmd.fnl index 0b97224..0c74fe8 100644 --- a/fnl/config/autocmd.fnl +++ b/fnl/config/autocmd.fnl @@ -43,3 +43,7 @@ :callback (lambda [] (env.init nvim.g.aniseed#env) (packer.sync))}) + +(create-autocmd :FileType + {:pattern :netrw + :command "nmap h -^ | nmap l "}) diff --git a/fnl/config/which-key.fnl b/fnl/config/which-key.fnl index 11a6dce..3700121 100644 --- a/fnl/config/which-key.fnl +++ b/fnl/config/which-key.fnl @@ -26,6 +26,7 @@ :hidden [: : : : :call :lua "^:" "^ "] :show_help true :triggers :auto + :disable {:filetypes [:netrw]} :triggers_blacklist {:i [:j :k] :v [:j :k]}}) (def- mopts {:mode :n diff --git a/fnl/settings/options.fnl b/fnl/settings/options.fnl index bc82be7..6d1fd7a 100644 --- a/fnl/settings/options.fnl +++ b/fnl/settings/options.fnl @@ -88,6 +88,9 @@ (nvim.ex.set :formatoptions-=cro) (nvim.ex.set :colorcolumn=80) (nvim.ex.set :shortmess+=c) + +;; Netrw settings (set vim.g.netrw_browse_split 0) (set vim.g.netrw_banner 0) (set vim.g.netrw_winsize 25) +(set vim.g.netrw_preview 1) -- cgit v1.2.3-70-g09d2