feat(nvim,wezterm,yabai): the big OLEDppuccin update

This commit is contained in:
winston 2022-10-21 17:01:46 +02:00
parent 368c6bbe5b
commit 2f24166856
Signed by: winston
GPG key ID: 3786770EDBC2B481
6 changed files with 99 additions and 63 deletions

View file

@ -1,5 +1,17 @@
local colors = require("catppuccin.palettes").get_palette()
vim.g.catppuccin_flavour = "frappe"
vim.g.catppuccin_flavour = "mocha"
local darkmode_overrides = {
base = "#000000",
crust = "#000000",
mantle = "#000000",
-- surface0 = "#101010",
-- surface1 = "#141414",
-- surface2 = "#181818",
-- overlay1 = "#202020",
-- overlay2 = "#242424",
-- overlay3 = "#282828",
}
require("catppuccin").setup({
dim_inactive = {
@ -62,22 +74,20 @@ require("catppuccin").setup({
telescope = true,
ts_rainbow = true,
vim_sneak = false,
vimwiki = true,
},
custom_highlights = {
DashboardHeader = { fg = colors.pink },
DashboardCenter = { fg = colors.peach },
DashboardShortCut = { fg = colors.yellow },
DashboardFooter = { fg = colors.maroon },
TelescopeBorder = { fg = colors.overlay0 },
},
color_overrides = {
mocha = darkmode_overrides,
macchiato = darkmode_overrides,
frappe = darkmode_overrides,
},
})
vim.api.nvim_command("colorscheme catppuccin")
-- vim.api.nvim_create_autocmd("ColorScheme", {
-- pattern = "*",
-- callback = function()
-- package.loaded["feline"] = nil
-- package.loaded["catppuccin.groups.integrations.feline"] = nil
-- require("config.feline")
-- end,
-- })

View file

@ -18,12 +18,12 @@ if not present or not cmp then
end
local has_words_before = function()
local line, col = table.unpack(vim.api.nvim_win_get_cursor(0))
local line, col = unpack(vim.api.nvim_win_get_cursor(0))
return col ~= 0
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
and vim.api
.nvim_buf_get_lines(0, line - 1, line, true)[1]
:sub(col, col)
:match("%s")
== nil
end
@ -42,8 +42,14 @@ cmp.setup({
end,
},
window = {
completion = cmp.config.window.bordered(),
documentation = cmp.config.window.bordered(),
completion = {
border = { "", "", "", "", "", "", "", "" },
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
},
documentation = {
border = { "", "", "", "", "", "", "", "" },
winhighlight = "Normal:CmpPmenu,FloatBorder:CmpBorder,CursorLine:PmenuSel,Search:None",
},
},
mapping = cmp.mapping.preset.insert({
["<C-b>"] = cmp.mapping.scroll_docs(-4),
@ -78,6 +84,13 @@ cmp.setup({
}, {
{ name = "buffer" },
}),
formatting = {
format = require("lspkind").cmp_format({
mode = "symbol_text",
maxwidth = 50,
ellipsis_char = "...",
}),
},
})
cmp.setup.filetype("gitcommit", {
@ -98,7 +111,7 @@ cmp.setup.cmdline({ "/", "?" }, {
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = cmp.config.sources({
{ name = "path" },
{ name = "path", option = { trailing_slash = true } },
}, {
{ name = "cmdline" },
}),
@ -185,6 +198,20 @@ lspconfig.denols.setup({
root_dir = lspconfig.util.root_pattern("deps.ts"),
single_file_support = false,
})
lspconfig.ltex.setup({
capabilities = capabilities,
on_attach = function(client, bufnr)
require("ltex_extra").setup({
load_langs = { "en-US", "de-AT" },
init_check = true,
path = vim.fn.stdpath("data") .. "/dictionary",
})
on_attach(client, bufnr)
end,
settings = {
ltex = {},
},
})
local null = require("null-ls")
local augroup = vim.api.nvim_create_augroup("LspFormatting", {})

View file

@ -24,7 +24,6 @@ return packer.startup({
use({
"catppuccin/nvim",
as = "catppuccin",
run = ":CatppuccinCompile",
config = function()
require("config/catppuccin")
end,
@ -41,18 +40,7 @@ return packer.startup({
use({
"lukas-reineke/indent-blankline.nvim",
config = function()
require("indent_blankline").setup({
space_char_blankline = " ",
show_current_conext = true,
char_highlight_list = {
"IndentBlanklineIndent1",
"IndentBlanklineIndent2",
"IndentBlanklineIndent3",
"IndentBlanklineIndent4",
"IndentBlanklineIndent5",
"IndentBlanklineIndent6",
},
})
require("indent_blankline").setup({})
vim.g.indent_blankline_filetype_exclude = {
"dashboard",
"help",
@ -83,27 +71,6 @@ return packer.startup({
component_separators = { left = "", right = "" },
section_separators = { left = "", right = "" },
},
sections = {
lualine_x = {
{
"diagnostics",
sources = { "nvim_lsp" },
-- Displays diagnostics for the defined severity types
sections = { "error", "warn", "info", "hint" },
diagnostics_color = {
-- Same values as the general color option can be used here.
error = "DiagnosticError", -- Changes diagnostics' error color.
warn = "DiagnosticWarn", -- Changes diagnostics' warn color.
info = "DiagnosticInfo", -- Changes diagnostics' info color.
hint = "DiagnosticHint", -- Changes diagnostics' hint color.
},
symbols = { error = "E", warn = "W", info = "I", hint = "H" },
colored = true, -- Displays diagnostics status in color if set to true.
update_in_insert = false, -- Update diagnostics in insert mode.
always_visible = false, -- Show diagnostics even if there are none.
},
},
},
})
end,
})
@ -126,6 +93,8 @@ return packer.startup({
require("config/treesitter")
end,
})
use("nvim-treesitter/playground")
use({
"p00f/nvim-ts-rainbow",
requires = "nvim-treesitter/nvim-treesitter",
@ -219,9 +188,23 @@ return packer.startup({
"nvim-telescope/telescope.nvim",
requires = "nvim-lua/plenary.nvim",
config = function()
require("telescope").setup({
defaults = {
borderchars = {
"",
"",
"",
"",
"",
"",
"",
"",
},
},
})
Map("n", "<leader>fr", "<cmd>Telescope asynctasks all<CR>")
Map("n", "<leader>fb", "<cmd>Telescope file_browser<CR>")
Map("n", "<leader>ff", "<cmd>Telescope find_files<CR>")
Map("n", "<leader>fd", "<cmd>Telescope find_files<CR>")
Map("n", "<leader>fg", "<cmd>Telescope live_grep<CR>")
Map("n", "<leader>fh", "<cmd>Telescope help_tags<CR>")
Map("n", "<leader>fp", "<cmd>Telescope project<CR>")
@ -284,6 +267,7 @@ return packer.startup({
use("hrsh7th/cmp-vsnip")
use("hrsh7th/vim-vsnip")
use("petertriho/cmp-git")
use("onsails/lspkind.nvim")
use("rafamadriz/friendly-snippets")
use("jose-elias-alvarez/null-ls.nvim")
use({
@ -293,13 +277,14 @@ return packer.startup({
require("config/lspsaga")
end,
})
use({ "barreiroleo/ltex-extra.nvim" })
use("b0o/schemastore.nvim")
use({
"github/copilot.vim",
config = function()
local opt = { noremap = true, silent = true, expr = true }
Map("i", "<C-J>", "copilot#Accept(<Tab>)", opt)
Map("i", "<C-J>", 'copilot#Accept("<CR>")', opt)
vim.g.copilot_no_tab_map = true
end,
})
@ -352,7 +337,9 @@ return packer.startup({
end,
config = {
display = {
open_fn = require("packer.util").float,
open_fn = function()
return require("packer.util").float({ border = "double" })
end,
},
},
})

View file

@ -34,6 +34,10 @@ if [[ $THEME == 'dark' ]]; then
BASE="303446"
MANTLE="292c3c"
CRUST="232634"
# overrides
BASE="000000"
MANTLE="000000"
CRUST="000000"
else
ROSEWATER="dc8a78"
FLAMINGO="dd7878"

View file

@ -5,7 +5,10 @@ local wezterm = require("wezterm")
-- kept seperately from the rest of the config so that I can easily change them
local fonts = {
berkeley = {
font = "Berkeley Mono",
font = {
family = "Berkeley Mono",
weight = "Bold",
},
size = 16,
},
comic = {
@ -198,11 +201,16 @@ wezterm.on("update-status", function(window, pane)
end)
-- }}}
local darkTheme = "Catppuccin Frappe"
local custom = wezterm.color.get_builtin_schemes()["Catppuccin Mocha"]
custom.background = "#000000"
custom.tab_bar.background = "#040404"
custom.tab_bar.inactive_tab.bg_color = "#0f0f0f"
custom.tab_bar.new_tab.bg_color = "#080808"
local darkTheme = "OLEDppuccin"
local lightTheme = "Catppuccin Latte"
local function scheme_for_appearance(appearance)
wezterm.log_info(appearance)
if string.match(wezterm.target_triple, "linux") then
return darkTheme
end
@ -287,7 +295,6 @@ return {
},
action = wezterm.action_callback(function(window, pane)
local url = window:get_selection_text_for_pane(pane)
wezterm.log_info("opening: " .. url)
wezterm.open_with(url)
end),
}),
@ -349,6 +356,9 @@ return {
-- don't attempt to resize the window (tiling wm)
adjust_window_size_when_changing_font_size = false,
-- theme
color_schemes = {
["OLEDppuccin"] = custom,
},
color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()),
-- nightly only
clean_exit_codes = { 130 },
@ -358,4 +368,5 @@ return {
max_fps = 240,
-- scrollbar, currently hidden by default, but better make sure
enable_scroll_bar = false,
hide_tab_bar_if_only_one_tab = true,
}

View file

@ -23,10 +23,7 @@ yabai -m config \
mouse_drop_action swap \
window_origin_display default \
window_placement second_child \
active_window_border_color 0xfff5c2e7 \
normal_window_border_color 0xffb4befe \
insert_feedback_color 0xfff9e2af \
window_border on \
window_border off \
window_border_width 2 \
window_opacity on \
window_opacity_duration 0.1 \