rebase: fix mappings
This commit is contained in:
parent
6102571a7f
commit
2be3e66c3c
3 changed files with 10 additions and 17 deletions
|
@ -8,6 +8,8 @@ end
|
|||
-- these settings will be merged with any settings definined in config.lua
|
||||
local default_config = {
|
||||
border = 'rounded',
|
||||
disable_builtin_plugins = {},
|
||||
add_plugins = {},
|
||||
theme = 'tokyonight',
|
||||
lsp = {
|
||||
format_on_save = true, -- true/false or table of filetypes {'.ts', '.js',}
|
||||
|
|
|
@ -1,15 +1,13 @@
|
|||
local map = require('cosmic.utils').map
|
||||
local ok, user_plugins = pcall(require, 'cosmic.config.plugins')
|
||||
local user_plugins = require('cosmic.config')
|
||||
|
||||
-- Mappings for plugins that need to be lazy loaded
|
||||
if ok then
|
||||
if not vim.tbl_contains(user_plugins.disable, 'nvim-tree') then
|
||||
require('cosmic.plugins.nvim-tree.mappings')
|
||||
end
|
||||
if not vim.tbl_contains(user_plugins.disable_builtin_plugins, 'nvim-tree') then
|
||||
require('cosmic.plugins.nvim-tree.mappings')
|
||||
end
|
||||
|
||||
if not vim.tbl_contains(user_plugins.disable, 'auto-session') then
|
||||
require('cosmic.plugins.auto-session.mappings')
|
||||
end
|
||||
if not vim.tbl_contains(user_plugins.disable_builtin_plugins, 'auto-session') then
|
||||
require('cosmic.plugins.auto-session.mappings')
|
||||
end
|
||||
|
||||
-- Quickfix mappings
|
||||
|
|
|
@ -10,18 +10,11 @@ local use = packer.use
|
|||
local ok, user_config = pcall(require, 'cosmic.config')
|
||||
if not ok then
|
||||
user_config = {
|
||||
add = {},
|
||||
disable = {},
|
||||
add_plugins = {},
|
||||
disable_builtin_plugins = {},
|
||||
}
|
||||
end
|
||||
|
||||
if not vim.tbl_islist(user_config.add) then
|
||||
user_config.add_plugins = {}
|
||||
end
|
||||
if not vim.tbl_islist(user_config.disable) then
|
||||
user_config.disable_builtin_plugins = {}
|
||||
end
|
||||
|
||||
local config = require('cosmic.config')
|
||||
|
||||
return packer.startup(function()
|
||||
|
|
Loading…
Add table
Reference in a new issue