From 33037b4f8f3c50cee23117118c66d23bfe4e5f8a Mon Sep 17 00:00:00 2001 From: Max Bucknell Date: Mon, 12 Aug 2019 21:45:22 +1000 Subject: [PATCH] Some new changes are afoot --- liquidprompt/liquidpromptrc.symlink | 20 +- .../autoload/airline/themes/maxbucknell.vim | 7 + nvim/nvim.symlink/coc-settings.json | 11 + .../nvim.symlink/colors/maxbucknell_light.erb | 335 ++++++++++++++++++ .../nvim.symlink/colors/maxbucknell_light.vim | 182 ++++++++++ nvim/nvim.symlink/init.vim | 116 +++--- zsh/zshrc.symlink | 22 +- 7 files changed, 624 insertions(+), 69 deletions(-) create mode 100644 nvim/nvim.symlink/autoload/airline/themes/maxbucknell.vim create mode 100644 nvim/nvim.symlink/colors/maxbucknell_light.erb create mode 100644 nvim/nvim.symlink/colors/maxbucknell_light.vim diff --git a/liquidprompt/liquidpromptrc.symlink b/liquidprompt/liquidpromptrc.symlink index fcd73a0..6139935 100644 --- a/liquidprompt/liquidpromptrc.symlink +++ b/liquidprompt/liquidpromptrc.symlink @@ -162,23 +162,23 @@ LP_DISABLED_VCS_PATH="" # Colors -LP_COLOR_MARK="$PURPLE" -LP_COLOR_USER_LOGGED="$CYAN" -LP_COLOR_TIME="$BLUE" +LP_COLOR_MARK="$BLACK" +LP_COLOR_USER_LOGGED="$BLACK" +LP_COLOR_TIME="$BLACK" LP_COLOR_WRITE="$GREEN" LP_COLOR_NOWRITE="$RED" LP_MARK_DEFAULT="$" LP_MARK_LOAD="" -LP_MARK_BRACKET_OPEN="${BLACK}[${WHITE}" -LP_MARK_BRACKET_CLOSE="${BLACK}]${WHITE}" -LP_MARK_PERM="${BLACK}:${WHITE}" +LP_MARK_BRACKET_OPEN="${BLACK}[${BLACK}" +LP_MARK_BRACKET_CLOSE="${BLACK}]${BLACK}" +LP_MARK_PERM="${BLACK}:${BLACK}" -LP_COLOR_UP="$YELLOW" -LP_COLOR_COMMITS="$GREEN" -LP_COLOR_CHANGES="$BLUE" +LP_COLOR_UP="$BLACK" +LP_COLOR_COMMITS="$BLACK" +LP_COLOR_CHANGES="$BLACK" -LP_COLOR_PATH="${YELLOW}" +LP_COLOR_PATH="${BLACK}" # vim: set et sts=4 sw=4 tw=120 ft=sh: diff --git a/nvim/nvim.symlink/autoload/airline/themes/maxbucknell.vim b/nvim/nvim.symlink/autoload/airline/themes/maxbucknell.vim new file mode 100644 index 0000000..3f0f959 --- /dev/null +++ b/nvim/nvim.symlink/autoload/airline/themes/maxbucknell.vim @@ -0,0 +1,7 @@ +let g:airline#themes#maxbucknell#palette = {} +let g:airline#themes#maxbucknell#palette.accents = {} + +let g:airline_a_normal = [ '#F0F1FF' , '#16182B' , 17 , 190 ] +let g:airline_b_normal = [ '#F0F1FF' , '#16182B' , 17 , 190 ] +let g:airline_c_normal = [ '#F0F1FF' , '#16182B' , 17 , 190 ] +let g:airline#themes#maxbucknell#palette.normal = airline#themes#generate_color_map(g:airline_a_normal, g:airline_b_normal, g:airline_c_normal) diff --git a/nvim/nvim.symlink/coc-settings.json b/nvim/nvim.symlink/coc-settings.json index 2c63c08..f919b1a 100644 --- a/nvim/nvim.symlink/coc-settings.json +++ b/nvim/nvim.symlink/coc-settings.json @@ -1,2 +1,13 @@ { + "tslint.configFile": "config/tslint.json", + "coc.preferences.formatOnSaveFiletypes": ["javascript", "typescript", "typescript.tsx"], + "coc.preferences.useQuickfixForLocations": true, + "codeLens.enable": true, + "languageserver": { + "golang": { + "command": "gopls", + "rootPatterns": ["go.mod", ".vim/", ".git/", ".hg/"], + "filetypes": ["go"] + } + } } diff --git a/nvim/nvim.symlink/colors/maxbucknell_light.erb b/nvim/nvim.symlink/colors/maxbucknell_light.erb new file mode 100644 index 0000000..7cc8de0 --- /dev/null +++ b/nvim/nvim.symlink/colors/maxbucknell_light.erb @@ -0,0 +1,335 @@ +<% + # RNB, A VIM COLORSCHEME TEMPLATE + # Author: Romain Lafourcade (https://github.com/romainl) + # Canonical URL: https://gist.github.com/romainl/5cd2f4ec222805f49eca + + # This template is designed to help vimmers create their own colorschemes + # without much effort. + # + # You will need Ruby to generate your colorscheme but Ruby knowledge is + # not needed at all. + # + # The process is divided in four steps: + # 1. start by editing your colorscheme's information, + # 2. define your colors, + # 3. define your highlight groups and links, + # 4. and generate your colorscheme. + + # Step 1: information + # + # Make sure the name of your colorscheme is unique and attractive. + # The description should fit in a single line with no linefeed. + # 'background' can be "light" or "dark". + information = { + author: "Max Bucknell", + email: "me@maxbucknell.com", + name: "maxbucknell_light", + description: "My colour scheme, bruh.", + background: "light", + webpage: "https://github.com/maxbucknell/dotfiles" + } + + # Step 2: colors + # + # black = [ give each color a distinctive name + # "#000000", hexadecimal color used in GVim/MacVim + # 0, integer between 0 and 255 used by terminals supporting 256 colors + # "black" color name used by less capable color terminals, can be "darkred", + # "red", "darkgreen", "green", "darkyellow", "yellow", "darkblue", + # "blue", "darkmagenta", "magenta", "black", "darkgrey", "grey", + # "white" + # ] + # + # If your colors are defined correctly, the resulting colorscheme is guaranteed + # to work in GVim (Windows/Linux), MacVim, and any properly set up terminal emulator. + # + # The colors below are the first 16 colors of the xterm palette. They + # are only here as an example, though. You can get rid of them, I won't be mad. + black = ["#000000", 0, "black"] + darkred = ["#800000", 1, "darkred"] + darkgreen = ["#008000", 2, "darkgreen"] + darkyellow = ["#808000", 3, "darkyellow"] + darkblue = ["#000080", 4, "darkblue"] + darkmagenta = ["#800080", 5, "darkmagenta"] + darkcyan = ["#008080", 6, "darkcyan"] + gray = ["#c0c0c0", 7, "gray"] + darkgray = ["#808080", 8, "darkgray"] + red = ["#ff0000", 9, "red"] + green = ["#00ff00", 10, "green"] + yellow = ["#ffff00", 11, "yellow"] + blue = ["#0000ff", 12, "blue"] + magenta = ["#ff00ff", 13, "magenta"] + cyan = ["#00ffff", 14, "cyan"] + white = ["#ffffff", 15, "white"] + + background = ["#F7F8FF", 15, "white"] + blurred_background = ["#D8DAE8", 15, "white"] + light_background = ["#F0F1FF", 7, "gray"] + extra_light_background = ["#F2F4FF", 7, "gray"] + search_highlight = ["#B6BDF0", 10, "green"] + symbol_highlight = ["#F0D1EA", 15, "white"] + error_highlight = ["#E0ABAB", 15, "white"] + warning_highlight = ["#E0DDAB", 15, "white"] + info_highlight = warning_highlight + paren_highlight = symbol_highlight + + foreground = ["#16182B", 0, "black"] + + # Step 3: highlights + # + # You can define highlight groups like this: + # + # [ "Normal", name of the highlight group + # white, the color used for background color, or use "NONE", "fg" or "bg" + # darkgray, the color used for foreground color, or use "NONE", "fg" or "bg" + # "NONE" style, can be "bold", "underline", "reverse", "italic", + # "standout", "NONE" or "undercurl" + # ] + # + # The sample above tells Vim to render normal text in dark gray against a white + # background, without any styling. + # + # or link an highlight group to another: + # + # [ "Title", "Normal" ] + # + # In GUI Vim, there is an additional color for the undercurl used to + # highlight spelling mistakes: + # + # [ "SpellBad", name of the highlight group + # "NONE", the color used for background color, or use "NONE", "fg" or "bg" + # red, the color used for foreground color, or use "NONE", "fg" or "bg" + # "undercurl", style + # red color used for the undercurl + # ] + # + # The sample above tells Vim to render badly spelled words in red against the current + # background, with a red undercurl. + # + # You can add any custom highlight group to the standard list below but you shouldn't + # remove any if you want a working colorscheme. + highlights = [ + [ "Normal", background, foreground, "NONE" ], + [ "NormalFloat", background, foreground, "NONE" ], + [ "NormalNC", blurred_background, foreground, "NONE"], + [ "NonText", "NONE", "NONE", "NONE" ], + [ "Comment", "NONE", "NONE", "bold" ], + [ "Constant", "NONE", "NONE", "NONE" ], + [ "Error", "NONE", "NONE", "NONE" ], + [ "CocErrorHighlight", error_highlight, "NONE", "NONE" ], + [ "CocWarningHighlight", warning_highlight, "NONE", "NONE" ], + [ "CocInfoHighlight", info_highlight, "NONE", "NONE" ], + [ "CocHintHighlight", info_highlight, "NONE", "NONE" ], + [ "CocHighlightText", symbol_highlight, "NONE", "NONE" ], + [ "Identifier", "NONE", "NONE", "NONE" ], + [ "Ignore", "NONE", "NONE", "NONE" ], + [ "PreProc", "NONE", "NONE", "NONE" ], + [ "Special", "NONE", "NONE", "NONE" ], + [ "Statement", "NONE", "NONE", "NONE" ], + [ "String", "Constant" ], + [ "Number", "Constant" ], + [ "Todo", "NONE", "NONE", "NONE" ], + [ "Type", "NONE", "NONE", "NONE" ], + [ "Underlined", "NONE", "NONE", "NONE" ], + [ "StatusLine", light_background, "NONE", "NONE" ], + [ "StatusLineNC", light_background, "NONE", "NONE" ], + [ "VertSplit", "NONE", light_background, "NONE" ], + [ "TabLine", "NONE", "NONE", "NONE" ], + [ "TabLineFill", "NONE", "NONE", "NONE" ], + [ "TabLineSel", "NONE", "NONE", "NONE" ], + [ "Title", "NONE", "NONE", "NONE" ], + [ "CursorLine", extra_light_background, "NONE", "NONE" ], + [ "LineNr", light_background, "NONE", "NONE" ], + [ "CursorLineNr", foreground, light_background, "NONE" ], + [ "helpLeadBlank", "NONE", "NONE", "NONE" ], + [ "helpNormal", "NONE", "NONE", "NONE" ], + [ "Visual", "NONE", "NONE", "NONE" ], + [ "VisualNOS", "NONE", "NONE", "NONE" ], + [ "Pmenu", foreground, background, "NONE" ], + [ "PmenuSbar", "NONE", "NONE", "NONE" ], + [ "PmenuSel", red, green, "NONE" ], + [ "PmenuThumb", "NONE", "NONE", "NONE" ], + [ "FoldColumn", "NONE", "NONE", "NONE" ], + [ "Folded", "NONE", "NONE", "NONE" ], + [ "WildMenu", "NONE", "NONE", "NONE" ], + [ "SpecialKey", "NONE", "NONE", "NONE" ], + [ "DiffAdd", "NONE", "NONE", "NONE" ], + [ "DiffChange", "NONE", "NONE", "NONE" ], + [ "DiffDelete", "NONE", "NONE", "NONE" ], + [ "DiffText", "NONE", "NONE", "NONE" ], + [ "IncSearch", search_highlight, "NONE", "bold" ], + [ "Search", search_highlight, "NONE", "NONE" ], + [ "Directory", "NONE", "NONE", "NONE" ], + [ "MatchParen", paren_highlight, "NONE", "NONE" ], + [ "SpellBad", "NONE", "NONE", "NONE", red ], + [ "SpellCap", "NONE", "NONE", "NONE", blue ], + [ "SpellLocal", "NONE", "NONE", "NONE", magenta ], + [ "SpellRare", "NONE", "NONE", "NONE", cyan ], + [ "ColorColumn", "NONE", "NONE", "NONE" ], + [ "SignColumn", light_background, "NONE", "NONE" ], + [ "ErrorMsg", "NONE", "NONE", "NONE" ], + [ "ModeMsg", "NONE", "NONE", "NONE" ], + [ "MoreMsg", "NONE", "NONE", "NONE" ], + [ "Question", "NONE", "NONE", "NONE" ], + [ "WarningMsg", "Error" ], + [ "Cursor", "NONE", "NONE", "NONE" ], + [ "CursorColumn", "NONE", "NONE", "NONE" ], + [ "QuickFixLine", "NONE", "NONE", "NONE" ], + [ "StatusLineTerm", light_background, "NONE", "NONE" ], + [ "StatusLineTermNC", light_background, "NONE", "NONE" ] + ] + + # Define the color palette used by :terminal when in GUI Vim + # or in TUI Vim when 'termguicolors' is enabled. If this list + # is empty or if it doesn't contain exactly 16 items, the corresponding + # Vim variable won't be set. + # + # The expected values are colors defined in step 2. + terminal_ansi_colors = [ + black, + darkred, + darkgreen, + darkyellow, + darkblue, + darkmagenta, + darkcyan, + gray, + darkgray, + red, + green, + yellow, + blue, + magenta, + cyan, + white + ] + + # Step 4: generation + # + # From a separate shell: + # + # $ erb -T - bar.erb > bar.vim + # + # From Vim: + # + # :!erb -T - % > %<.vim + + # These online resources can help you design your colorscheme: + # + # * http://upload.wikimedia.org/wikipedia/en/1/15/Xterm_256color_chart.svg + # the xterm palette + # * http://whatcolor.herokuapp.com/ + # play with hexadecimal colors right in the address bar (currently down) + # * http://color.hailpixel.com/ + # similar concept, fuzzier implementation + # * http://colourco.de/ + # similar concept, fancier implementation + # * http://www.colr.org/ + # extract a palette from an image + # * http://colores.manugarri.com/ + # search for 'word', get images and color palettes + # * http://www.colourlovers.com/palettes + # user-created palettes + # * http://www.perbang.dk/color+scheme/ + # a no-nonsense colorscheme generator + # * https://color.adobe.com/ + # Adobe's fancy colorscheme generator + # * http://paletton.com/ + # The classic 'Color Scheme Designer', rebranded + # * http://vrl.cs.brown.edu/color + # A very smart palette generator + # * https://cmcenroe.me/2018/04/03/colour-scheme.html + # "I Made My Own Colour Scheme and You Can Too!" + + # A few general advices: + # + # * The Windows console is limited to the 16 so-called "ANSI" colors but it has + # a few of them interverted which makes numbers impractical. Use color names + # instead of numbers: :help cterm-colors + # * The Windows console (yeah…) doesn't do italics, underlines or bolded text; + # it is limited to normal and reverse. Keep that in mind if you want + # your colorscheme to be usable in as many environments as possible by as many + # people as possible. + # * All of the terminal emulators in use these days allow their users to + # change the 16 so-called "ANSI" colors. It is also possible on some platforms + # to change some or all of the 256 colors in the xterm palette. Don't take + # anything for granted. + # * When used against a light background, strong colors work better than muted + # ones. Light or dark doesn't really matters. Also, it is harder to discriminate + # between two similar colors on a light background. + # * Both strong and muted colors work well against a dark background. It is also + # easier to work with similar colors, but dark colors don't work at all. + # * Use as many text samples as possible. String-heavy languages may look completely + # different than keyword-heavy ones. This can have an impact on the usability + # of your colorscheme. + # * Most terminal emulators and terminal multiplexers currently in use on unix-like + # systems support 256 colors but they almost always default to a '$TERM' that tells + # Vim otherwise. Your users will need to make sure their terminal emulator/multiplexer + # is correctly set up if they want to enjoy the best possible experience. + + # Many thanks to Barry Arthur (https://github.com/dahu) for the original idea. + + # You don't need to edit anything beyond this line. +-%> +" <%= information[:name] %>.vim -- Vim color scheme. +" Author: <%= information[:author] %> (<%= information[:email] %>) +" Webpage: <%= information[:webpage] %> +" Description: <%= information[:description] %> + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "<%= information[:name].downcase %>" + +if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") +<% for highlight in highlights -%> +<% if highlight.length == 4 -%> + hi <%= highlight[0] %> ctermbg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][1] %> ctermfg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][1] %> cterm=<%= highlight[3] %> guibg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][0] %> guifg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][0] %> gui=<%= highlight[3] %> +<% if highlight[0] == "Normal" -%> +<%= '' %> + set background=<%= information[:background] %> +<%= '' %> +<% end -%> +<% elsif highlight.length > 4 -%> + hi <%= highlight[0] %> ctermbg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][1] %> ctermfg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][1] %> cterm=<%= highlight[3] %> guibg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][0] %> guifg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][0] %> gui=<%= highlight[3] %> guisp=<%= highlight[4].kind_of?(String) ? highlight[4] : highlight[4][0] %> +<% end -%> +<% end -%> + +elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16 + set t_Co=16 +<%= '' %> +<% for highlight in highlights -%> +<% if highlight.length > 2 -%> + hi <%= highlight[0] %> ctermbg=<%= highlight[1].kind_of?(String) ? highlight[1] : highlight[1][2] %> ctermfg=<%= highlight[2].kind_of?(String) ? highlight[2] : highlight[2][2] %> cterm=<%= highlight[3] %> +<% if highlight[0] == "Normal" -%> +<%= '' %> + set background=<%= information[:background] %> +<%= '' %> +<% end -%> +<% end -%> +<% end -%> +endif +<% links = highlights.select do |highlight| -%> +<% highlight.length == 2 -%> +<% end -%> +<% if links.length > 0 -%> +<%= '' %> +<% for link in links -%> +hi link <%= link[0] %> <%= link[1] %> +<% end -%> +<% end -%> +<% if terminal_ansi_colors.length == 16 -%> +<%= '' %> +let g:terminal_ansi_colors = [ +<% for color in terminal_ansi_colors -%> + \ '<%= color[0] %>', +<% end -%> + \ ] +<% end -%> + + + +" Generated with RNB (https://gist.github.com/romainl/5cd2f4ec222805f49eca) diff --git a/nvim/nvim.symlink/colors/maxbucknell_light.vim b/nvim/nvim.symlink/colors/maxbucknell_light.vim new file mode 100644 index 0000000..dc00518 --- /dev/null +++ b/nvim/nvim.symlink/colors/maxbucknell_light.vim @@ -0,0 +1,182 @@ +" maxbucknell_light.vim -- Vim color scheme. +" Author: Max Bucknell (me@maxbucknell.com) +" Webpage: https://github.com/maxbucknell/dotfiles +" Description: My colour scheme, bruh. + +hi clear + +if exists("syntax_on") + syntax reset +endif + +let colors_name = "maxbucknell_light" + +if ($TERM =~ '256' || &t_Co >= 256) || has("gui_running") + hi Normal ctermbg=15 ctermfg=0 cterm=NONE guibg=#F7F8FF guifg=#16182B gui=NONE + + set background=light + + hi NormalFloat ctermbg=15 ctermfg=0 cterm=NONE guibg=#F7F8FF guifg=#16182B gui=NONE + hi NormalNC ctermbg=15 ctermfg=0 cterm=NONE guibg=#D8DAE8 guifg=#16182B gui=NONE + hi NonText ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Comment ctermbg=NONE ctermfg=NONE cterm=bold guibg=NONE guifg=NONE gui=bold + hi Constant ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Error ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi CocErrorHighlight ctermbg=15 ctermfg=NONE cterm=NONE guibg=#E0ABAB guifg=NONE gui=NONE + hi CocWarningHighlight ctermbg=15 ctermfg=NONE cterm=NONE guibg=#E0DDAB guifg=NONE gui=NONE + hi CocInfoHighlight ctermbg=15 ctermfg=NONE cterm=NONE guibg=#E0DDAB guifg=NONE gui=NONE + hi CocHintHighlight ctermbg=15 ctermfg=NONE cterm=NONE guibg=#E0DDAB guifg=NONE gui=NONE + hi CocHighlightText ctermbg=15 ctermfg=NONE cterm=NONE guibg=#F0D1EA guifg=NONE gui=NONE + hi Identifier ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Ignore ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi PreProc ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Special ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Statement ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Todo ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Type ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Underlined ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi StatusLine ctermbg=7 ctermfg=NONE cterm=NONE guibg=#F0F1FF guifg=NONE gui=NONE + hi StatusLineNC ctermbg=7 ctermfg=NONE cterm=NONE guibg=#F0F1FF guifg=NONE gui=NONE + hi VertSplit ctermbg=NONE ctermfg=7 cterm=NONE guibg=NONE guifg=#F0F1FF gui=NONE + hi TabLine ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi TabLineSel ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Title ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi CursorLine ctermbg=7 ctermfg=NONE cterm=NONE guibg=#F2F4FF guifg=NONE gui=NONE + hi LineNr ctermbg=7 ctermfg=NONE cterm=NONE guibg=#F0F1FF guifg=NONE gui=NONE + hi CursorLineNr ctermbg=0 ctermfg=7 cterm=NONE guibg=#16182B guifg=#F0F1FF gui=NONE + hi helpLeadBlank ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi helpNormal ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Visual ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi VisualNOS ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Pmenu ctermbg=0 ctermfg=15 cterm=NONE guibg=#16182B guifg=#F7F8FF gui=NONE + hi PmenuSbar ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi PmenuSel ctermbg=9 ctermfg=10 cterm=NONE guibg=#ff0000 guifg=#00ff00 gui=NONE + hi PmenuThumb ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi FoldColumn ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Folded ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi WildMenu ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi SpecialKey ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi DiffAdd ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi DiffChange ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi DiffDelete ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi DiffText ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi IncSearch ctermbg=10 ctermfg=NONE cterm=bold guibg=#B6BDF0 guifg=NONE gui=bold + hi Search ctermbg=10 ctermfg=NONE cterm=NONE guibg=#B6BDF0 guifg=NONE gui=NONE + hi Directory ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi MatchParen ctermbg=15 ctermfg=NONE cterm=NONE guibg=#F0D1EA guifg=NONE gui=NONE + hi SpellBad ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE guisp=#ff0000 + hi SpellCap ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE guisp=#0000ff + hi SpellLocal ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE guisp=#ff00ff + hi SpellRare ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE guisp=#00ffff + hi ColorColumn ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi SignColumn ctermbg=7 ctermfg=NONE cterm=NONE guibg=#F0F1FF guifg=NONE gui=NONE + hi ErrorMsg ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi ModeMsg ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi MoreMsg ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Question ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi Cursor ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi CursorColumn ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi QuickFixLine ctermbg=NONE ctermfg=NONE cterm=NONE guibg=NONE guifg=NONE gui=NONE + hi StatusLineTerm ctermbg=7 ctermfg=NONE cterm=NONE guibg=#F0F1FF guifg=NONE gui=NONE + hi StatusLineTermNC ctermbg=7 ctermfg=NONE cterm=NONE guibg=#F0F1FF guifg=NONE gui=NONE + +elseif &t_Co == 8 || $TERM !~# '^linux' || &t_Co == 16 + set t_Co=16 + + hi Normal ctermbg=white ctermfg=black cterm=NONE + + set background=light + + hi NormalFloat ctermbg=white ctermfg=black cterm=NONE + hi NormalNC ctermbg=white ctermfg=black cterm=NONE + hi NonText ctermbg=NONE ctermfg=NONE cterm=NONE + hi Comment ctermbg=NONE ctermfg=NONE cterm=bold + hi Constant ctermbg=NONE ctermfg=NONE cterm=NONE + hi Error ctermbg=NONE ctermfg=NONE cterm=NONE + hi CocErrorHighlight ctermbg=white ctermfg=NONE cterm=NONE + hi CocWarningHighlight ctermbg=white ctermfg=NONE cterm=NONE + hi CocInfoHighlight ctermbg=white ctermfg=NONE cterm=NONE + hi CocHintHighlight ctermbg=white ctermfg=NONE cterm=NONE + hi CocHighlightText ctermbg=white ctermfg=NONE cterm=NONE + hi Identifier ctermbg=NONE ctermfg=NONE cterm=NONE + hi Ignore ctermbg=NONE ctermfg=NONE cterm=NONE + hi PreProc ctermbg=NONE ctermfg=NONE cterm=NONE + hi Special ctermbg=NONE ctermfg=NONE cterm=NONE + hi Statement ctermbg=NONE ctermfg=NONE cterm=NONE + hi Todo ctermbg=NONE ctermfg=NONE cterm=NONE + hi Type ctermbg=NONE ctermfg=NONE cterm=NONE + hi Underlined ctermbg=NONE ctermfg=NONE cterm=NONE + hi StatusLine ctermbg=gray ctermfg=NONE cterm=NONE + hi StatusLineNC ctermbg=gray ctermfg=NONE cterm=NONE + hi VertSplit ctermbg=NONE ctermfg=gray cterm=NONE + hi TabLine ctermbg=NONE ctermfg=NONE cterm=NONE + hi TabLineFill ctermbg=NONE ctermfg=NONE cterm=NONE + hi TabLineSel ctermbg=NONE ctermfg=NONE cterm=NONE + hi Title ctermbg=NONE ctermfg=NONE cterm=NONE + hi CursorLine ctermbg=gray ctermfg=NONE cterm=NONE + hi LineNr ctermbg=gray ctermfg=NONE cterm=NONE + hi CursorLineNr ctermbg=black ctermfg=gray cterm=NONE + hi helpLeadBlank ctermbg=NONE ctermfg=NONE cterm=NONE + hi helpNormal ctermbg=NONE ctermfg=NONE cterm=NONE + hi Visual ctermbg=NONE ctermfg=NONE cterm=NONE + hi VisualNOS ctermbg=NONE ctermfg=NONE cterm=NONE + hi Pmenu ctermbg=black ctermfg=white cterm=NONE + hi PmenuSbar ctermbg=NONE ctermfg=NONE cterm=NONE + hi PmenuSel ctermbg=red ctermfg=green cterm=NONE + hi PmenuThumb ctermbg=NONE ctermfg=NONE cterm=NONE + hi FoldColumn ctermbg=NONE ctermfg=NONE cterm=NONE + hi Folded ctermbg=NONE ctermfg=NONE cterm=NONE + hi WildMenu ctermbg=NONE ctermfg=NONE cterm=NONE + hi SpecialKey ctermbg=NONE ctermfg=NONE cterm=NONE + hi DiffAdd ctermbg=NONE ctermfg=NONE cterm=NONE + hi DiffChange ctermbg=NONE ctermfg=NONE cterm=NONE + hi DiffDelete ctermbg=NONE ctermfg=NONE cterm=NONE + hi DiffText ctermbg=NONE ctermfg=NONE cterm=NONE + hi IncSearch ctermbg=green ctermfg=NONE cterm=bold + hi Search ctermbg=green ctermfg=NONE cterm=NONE + hi Directory ctermbg=NONE ctermfg=NONE cterm=NONE + hi MatchParen ctermbg=white ctermfg=NONE cterm=NONE + hi SpellBad ctermbg=NONE ctermfg=NONE cterm=NONE + hi SpellCap ctermbg=NONE ctermfg=NONE cterm=NONE + hi SpellLocal ctermbg=NONE ctermfg=NONE cterm=NONE + hi SpellRare ctermbg=NONE ctermfg=NONE cterm=NONE + hi ColorColumn ctermbg=NONE ctermfg=NONE cterm=NONE + hi SignColumn ctermbg=gray ctermfg=NONE cterm=NONE + hi ErrorMsg ctermbg=NONE ctermfg=NONE cterm=NONE + hi ModeMsg ctermbg=NONE ctermfg=NONE cterm=NONE + hi MoreMsg ctermbg=NONE ctermfg=NONE cterm=NONE + hi Question ctermbg=NONE ctermfg=NONE cterm=NONE + hi Cursor ctermbg=NONE ctermfg=NONE cterm=NONE + hi CursorColumn ctermbg=NONE ctermfg=NONE cterm=NONE + hi QuickFixLine ctermbg=NONE ctermfg=NONE cterm=NONE + hi StatusLineTerm ctermbg=gray ctermfg=NONE cterm=NONE + hi StatusLineTermNC ctermbg=gray ctermfg=NONE cterm=NONE +endif + +hi link String Constant +hi link Number Constant +hi link WarningMsg Error + +let g:terminal_ansi_colors = [ + \ '#000000', + \ '#800000', + \ '#008000', + \ '#808000', + \ '#000080', + \ '#800080', + \ '#008080', + \ '#c0c0c0', + \ '#808080', + \ '#ff0000', + \ '#00ff00', + \ '#ffff00', + \ '#0000ff', + \ '#ff00ff', + \ '#00ffff', + \ '#ffffff', + \ ] + + + +" Generated with RNB (https://gist.github.com/romainl/5cd2f4ec222805f49eca) diff --git a/nvim/nvim.symlink/init.vim b/nvim/nvim.symlink/init.vim index 9975288..71368a7 100644 --- a/nvim/nvim.symlink/init.vim +++ b/nvim/nvim.symlink/init.vim @@ -1,11 +1,5 @@ " Let's get the plugins out of the way first, shall we? call plug#begin() - " Pane Navigation (Tmux integration) - Plug 'christoomey/vim-tmux-navigator' - - " Colours - Plug 'morhetz/gruvbox' - " Fuzzy finding Plug '/usr/local/opt/fzf' Plug 'junegunn/fzf.vim' @@ -15,21 +9,16 @@ call plug#begin() " Snippets Plug 'SirVer/ultisnips' - Plug 'honza/vim-snippets' " Surround Plug 'tpope/vim-surround' " Git integration Plug 'tpope/vim-fugitive' - Plug 'airblade/vim-gitgutter' " Comments Plug 'tpope/vim-commentary' - " Statusline - Plug 'vim-airline/vim-airline' - " (Java|Type)Script Plug 'pangloss/vim-javascript' Plug 'mxw/vim-jsx' @@ -43,6 +32,9 @@ call plug#begin() " CSS Colour previews Plug 'maxbucknell/Colorizer', { 'branch': 'neovim-virtual-text' } + + " Statusline + Plug 'vim-airline/vim-airline' call plug#end() " I have a true colour terminal, and I will have true colours in my Vim @@ -58,12 +50,32 @@ set nobackup set nowritebackup set noswapfile -" Don't wrap lines +" Show things faster, particularly error messages +set updatetime=300 + +" I always want a sign column +set signcolumn=yes + +" Trying this bizarre method of self location again. +set cursorline + +" Statuslines! + +" Input supports patched fonts already \o/ +let g:airline_powerline_fonts = 1 + +" Made a custom theme for it didn't I? +let g:airline_theme='maxbucknell' + +let g:airline_left_sep='|' +let g:airline_right_sep='|' + +" Wrap lines " -" I look at a lot of CSV files and logs, which are generally the only -" times I see long lines. If code is too long, I shorten it. As such, -" having lines artificially wrapping only gets in my way. -set nowrap +" Splitting screens means that sometimes my code windows are little. It might +" be nice in future to indent and give indication that it's wrapped, but for +" now, I can manage by seeing line numbers. +set wrap " Line numbering " @@ -110,7 +122,7 @@ set autoread " Show trailing whitespace, since it's a crime set list -set listchars=tab:‣\ ,trail:· +set listchars=tab:‣\ ,trail:·,extends:◣,precedes:◢,nbsp:○ " Turn off code folding " @@ -142,20 +154,17 @@ filetype plugin indent on " Theme configuration -if $MACOS_DARKMODE - set background=dark +let g:is_dark_mode = system("isdark") + +if g:is_dark_mode == "true\n" + set background=light + colorscheme maxbucknell_light else set background=light + colorscheme maxbucknell_light endif -let g:gruvbox_italic = 1 - -colorscheme gruvbox - -" I want floating windows to have the same syntax highlighting as normal vim -" things. -" hi NormalFloat ctermbg=4 - +let g:go_def_mapping_enabled = 0 " Lead with the biggest button on the motherfucking keyboard let mapleader = "\" @@ -196,26 +205,15 @@ nnoremap b :Buffers nnoremap " Ultisnips, y'all -let g:UltiSnipsExpandTrigger="" -let g:UltiSnipsJumpForwardTrigger="" -let g:UltiSnipsJumpBackwardTrigger="" +" I previously configured tab as a trigger here, but now I just +" use CoC +let g:UltiSnipsSnippetDirectories=[$VIMCONFIG.'/UltiSnips'] " Colorizer adds little colour swatches next to CSS colours let g:colorizer_auto_filetype='css,less,scss,sass' let g:colorizer_colornames = 0 let g:colorizer_use_virtual_text = 1 -" Gitgutter -let g:gitgutter_realtime = 1 -let g:gitgutter_eager = 1 - -" Status line stuff -let g:airline_theme = 'gruvbox' -let g:airline#extensions#tabline#enabled = 1 - -" Input supports patched fonts already \o/ -let g:airline_powerline_fonts = 1 - " Coc " " I'm not sure that I like Coc, its configuration feels very "unvimmy", but it @@ -313,7 +311,23 @@ function! ZoomOrUnzoom() endfunc " Map it to z -nnoremap v :call ZoomOrUnzoom() +nnoremap z :call ZoomOrUnzoom() + +" Making splits a little bit better. +" +" I open splits before opening files because I can never remember the +" keyboard incantations in FZF to open in splits, but I get annoyed for +" the brief moment that the same buffer was shown when I do :vsp or :sp. +" +" I don't have to have this problem anymore. +nnoremap v :vnew +nnoremap s :new + +" And make moving around splits just a little bit sane. +nnoremap +nnoremap +nnoremap +nnoremap " I had this running as an autocommand on resizes, but it was buggy so it's " disabled at the moment. @@ -371,6 +385,9 @@ augroup textFormatting " Make files really need tabs autocmd FileType make setl noet sw=8 sts=8 ts=8 + " So too do Go files, apparently. + autocmd FileType go setl noet sw=8 sts=8 ts=8 + " Hard wrap prose " " This will automatically insert a new line in insert mode when a @@ -415,14 +432,11 @@ augroup AutoMkdir autocmd BufNewFile * :call EnsureDirExists() augroup END -function! HandleWinEnter() - setlocal winhighlight=Normal:ActiveWindow,NormalNC:InactiveWindow -endfunc - augroup WindowManagement autocmd! - autocmd WinEnter * call HandleWinEnter() + autocmd WinEnter * setl rnu cul syntax=on + autocmd WinLeave * setl nornu nocul syntax=off augroup END " Show syntax highlighting groups for word under cursor @@ -433,7 +447,11 @@ function! SynStack() if !exists("*synstack") return endif - echo map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")') + " echo map(synstack(line('.'), col('.')), 'synIDattr(v:val,"name")') + + echo "hi<" . synIDattr(synID(line("."),col("."),1),"name") . '> trans<' + \ . synIDattr(synID(line("."),col("."),0),"name") . "> lo<" + \ . synIDattr(synIDtrans(synID(line("."),col("."),1)),"name") . ">" endfunc nnoremap \ :call SynStack() @@ -510,7 +528,7 @@ endfunc augroup manageModalWindows autocmd! -" autocmd BufEnter * call FocusModalWindow() + " autocmd BufEnter * call FocusModalWindow() augroup END " Remind me to update my plugins every so often. Run a function at startup diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink index c23a067..7b05cc3 100644 --- a/zsh/zshrc.symlink +++ b/zsh/zshrc.symlink @@ -33,7 +33,9 @@ export PYTHONPATH="$PYTHONPATH:$HOME/dotfiles/lib/python" # source $HOME/.cargo/env # Go -PATH="$HOME/go/bin:$PATH" +export GOPATH="$HOME/go" +export GOBIN="$GOPATH/bin" +PATH="$GOBIN:$PATH" # Yarn ffs export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" @@ -163,20 +165,14 @@ setopt extended_history # to do things correctly and see if it's slow. setopt hist_lex_words -# Dark Mode Support -isdark="$($HOME/dotfiles/bin/isdark)" -if [[ "$isdark" == 'true' ]] -then - export MACOS_DARKMODE=1 -else - export MACOS_DARKMODE=0 -fi - # Liquid Prompt! source "$HOME/.zsh/liquidprompt/liquidprompt" # Vim! alias vim=nvim +# I made this typo once and never again. +alias vi=nvim +alias v=nvim # Exa! alias ls=exa @@ -217,3 +213,9 @@ function select_session { # fi # select_session + +# The next line updates PATH for the Google Cloud SDK. +if [ -f '/Users/maxbucknell/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/maxbucknell/google-cloud-sdk/path.zsh.inc'; fi + +# The next line enables shell command completion for gcloud. +if [ -f '/Users/maxbucknell/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/maxbucknell/google-cloud-sdk/completion.zsh.inc'; fi