nvim: Restructure directory slightly

Moved vim-plug plugin list to load into separate file so it is a coherent
plugin list to modify or disable.

Moved key mappings (`maps.vim`) into a separate keys directory so they
can be loaded in individual files if desired.
This commit is contained in:
Marty Oehme 2020-11-12 14:29:48 +01:00
parent 201cd58f3f
commit d9185d0542
Signed by: Marty
GPG key ID: B7538B8F50A1C800
5 changed files with 122 additions and 115 deletions

View file

@ -8,97 +8,6 @@
" Junegunn Choi
" Tim Pope
" }}}
" PLUGIN INSTALLATION - handled by VIM-PLUG {{{
" ================================================================================
"
" automatically install vim-plug if it does not exist
" Note: this installs it in the neovim folder, not the vim folder
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | q
endif
" automatically install any missing plugins
autocmd VimEnter *
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | q
\| endif
" defines plugin directory
" Install plugins from vim with :PlugInstall
silent! if plug#begin('~/.local/share/nvim/plugged')
" base
Plug 'christoomey/vim-tmux-navigator' " allow seamless navigation between vim buffers and tmux splits
Plug 'jeffkreeftmeijer/vim-numbertoggle' " toggles numbers to absolute for all buffers but the current which is relative
Plug 'justinmk/vim-sneak' " jump between letters with improved fFtT quicksearch
Plug 'RRethy/vim-illuminate' " highlight other occurences of the word under cursor
" filedrawer
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show a directory listing within vim
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show git status in nerdtree for files and dirs
" editing
Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragraphs etc with gc
Plug 'tpope/vim-surround' " lets you change surrounding things with cs (or ds to del, ys to add)
Plug 'tommcdo/vim-exchange' " adds exchange operator with cx. common use: cxiw . on 2 words to switch
Plug 'jiangmiao/auto-pairs' " Auto close brackets and ''
Plug 'junegunn/vim-easy-align' " Align tables and other alignable things
Plug 'junegunn/vim-peekaboo' " Show the contents of regiseters on pasting from '', @, <C-R>
" Fuzzy matching
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'neovim/nvim-lspconfig' " some commong language server configurations
Plug 'nvim-lua/completion-nvim' " simple completion engine built specifically for nvim and lsp
Plug 'steelsojka/completion-buffers' " completion source from words found in current buffers
Plug 'desmap/ale-sensible' | Plug 'w0rp/ale' " asynchronous linting - might be superseded by lsp or coc.nvim at some point
" statusline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim'
" Colorschemes
Plug 'chriskempson/base16-vim'
Plug 'reedes/vim-colors-pencil'
" RMarkdown & LaTeX workflow
Plug 'vim-pandoc/vim-pandoc-syntax'
Plug 'vim-pandoc/vim-pandoc'
" Notes and Wiki
Plug 'dyng/ctrlsf.vim' " search-and-edit of many wiki files at once
Plug 'lervag/wiki.vim' " foundational wiki system, allowing links between plaintext files
Plug 'alok/notational-fzf-vim' " quickly search through the wiki
" Prose Workflow
Plug 'micarmst/vim-spellsync' " personal dict improvements for git sync
Plug 'ron89/thesaurus_query.vim' " find thesaurus backed synonyms for word under cursor
Plug 'kana/vim-textobj-user' " dependency for most other textobj plugins
Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detection
" and allows you to jump to the *end* of this <g)> or last <g(> sentence.
Plug 'junegunn/goyo.vim', { 'for': ['pandoc', 'markdown', 'txt'], 'on': 'Goyo' } " provide distraction free writing
Plug 'junegunn/limelight.vim', { 'for': ['pandoc', 'markdown', 'txt'], 'on': 'Goyo' } " provide even distraction free-er writing (lowlight paragraphs)
" Language Integration
Plug 'tjdevries/nlua.nvim' " lua lsp integration
Plug 'euclidianAce/BetterLua.vim' " better syntax highlighting for lua
Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language
Plug 'stephpy/vim-yaml'
Plug 'mhartington/nvim-typescript', {'for': 'typescript','do': './install.sh'}
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'aliou/bats.vim'
if !has('nvim')
Plug 'tpope/vim-sensible'
endif
" Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] } ->
" instructions: http://liuchengxu.org/vim-which-key/, needs setup tp become
" useful. TODO enable when setup is more settled down
call plug#end()
endif
" }}}
" VIM SETTINGS {{{
@ -107,13 +16,6 @@ endif
" set truecolor (neovim)
set termguicolors
" load colorscheme from dynamic file
" first one is here to make airline behave correctly without reload
runtime colorscheme.vim
" this one is here to override anything set by default in colorscheme plugin
" loading
autocmd VimEnter * runtime colorscheme.vim
" sets tabs to be 2 characters, expanded into spaces, but still removable with
" one press of backspace.
" great explanation: http://vimcasts.org/transcripts/2/en/
@ -121,6 +23,17 @@ set tabstop=2
set shiftwidth=2
set softtabstop=2
set expandtab
augroup LUAtabs
autocmd Filetype lua setlocal tabstop=4
autocmd Filetype lua setlocal shiftwidth=4
autocmd Filetype lua setlocal softtabstop=4
autocmd Filetype lua setlocal expandtab
augroup END
" make jumplist behave more like browser, when jumping back
" and then adding a new jump discards all the previous
" 'future-jump' tree, making more sense for wiki-like movement
set jumpoptions=stack
" set cursor line highlighting, esp useful when using with bracket
" highlighting and you don't know which side of the brace the cursor is on
@ -195,12 +108,21 @@ set scrolloff=5
let g:tex_flavor = "latex"
" }}}
" KEYBINDINGS {{{
" EXTERNAL FILES {{{
" ================================================================================
"
" Load vim-plug plugins
runtime plugins.vim
" Begin mapping definitions
runtime! **/maps.vim
runtime! keys/*.vim
" load colorscheme from dynamic file
" first one is here to make airline behave correctly without reload
runtime colorscheme.vim
" this one is here to override anything set by default in colorscheme plugin
" loading
autocmd VimEnter * runtime colorscheme.vim
" }}}
" ABBREVIATIONS {{{

View file

@ -0,0 +1,91 @@
" }}}
" PLUGIN INSTALLATION - handled by VIM-PLUG {{{
" ================================================================================
"
" automatically install vim-plug if it does not exist
" Note: this installs it in the neovim folder, not the vim folder
if empty(glob('~/.local/share/nvim/site/autoload/plug.vim'))
silent !curl -fLo ~/.local/share/nvim/site/autoload/plug.vim --create-dirs
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | q
endif
" automatically install any missing plugins
autocmd VimEnter *
\ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
\| PlugInstall --sync | q
\| endif
" defines plugin directory
" Install plugins from vim with :PlugInstall
silent! if plug#begin('~/.local/share/nvim/plugged')
" base
Plug 'christoomey/vim-tmux-navigator' " allow seamless navigation between vim buffers and tmux splits
Plug 'jeffkreeftmeijer/vim-numbertoggle' " toggles numbers to absolute for all buffers but the current which is relative
Plug 'justinmk/vim-sneak' " jump between letters with improved fFtT quicksearch
Plug 'RRethy/vim-illuminate' " highlight other occurences of the word under cursor
" filedrawer
Plug 'scrooloose/nerdtree', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show a directory listing within vim
Plug 'Xuyuanp/nerdtree-git-plugin', { 'on': ['NERDTreeToggle', 'NERDTreeFind'] } " show git status in nerdtree for files and dirs
" editing
Plug 'tpope/vim-commentary' " easily toggle comments for lines, paragraphs etc with gc
Plug 'tpope/vim-surround' " lets you change surrounding things with cs (or ds to del, ys to add)
Plug 'tommcdo/vim-exchange' " adds exchange operator with cx. common use: cxiw . on 2 words to switch
Plug 'jiangmiao/auto-pairs' " Auto close brackets and ''
Plug 'junegunn/vim-easy-align' " Align tables and other alignable things
Plug 'junegunn/vim-peekaboo' " Show the contents of regiseters on pasting from '', @, <C-R>
" Fuzzy matching
Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
Plug 'junegunn/fzf.vim'
Plug 'neovim/nvim-lspconfig' " some commong language server configurations
Plug 'nvim-lua/completion-nvim' " simple completion engine built specifically for nvim and lsp
Plug 'steelsojka/completion-buffers' " completion source from words found in current buffers
Plug 'desmap/ale-sensible' | Plug 'w0rp/ale' " asynchronous linting - might be superseded by lsp or coc.nvim at some point
" statusline
Plug 'vim-airline/vim-airline'
Plug 'vim-airline/vim-airline-themes'
Plug 'edkolev/tmuxline.vim'
" Colorschemes
Plug 'chriskempson/base16-vim'
Plug 'reedes/vim-colors-pencil'
" RMarkdown & LaTeX workflow
Plug 'vim-pandoc/vim-pandoc-syntax'
Plug 'vim-pandoc/vim-pandoc'
" Notes and Wiki
Plug 'dyng/ctrlsf.vim' " search-and-edit of many wiki files at once
Plug 'lervag/wiki.vim' " foundational wiki system, allowing links between plaintext files
Plug 'alok/notational-fzf-vim' " quickly search through the wiki
" Prose Workflow
Plug 'micarmst/vim-spellsync' " personal dict improvements for git sync
Plug 'ron89/thesaurus_query.vim' " find thesaurus backed synonyms for word under cursor
Plug 'kana/vim-textobj-user' " dependency for most other textobj plugins
Plug 'reedes/vim-textobj-sentence' " extends the capabilities of sentence detection
" and allows you to jump to the *end* of this <g)> or last <g(> sentence.
Plug 'junegunn/goyo.vim', { 'for': ['pandoc', 'markdown', 'txt'], 'on': 'Goyo' } " provide distraction free writing
Plug 'junegunn/limelight.vim', { 'for': ['pandoc', 'markdown', 'txt'], 'on': 'Goyo' } " provide even distraction free-er writing (lowlight paragraphs)
" Language Integration
Plug 'tjdevries/nlua.nvim' " lua lsp integration
Plug 'euclidianAce/BetterLua.vim' " better syntax highlighting for lua
Plug 'sheerun/vim-polyglot' " syntax plugins for almost every language
Plug 'stephpy/vim-yaml'
Plug 'mhartington/nvim-typescript', {'for': 'typescript','do': './install.sh'}
Plug 'fatih/vim-go', { 'do': ':GoUpdateBinaries' }
Plug 'aliou/bats.vim'
if !has('nvim')
Plug 'tpope/vim-sensible'
endif
" Plug 'liuchengxu/vim-which-key', { 'on': ['WhichKey', 'WhichKey!'] } ->
" instructions: http://liuchengxu.org/vim-which-key/, needs setup tp become
" useful. TODO enable when setup is more settled down
call plug#end()
endif

View file

@ -76,3 +76,12 @@ Walmart
Wrocław
Poznań
Taylorization
Taylorism
Taylorist
securitizing
Orientalism
epistemes
temporality
guerilla
Tricontinental
disposability

View file

@ -1,15 +0,0 @@
local w = vim.loop.new_fs_event()
local function on_change(err, fname, status)
-- Do work...
vim.api.nvim_command('checktime')
-- Debounce: stop/start.
w:stop()
watch_file(fname)
end
function watch_file(fname)
local fullpath = vim.api.nvim_call_function('fnamemodify', {fname, ':p'})
w:start(fullpath, {}, vim.schedule_wrap(function(...) on_change(...) end))
end
vim.api.nvim_command(
"command! -nargs=1 Watch call luaeval('watch_file(_A)', expand('<args>'))")