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 -- <<< 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 -- <<< 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' } diff --git a/.config/shell/bin/upd b/.config/shell/bin/upd index 9df22fe..92512d3 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" ]; then + GREEN="" + NC="(B" fi # `git pull` everything mentioned in the REPOS_TO_UPDATE variable diff --git a/.zshrc b/.zshrc index 88c01b9..a3f6302 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 \