···55local M = {}
6677function M.setup_ide_layout()
88- -- Close all windows except current
99- vim.cmd("only")
88+ -- Close all windows except current (ignore errors from floating windows)
99+ pcall(function() vim.cmd("only") end)
1010+1111+ -- Close nvim-tree if open
1212+ pcall(function() vim.cmd("NvimTreeClose") end)
10131114 -- Open nvim-tree on the left
1215 vim.cmd("NvimTreeOpen")
···25282629 -- Open terminal in bottom split
2730 vim.cmd("terminal")
2828- vim.cmd("startinsert")
29313032 -- Move back to top split (editor)
3133 vim.cmd("wincmd k")