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

View file

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

View file

@ -32,3 +32,16 @@ vim.opt.updatetime = 50
-- use system clipboard -- use system clipboard
vim.opt.clipboard = "unnamedplus" 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,
}