summaryrefslogtreecommitdiff
path: root/lua/ben/core
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-09-24 09:00:56 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2023-09-24 09:00:56 -0400
commit7af7475ebbb47e376286866accb9c1822237e6de (patch)
tree9b65aa1a2f20c2f811a06392f9fe4c067a2cdc8d /lua/ben/core
parent273545e803d66b626eeec19ec225c336957c23f1 (diff)
V4 of my lua config
Diffstat (limited to 'lua/ben/core')
-rw-r--r--lua/ben/core/init.lua31
1 files changed, 0 insertions, 31 deletions
diff --git a/lua/ben/core/init.lua b/lua/ben/core/init.lua
index 5d8b7b0..eaaba6a 100644
--- a/lua/ben/core/init.lua
+++ b/lua/ben/core/init.lua
@@ -72,34 +72,3 @@ vim.cmd([[autocmd BufWritePre * %s/\s\+$//e]])
-- Tree View for the netrw File Manager
vim.g.netrw_liststyle = 3
vim.g.netrw_banner = 0
--- If nvim is opened with no arguments, open the netrw file manager
-local mygroup = vim.api.nvim_create_augroup("loading_netrwPlugin", { clear = true })
-vim.api.nvim_create_autocmd({ "VimEnter" }, {
- pattern = { "*" },
- callback = function()
- -- Getting the file name that you pass when you launch nvim,
- local current_file = vim.fn.expand("%")
- -- if we have already file_name, then, we edit it
- if current_file ~= "" then
- vim.cmd(":silent! edit " .. current_file)
- else
- -- We will check if the window (buffer) is the lazy nvim, as it conflict if the buffer (popup menu) is lazy
- local lazy_popup_buf_exists = false
- -- We will get list of all current opened buffers
- local buf_list = vim.api.nvim_list_bufs()
- for _, buf in ipairs(buf_list) do
- -- We will obtain from the table only the filetype
- local buf_ft = vim.api.nvim_buf_get_option(buf, "filetype")
- if buf_ft == "lazy" then
- lazy_popup_buf_exists = true
- end
- end -- Check if vim-floaterm is loaded
- local has_floaterm, _ = pcall(require, "floaterm")
- if not lazy_popup_buf_exists and not has_floaterm then
- -- Then we can safely loading netrwPlugin at startup
- vim.cmd(":silent! Explore")
- end
- end
- end,
- group = mygroup,
-})