From 3939bdcad77c9df0f70503da35f962deccacb1d0 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 00:36:53 -0700 Subject: [PATCH 1/8] upd: add support for colors in termux (android) --- .config/shell/bin/upd | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.config/shell/bin/upd b/.config/shell/bin/upd index 9df22fe..4f999f8 100755 --- a/.config/shell/bin/upd +++ b/.config/shell/bin/upd @@ -12,6 +12,9 @@ fi if command -v tput > /dev/null; then GREEN="$(tput setaf 2)" NC="$(tput sgr0)" +elif [ -n "$TERMUX_VERSION"] + GREEN="" + NC="(B" fi # `git pull` everything mentioned in the REPOS_TO_UPDATE variable From 9ccde7971d28a0e794b88c3a24c6c1c799335021 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 00:49:33 -0700 Subject: [PATCH 2/8] zsh: fix instant prompt loading on first zinit install --- .zshrc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.zshrc b/.zshrc index adeff6a..0bc99fc 100644 --- a/.zshrc +++ b/.zshrc @@ -17,6 +17,8 @@ ${SKIP_PLUGINS:-false} || { command git clone https://github.com/zdharma-continuum/zinit "$ZINIT_HOME_DIR/bin" && \ print -P "%F{33}▓▒░ %F{34}Installation successful.%f%b\nPlease wait while plugins install." || \ print -P "%F{160}▓▒░ The clone has failed.%f%b" + elif [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then + source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi # Source zinit @@ -24,9 +26,6 @@ ${SKIP_PLUGINS:-false} || { autoload -Uz _zinit (( ${+_comps} )) && _comps[zinit]=_zinit - if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then - source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" - fi # Load a few important annexes, without Turbo # (this is currently required for annexes) zinit light-mode for \ From 68f073dab37ef9489d64d202eb13601367e17239 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 01:41:16 -0700 Subject: [PATCH 3/8] nvim: update cmp comfiguration --- .config/nvim/lua/blake/lsp.lua | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.config/nvim/lua/blake/lsp.lua b/.config/nvim/lua/blake/lsp.lua index 776ba27..acc89a5 100644 --- a/.config/nvim/lua/blake/lsp.lua +++ b/.config/nvim/lua/blake/lsp.lua @@ -102,8 +102,6 @@ M.cmp = function() local cmp_autopairs = require('nvim-autopairs.completion.cmp') local cmp = require('cmp') cmp.event:on( 'confirm_done', cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) - -- add a lisp filetype (wrap my-function), FYI: Hardcoded = { "clojure", "clojurescript", "fennel", "janet" } - cmp_autopairs.lisp[#cmp_autopairs.lisp+1] = "racket" -- nvim-cmp setup cmp.setup { snippet = { expand = function(args) @@ -201,9 +199,9 @@ M.cmp = function() cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), sources = cmp.config.sources({ - { name = 'path' } - }, { { name = 'cmdline' } + }, { + { name = 'path' } }) }) end -- <<< From 8f92613c6f8882a9e4ef4105eb148570dde6fd7a Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 01:41:50 -0700 Subject: [PATCH 4/8] nvim: fix dap-ui configuration --- .config/nvim/lua/blake/dap.lua | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/.config/nvim/lua/blake/dap.lua b/.config/nvim/lua/blake/dap.lua index 497e11a..c3ed409 100644 --- a/.config/nvim/lua/blake/dap.lua +++ b/.config/nvim/lua/blake/dap.lua @@ -72,30 +72,6 @@ M.dap_ui = function() edit = "s", -- (as in substitute) repl = "r", -- open a repl }, - sidebar = { - -- You can change the order of elements in the sidebar - elements = { - -- size can be float or integer > 1 - { id = "scopes", size = 0.80, }, - { id = "breakpoints", size = 0.20 }, - -- { id = "stacks", size = 0.15 }, - -- { id = "watches", size = 0.15 }, - }, - size = 40, - position = "left", -- Can be "left", "right", "top", "bottom" - }, - tray = { - elements = { "repl" }, - size = 0, - position = "top", -- Can be "left", "right", "top", "bottom" - }, - floating = { - max_height = nil, -- These can be integers or a float between 0 and 1. - max_width = nil, -- Floats will be treated as percentage of your screen. - mappings = { - close = { "q", "" }, - }, - }, windows = { indent = 1 }, }) end -- <<< From c715fef4371499054b2bb14fc20e49b318936c48 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 01:42:34 -0700 Subject: [PATCH 5/8] nvim: big auto pairing update: update nvim-autopairs configurarion, add nvim-ts-autotag, add nvim-treesitter-endwise --- .config/nvim/lua/blake/plugins.lua | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.config/nvim/lua/blake/plugins.lua b/.config/nvim/lua/blake/plugins.lua index 85f633d..1ee46f2 100644 --- a/.config/nvim/lua/blake/plugins.lua +++ b/.config/nvim/lua/blake/plugins.lua @@ -286,9 +286,36 @@ return require('packer').startup({function() use { -- Quote pairing 'windwp/nvim-autopairs', config = function() - require('nvim-autopairs').setup() + -- If you want insert `(` after select function or method item + local cmp_autopairs = require('nvim-autopairs.completion.cmp') + local cmp = require('cmp') + cmp.event:on( + 'confirm_done', + cmp_autopairs.on_confirm_done() + ) + require('nvim-autopairs').setup({ + -- check_ts = true, + -- map_c_h = true, + -- map_c_w = true, + }) end } + use { -- ts-autotag: automatically close html tags + 'windwp/nvim-ts-autotag', + config = function() + require('nvim-ts-autotag').setup() + end + } + use { -- endwise: auto add 'end' keyword + 'RRethy/nvim-treesitter-endwise', + config = function() + require('nvim-treesitter.configs').setup { + endwise = { + enable = true, + }, + } + end +} use { -- accelerated jk movement 'rhysd/accelerated-jk' } From 4c9ab664f4d51c150c6af7a95e6bb50becbcc3fb Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 11:12:33 -0700 Subject: [PATCH 6/8] upd: oops --- .config/shell/bin/upd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.config/shell/bin/upd b/.config/shell/bin/upd index 4f999f8..92512d3 100755 --- a/.config/shell/bin/upd +++ b/.config/shell/bin/upd @@ -12,7 +12,7 @@ fi if command -v tput > /dev/null; then GREEN="$(tput setaf 2)" NC="$(tput sgr0)" -elif [ -n "$TERMUX_VERSION"] +elif [ -n "$TERMUX_VERSION" ]; then GREEN="" NC="(B" fi From 9fb3eb136de8d5ec0e601672aa7aa4d2ec453948 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 18:41:52 -0700 Subject: [PATCH 7/8] zsh: don't remove aliases that don't already exist --- .zshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 0bc99fc..f13a64a 100644 --- a/.zshrc +++ b/.zshrc @@ -76,8 +76,10 @@ ${SKIP_PLUGINS:-false} || { # clear plugin options set at the start of this block unalias zinit - # just gonna sneak this in here too - alias zi > /dev/null && unalias zi zpl zini zplg which-command run-help fsh-alias + # delete aliases added by zinit and zsh that I don't care about + unaliases(){ for A in "$@";do alias "$A" > /dev/null && unalias "$A"; } + unaliases zi zpl zini zplg which-command run-help fsh-alias + unset -f unaliases } # <<< } From 807dd358c92b3cf3c93facac0cc02b00e7954ff0 Mon Sep 17 00:00:00 2001 From: PowerUser64 Date: Wed, 22 Jun 2022 18:41:52 -0700 Subject: [PATCH 8/8] zsh: don't remove aliases that don't already exist --- .zshrc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.zshrc b/.zshrc index 0bc99fc..0eba1cb 100644 --- a/.zshrc +++ b/.zshrc @@ -76,8 +76,10 @@ ${SKIP_PLUGINS:-false} || { # clear plugin options set at the start of this block unalias zinit - # just gonna sneak this in here too - alias zi > /dev/null && unalias zi zpl zini zplg which-command run-help fsh-alias + # delete aliases added by zinit and zsh that I don't care about + unaliases(){ for A in "$@";do alias "$A" > /dev/null && unalias "$A";done; } + unaliases zi zpl zini zplg which-command run-help fsh-alias + unset -f unaliases } # <<< }