From 351ae05337b3e603aca54e9afc239baa777eb0e8 Mon Sep 17 00:00:00 2001 From: arielherself Date: Wed, 1 Jan 2025 01:28:31 +0800 Subject: [PATCH] feat(nvim): add oil.nvim back --- .vimrc | 4 +++- home-manager/home.nix | 12 +++++++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.vimrc b/.vimrc index 0c62dba..9e329a5 100644 --- a/.vimrc +++ b/.vimrc @@ -119,6 +119,7 @@ Plug 'tpope/vim-fugitive' Plug 'Yggdroot/indentLine' Plug '907th/vim-auto-save' Plug 'markonm/traces.vim' +Plug 'stevearc/oil.nvim' call plug#end() @@ -328,7 +329,8 @@ let g:airline_right_sep = '' let g:airline_right_alt_sep = '' " fix c++ comment style in Neovim -autocmd FileType cpp setl commentstring=//\ %s +" ref: https://github.com/tpope/vim-commentary/issues/15#issuecomment-23127749 +autocmd FileType c,cpp,cs,java setlocal commentstring=//\ %s " Why?! set noshowmode diff --git a/home-manager/home.nix b/home-manager/home.nix index 70a751c..ff0aa5e 100644 --- a/home-manager/home.nix +++ b/home-manager/home.nix @@ -103,11 +103,21 @@ in { # recursive = true; # }; "nvim/init.vim" = { - text= '' + text = '' set runtimepath+=${config.home.homeDirectory}/.vim,${config.home.homeDirectory}/.vim/after set packpath+=${config.home.homeDirectory}/.vim source ${config.home.homeDirectory}/.vimrc set undodir=${config.home.homeDirectory}/.vim/undofiles + lua require('config') + ''; + }; + "nvim/lua/config.lua" = { + text = '' + require('oil').setup { + view_options = { + show_hidden = true, + }, + } ''; }; "nvim/ftplugin/java.lua" = {