Skip to content

Commit 4f23e8a

Browse files
committed
add oil.nvim
1 parent 431fa9a commit 4f23e8a

File tree

2 files changed

+39
-1
lines changed

2 files changed

+39
-1
lines changed

init.lua

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
--[[
2-
2+
33
=====================================================================
44
==================== READ THIS BEFORE CONTINUING ====================
55
=====================================================================
@@ -185,6 +185,8 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
185185
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
186186
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })
187187

188+
vim.keymap.set('n', '<leader>fs', '<cmd>Oil<CR>', { desc = 'Open parent directory' })
189+
188190
-- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes
189191
-- vim.keymap.set("n", "<C-S-h>", "<C-w>H", { desc = "Move window to the left" })
190192
-- vim.keymap.set("n", "<C-S-l>", "<C-w>L", { desc = "Move window to the right" })
@@ -908,6 +910,35 @@ require('lazy').setup({
908910
-- Highlight todo, notes, etc in comments
909911
{ 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } },
910912

913+
-- File Explorer
914+
{
915+
'stevearc/oil.nvim',
916+
---@module 'oil'
917+
---@type oil.SetupOpts
918+
opts = {
919+
default_file_explorer = true,
920+
},
921+
-- Optional dependencies
922+
dependencies = { { 'echasnovski/mini.icons', opts = {} } },
923+
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
924+
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
925+
lazy = false,
926+
},
927+
928+
-- GitHub Copilot Chat
929+
{
930+
'CopilotC-Nvim/CopilotChat.nvim',
931+
dependencies = {
932+
{ 'github/copilot.vim' }, -- or zbirenbaum/copilot.lua
933+
{ 'nvim-lua/plenary.nvim', branch = 'master' }, -- for curl, log and async functions
934+
},
935+
build = 'make tiktoken', -- Only on MacOS or Linux
936+
opts = {
937+
-- See Configuration section for options
938+
},
939+
-- See Commands section for default commands if you want to lazy load on them
940+
},
941+
911942
{ -- Collection of various small independent plugins/modules
912943
'echasnovski/mini.nvim',
913944
config = function()
@@ -926,6 +957,9 @@ require('lazy').setup({
926957
-- - sr)' - [S]urround [R]eplace [)] [']
927958
require('mini.surround').setup()
928959

960+
-- File and folder icon
961+
require('mini.icons').setup()
962+
929963
-- Simple and easy statusline.
930964
-- You could remove this setup call if you don't like it,
931965
-- and try some other statusline plugin

lazy-lock.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
{
2+
"CopilotChat.nvim": { "branch": "main", "commit": "75653259442a8eb895abfc70d7064e07aeb7134c" },
23
"LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
34
"blink.cmp": { "branch": "main", "commit": "cb5e346d9e0efa7a3eee7fd4da0b690c48d2a98e" },
45
"conform.nvim": { "branch": "master", "commit": "372fc521f8421b7830ea6db4d6ea3bae1c77548c" },
56
"copilot.vim": { "branch": "release", "commit": "8d1e0f86d8aaa64070c080589bc2a516beb4024f" },
67
"fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" },
8+
"git-blame.nvim": { "branch": "master", "commit": "8503b199edf9a666fe7b1a989cf14e3c26b2eb03" },
79
"gitsigns.nvim": { "branch": "main", "commit": "ee7e50dfbdf49e3acfa416fd3ad3abbdb658582c" },
810
"lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" },
911
"lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" },
1012
"mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" },
1113
"mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" },
1214
"mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" },
15+
"mini.icons": { "branch": "main", "commit": "397ed3807e96b59709ef3292f0a3e253d5c1dc0a" },
1316
"mini.nvim": { "branch": "main", "commit": "05975f387906211745d0aaf996eb7ad3c91b193d" },
1417
"nvim-lspconfig": { "branch": "master", "commit": "8b0f47d851ee5343d38fe194a06ad16b9b9bd086" },
1518
"nvim-treesitter": { "branch": "master", "commit": "684eeac91ed8e297685a97ef70031d19ac1de25a" },
19+
"oil.nvim": { "branch": "master", "commit": "685cdb4ffa74473d75a1b97451f8654ceeab0f4a" },
1620
"plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" },
1721
"telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" },
1822
"telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },

0 commit comments

Comments
 (0)