feat(configs): add more plugin config options

This commit is contained in:
Matt Leong 2021-11-29 14:35:04 -08:00
parent f6c4a9d2cb
commit c7d28b0176
4 changed files with 28 additions and 18 deletions

View file

@ -5,19 +5,15 @@
local config = {} local config = {}
-- auto session settings -- default statusline icon
-- see Cosmic defaults: core/session/init.lua
config.session = {}
-- statusline settings
config.statusline = { config.statusline = {
main_icon = '', main_icon = '',
} }
-- see Cosmic defaults: core/treesitter/init.lua -- See :h nvim-treesitter-quickstart
config.treesitter = {} config.treesitter = {}
-- theming, don't forget to run :PackerSync and reload CosmicNvim when chaning themes -- theming, don't forget to run :CosmicReloadSync when changing themes
-- 'catppuccin' -- 'catppuccin'
-- 'dracula' -- 'dracula'
-- 'enfocado' -- 'enfocado'
@ -68,10 +64,19 @@ config.lsp = {
ts_utils = {}, ts_utils = {},
} }
config.nvim_tree = { -- See https://github.com/folke/todo-comments.nvim#%EF%B8%8F-configuration
view = { config.comments = {}
width = 50,
}, -- See :h nvim-tree.setup
} config.nvim_tree = {}
-- See :h notify.setup
config.notify = {}
-- See https://github.com/rmagatti/auto-session#%EF%B8%8F-configuration
config.session = {}
-- See :h telescope.setup
config.telescope = {}
return config return config

View file

@ -1,5 +1,7 @@
local icons = require('cosmic.core.theme.icons') local icons = require('cosmic.core.theme.icons')
require('todo-comments').setup({ local config = require('cosmic.config')
require('todo-comments').setup(vim.tbl_deep_extend('force', {
keywords = { keywords = {
FIX = { FIX = {
icon = icons.debug, -- icon used for the sign, and in search results icon = icons.debug, -- icon used for the sign, and in search results
@ -20,4 +22,4 @@ require('todo-comments').setup({
hint = { 'DiagnosticHint', '#10B981' }, hint = { 'DiagnosticHint', '#10B981' },
default = { 'Identifier', '#7C3AED' }, default = { 'Identifier', '#7C3AED' },
}, },
}) }, config.comments or {}))

View file

@ -1,5 +1,6 @@
local actions = require('telescope.actions') local actions = require('telescope.actions')
local icons = require('cosmic.core.theme.icons') local icons = require('cosmic.core.theme.icons')
local config = require('cosmic.config')
local default_mappings = { local default_mappings = {
n = { n = {
@ -37,7 +38,7 @@ local opts_vertical = {
}, },
} }
require('telescope').setup({ require('telescope').setup(vim.tbl_deep_extend('force', {
defaults = { defaults = {
prompt_prefix = '🔍 ', prompt_prefix = '🔍 ',
selection_caret = icons.folder.arrow_closed, selection_caret = icons.folder.arrow_closed,
@ -114,6 +115,6 @@ require('telescope').setup({
mappings = default_mappings, mappings = default_mappings,
}, },
}, },
}) }, config.telescope or {}))
require('telescope').load_extension('fzf') require('telescope').load_extension('fzf')

View file

@ -1,5 +1,7 @@
local icons = require('cosmic.core.theme.icons') local icons = require('cosmic.core.theme.icons')
require('notify').setup({ local config = require('cosmic.config')
require('notify').setup(vim.tbl_deep_extend('force', {
icons = { icons = {
ERROR = icons.error, ERROR = icons.error,
WARN = icons.warn, WARN = icons.warn,
@ -8,5 +10,5 @@ require('notify').setup({
TRACE = icons.trace, TRACE = icons.trace,
}, },
background_colour = require('cosmic.core.theme.colors').notify_bg, background_colour = require('cosmic.core.theme.colors').notify_bg,
}) }, config.notify or {}))
vim.notify = require('notify') vim.notify = require('notify')