intial rip from kickstart
This commit is contained in:
parent
de44f49101
commit
c0ad86ac7c
23 changed files with 2080 additions and 1210 deletions
56
lua/custom/plugins/oil.lua
Normal file
56
lua/custom/plugins/oil.lua
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
return {
|
||||
'stevearc/oil.nvim',
|
||||
---@module 'oil'
|
||||
---@type oil.SetupOpts
|
||||
opts = {},
|
||||
-- Optional dependencies
|
||||
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
|
||||
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if prefer nvim-web-devicons
|
||||
keymaps = {
|
||||
['g?'] = { 'actions.show_help', mode = 'n' },
|
||||
['<CR>'] = 'actions.select',
|
||||
['<C-s>'] = { 'actions.select', opts = { vertical = true } },
|
||||
['<C-h>'] = { 'actions.select', opts = { horizontal = true } },
|
||||
['<C-t>'] = { 'actions.select', opts = { tab = true } },
|
||||
['<C-p>'] = 'actions.preview',
|
||||
['<C-c>'] = { 'actions.close', mode = 'n' },
|
||||
['<C-l>'] = 'actions.refresh',
|
||||
['-'] = { 'actions.parent', mode = 'n' },
|
||||
['_'] = { 'actions.open_cwd', mode = 'n' },
|
||||
['`'] = { 'actions.cd', mode = 'n' },
|
||||
['~'] = { 'actions.cd', opts = { scope = 'tab' }, mode = 'n' },
|
||||
['gs'] = { 'actions.change_sort', mode = 'n' },
|
||||
['gx'] = 'actions.open_external',
|
||||
['g.'] = { 'actions.toggle_hidden', mode = 'n' },
|
||||
['g\\'] = { 'actions.toggle_trash', mode = 'n' },
|
||||
},
|
||||
view_options = {
|
||||
-- Show files and directories that start with "."
|
||||
show_hidden = false,
|
||||
-- This function defines what is considered a "hidden" file
|
||||
is_hidden_file = function(name, bufnr)
|
||||
local m = name:match '^%.'
|
||||
return m ~= nil
|
||||
end,
|
||||
-- This function defines what will never be shown, even when `show_hidden` is set
|
||||
is_always_hidden = function(name, bufnr)
|
||||
return false
|
||||
end,
|
||||
-- Sort file names with numbers in a more intuitive order for humans.
|
||||
-- Can be "fast", true, or false. "fast" will turn it off for large directories.
|
||||
natural_order = 'fast',
|
||||
-- Sort file and directory names case insensitive
|
||||
case_insensitive = false,
|
||||
sort = {
|
||||
-- sort order can be "asc" or "desc"
|
||||
-- see :help oil-columns to see which columns are sortable
|
||||
{ 'type', 'asc' },
|
||||
{ 'name', 'asc' },
|
||||
},
|
||||
},
|
||||
config = function()
|
||||
require('oil').setup {
|
||||
vim.keymap.set('n', '-', '<CMD>Oil<CR>', { desc = 'Open parent directory' }),
|
||||
}
|
||||
end,
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue