switch neotree for oil

This commit is contained in:
Andre Schaf 2025-06-10 14:32:54 +02:00
parent c49aaeb82a
commit afd642e367
5 changed files with 36 additions and 24 deletions

View file

@ -1,12 +0,0 @@
local neotree = require("neo-tree")
neotree.setup({
buffers = {
follow_current_file = {
enabled = true,
},
},
window = {
position = "right",
},
})

8
lua/plugin/oil.lua Normal file
View file

@ -0,0 +1,8 @@
require("oil").setup {
view_options = {
-- Show files and directories that start with "."
show_hidden = true,
}
}

View file

@ -45,7 +45,11 @@ require("lazy").setup({
-- formatter
{
'stevearc/conform.nvim',
opts = {},
opts = {
formatters_by_ft = {
htmlangular = { "prettier" },
},
},
},
-- Autocompletion
{ 'hrsh7th/nvim-cmp' }, -- Required
@ -56,14 +60,15 @@ require("lazy").setup({
}
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v3.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
lazy = true,
'stevearc/oil.nvim',
---@module 'oil'
---@type oil.SetupOpts
opts = {},
-- Optional dependencies
dependencies = { { "echasnovski/mini.icons", opts = {} } },
-- dependencies = { "nvim-tree/nvim-web-devicons" }, -- use if you prefer nvim-web-devicons
-- Lazy loading is not recommended because it is very tricky to make it work correctly in all situations.
lazy = false,
},
{
"ThePrimeagen/harpoon",
@ -83,7 +88,6 @@ require("lazy").setup({
ft = { "markdown" },
build = function() vim.fn["mkdp#util#install"]() end,
},
{ 'github/copilot.vim' },
{ 'mhinz/vim-startify' },
}, opts)

View file

@ -1,5 +1,4 @@
vim.keymap.set("n", "<leader>;;", ":Neotree toggle<CR>")
vim.keymap.set("n", "<leader>kk", ":Neotree reveal<CR>")
vim.keymap.set("n", "<leader>kk", "<CMD>Oil<CR>", { desc = "Open parent directory" })
-- jk to escape
vim.keymap.set("i", "jk", "<Esc>")

View file

@ -32,3 +32,16 @@ vim.opt.updatetime = 50
-- use system clipboard
vim.opt.clipboard = "unnamedplus"
vim.g.clipboard = {
name = "win32yank-wsl",
copy = {
["+"] = "win32yank.exe -i --crlf",
["*"] = "win32yank.exe -i --crlf"
},
paste = {
["+"] = "win32yank.exe -o --crlf",
["*"] = "win32yank.exe -o --crlf"
},
cache_enable = 0,
}