fix bufferline colors, add :Black and :IPDB

This commit is contained in:
Michael Peters 2022-09-30 10:30:39 -07:00
parent 7d920a5779
commit 5550001acf
4 changed files with 55 additions and 42 deletions

View File

@ -2,6 +2,7 @@
require('plugins')
require('settings')
require('keybinds')
require('commands')
require('cmds')
require('highlights')

6
lua/commands.lua Normal file
View File

@ -0,0 +1,6 @@
-- Make it easier to run black
vim.api.nvim_create_user_command('Black', 'call Black()', {})
-- Insert IPDB statement
vim.api.nvim_create_user_command('IPDB', 'norm oimport ipdb; ipdb.set_trace() # fmt:skip', {})

View File

@ -8,13 +8,14 @@ function M.config()
-- Semantic Colors
local scolors = {
empty_fg = '#ced2dc',
white_fg = '#ced2dc',
tab_visible_bg = '#404040',
tab_bg = '#353535',
empty_bg = '#252526',
tab_fg = '#ced2dc',
tab_bg = '#303030',
selected_fg = '#ced2dc',
selected_bg = '#404040',
green = '#6a9955',
yellow = '#d8b92d',
red = '#d16969',
none = 'NONE',
}
@ -24,16 +25,16 @@ function M.config()
close_command = "Bdelete! %d", -- use vim-bbye
right_mouse_command = "Bdelete! %d", -- use vim-bbye
offsets = {
{
filetype = "NvimTree",
text = "",
padding = 1
}
},
indicator = {
icon = '',
style = 'icon'
},
{
filetype = "NvimTree",
text = "",
padding = 1
}
},
indicator = {
icon = '',
style = 'icon'
},
modified_icon = "",
--buffer_close_icon = "",
show_buffer_close_icons = false,
@ -53,20 +54,24 @@ function M.config()
},
highlights = {
fill = {
fg = scolors.white_fg,
bg = scolors.empty_bg,
},
background = {
fg = scolors.tab_fg,
fg = scolors.white_fg,
bg = scolors.tab_bg,
},
-- Buffers
buffer_selected = {
fg = scolors.selected_fg,
bg = scolors.selected_bg,
fg = scolors.white_fg,
bg = scolors.tab_visible_bg,
--gui = colors.none,
},
buffer_visible = {
fg = scolors.selected_fg,
bg = scolors.selected_bg,
fg = scolors.white_fg,
bg = scolors.tab_visible_bg,
},
-- Diagnostics
@ -81,38 +86,39 @@ function M.config()
-- Close buttons
close_button = {
fg = scolors.tab_fg,
fg = scolors.white_fg,
bg = scolors.tab_bg,
},
close_button_visible = {
fg = scolors.selected_fg,
bg = scolors.selected_bg,
fg = scolors.white_fg,
bg = scolors.tab_visible_bg,
},
close_button_selected = {
fg = scolors.red,
bg = scolors.selected_bg,
},
fill = {
fg = scolors.empty_fg,
bg = scolors.empty_bg,
bg = scolors.tab_visible_bg,
},
-- Open buffer indicator
indicator_selected = {
fg = scolors.green,
bg = scolors.selected_bg,
bg = scolors.tab_visible_bg,
},
indicator_visible = {
bg = scolors.tab_visible_bg,
},
-- Modified
modified = {
fg = scolors.red,
fg = scolors.yellow,
bg = scolors.tab_bg,
},
modified_visible = {
fg = scolors.tab_fg,
bg = scolors.tab_bg,
fg = scolors.yellow,
bg = scolors.tab_visible_bg,
},
modified_selected = {
fg = scolors.green,
bg = scolors.selected_bg,
fg = scolors.yellow,
bg = scolors.tab_visible_bg,
},
-- Separators
@ -122,25 +128,25 @@ function M.config()
},
separator_visible = {
fg = scolors.empty_bg,
bg = scolors.selected_bg,
bg = scolors.tab_visible_bg,
},
separator_selected = {
fg = scolors.empty_bg,
bg = scolors.selected_bg,
bg = scolors.tab_visible_bg,
},
-- Tabs
tab = {
fg = scolors.tab_fg,
fg = scolors.white_fg,
bg = scolors.tab_bg,
},
tab_selected = {
fg = scolors.selected_fg,
bg = scolors.selected_bg,
fg = scolors.white_fg,
bg = scolors.tab_visible_bg,
},
tab_close = {
fg = scolors.selected_fg,
bg = scolors.selected_bg,
fg = scolors.white_fg,
bg = scolors.tab_visible_bg,
},
}
}

View File

@ -47,7 +47,7 @@ map("n", "<leader>ff", "<cmd>Telescope find_files<CR>", opts)
map("n", "<leader>fw", "<cmd>Telescope live_grep<CR>", opts)
map("n", "<leader>fb", "<cmd>Telescope buffers<CR>", opts)
map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>", opts)
map("n", "<leader>fo", "<cmd>Telescope oldfiles<CR>", opts) -- This wasn't working for some reason in astrovim
map("n", "<leader>fo", "<cmd>Telescope oldfiles<CR>", opts) -- This works for me now :)
map("n", "<leader>fs", "<cmd>Telescope git_status<CR>", opts)
map("n", "<leader>fc", "<cmd>Telescope git_commits<CR>", opts)