feat(config): settable main icon

This commit is contained in:
Matt Leong 2021-10-25 08:52:54 -07:00
parent 7566c55527
commit 4444126a83
4 changed files with 15 additions and 3 deletions

View file

@ -3,6 +3,10 @@
--[[
local config = {}
config.statusline = {
main_icon = '',
}
config.lsp = {
-- true/false or table of filetypes {'.ts', '.js',}

View file

@ -11,6 +11,9 @@ end
-- these settings will be merged with any settings definined in config.lua
local default_config = {
statusline = {
main_icon = require('cosmic.core.theme.icons').ghost,
},
lsp = {
format_on_save = false, -- true/false or table of filetypes {'.ts', '.js',}
servers = {

View file

@ -7,6 +7,9 @@ local utils = require('cosmic.utils')
local colors = require('cosmic.core.theme.colors')
local highlight = utils.highlight
local icons = require('cosmic.core.theme.icons')
local config = require('cosmic.config')
local main_icon = config.statusline.main_icon
local get_mode = function()
local mode_colors = {
@ -93,7 +96,7 @@ gls.left = {
},
{
Ghost = {
provider = BracketProvider(icons.ghost, true),
provider = BracketProvider(main_icon, true),
highlight = 'GalaxyViModeInv',
},
},
@ -380,7 +383,7 @@ gls.short_line_left = {
},
{
GhostShort = {
provider = BracketProvider(icons.ghost, true),
provider = BracketProvider(main_icon, true),
highlight = { colors.bg, colors.white },
},
},

View file

@ -30,7 +30,7 @@ Full featured native LSP functionality!
- Explore files with [nvim-tree](https://github.com/kyazdani42/nvim-tree.lua)
- Fuzzy finder and some LSP actions with [Telescope](https://github.com/nvim-telescope/telescope.nvim)
- Floating terminal with [vim-floaterm](https://github.com/voldikss/vim-floaterm)
- Easy LSP installation with [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer)
- Auto LSP installation with [nvim-lsp-installer](https://github.com/williamboman/nvim-lsp-installer)
- Autocompletion provided by [nvim-cmp](https://github.com/hrsh7th/nvim-cmp)
- Snippet support via [LuaSnip](https://github.com/L3MON4D3/LuaSnip)
- Session management with [auto-session](https://github.com/rmagatti/auto-session)
@ -62,7 +62,9 @@ Additional LSP server installation [details](https://github.com/mattleong/Cosmic
## Configuration
[Cosmic configurations](./lua/cosmic/config/config.lua)
[Add additional mappings](./lua/cosmic/config/mappings.lua)
[Add addtional vim options](./lua/cosmic/config/editor.lua)
## Default Mappings