aboutsummaryrefslogtreecommitdiffhomepage
path: root/.config/nvim/lua
diff options
context:
space:
mode:
Diffstat (limited to '.config/nvim/lua')
-rw-r--r--.config/nvim/lua/init/05-appearance.lua21
-rw-r--r--.config/nvim/lua/vimrc/plugins.lua22
2 files changed, 6 insertions, 37 deletions
diff --git a/.config/nvim/lua/init/05-appearance.lua b/.config/nvim/lua/init/05-appearance.lua
index e218252..3c184e6 100644
--- a/.config/nvim/lua/init/05-appearance.lua
+++ b/.config/nvim/lua/init/05-appearance.lua
@@ -123,30 +123,17 @@ function vimrc.statusline.filename(bufnr)
return '*scratch*'
end
- local simplify_bufname
- if vim.b[bufnr].fern then
- simplify_bufname = function(bufname)
- bufname = F['fern#fri#parse'](bufname).path
- if vim.startswith(bufname, 'file://') then
- bufname = bufname:sub(#'file://' + 1)
- end
- return bufname
- end
- else
- simplify_bufname = function(bufname) return bufname end
- end
-
- local this_path = simplify_bufname(F.expand(('#%s:p'):format(bufnr)))
+ local this_path = F.expand(('#%s:p'):format(bufnr))
local other_paths = {}
for b = 1, F.bufnr('$') do
if F.bufexists(b) and b ~= bufnr then
- other_paths[#other_paths+1] = simplify_bufname(F.bufname(b))
+ other_paths[#other_paths+1] = F.bufname(b)
end
end
local result = uniquify.uniquify(this_path, other_paths)
- if vim.b[bufnr].fern then
- return '[fern] ' .. result .. '/'
+ if vim.bo[bufnr].filetype == 'dirvish' then
+ return '[dir] ' .. result .. '/'
else
return result
end
diff --git a/.config/nvim/lua/vimrc/plugins.lua b/.config/nvim/lua/vimrc/plugins.lua
index 092cae2..7b4f5dc 100644
--- a/.config/nvim/lua/vimrc/plugins.lua
+++ b/.config/nvim/lua/vimrc/plugins.lua
@@ -252,27 +252,9 @@ return {
vim.keymap.set('n', 'gfa', '<Plug>(altr-forward)')
end,
},
- -- Full-featured filer.
+ -- Simple filer.
{
- 'lambdalisue/fern.vim',
- lazy = true,
- cmd = {'Fern'},
- config = function()
- local vimrc = require('vimrc')
-
- vimrc.autocmd('FileType', {
- pattern = {'fern'},
- callback = function()
- if vim.fn.hasmapto('<Plug>(fern-action-open:tabedit)', 'n') == 1 then
- vim.keymap.del('n', 't', { buffer = true })
- end
- end,
- })
- end,
- },
- -- Fern plugin: hijack Netrw.
- {
- 'lambdalisue/fern-hijack.vim',
+ 'justinmk/vim-dirvish',
},
-- Appearance {{{1
-- Show highlight.