massive vim cleanup

This commit is contained in:
elkowar 2023-03-14 12:48:22 +01:00
parent e98afe1539
commit 1b226a4205
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
10 changed files with 145 additions and 157 deletions

View file

@ -8,7 +8,8 @@
# title=foot # title=foot
# locked-title=no # locked-title=no
font=Fira Code:size=8 # font=APL386 Unicode:size=8
font=Fira Code Nerd Font:size=8
# font-bold=<bold variant of regular font> # font-bold=<bold variant of regular font>
# font-italic=<italic variant of regular font> # font-italic=<italic variant of regular font>
# font-bold-italic=<bold+italic variant of regular font> # font-bold-italic=<bold+italic variant of regular font>
@ -25,7 +26,7 @@ font=Fira Code:size=8
# initial-window-size-pixels=700x500 # Or, # initial-window-size-pixels=700x500 # Or,
# initial-window-size-chars=<COLSxROWS> # initial-window-size-chars=<COLSxROWS>
# initial-window-mode=windowed # initial-window-mode=windowed
pad=15x15 # optionally append 'center' pad=15x15 center # optionally append 'center'
# resize-delay-ms=100 # resize-delay-ms=100
# notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body} # notify=notify-send -a ${app-id} -i ${app-id} ${title} ${body}
@ -69,7 +70,7 @@ hide-when-typing=yes
# alternate-scroll-mode=yes # alternate-scroll-mode=yes
[colors] [colors]
background=282828 background=1d2021
foreground=ebdbb2 foreground=ebdbb2
regular0=282828 regular0=282828
regular1=cc241d regular1=cc241d

View file

@ -1,6 +1,8 @@
(module dots.colors (module dots.colors
{} {}
{:dark0_hard "#1d2021" {:bg_main (if (= "epix" (vim.fn.hostname)) "#1d2021" "#282828")
:bg_second (if (= "epix" (vim.fn.hostname)) "#181A1B" "#1d2021")
:dark0_hard "#1d2021"
:dark0 "#282828" :dark0 "#282828"
:dark0_soft "#32302f" :dark0_soft "#32302f"
:dark1 "#3c3836" :dark1 "#3c3836"

View file

@ -7,7 +7,7 @@
require-macros [macros]}) require-macros [macros]})
; :h bufferline-lua-highlights ; :h bufferline-lua-highlights
(let [selected {:bg colors.neutral_aqua :fg colors.dark0} (let [selected {:bg colors.neutral_aqua :fg colors.bg_main :gui "NONE"}
visible {:bg colors.dark1 :fg colors.neutral_aqua}] visible {:bg colors.dark1 :fg colors.neutral_aqua}]
(bufferline.setup (bufferline.setup
{:options {:options
@ -22,7 +22,7 @@
; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74 ; https://github.com/akinsho/nvim-bufferline.lua/blob/4ebab39af2376b850724dd29c29579c8e024abe6/lua/bufferline/config.lua#L74
:highlights :highlights
{:fill {:bg colors.dark0 :fg colors.light0} {:fill {:guibg colors.bg_main :guifg colors.light0}
:background visible :background visible
:buffer_visible visible :buffer_visible visible
:buffer_selected selected :buffer_selected selected
@ -34,7 +34,7 @@
:diagnostic {:bg colors.dark1 :fg colors.neutral_red} :diagnostic {:bg colors.dark1 :fg colors.neutral_red}
:diagnostic_visible {:bg colors.dark1 :fg colors.neutral_red} :diagnostic_visible {:bg colors.dark1 :fg colors.neutral_red}
:diagnostic_selected {:bg colors.neutral_aqua :fg colors.faded_red} :diagnostic_selected {:bg colors.neutral_aqua :fg colors.faded_redu}
:info_diagnostic {:bg colors.dark1 :fg colors.neutral_blue} :info_diagnostic {:bg colors.dark1 :fg colors.neutral_blue}
:info_diagnostic_visible {:bg colors.dark1 :fg colors.neutral_blue} :info_diagnostic_visible {:bg colors.dark1 :fg colors.neutral_blue}

View file

@ -31,7 +31,7 @@
:V {:text "VISUAL LINE" :color colors.neutral_blue} :V {:text "VISUAL LINE" :color colors.neutral_blue}
"" {:text "VISUAL BLOCK" :color colors.neutral_blue}}) "" {:text "VISUAL BLOCK" :color colors.neutral_blue}})
(def bar-bg colors.dark0) (def bar-bg colors.bg_main)
(def horiz-separator-color colors.light1) (def horiz-separator-color colors.light1)
(defn or-empty [x] (or x "")) (defn or-empty [x] (or x ""))
@ -111,6 +111,6 @@
(utils.highlight-add :StatusLineNC {:bg "NONE" :fg colors.light1}) (utils.highlight-add :StatusLineNC {:bg "NONE" :fg colors.light1})
(feline.setup {:theme {:fg colors.light1 :bg colors.dark0} (feline.setup {:theme {:fg colors.light1 :bg colors.bg_main}
:components components}) :components components})

View file

@ -18,28 +18,3 @@
(let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")] (let [scrollbar-gitsigns (require "scrollbar.handlers.gitsigns")]
(scrollbar-gitsigns.setup)) (scrollbar-gitsigns.setup))
(vim.api.nvim_create_autocmd
"ColorScheme"
{:pattern "*"
:callback
(fn []
(utils.highlight-add "GitSignsAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "GitSignsDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "GitSignsChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue})
(utils.highlight-add "ScrollbarGitAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "ScrollbarGitDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "ScrollbarGitChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue}))})
;(utils.highlight :GitSignsAdd {:bg "NONE" :fg colors.bright_aqua})
;(utils.highlight :GitSignsDelete {:bg "NONE" :fg colors.neutral_red})
;(utils.highlight :GitSignsChange {:bg "NONE" :fg colors.bright_blue})
;(print "This is right before setting and then printing the highlight group")
;(vim.cmd "highlight GitSignsAdd guibg='NONE' guifg='#ff2200'")
;(vim.cmd "highlight GitSignsAdd")
; this no work, but https://github.com/lewis6991/gitsigns.nvim/blob/d89f88384567afc7a72b597e130008126fdb97f7/teal/gitsigns/highlight.tl#L19
; REEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE
; (utils.highlight "GitSignsCurrentLineBlame" {:bg "NONE" :fg colors.dark0_soft})

View file

@ -8,16 +8,137 @@
(set vim.g.gruvbox_filetype_hi_groups 1) (set vim.g.gruvbox_filetype_hi_groups 1)
(set vim.g.gruvbox_plugin_hi_groups 1) (set vim.g.gruvbox_plugin_hi_groups 1)
(defn- setup-colors []
(utils.highlight-add
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
{:bg "NONE"})
; hide empty line ~'s
(utils.highlight :EndOfBuffer {:bg "NONE" :fg colors.bg_main})
(utils.highlight :LineNr {:bg "NONE"})
(utils.highlight-add :Pmenu {:bg colors.bg_second})
(utils.highlight-add :PmenuSel {:bg colors.bright_aqua})
(utils.highlight-add :PmenuSbar {:bg colors.bg_second})
(utils.highlight-add :PmenuThumb {:bg colors.dark1})
(utils.highlight-add :NormalFloat {:bg colors.bg_second})
(utils.highlight-add :SignColumn {:bg colors.bg_main})
(utils.highlight-add :FloatBorder {:bg colors.bg_second})
(utils.highlight-add :SpecialComment {:fg colors.dark4})
(utils.highlight-add
[:LspDiagnosticsSignError :LspDiagnosticsSignWarning :LspDiagnosticsSignInformation :LspDiagnosticsSignHint]
{:bg "NONE"})
(utils.highlight-add :DiagnosticError {:fg colors.bright_red})
(utils.highlight-add :DiagnosticWarning {:fg colors.bright_orange})
(utils.highlight-add :DiagnosticInformation {:fg colors.bright_aqua})
(utils.highlight-add :DiagnosticHint {:fg colors.bright_yellow})
(utils.highlight-add :DiagnosticVirtualTextError {:bg "#342828" :fg colors.bright_red})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#473027" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#3b2c28" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextInformation {:bg "#272d2f" :fg colors.bright_aqua})
(utils.highlight-add :DiagnosticVirtualTextHint {:bg "#272d2f" :fg colors.bright_yellow})
(utils.highlight :LspDiagnosticsUnderlineError {:gui "undercurl"})
(vim.fn.sign_define :LspDiagnosticsSignError {:text "◆"})
(vim.fn.sign_define :LspDiagnosticsSignWarning {:text "◆"})
(vim.fn.sign_define :LspDiagnosticsSignHint {:text "◆"})
(vim.fn.sign_define :LspDiagnosticsSignInformation {:text "◆"})
(utils.highlight :StatusLine {:bg colors.dark1 :fg colors.light0})
(vim.cmd "highlight link Function GruvboxGreen")
(utils.highlight-add :Function {:gui "NONE"}))
(defn setup-telescope-theme []
(def prompt "blacker")
(if
(= prompt "bright")
(let [promptbg "#689d6a"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.bg_main})
(utils.highlight-add :TelescopePromptTitle {:bg promptbg :fg colors.dark1}))
(= prompt "dark")
(let [promptbg "#252525"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1}))
(= prompt "black")
(let [promptbg "#212526"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_green :fg colors.dark1}))
(= prompt "blacker")
(let [promptbg "#1f2324"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1})))
(def side "darker")
(if
(= side "brighter")
(let [previewbg "#1f2324"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg}))
(= side "darker")
(let [previewbg "#1a1e1f"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg})))
(utils.highlight-add :TelescopeBorder {:bg colors.bg_second :fg colors.bg_second})
(utils.highlight-add :TelescopeNormal {:bg colors.bg_second})
(utils.highlight-add :TelescopePreviewTitle {:bg colors.neutral_green :fg colors.dark1})
(utils.highlight-add :TelescopeResultsTitle {:bg colors.neutral_aqua :fg colors.dark1})
(utils.highlight-add :TelescopeSelection {:bg colors.neutral_aqua :fg colors.dark1}))
(defn- setup-noice-theme []
(utils.highlight-add :NoicePopupmenu {:bg colors.bg_second})
(utils.highlight-add :NoiceCmdline {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopup {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePrompt {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopupBorder {:fg colors.bright_aqua})
(utils.highlight-add :NoiceCmdlineIcon {:fg colors.bright_aqua}))
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-colors})
(setup-colors)
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-telescope-theme})
(setup-telescope-theme)
(vim.api.nvim_create_autocmd "ColorScheme" {:pattern "*" :callback setup-noice-theme})
(setup-noice-theme)
(vim.api.nvim_create_autocmd
"ColorScheme"
{:pattern "*"
:callback
(fn []
(utils.highlight-add "GitSignsAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "GitSignsDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "GitSignsChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue})
(utils.highlight-add "ScrollbarGitAdd" {:gui "NONE" :bg "NONE" :fg colors.bright_aqua})
(utils.highlight-add "ScrollbarGitDelete" {:gui "NONE" :bg "NONE" :fg colors.neutral_red})
(utils.highlight-add "ScrollbarGitChange" {:gui "NONE" :bg "NONE" :fg colors.bright_blue}))})
(if (= "epix" (vim.fn.hostname)) (if (= "epix" (vim.fn.hostname))
(vim.cmd "colorscheme gruvbox8_hard") (vim.cmd "colorscheme gruvbox8_hard")
(vim.cmd "colorscheme gruvbox8")) (vim.cmd "colorscheme gruvbox8"))
(defer
(if (= "epix" (vim.fn.hostname))
(utils.highlight :SignColumn {:bg colors.dark0_hard})
(utils.highlight :SignColumn {:bg colors.dark0})))
;(utils.highlight :SignColumn {:bg (. (require :dots.colors) :dark0)}))}
;(utils.highlight :LspDiagnosticsUnderlineError {:gui "underline"}))}

View file

@ -39,13 +39,3 @@
{:view "cmdline_output" {:view "cmdline_output"
:filter {:error true :min_height 6}}]}) :filter {:error true :min_height 6}}]})
(defn- setup-noice-theme []
(utils.highlight-add :NoicePopupmenu {:bg colors.dark0_hard})
(utils.highlight-add :NoiceCmdline {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopup {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePrompt {:bg "#1f2324"})
(utils.highlight-add :NoiceCmdlinePopupBorder {:fg colors.bright_aqua})
(utils.highlight-add :NoiceCmdlineIcon {:fg colors.bright_aqua}))
(vim.defer_fn setup-noice-theme 200)

View file

@ -14,55 +14,3 @@
(utils.keymap :n :<C-p> ":Telescope find_files<CR>") (utils.keymap :n :<C-p> ":Telescope find_files<CR>")
(defn setup-telescope-theme []
(def prompt "blacker")
(if
(= prompt "bright")
(let [promptbg "#689d6a"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.dark0})
(utils.highlight-add :TelescopePromptTitle {:bg promptbg :fg colors.dark1}))
(= prompt "dark")
(let [promptbg "#252525"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1}))
(= prompt "black")
(let [promptbg "#212526"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_green :fg colors.dark1}))
(= prompt "blacker")
(let [promptbg "#1f2324"]
(utils.highlight-add :TelescopePromptBorder {:bg promptbg :fg promptbg})
(utils.highlight-add :TelescopePromptNormal {:bg promptbg :fg colors.light2})
(utils.highlight-add :TelescopePromptPrefix {:bg promptbg :fg colors.neutral_aqua})
(utils.highlight-add :TelescopePromptTitle {:bg colors.neutral_blue :fg colors.dark1})))
(def side "darker")
(if
(= side "brighter")
(let [previewbg "#1f2324"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg}))
(= side "darker")
(let [previewbg "#1a1e1f"]
(utils.highlight-add :TelescopePreviewNormal {:bg previewbg})
(utils.highlight-add :TelescopePreviewBorder {:bg previewbg :fg previewbg})))
(utils.highlight-add :TelescopeBorder {:bg colors.dark0_hard :fg colors.dark0_hard})
(utils.highlight-add :TelescopeNormal {:bg colors.dark0_hard})
(utils.highlight-add :TelescopePreviewTitle {:bg colors.neutral_green :fg colors.dark1})
(utils.highlight-add :TelescopeResultsTitle {:bg colors.neutral_aqua :fg colors.dark1})
(utils.highlight-add :TelescopeSelection {:bg colors.neutral_aqua :fg colors.dark1}))
; TODO this is the hackiest thing I've ever done
(vim.defer_fn setup-telescope-theme 50)

View file

@ -95,63 +95,13 @@
; Colors ------------------------------------------------------- foldstart ; Colors ------------------------------------------------------- foldstart
(utils.highlight-add
["GruvboxBlueSign" "GruvboxAquaSign" "GruvboxRedSign" "GruvboxYellowSign" "GruvboxGreenSign" "GruvboxOrangeSign" "GruvboxPurpleSign"]
{:bg "NONE"})
; hide empty line ~'s
(utils.highlight :EndOfBuffer {:bg "NONE" :fg colors.dark0})
(utils.highlight :LineNr {:bg "NONE"})
(utils.highlight-add :Pmenu {:bg colors.dark0_hard})
(utils.highlight-add :PmenuSel {:bg colors.bright_aqua})
(utils.highlight-add :PmenuSbar {:bg colors.dark0_hard})
(utils.highlight-add :PmenuThumb {:bg colors.dark1})
(utils.highlight-add :NormalFloat {:bg colors.dark0_hard})
(utils.highlight-add :SignColumn {:bg colors.dark0})
(utils.highlight-add :FloatBorder {:bg colors.dark0_hard})
(utils.highlight-add :SpecialComment {:fg colors.dark4})
(utils.highlight-add
[:LspDiagnosticsSignError :LspDiagnosticsSignWarning :LspDiagnosticsSignInformation :LspDiagnosticsSignHint]
{:bg "NONE"})
(utils.highlight-add :DiagnosticError {:fg colors.bright_red})
(utils.highlight-add :DiagnosticWarning {:fg colors.bright_orange})
(utils.highlight-add :DiagnosticInformation {:fg colors.bright_aqua})
(utils.highlight-add :DiagnosticHint {:fg colors.bright_yellow})
(utils.highlight-add :DiagnosticVirtualTextError {:bg "#342828" :fg colors.bright_red})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#473027" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextWarning {:bg "#3b2c28" :fg colors.bright_orange})
(utils.highlight-add :DiagnosticVirtualTextInformation {:bg "#272d2f" :fg colors.bright_aqua})
(utils.highlight-add :DiagnosticVirtualTextHint {:bg "#272d2f" :fg colors.bright_yellow})
(utils.highlight :LspDiagnosticsUnderlineError {:gui "undercurl"})
(vim.fn.sign_define :LspDiagnosticsSignError {:text "◆"})
(vim.fn.sign_define :LspDiagnosticsSignWarning {:text "◆"})
(vim.fn.sign_define :LspDiagnosticsSignHint {:text "◆"})
(vim.fn.sign_define :LspDiagnosticsSignInformation {:text "◆"})
(utils.highlight :StatusLine {:bg colors.dark1 :fg colors.light0})
(vim.cmd "highlight link Function GruvboxGreen")
(utils.highlight-add :Function {:gui "NONE"})
; foldend ; foldend
(vim.diagnostic.config (vim.diagnostic.config
{:float {:scope scope {:float {:border "single"
:border "single"
:style "minimal"}}) :style "minimal"}})
; Plugin config ----------------------- foldstart ; Plugin config ----------------------- foldstart

View file

@ -118,7 +118,8 @@ input "type:keyboard" {
# Exit sway (logs you out of your Wayland session) # Exit sway (logs you out of your Wayland session)
bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit' bindsym $mod+Shift+e exec swaynag -t warning -m 'You pressed the exit shortcut. Do you really want to exit sway? This will end your Wayland session.' -b 'Yes, exit sway' 'swaymsg exit'
bindsym $mod+Shift+p exec ~/.config/rofi/bin/launcher_ribbon bindsym $mod+Shift+p exec rofi -show drun -theme sidebar
#bindsym $mod+Shift+p exec ~/.config/rofi/bin/launcher_ribbon
# #
# Moving around: # Moving around:
# #