remove config menu from binds.lua
This commit is contained in:
@ -58,41 +58,6 @@ a.nvim_create_autocmd('FileType', {
|
||||
end
|
||||
})
|
||||
|
||||
-- custom menu for simpler neovim managment -----------------------------------
|
||||
local function configmenu()
|
||||
local list = {}
|
||||
local function add(name, plug)
|
||||
if not plug then
|
||||
table.insert(list, name)
|
||||
return
|
||||
end
|
||||
if package.loaded[plug] then
|
||||
table.insert(list, name)
|
||||
end
|
||||
end
|
||||
|
||||
add('edit config')
|
||||
add('update plugins', 'dep')
|
||||
|
||||
vim.ui.select(list, { prompt = 'Config Menu' },
|
||||
function(choice)
|
||||
if choice == 'edit config' then
|
||||
vim.cmd'e $XDG_CONFIG_HOME/nvim/init.lua'
|
||||
end
|
||||
if choice == 'update plugins' then
|
||||
require('dep').sync()
|
||||
if package.loaded['nvim-treesitter'] then
|
||||
vim.cmd'TSUpdate'
|
||||
end
|
||||
if package.loaded['mason'] then
|
||||
require('mason.api.command').MasonUpdate()
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
map('n', '<C-m>', configmenu)
|
||||
|
||||
-- plugin binds ---------------------------------------------------------------
|
||||
-- treesj
|
||||
local treesj = require('treesj')
|
||||
|
Reference in New Issue
Block a user