2023-08-16 02:03:53 -03:00
|
|
|
local keymaps = require('core.keymaps.async.project-tree')
|
|
|
|
|
|
|
|
|
|
return function()
|
|
|
|
|
local on_attach = function(bufnr)
|
|
|
|
|
keymaps(bufnr)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
-- HACK A temporary way to subscribe to the fact that
|
|
|
|
|
-- the setup is complete
|
|
|
|
|
vim.api.nvim_create_autocmd("User", {
|
|
|
|
|
pattern = "NvimTreeSetup",
|
|
|
|
|
callback = function(data)
|
|
|
|
|
on_attach(data.buf)
|
2023-11-10 20:53:12 -03:00
|
|
|
require("lsp-file-operations").setup()
|
2023-08-16 02:03:53 -03:00
|
|
|
end,
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
require("nvim-tree").setup({
|
|
|
|
|
-- TODO uncomment this in a version that it actually works
|
|
|
|
|
-- on_attach = on_attach
|
2023-11-15 17:01:08 -03:00
|
|
|
view = {
|
2023-11-20 12:53:22 -03:00
|
|
|
width = 45,
|
2023-11-15 17:01:08 -03:00
|
|
|
},
|
|
|
|
|
filters = {
|
|
|
|
|
dotfiles = false,
|
|
|
|
|
},
|
2023-08-16 02:03:53 -03:00
|
|
|
})
|
|
|
|
|
end
|