Browse Source

vim: autoload plugins

master
sentriz 6 months ago
parent
commit
ec6487aab9
No known key found for this signature in database GPG Key ID: 9A8DAE1CA907B862
29 changed files with 89 additions and 138 deletions
  1. +18
    -21
      .gitmodules
  2. +0
    -48
      conf_common/.config/nvim/conf_auto_commands.vim
  3. +0
    -38
      conf_common/.config/nvim/conf_plugins.vim
  4. +63
    -2
      conf_common/.config/nvim/init.vim
  5. +0
    -0
      conf_common/.local/share/nvim/site/pack/look/opt/.gitkeep
  6. +0
    -0
      conf_common/.local/share/nvim/site/pack/meta/opt/.gitkeep
  7. +0
    -1
      conf_common/.local/share/nvim/site/pack/meta/opt/hrsh7th/nvim-compe
  8. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/committia.vim
  9. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/conflict3
  10. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/formatter.nvim
  11. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/nvim-lsp
  12. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/nvim-treesitter
  13. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/nvim-treesitter-textobjects
  14. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/spiffy_foldtext
  15. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-abolish
  16. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-commentary
  17. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-highlightedyank
  18. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-illuminate
  19. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-monotone
  20. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-print-debug
  21. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-qf
  22. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-repeat
  23. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-surround
  24. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-tmux-navigator
  25. +0
    -0
      conf_common/.local/share/nvim/site/pack/plugins/start/vim-vinegar
  26. +0
    -0
      conf_common/.local/share/nvim/site/pack/text/opt/.gitkeep
  27. +1
    -7
      fish-plugin-uninstall
  28. +5
    -9
      vim-plugin-install
  29. +2
    -12
      vim-plugin-uninstall

+ 18
- 21
.gitmodules View File

@@ -5,49 +5,49 @@
path = conf_extra/bin/notify-send
url = git@github.com:vlevit/notify-send.sh.git
[submodule "conf_common/.local/share/nvim/site/pack/look/opt/atimholt/spiffy_foldtext"]
path = conf_common/.local/share/nvim/site/pack/look/opt/atimholt/spiffy_foldtext
path = conf_common/.local/share/nvim/site/pack/plugins/start/spiffy_foldtext
url = https://github.com/atimholt/spiffy_foldtext
[submodule "conf_common/.local/share/nvim/site/pack/look/opt/tpope/vim-vinegar"]
path = conf_common/.local/share/nvim/site/pack/look/opt/tpope/vim-vinegar
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-vinegar
url = https://github.com/tpope/vim-vinegar
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/christoomey/vim-tmux-navigator"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/christoomey/vim-tmux-navigator
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-tmux-navigator
url = https://github.com/christoomey/vim-tmux-navigator
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/machakann/vim-highlightedyank"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/machakann/vim-highlightedyank
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-highlightedyank
url = https://github.com/machakann/vim-highlightedyank
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/neovim/nvim-lsp"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/neovim/nvim-lsp
path = conf_common/.local/share/nvim/site/pack/plugins/start/nvim-lsp
url = https://github.com/neovim/nvim-lsp
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/rhysd/committia.vim"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/rhysd/committia.vim
path = conf_common/.local/share/nvim/site/pack/plugins/start/committia.vim
url = https://github.com/rhysd/committia.vim
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/romainl/vim-qf"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/romainl/vim-qf
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-qf
url = https://github.com/romainl/vim-qf
[submodule "conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-abolish"]
path = conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-abolish
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-abolish
url = https://github.com/tpope/vim-abolish
[submodule "conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-commentary"]
path = conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-commentary
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-commentary
url = https://github.com/tpope/vim-commentary
[submodule "conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-repeat"]
path = conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-repeat
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-repeat
url = https://github.com/tpope/vim-repeat
[submodule "conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-surround"]
path = conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-surround
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-surround
url = https://github.com/tpope/vim-surround
[submodule "conf_common/.local/share/nvim/site/pack/look/opt/Lokaltog/vim-monotone"]
path = conf_common/.local/share/nvim/site/pack/look/opt/Lokaltog/vim-monotone
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-monotone
url = https://github.com/Lokaltog/vim-monotone
[submodule "conf_common/.local/share/nvim/site/pack/text/opt/sentriz/vim-print-debug"]
path = conf_common/.local/share/nvim/site/pack/text/opt/sentriz/vim-print-debug
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-print-debug
url = https://github.com/sentriz/vim-print-debug
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/mhartington/formatter.nvim"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/mhartington/formatter.nvim
path = conf_common/.local/share/nvim/site/pack/plugins/start/formatter.nvim
url = https://github.com/mhartington/formatter.nvim
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/RRethy/vim-illuminate"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/RRethy/vim-illuminate
path = conf_common/.local/share/nvim/site/pack/plugins/start/vim-illuminate
url = https://github.com/RRethy/vim-illuminate
[submodule "conf_common/.config/fish/plugins/jethrokuan/fzf"]
path = conf_common/.config/fish/plugins/jethrokuan/fzf
@@ -68,14 +68,11 @@
path = conf_common/.config/fish/plugins/brgmnn/fish-docker-compose
url = https://github.com/brgmnn/fish-docker-compose
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/mkotha/conflict3"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/mkotha/conflict3
path = conf_common/.local/share/nvim/site/pack/plugins/start/conflict3
url = https://github.com/mkotha/conflict3
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/hrsh7th/nvim-compe"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/hrsh7th/nvim-compe
url = https://github.com/hrsh7th/nvim-compe
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/nvim-treesitter/nvim-treesitter"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/nvim-treesitter/nvim-treesitter
path = conf_common/.local/share/nvim/site/pack/plugins/start/nvim-treesitter
url = https://github.com/nvim-treesitter/nvim-treesitter
[submodule "conf_common/.local/share/nvim/site/pack/meta/opt/nvim-treesitter/nvim-treesitter-textobjects"]
path = conf_common/.local/share/nvim/site/pack/meta/opt/nvim-treesitter/nvim-treesitter-textobjects
path = conf_common/.local/share/nvim/site/pack/plugins/start/nvim-treesitter-textobjects
url = https://github.com/nvim-treesitter/nvim-treesitter-textobjects

+ 0
- 48
conf_common/.config/nvim/conf_auto_commands.vim View File

@@ -1,48 +0,0 @@
autocmd FileType markdown setlocal spell
autocmd FileType gitcommit setlocal spell
autocmd FileType yaml setlocal cursorcolumn
autocmd FileType yaml.docker-compose setlocal cursorcolumn

autocmd FileType yaml setlocal comments=:# commentstring=#\ %s expandtab
autocmd FileType yaml.docker-compose setlocal comments=:# commentstring=#\ %s expandtab
autocmd FileType python setlocal comments=b:#,fb:- commentstring=#\ %s
autocmd FileType go setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=//\ %s
autocmd FileType lua setlocal comments=:-- commentstring=--%s
autocmd FileType vim setlocal comments=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" commentstring=\"%s
autocmd FileType sql setlocal comments=s1:/*,mb:*,ex:*/,:--,://
autocmd FileType git syntax on

augroup AutoCursorLastPosition
autocmd!
autocmd BufReadPost *
\ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
\ exec "normal g`\"" |
\ endif
augroup END

augroup AutoNetrwOnStart
autocmd!
let have_stdin = 0
autocmd StdinReadPost * let have_stdin = 1
autocmd VimEnter * if !(argc() + have_stdin) | Explore! | endif
augroup END

" by Wouter Hanegraaff
augroup AutoEditGPGFile
autocmd!
autocmd BufReadPre,FileReadPre *.gpg set viminfo=
autocmd BufReadPre,FileReadPre *.gpg set noswapfile noundofile nobackup
autocmd BufReadPre,FileReadPre *.gpg set bin
autocmd BufReadPre,FileReadPre *.gpg let ch_save = &cmdheight | set cmdheight=2
autocmd BufReadPost,FileReadPost *.gpg '[,']!gpg --decrypt 2>/dev/null
autocmd BufReadPost,FileReadPost *.gpg set nobin
autocmd BufReadPost,FileReadPost *.gpg let &cmdheight = ch_save | unlet ch_save
autocmd BufReadPost,FileReadPost *.gpg execute ":doautocmd BufReadPost " . expand("%:r")
autocmd BufWritePre,FileWritePre *.gpg '[,']!gpg --default-recipient-self --armor --encrypt 2>/dev/null
autocmd BufWritePost,FileWritePost *.gpg undo
augroup END

augroup AutoFormat
autocmd!
autocmd BufWritePost * silent! FormatWrite
augroup END

+ 0
- 38
conf_common/.config/nvim/conf_plugins.vim View File

@@ -1,38 +0,0 @@
let g:netrw_list_hide = '.*\.pyc$,^__pycache__$'

let g:tmux_navigator_no_mappings = 1
let g:tmux_navigator_save_on_switch = 1

let g:monotone_color = [10, 3, 100]
let g:monotone_secondary_hue_offset = 0

let g:qf_auto_open_quickfix = 1
let g:qf_auto_open_loclist = 1

let g:Illuminate_delay = 500

" category "meta"
" ~/.local/share/nvim/site/pack/meta/opt/
packadd! RRethy/vim-illuminate
packadd! christoomey/vim-tmux-navigator
packadd! machakann/vim-highlightedyank
packadd! mhartington/formatter.nvim
packadd! mkotha/conflict3
packadd! neovim/nvim-lsp
packadd! rhysd/committia.vim
packadd! romainl/vim-qf
packadd! nvim-treesitter/nvim-treesitter
packadd! nvim-treesitter/nvim-treesitter-textobjects

" category "look"
" ~/.local/share/nvim/site/pack/look/opt/
packadd! Lokaltog/vim-monotone
packadd! tpope/vim-vinegar

" category "text"
" ~/.local/share/nvim/site/pack/text/opt/
packadd! sentriz/vim-print-debug
packadd! tpope/vim-abolish
packadd! tpope/vim-commentary
packadd! tpope/vim-repeat
packadd! tpope/vim-surround

+ 63
- 2
conf_common/.config/nvim/init.vim View File

@@ -1,11 +1,72 @@
filetype plugin indent off

exec 'source' . expand("$XDG_CONFIG_HOME/nvim/conf_plugins.vim")
let g:netrw_list_hide = '.*\.pyc$,^__pycache__$'

let g:tmux_navigator_no_mappings = 1
let g:tmux_navigator_save_on_switch = 1

let g:monotone_color = [10, 3, 100]
let g:monotone_secondary_hue_offset = 0

let g:qf_auto_open_quickfix = 1
let g:qf_auto_open_loclist = 1

let g:Illuminate_delay = 500

exec 'source' . expand("$XDG_CONFIG_HOME/nvim/conf_appearance.vim")
exec 'source' . expand("$XDG_CONFIG_HOME/nvim/conf_auto_commands.vim")
exec 'source' . expand("$XDG_CONFIG_HOME/nvim/conf_improvements.vim")
exec 'source' . expand("$XDG_CONFIG_HOME/nvim/conf_mappings.vim")

exec 'luafile' . expand("$XDG_CONFIG_HOME/nvim/conf_lang_server.lua")
exec 'luafile' . expand("$XDG_CONFIG_HOME/nvim/conf_treesitter.lua")
exec 'luafile' . expand("$XDG_CONFIG_HOME/nvim/conf_formatters.lua")


autocmd FileType markdown setlocal spell
autocmd FileType gitcommit setlocal spell
autocmd FileType yaml setlocal cursorcolumn
autocmd FileType yaml.docker-compose setlocal cursorcolumn

autocmd FileType yaml setlocal comments=:# commentstring=#\ %s expandtab
autocmd FileType yaml.docker-compose setlocal comments=:# commentstring=#\ %s expandtab
autocmd FileType python setlocal comments=b:#,fb:- commentstring=#\ %s
autocmd FileType go setlocal comments=s1:/*,mb:*,ex:*/,:// commentstring=//\ %s
autocmd FileType lua setlocal comments=:-- commentstring=--%s
autocmd FileType vim setlocal comments=sO:\"\ -,mO:\"\ \ ,eO:\"\",:\" commentstring=\"%s
autocmd FileType sql setlocal comments=s1:/*,mb:*,ex:*/,:--,://
autocmd FileType git syntax on

augroup AutoCursorLastPosition
autocmd!
autocmd BufReadPost *
\ if &ft != 'gitcommit' && line("'\"") > 0 && line("'\"") <= line("$") |
\ exec "normal g`\"" |
\ endif
augroup END

augroup AutoNetrwOnStart
autocmd!
let have_stdin = 0
autocmd StdinReadPost * let have_stdin = 1
autocmd VimEnter * if !(argc() + have_stdin) | Explore! | endif
augroup END

" by Wouter Hanegraaff
augroup AutoEditGPGFile
autocmd!
autocmd BufReadPre,FileReadPre *.gpg set viminfo=
autocmd BufReadPre,FileReadPre *.gpg set noswapfile noundofile nobackup
autocmd BufReadPre,FileReadPre *.gpg set bin
autocmd BufReadPre,FileReadPre *.gpg let ch_save = &cmdheight | set cmdheight=2
autocmd BufReadPost,FileReadPost *.gpg '[,']!gpg --decrypt 2>/dev/null
autocmd BufReadPost,FileReadPost *.gpg set nobin
autocmd BufReadPost,FileReadPost *.gpg let &cmdheight = ch_save | unlet ch_save
autocmd BufReadPost,FileReadPost *.gpg execute ":doautocmd BufReadPost " . expand("%:r")
autocmd BufWritePre,FileWritePre *.gpg '[,']!gpg --default-recipient-self --armor --encrypt 2>/dev/null
autocmd BufWritePost,FileWritePost *.gpg undo
augroup END

augroup AutoFormat
autocmd!
autocmd BufWritePost * silent! FormatWrite
augroup END

+ 0
- 0
conf_common/.local/share/nvim/site/pack/look/opt/.gitkeep View File


+ 0
- 0
conf_common/.local/share/nvim/site/pack/meta/opt/.gitkeep View File


+ 0
- 1
conf_common/.local/share/nvim/site/pack/meta/opt/hrsh7th/nvim-compe

@@ -1 +0,0 @@
Subproject commit 4b3ade100866bb64b472644642da670e2fc61dde

conf_common/.local/share/nvim/site/pack/meta/opt/rhysd/committia.vim → conf_common/.local/share/nvim/site/pack/plugins/start/committia.vim View File


conf_common/.local/share/nvim/site/pack/meta/opt/mkotha/conflict3 → conf_common/.local/share/nvim/site/pack/plugins/start/conflict3 View File


conf_common/.local/share/nvim/site/pack/meta/opt/mhartington/formatter.nvim → conf_common/.local/share/nvim/site/pack/plugins/start/formatter.nvim View File


conf_common/.local/share/nvim/site/pack/meta/opt/neovim/nvim-lsp → conf_common/.local/share/nvim/site/pack/plugins/start/nvim-lsp View File


conf_common/.local/share/nvim/site/pack/meta/opt/nvim-treesitter/nvim-treesitter → conf_common/.local/share/nvim/site/pack/plugins/start/nvim-treesitter View File


conf_common/.local/share/nvim/site/pack/meta/opt/nvim-treesitter/nvim-treesitter-textobjects → conf_common/.local/share/nvim/site/pack/plugins/start/nvim-treesitter-textobjects View File


conf_common/.local/share/nvim/site/pack/look/opt/atimholt/spiffy_foldtext → conf_common/.local/share/nvim/site/pack/plugins/start/spiffy_foldtext View File


conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-abolish → conf_common/.local/share/nvim/site/pack/plugins/start/vim-abolish View File


conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-commentary → conf_common/.local/share/nvim/site/pack/plugins/start/vim-commentary View File


conf_common/.local/share/nvim/site/pack/meta/opt/machakann/vim-highlightedyank → conf_common/.local/share/nvim/site/pack/plugins/start/vim-highlightedyank View File


conf_common/.local/share/nvim/site/pack/meta/opt/RRethy/vim-illuminate → conf_common/.local/share/nvim/site/pack/plugins/start/vim-illuminate View File


conf_common/.local/share/nvim/site/pack/look/opt/Lokaltog/vim-monotone → conf_common/.local/share/nvim/site/pack/plugins/start/vim-monotone View File


conf_common/.local/share/nvim/site/pack/text/opt/sentriz/vim-print-debug → conf_common/.local/share/nvim/site/pack/plugins/start/vim-print-debug View File


conf_common/.local/share/nvim/site/pack/meta/opt/romainl/vim-qf → conf_common/.local/share/nvim/site/pack/plugins/start/vim-qf View File


conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-repeat → conf_common/.local/share/nvim/site/pack/plugins/start/vim-repeat View File


conf_common/.local/share/nvim/site/pack/text/opt/tpope/vim-surround → conf_common/.local/share/nvim/site/pack/plugins/start/vim-surround View File


conf_common/.local/share/nvim/site/pack/meta/opt/christoomey/vim-tmux-navigator → conf_common/.local/share/nvim/site/pack/plugins/start/vim-tmux-navigator View File


conf_common/.local/share/nvim/site/pack/look/opt/tpope/vim-vinegar → conf_common/.local/share/nvim/site/pack/plugins/start/vim-vinegar View File


+ 0
- 0
conf_common/.local/share/nvim/site/pack/text/opt/.gitkeep View File


+ 1
- 7
fish-plugin-uninstall View File

@@ -8,13 +8,7 @@ if test $# -ne 1; then
fi

name="$1"
paths=(conf_common/.config/fish/plugins/"$name")
path="${paths[0]}"

if test ! -d "$path"; then
echo "plugin $name not found" >&2
exit 1
fi
path="conf_common/.config/fish/plugins/$name"

git submodule deinit -f "$path"
git rm -f "$path"

+ 5
- 9
vim-plugin-install View File

@@ -2,17 +2,13 @@

set -e

if test $# -ne 2; then
echo "please provide a <category> <repo>" >&2
if test $# -ne 1; then
echo "please provide a repo" >&2
exit 1
fi

category="$1"
repo="$2"
name="$(grep -Po '[^\/]+\/[^\/]+$' <<< "$repo")"
path="conf_common/.local/share/nvim/site/pack/$category/opt/$name"
repo="$1"
name="$(grep -Po '[^\/]+$' <<<"$repo")"
path="conf_common/.local/share/nvim/site/pack/plugins/start/$name"

git submodule add -f "$repo" "$path"

echo "##############"
echo "packadd! $name"

+ 2
- 12
vim-plugin-uninstall View File

@@ -3,22 +3,12 @@
set -e

if test $# -ne 1; then
echo "please provide a <repo>" >&2
echo "please provide a name" >&2
exit 1
fi

name="$1"
paths=(conf_common/.local/share/nvim/site/pack/*/opt/"$name")
path="${paths[0]}"

if test ! -d "$path"; then
echo "plugin $name not found" >&2
exit 1
fi
path="conf_common/.local/share/nvim/site/pack/plugins/start/$name"

git submodule deinit -f "$path"
git rm -f "$path"

echo "##############"
echo "remove config:"
echo "packadd! $name"

Loading…
Cancel
Save