dotfiles

My configuration files
git clone git://git.finwo.net/misc/dotfiles
Log | Files | Refs

commit 10c9317bff3bd6c4078f9ff188711e87d10e2709
parent cd7aa927afda7c9ef1b5c9569b3878baf5e6f203
Author: finwo <finwo@pm.me>
Date:   Mon, 18 Aug 2025 12:39:45 +0200

nvim makefile fixes ; autoload nvm for node/nvim

Diffstat:
Mneovim/home/.vimrc | 32+++++++++++++++++++-------------
Mzsh/home/.zshrc | 62++++++++++++++++++++++++++++++++++++++++++++++++++++++++------
2 files changed, 75 insertions(+), 19 deletions(-)

diff --git a/neovim/home/.vimrc b/neovim/home/.vimrc @@ -139,6 +139,11 @@ if has('mouse') set mouse=a endif +" in makefiles, don't expand tabs to spaces, since actual tab characters are +" needed, and have indentation at 8 chars to be sure that all indents are tabs +" (despite the mappings later): +autocmd FileType make set noexpandtab shiftwidth=2 softtabstop=0 + " }}} " Colors {{{ @@ -201,23 +206,23 @@ let g:NERDTreePatternMatchHighlightFullName = 1 " " Don't restrict JSX syntax highlighting to .jsx files " let g:jsx_ext_required = 0 -" +" " " Enable completion where available " let g:ale_sign_error = '✘' " let g:ale_sign_warning = '•' " let g:ale_sign_column_always = 1 -" +" " " What programs handle what " let g:ale_fixers = {} " let g:ale_fixers['javascript'] = ['eslint'] " let g:ale_fixers['typescript'] = ['eslint'] " let g:ale_fixers['vue'] = ['eslint'] " let g:ale_fixers['scss'] = ['stylelint'] -" +" " " Automagically fix " let g:ale_open_list= 0 " let g:ale_fix_on_save = 1 -" +" " " Don't run every keystroke " let g:ale_lint_on_insert_leave = 1 " let g:ale_lint_on_text_changed = 'never' @@ -235,6 +240,7 @@ let g:coc_global_extensions = [ \ 'coc-html', \ 'coc-json', \ 'coc-sh', + \ 'coc-tsserver', \ 'coc-vetur', \ 'coc-yaml' \ ] @@ -440,8 +446,8 @@ set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} "" Whether to include the types of the completions in the result data. Default: 0 "let g:deoplete#sources#ternjs#types = 1 -"" Whether to include the distance (in scopes for variables, in prototypes for -"" properties) between the completions and the origin position in the result +"" Whether to include the distance (in scopes for variables, in prototypes for +"" properties) between the completions and the origin position in the result "" data. Default: 0 "let g:deoplete#sources#ternjs#depths = 1 @@ -450,32 +456,32 @@ set statusline^=%{coc#status()}%{get(b:,'coc_current_function','')} "let g:deoplete#sources#ternjs#docs = 1 "" When on, only completions that match the current word at the given point will -"" be returned. Turn this off to get all results, so that you can filter on the +"" be returned. Turn this off to get all results, so that you can filter on the "" client side. Default: 1 "let g:deoplete#sources#ternjs#filter = 0 -"" Whether to use a case-insensitive compare between the current word and +"" Whether to use a case-insensitive compare between the current word and "" potential completions. Default 0 "let g:deoplete#sources#ternjs#case_insensitive = 1 -"" When completing a property and no completions are found, Tern will use some -"" heuristics to try and return some properties anyway. Set this to 0 to +"" When completing a property and no completions are found, Tern will use some +"" heuristics to try and return some properties anyway. Set this to 0 to "" turn that off. Default: 1 "let g:deoplete#sources#ternjs#guess = 0 "" Determines whether the result set will be sorted. Default: 1 "let g:deoplete#sources#ternjs#sort = 1 -"" When disabled, only the text before the given position is considered part of +"" When disabled, only the text before the given position is considered part of "" the word. When enabled (the default), the whole variable name that the cursor "" is on will be included. Default: 1 "let g:deoplete#sources#ternjs#expand_word_forward = 0 -"" Whether to ignore the properties of Object.prototype unless they have been +"" Whether to ignore the properties of Object.prototype unless they have been "" spelled out by at least two characters. Default: 1 "let g:deoplete#sources#ternjs#omit_object_prototype = 0 -"" Whether to include JavaScript keywords when completing something that is not +"" Whether to include JavaScript keywords when completing something that is not "" a property. Default: 0 "let g:deoplete#sources#ternjs#include_keywords = 1 diff --git a/zsh/home/.zshrc b/zsh/home/.zshrc @@ -114,6 +114,8 @@ command -v gmake &>/dev/null && alias make="gmake" command -v nproc &>/dev/null || alias nproc="sysctl -n hw.ncpu" +command -v kitten &>/dev/null && alias icat="kitten icat" + # }}} # Aliases {{{ @@ -184,6 +186,11 @@ if [[ $TERM == screen* ]]; then export SCREEN=yes fi +# Fix for kitty term +if [[ $TERM == "xterm-kitty" ]]; then + export TERM=xterm-color +fi + # # TERM # # nvim has issues with xterm-256color # if [[ $TERM == xterm-256color ]]; then @@ -300,7 +307,44 @@ nvm() { [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion nvm "$@" } -# + +_load_nvm() { + unset -f node + unset -f npx + unset -f npm + nvm use default +} + +node() { + _load_nvm + node "$@" +} + +npm() { + _load_nvm + npm "$@" +} + +npx() { + _load_nvm + npx "$@" +} + +# if [ -d "$HOME/.nvm" ]; then +# nvm use default +# fi + +# }}} +# Load nvm pre-neovim {{{ + +[ -d "$HOME/.nvm" ] && command -v nvim &>/dev/null && { + nvim() { + _load_nvm + unset -f nvim + nvim "$@" + } +} + # }}} # PHPBrew {{{ @@ -358,8 +402,8 @@ EOF } # }}} # nativescript {{{ -if [ -f /home/finwo/.tnsrc ]; then - source /home/finwo/.tnsrc +if [ -f /home/finwo/.tnsrc ]; then + source /home/finwo/.tnsrc fi # }}} # pnpm {{{ @@ -402,9 +446,15 @@ if command -v difft &>/dev/null; then export GIT_EXTERNAL_DIFF=difft fi # }}} -# Deno {{{ -export DENO_INSTALL="$HOME/.deno" -export PATH="$DENO_INSTALL/bin:$PATH" +# osx clang {{{ +if [ -d /opt/homebrew/opt/llvm/bin ]; then + export PATH="/opt/homebrew/opt/llvm/bin:${PATH}" +fi +# }}} +# Rust cargo {{{ +if [ -f $HOME/.cargo/env ]; then + . $HOME/.cargo/env +fi # }}} # KubeCTL {{{