diff --git a/dunst/.config/dunst/dunstrc b/dunst/.config/dunst/dunstrc
index 9c5eaec..447448f 100644
--- a/dunst/.config/dunst/dunstrc
+++ b/dunst/.config/dunst/dunstrc
@@ -415,22 +415,22 @@
# set_stack_tag = "volume"
#
# vim: ft=cfg
-# Base16 tomorrow-night - dunst color config
-frame_color = "#c5c8c6"
-separator_color = "#c5c8c6"
+# Base16 bespin - dunst color config
+frame_color = "#8a8986"
+separator_color = "#8a8986"
[base16_low]
msg_urgency = low
- background = "#282a2e"
- foreground = "#969896"
+ background = "#36312e"
+ foreground = "#666666"
[base16_normal]
msg_urgency = normal
- background = "#373b41"
- foreground = "#c5c8c6"
+ background = "#5e5d5c"
+ foreground = "#8a8986"
[base16_critical]
msg_urgency = critical
- background = "#cc6666"
- foreground = "#e0e0e0"
-# Base16End tomorrow-night - dunst color config
+ background = "#cf6a4c"
+ foreground = "#9d9b97"
+# Base16End bespin - dunst color config
diff --git a/nvim/.config/nvim/abbrev.vim b/nvim/.config/nvim/abbrev.vim
new file mode 100644
index 0000000..dd955d0
--- /dev/null
+++ b/nvim/.config/nvim/abbrev.vim
@@ -0,0 +1,15 @@
+" Typos
+iabbrev adn and
+iabbrev waht what
+iabbrev tehn then
+iabbrev whit with
+iabbrev whith with
+iabbrev grwoth growth
+iabbrev Grwoth Growth
+iabbrev teh the
+iabbrev projcets projects
+
+" Text expansion
+iabbrev mo@ marty.oehme@gmail.com
+iabbrev mo.me@
+iabbrev mcc@ Copyright 2020 Marty Oehme, all rights reserved.
diff --git a/nvim/.config/nvim/after/plugin/prose.vim b/nvim/.config/nvim/after/plugin/prose.vim
index 6fe066d..258591c 100644
--- a/nvim/.config/nvim/after/plugin/prose.vim
+++ b/nvim/.config/nvim/after/plugin/prose.vim
@@ -1,10 +1,9 @@
" PROSE: function to automatically enables markdown plugins for md & txt files
function! s:Prose()
- call plug#load('goyo.vim')
- call plug#load('limelight.vim')
" PLUGIN: vim-textobj-sentence
" enable extended sentence textobject use on md and plaintext files
call textobj#sentence#init()
+ IndentBlanklineDisable
" hide the markdown cruft
setlocal conceallevel=2
setlocal foldlevel=3
diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua
new file mode 100644
index 0000000..f073c2f
--- /dev/null
+++ b/nvim/.config/nvim/init.lua
@@ -0,0 +1,38 @@
+-- much of this config comes from
+-- https://github.com/elianiva/dotfiles/ - with much gratitude
+local augroup = require("helpers.augroup")
+local api = vim.api
+
+require('base.settings')
+require('base.look')
+require('base.plugins')
+
+-- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to
+augroup({
+ { 'BufNewFile,BufRead', '/dev/shm/gopass.*', 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' },
+ { 'BufNewFile,BufRead', '/dev/shm/pass.?*/?*.txt', 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' },
+ { 'BufNewFile,BufRead', '$TMPDIR/pass.?*/?*.txt', 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' },
+ { 'BufNewFile,BufRead', '/tmp/pass.?*/?*.txt', 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=' }
+}, 'passnoleak')
+
+-- fixing neovim opening up at same moment as alacritty (see https://github.com/neovim/neovim/issues/11330)
+augroup({
+ { 'VimEnter', '*', 'silent exec "!kill -s SIGWINCH $PPID"' }
+}, 'fixsize')
+
+
+-- TODO from here on starts stuff we want to convert into new settings format as well
+api.nvim_exec('runtime! keys/*.vim', false)
+api.nvim_exec('runtime colorscheme.vim', false)
+api.nvim_exec('runtime abbrev.vim', false)
+
+local plugin_configs = {
+ '_lsp',
+ '_treesitter',
+ '_indentation',
+ '_telescope'
+}
+-- load lua plugin configurations
+for _, f in ipairs(plugin_configs) do
+ require(f)
+end
diff --git a/nvim/.config/nvim/init.vim b/nvim/.config/nvim/init.vim
deleted file mode 100644
index 37c4c39..0000000
--- a/nvim/.config/nvim/init.vim
+++ /dev/null
@@ -1,146 +0,0 @@
-" vim: set foldmethod=marker foldlevel=0 nomodeline:
-" ================================================================================
-" .init.vim / .vimrc of Marty Oehme {{{
-" ================================================================================
-"
-" - stolen from many different sources including
-" Steve Losh
-" Junegunn Choi
-" Tim Pope
-
-
-" }}}
-" VIM SETTINGS {{{
-" ================================================================================
-"
-" set truecolor (neovim)
-set termguicolors
-
-" 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/
-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
-set cursorline
-
-" shows linenumbers relative to the one you are on, for easy movement and
-" dNUMBERd deletions
-set number relativenumber
-
-" keeps an undofile next to files so that you can even undo if vim is closed
-" in between
-set undofile
-
-" ignores case by default but will use case when search is specifically not
-" all lowercased
-set ignorecase
-set smartcase
-
-" shows previews of what substitute command will do (and a couple others)
-set inccommand=split
-
-" disables showing us the current mode in the command line since airline takes
-" care of it
-set noshowmode
-" turn off modeline, to ensure security observation
-set nomodeline
-
-" i feel foldlevel 2 is generally pretty usable, for headlines and similar
-set foldlevel=2
-
-" highlight everything that goes over 80 columns
-highlight ColorColumn ctermbg=magenta
-call matchadd('ColorColumn', '\%81v', 100)
-
-" pump all clippings into the system clipboard
-set clipboard+=unnamedplus
-
-" Special setting for editing gopass files - make sure nothing leaks outside
-" the directories it is supposed to
-au BufNewFile,BufRead /dev/shm/gopass.* setlocal noswapfile nobackup noundofile nowritebackup viminfo=
-au BufNewFile,BufRead /dev/shm/pass.?*/?*.txt setlocal noswapfile nobackup noundofile nowritebackup viminfo=
-au BufNewFile,BufRead $TMPDIR/pass.?*/?*.txt setlocal noswapfile nobackup noundofile nowritebackup viminfo=
-au BufNewFile,BufRead /tmp/pass.?*/?*.txt setlocal noswapfile nobackup noundofile nowritebackup viminfo=
-
-" from https://github.com/tjdevries/config_manager/blob/master/xdg_config/nvim/init.vim
-if has('nvim-0.4')
- " make completion menu slightly transparent
- set pumblend=17
- set wildmode=longest:full
-
- " Makes floating PopUpMenu for completing stuff on the command line.
- " Very similar to completing in insert mode.
- set wildoptions+=pum
-else
- set wildmode=longest,list,full
- " Vim Galore recommended mappings
- " Make next and previous use smart history
- cnoremap
- cnoremap
-end
-
-" turn of automatic resizing of individual splits
-set noequalalways
-
-" make sure there's always *some* context below cursor
-set scrolloff=4
-
-" in .tex files, default to latex over plaintext/context as syntax
-let g:tex_flavor = "latex"
-
-" }}}
-" EXTERNAL FILES {{{
-" ================================================================================
-"
-
-" Load vim-plug plugins
-runtime plugins.vim
-" Begin mapping definitions
-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 {{{
-
-" Typos
-iabbrev adn and
-iabbrev waht what
-iabbrev tehn then
-iabbrev whit with
-iabbrev whith with
-iabbrev grwoth growth
-iabbrev Grwoth Growth
-iabbrev teh the
-iabbrev projcets projects
-
-" Text expansion
-iabbrev mo@ marty.oehme@gmail.com
-iabbrev mo.me@
-iabbrev mcc@ Copyright 2020 Marty Oehme, all rights reserved.
-
-"
-" }}}
-" END
-" ================================================================================
diff --git a/nvim/.config/nvim/keys/maps.vim b/nvim/.config/nvim/keys/maps.vim
index 53ba969..69e2e2f 100644
--- a/nvim/.config/nvim/keys/maps.vim
+++ b/nvim/.config/nvim/keys/maps.vim
@@ -131,47 +131,34 @@ nnoremap e :Vifm getcwd()
" open current file tree with current file directory
nnoremap E :Vifm
-" PLUGIN: FZF GLOBAL FUZZY FINDING
-" FZF buffers and files in current workdir
-noremap s :FzfBuffers
-" FZF most recently used / MRU, bound to S since it is essentially a larger
+" PLUGIN: Telescope GLOBAL FUZZY FINDING
+" buffers and files in current workdir
+noremap s :lua require 'telescope.builtin'.buffers(require 'telescope.themes'.get_ivy())
+" most recently used / MRU, bound to S since it is essentially a larger
" go-back intention than just buffers
-noremap S :FzfHistory
+noremap S :lua require 'telescope.builtin'.oldfiles(require 'telescope.themes'.get_ivy())
" fuzzy find files in cwd
-noremap f :FzfFiles
-" FZF general full-text search in cwd with rg
-noremap F :FzfRgHidden
+noremap f :lua require 'telescope.builtin'.find_files({follow=true, hidden=true})
+" general full-text search in cwd with rg
+noremap F :lua require 'telescope.builtin'.live_grep()
-" FZF git status
-noremap gs :FzfGFiles?
-" FZF git buffercommits
-noremap gb :FzfBCommits
-" FZF git commitlog
-noremap gl :FzfCommits
+" git status
+noremap gs :lua require 'telescope.builtin'.git_status()
+" git buffercommits
+noremap gb :lua require 'telescope.builtin'.git_bcommits()
+" git commitlog
+noremap gl :lua require 'telescope.builtin'.git_commits()
-" FZF helptags
-noremap :FzfHelptags
+" helptags
+noremap :lua require 'telescope.builtin'.help_tags()
+" manpages
+noremap :lua require 'telescope.builtin'.man_pages()
-" FZF colorschemes
-nnoremap :FzfColors
+" colorschemes
+nnoremap :lua require 'telescope.builtin'.colorscheme(require 'telescope.themes'.get_ivy())
-" PLUGIN: vim-go
-" vim-go mappings - will only activate in go files
-" most of this credit to https://hackernoon.com/my-neovim-setup-for-go-7f7b6e805876
-" switch between test file and function
-au Filetype go nnoremap ga (go-alternate-edit)
-" switch between test file and function - in a horizontal/vertical split
-au Filetype go nnoremap gah (go-alternate-split)
-au Filetype go nnoremap gav (go-alternate-vertical)
-" run a test (but run it as short version, in case tests are tagged
-" accordingly)
-au FileType go nnoremap :GoTest -short
-" show/hide code coverage of go file
-au FileType go nnoremap :GoCoverageToggle -short
-" To get the documentation of whatever you are hovering over press K (to go
-" back C-t) -- this is enabled by default and needs no bind
-" go to the definition of whatever you hover over
-au FileType go nnoremap (go-def)
+" spell suggestions
+nnoremap z= :lua require 'telescope.builtin'.spell_suggest(require 'telescope.themes'.get_ivy())
" Note Searching
" PLUGIN: Notational-FZF
@@ -197,7 +184,7 @@ nnoremap wF :execute(":call SearchNotes()")
" leader is used when it is callable from anywhere
" localleader is used when it is specific to the local file
nnoremap wf :WikiFzfPages
-nnoremap l :WikiFzfTags
+nnoremap wt :WikiFzfTags
" use default TOC shortcut for viewing wikitoc if in correct filetype
augroup wikitoc
autocmd!
@@ -207,7 +194,6 @@ augroup END
" overwrites some default mappings I don't use, or that interfere with my own
" mappings TODO: currently this just assigns bogus shortcuts, since the plugin grumbles
" when setting to an empty string
-
let g:wiki_mappings_local = {
\ '(wiki-link-next)' : '',
\ '(wiki-link-prev)' : '',
@@ -220,7 +206,8 @@ let g:wiki_mappings_local = {
" additional zettelkasten mapping
augroup zettelkasten
autocmd!
- autocmd Filetype markdown,pandoc nnoremap :ZettelOpenAtCursor
+ autocmd Filetype markdown,pandoc nnoremap :lua require 'zettelkasten'.open_or_make_link()
+ autocmd Filetype markdown,pandoc vnoremap :lua require 'zettelkasten'.open_or_make_link(true)
augroup END
" Mostly dealing with Prose writing from here on out
diff --git a/nvim/.config/nvim/lua/_indentation.lua b/nvim/.config/nvim/lua/_indentation.lua
new file mode 100644
index 0000000..75a08ce
--- /dev/null
+++ b/nvim/.config/nvim/lua/_indentation.lua
@@ -0,0 +1,21 @@
+-- Settings for indentBlankline
+-- turn off for diff views since we want to compare directly
+if vim.wo.diff then
+ vim.g["indent_blakline_enabled"] = false
+end
+
+vim.g.indent_blankline_char = "▏"
+
+vim.g.indent_blankline_filetype_exclude = {
+ "help", "undotree",
+ "markdown", "text", "pandoc",
+ "vim-plug"
+}
+vim.g.indent_blankline_buftype_exclude = {"terminal"}
+
+vim.g.indent_blankline_use_treesitter = true
+vim.g.indent_blankline_show_first_indent_level = false
+
+vim.g.indent_blankline_show_current_context = true
+vim.g.indent_blankline_context_highlight = "Function"
+vim.g.indent_blankline_context_patterns = {"function", "class", "method"}
diff --git a/nvim/.config/nvim/lua/_lsp.lua b/nvim/.config/nvim/lua/_lsp.lua
new file mode 100644
index 0000000..11070cc
--- /dev/null
+++ b/nvim/.config/nvim/lua/_lsp.lua
@@ -0,0 +1,133 @@
+local api = vim.api
+
+local saga = require 'lspsaga'
+local lspcfg = require 'lspconfig'
+local compe = require 'compe'
+
+-- Enable the following language servers
+local servers = {
+ 'bashls',
+ 'gopls',
+ 'texlab',
+ 'pyright',
+ 'rust_analyzer',
+ 'tsserver',
+ 'vimls',
+ -- sumneko_lua further down, needs more setup
+}
+
+vim.o.completeopt = "menuone,noselect"
+-- completion sources, higher priority = closer to the top?
+compe.setup({
+ source = {
+ nvim_lsp = true,
+ nvim_treesitter = true,
+ buffer = true,
+ path = true,
+ calc = true,
+ nvim_lua = true,
+ emoji = true,
+ spell = {
+ priority = 0,
+ },
+ -- vsnip = true,
+ },
+})
+
+local on_attach = function(_, _)
+ -- Keybindings for LSPs
+ -- Note these are in on_attach so that they don't override bindings in a non-LSP setting
+ api.nvim_set_keymap("n", "gh", "lua require 'lspsaga.provider'.lsp_finder()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "gd", "lua require'lspsaga.provider'.preview_definition()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "gE", "lua require 'lspsaga.codeaction'.code_action()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("v", "gE", "'<,'>lua require 'lspsaga.codeaction'.range_code_action()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "K", "lua require('lspsaga.hover').render_hover_doc()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "gK", "lua require('lspsaga.signaturehelp').signature_help()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "gr", "lua require('lspsaga.rename').rename()",
+ {noremap = true, silent = true})
+
+ api.nvim_set_keymap("n", "ge", "lua require('lspsaga.diagnostic').show_line_diagnostics()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "]e", "lua require('lspsaga.diagnostic').lsp_jump_diagnostic_next()",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "[e", "lua require('lspsaga.diagnostic').lsp_jump_diagnostic_prev()",
+ {noremap = true, silent = true})
+
+ api.nvim_set_keymap("n", "C-f", "lua require('lspsaga.action').smart_scroll_with_saga(1)",
+ {noremap = true, silent = true})
+ api.nvim_set_keymap("n", "C-b", "lua require('lspsaga.action').smart_scroll_with_saga(-1)",
+ {noremap = true, silent = true})
+
+ require("lspsaga").init_lsp_saga {
+ error_sign = 'X',
+ warn_sign = '⚠️',
+ hint_sign = '⚡',
+ infor_sign = 'ℹ️',
+ code_action_icon = '●',
+ finder_definition_icon = '📖 ',
+ finder_reference_icon = '🔖 ',
+ definition_preview_icon = '📖 ',
+ finder_action_keys = {
+ open = '',
+ split = 's',
+ vsplit = 'v',
+ quit = '',
+ scroll_down = '',
+ scroll_up = ''
+ },
+ code_action_keys = {
+ quit = '',
+ exec = ''
+ },
+ rename_action_keys = {
+ quit = '',
+ exec = ''
+ },
+ }
+ print('LSP ready')
+end
+
+-- set up simple servers
+for _, lsp in ipairs(servers) do
+ lspcfg[lsp].setup { on_attach = on_attach }
+end
+
+-- requires the lua-language-server package to be installed
+-- The arch package defaults to the following directory
+local sumneko_root_path = "/usr/share/lua-language-server"
+lspcfg.sumneko_lua.setup {
+ cmd = { "lua-language-server", "-E", sumneko_root_path .. "/main.lua"};
+ settings = {
+ Lua = {
+ runtime = {
+ -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
+ version = 'LuaJIT',
+ -- Setup your lua path
+ path = vim.split(package.path, ';'),
+ },
+ diagnostics = {
+ -- Get the language server to recognize the `vim` global
+ globals = {'vim', 'before_each', 'after_each', 'describe', 'it', 'mock', 'stub'},
+ },
+ workspace = {
+ -- Make the server aware of Neovim runtime files
+ library = {
+ [vim.fn.expand('$VIMRUNTIME/lua')] = true,
+ [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
+ ["/usr/share/lua/5.1/busted/"] = true,
+ },
+ },
+ },
+ },
+ on_attach = on_attach,
+}
+
+saga.init_lsp_saga()
+
+api.nvim_set_keymap("i", "", "compe#complete()", {expr = true, silent = true})
diff --git a/nvim/.config/nvim/lua/_telescope.lua b/nvim/.config/nvim/lua/_telescope.lua
new file mode 100644
index 0000000..0a495a9
--- /dev/null
+++ b/nvim/.config/nvim/lua/_telescope.lua
@@ -0,0 +1,12 @@
+require("telescope").setup {
+ defaults = {
+ file_sorter = require("telescope.sorters").get_fzy_sorter
+ },
+ extensions = {
+ fzy_native = {
+ override_generic_sorter = false,
+ override_file_sorter = true
+ }
+ }
+}
+require("telescope").load_extension("fzy_native")
diff --git a/nvim/.config/nvim/lua/_treesitter.lua b/nvim/.config/nvim/lua/_treesitter.lua
index 6514ca3..055b36c 100644
--- a/nvim/.config/nvim/lua/_treesitter.lua
+++ b/nvim/.config/nvim/lua/_treesitter.lua
@@ -5,4 +5,9 @@ require'nvim-treesitter.configs'.setup {
incremental_selection = { enable = true },
textobjects = { enable = true },
indent = { enable = true },
+
+ -- enable rainbow brackets, needs p00f/nvim-ts-rainbow
+ rainbow = {
+ enable = true
+ }
}
diff --git a/nvim/.config/nvim/lua/base/look.lua b/nvim/.config/nvim/lua/base/look.lua
new file mode 100644
index 0000000..1b7d675
--- /dev/null
+++ b/nvim/.config/nvim/lua/base/look.lua
@@ -0,0 +1,19 @@
+local set_hl = require("helpers.highlight")
+local augroup = require("helpers.augroup")
+
+set_hl("Comment", { gui = "italic" })
+
+-- local function override_hl_colors()
+-- vim.api.nvim_exec(
+-- [[
+-- hi LspDiagnosticsVirtualTextError guifg=blue gui=bold,italic,underline
+-- hi LspDiagnosticsVirtualTextWarning guifg=pink gui=bold,italic,underline
+-- hi LspDiagnosticsVirtualTextInformation guifg=yellow gui=bold,italic,underline
+-- hi LspDiagnosticsVirtualTextHint guifg=green gui=bold,italic,underline
+-- ]], false)
+-- end
+
+
+augroup({
+ { 'ColorScheme', 'lua require("base.look").override_hl_colors()' }
+}, 'override_highlights')
diff --git a/nvim/.config/nvim/lua/base/plugins.lua b/nvim/.config/nvim/lua/base/plugins.lua
new file mode 100644
index 0000000..6979af8
--- /dev/null
+++ b/nvim/.config/nvim/lua/base/plugins.lua
@@ -0,0 +1,92 @@
+local install_path = vim.fn.stdpath("data") .. "/pack/packer/start/packer.nvim"
+
+if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
+ vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
+end
+
+vim.api.nvim_exec(
+ [[
+ augroup Packer
+ autocmd!
+ autocmd BufWritePost plugins.lua PackerCompile
+ augroup END
+]],
+ false
+)
+
+local use = require("packer").use
+require("packer").startup(
+ function()
+ -- packer manages itself
+ use "wbthomason/packer.nvim"
+
+ --
+ -- vim plugs
+ -- essential
+ use 'christoomey/vim-tmux-navigator' -- allow seamless navigation between vim buffers and tmux splits
+ use 'jeffkreeftmeijer/vim-numbertoggle' -- toggles numbers to absolute for all buffers but the current which is relative
+ use 'justinmk/vim-sneak' -- jump between letters with improved fFtT quicksearch
+ use 'RRethy/vim-illuminate' -- highlight other occurences of the word under cursor
+
+ -- files
+ use 'vifm/vifm.vim'
+
+ -- editing
+ use 'tpope/vim-commentary' -- easily toggle comments for lines, paragraphs etc with gc
+ use 'tpope/vim-surround' -- lets you change surrounding things with cs (or ds to del, ys to add)
+ use 'tommcdo/vim-exchange' -- adds exchange operator with cx. common use: cxiw . on 2 words to switch
+ use 'jiangmiao/auto-pairs' -- Auto close brackets and ''
+ use 'junegunn/vim-easy-align' -- Align tables and other alignable things
+ use 'junegunn/vim-peekaboo' -- Show the contents of regiseters on pasting from '', @,
+
+ -- fuzzy
+ use {"nvim-telescope/telescope.nvim", requires = {{"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}}}
+ use "nvim-telescope/telescope-fzy-native.nvim"
+
+ -- linting
+ use 'desmap/ale-sensible'
+ use 'w0rp/ale' -- asynchronous linting - might be superseded by lsp or coc.nvim at some point
+
+ -- statusline
+ use 'vim-airline/vim-airline'
+ use 'vim-airline/vim-airline-themes'
+ use 'edkolev/tmuxline.vim'
+
+ -- colorschemes
+ use 'chriskempson/base16-vim'
+ use 'reedes/vim-colors-pencil'
+
+ -- writing
+ use 'vim-pandoc/vim-pandoc-syntax'
+ use 'vim-pandoc/vim-pandoc'
+ use 'micarmst/vim-spellsync' -- personal dict improvements for git sync
+ use 'ron89/thesaurus_query.vim' -- find thesaurus backed synonyms for word under cursor
+ use 'kana/vim-textobj-user' -- dependency for most other textobj plugins
+ use 'reedes/vim-textobj-sentence' -- extends the capabilities of sentence detection
+ use 'junegunn/goyo.vim' -- provide distraction free writing
+ use 'junegunn/limelight.vim' -- provide even distraction free-er writing (lowlight paragraphs)
+ use 'lervag/wiki.vim' -- foundational wiki system, allowing links between plaintext files
+ use 'dyng/ctrlsf.vim' -- search-and-edit of many wiki files at once
+ use 'alok/notational-fzf-vim' -- quickly search through the wiki
+
+ -- languages
+ use 'euclidianAce/BetterLua.vim' -- better syntax highlighting for lua
+
+ --
+ -- nvim plugs
+
+ use 'erietz/vim-terminator' -- interactive code sending and repl-ing from vim
+ use {"lukas-reineke/indent-blankline.nvim", branch = "lua"} -- show a vertical line for each indentation
+
+ -- lsp
+ use 'neovim/nvim-lspconfig' -- some commong language server configurations
+ use 'glepnir/lspsaga.nvim' -- nice and fast ui for lsp actions
+ use 'hrsh7th/nvim-compe' -- simple completion engine built specifically for nvim and lsp
+
+ -- treesitter
+ use {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
+ use 'p00f/nvim-ts-rainbow' -- rainbow brackets using treesitter
+
+ use 'marty-oehme/zettelkasten.nvim'
+ end
+)
diff --git a/nvim/.config/nvim/lua/base/settings.lua b/nvim/.config/nvim/lua/base/settings.lua
new file mode 100644
index 0000000..c695c8c
--- /dev/null
+++ b/nvim/.config/nvim/lua/base/settings.lua
@@ -0,0 +1,72 @@
+require("helpers.vimoptions")
+
+
+local apply_options = function(opts)
+ for k, v in pairs(opts) do
+ vim.opt[k] = v
+ end
+end
+
+local o = {
+ termguicolors = true,
+ -- 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/
+ tabstop = 4,
+ shiftwidth = 4,
+ softtabstop = 4,
+ expandtab = true,
+
+ -- 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
+ 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
+ cursorline = true,
+
+ -- shows linenumbers relative to the one you are on, for easy movement and
+ -- dNUMBERd deletions
+ number = true,
+ relativenumber = true,
+
+ -- keeps an undofile next to files so that you can even undo if vim is closed
+ -- in between
+ undofile = true,
+ -- TODO o.undodir = '~/.cache/nvim/undodir'
+
+ -- ignores case by default but will use case when search is specifically not
+ -- all lowercased
+ ignorecase = true,
+ smartcase = true,
+
+ -- shows previews of what substitute command will do (and a couple others)
+ inccommand = 'split',
+
+ -- disables showing us the current mode in the command line since airline takes
+ -- care of it
+ showmode = false,
+ -- turn off modeline, to ensure security observation
+ modeline = false,
+
+ -- i feel foldlevel 2 is generally pretty usable, for headlines and similar
+ foldlevel = 2,
+ conceallevel = 2,
+
+ -- enable mouse, doesn't bug me and might come in useful at some point
+ mouse = 'a',
+
+ -- pump all clippings into the system clipboard
+ clipboard='unnamedplus',
+
+ -- turn of automatic resizing of individual splits
+ equalalways = false,
+
+ -- make sure there's always *some* context below cursor
+ scrolloff=4,
+
+}
+
+vim.api.nvim_set_var('tex_flavor', 'latex')
+apply_options(o)
diff --git a/nvim/.config/nvim/lua/helpers/augroup.lua b/nvim/.config/nvim/lua/helpers/augroup.lua
new file mode 100644
index 0000000..b0ea4cb
--- /dev/null
+++ b/nvim/.config/nvim/lua/helpers/augroup.lua
@@ -0,0 +1,27 @@
+-- augroup utility function
+--
+-- Let's you create and use autogroups through lua
+-- which (as of now) is not possible through official nvim api
+--
+-- Cribbed from the very helpful https://icyphox.sh/blog/nvim-lua - Thank you!
+--
+-- Example usage settings.lua
+-- local cmd = vim.cmd
+-- local u = require('utils')
+-- u.create_augroup({
+-- { 'BufRead,BufNewFile', '/tmp/nail-*', 'setlocal', 'ft=mail' },
+-- { 'BufRead,BufNewFile', '*s-nail-*', 'setlocal', 'ft=mail' },
+-- }, 'ftmail')
+-- cmd('au BufNewFile,BufRead * if &ft == "" | set ft=text | endif')
+
+local cmd = vim.cmd
+
+
+return function(cmds, groupname)
+ cmd('augroup ' .. groupname)
+ cmd('autocmd!')
+ for _, autocmd in ipairs(cmds) do
+ cmd('autocmd ' .. table.concat(autocmd, ' '))
+ end
+ cmd('augroup END')
+end
diff --git a/nvim/.config/nvim/lua/helpers/highlight.lua b/nvim/.config/nvim/lua/helpers/highlight.lua
new file mode 100644
index 0000000..1465788
--- /dev/null
+++ b/nvim/.config/nvim/lua/helpers/highlight.lua
@@ -0,0 +1,17 @@
+-- helper for easily defining highlight groups
+--
+-- usage example - italicize comments:
+-- set_hl("Comment", { gui = "italic" })
+return function(group, options)
+ local bg = options.bg == nil and "" or "guibg=" .. options.bg
+ local fg = options.fg == nil and "" or "guifg=" .. options.fg
+ local gui = options.gui == nil and "" or "gui=" .. options.gui
+ local link = options.link or false
+ local target = options.target
+
+ if not link then
+ vim.cmd(string.format("hi %s %s %s %s", group, bg, fg, gui))
+ else
+ vim.cmd(string.format("hi! link", group, target))
+ end
+end
diff --git a/nvim/.config/nvim/lua/helpers/vimoptions.lua b/nvim/.config/nvim/lua/helpers/vimoptions.lua
new file mode 100644
index 0000000..b318851
--- /dev/null
+++ b/nvim/.config/nvim/lua/helpers/vimoptions.lua
@@ -0,0 +1,230 @@
+--{{{
+-- remove this when vim.opt got merged
+local if_nil = function(a, b)
+ if a == nil then
+ return b
+ end
+ return a
+end
+
+local singular_values = {
+ ['boolean'] = true,
+ ['number'] = true,
+ ['nil'] = true,
+}
+
+local set_key_value = function(t, key_value_str)
+ assert(string.find(key_value_str, ":"), "Must have a :" .. tostring(key_value_str))
+
+ local key, value = unpack(vim.split(key_value_str, ":"))
+ key = vim.trim(key)
+ value = vim.trim(value)
+
+ t[key] = value
+end
+
+local convert_vimoption_to_lua = function(_, val)
+ -- Short circuit if we've already converted!
+ if type(val) == 'table' then
+ return val
+ end
+
+ if singular_values[type(val)] then
+ return val
+ end
+
+ if type(val) == "string" then
+ -- TODO: Bad hax I think
+ if string.find(val, ":") then
+ local result = {}
+ local items = vim.split(val, ",")
+ for _, item in ipairs(items) do
+ set_key_value(result, item)
+ end
+
+ return result
+ else
+ return vim.split(val, ",")
+ end
+ end
+end
+
+-- local concat_keys = function(t, sep)
+-- return table.concat(vim.tbl_keys(t), sep)
+-- end
+
+local concat_key_values = function(t, sep, divider)
+ local final = {}
+ for k, v in pairs(t) do
+ table.insert(final, string.format('%s%s%s', k, divider, v))
+ end
+
+ table.sort(final)
+ return table.concat(final, sep)
+end
+
+local remove_duplicate_values = function(t)
+ local result = {}
+ for _, v in ipairs(t) do
+ result[v] = true
+ end
+
+ return vim.tbl_keys(result)
+end
+
+local remove_value = function(t, val)
+ if vim.tbl_islist(t) then
+ local remove_index = nil
+ for i, v in ipairs(t) do
+ if v == val then
+ remove_index = i
+ end
+ end
+
+ if remove_index then
+ table.remove(t, remove_index)
+ end
+ else
+ t[val] = nil
+ end
+
+ return t
+end
+
+local add_value = function(current, new)
+ if singular_values[type(current)] then
+ error(
+ "This is not possible to do. Please do something different: "
+ .. tostring(current)
+ .. " // "
+ .. tostring(new)
+ )
+ end
+
+ if type(new) == 'string' then
+ if vim.tbl_islist(current) then
+ table.insert(current, new)
+ else
+ set_key_value(current, new)
+ end
+
+ return current
+ elseif type(new) == 'table' then
+ if vim.tbl_islist(current) then
+ assert(vim.tbl_islist(new))
+ vim.list_extend(current, new)
+ else
+ assert(not vim.tbl_islist(new), vim.inspect(new) .. vim.inspect(current))
+ current = vim.tbl_extend("force", current, new)
+ end
+
+ return current
+ else
+ error("Unknown type")
+ end
+end
+
+local convert_lua_to_vimoption = function(t)
+ if vim.tbl_islist(t) then
+ t = remove_duplicate_values(t)
+
+ table.sort(t)
+ return table.concat(t, ',')
+ else
+ return concat_key_values(t, ',', ':')
+ end
+end
+
+local clean_value = function(v)
+ if singular_values[type(v)] then
+ return v
+ end
+
+ local result = v:gsub('^,', '')
+
+ return result
+end
+
+local opt_mt
+
+opt_mt = {
+ __index = function(t, k)
+ if k == '_value' then
+ return rawget(t, k)
+ end
+
+ return setmetatable({ _option = k, }, opt_mt)
+ end,
+
+ __newindex = function(t, k, v)
+ if k == '_value' then
+ return rawset(t, k, v)
+ end
+
+ if type(v) == 'table' then
+ local new_value
+ if getmetatable(v) ~= opt_mt then
+ new_value = v
+ else
+ assert(v._value, "Must have a value to set this")
+ new_value = v._value
+ end
+
+ vim.o[k] = convert_lua_to_vimoption(new_value)
+ return
+ end
+
+ if v == nil then
+ v = ''
+ end
+
+ -- TODO: Figure out why nvim_set_option doesn't override values the same way.
+ -- @bfredl said he will fix this for me, so I can just use nvim_set_option
+ if type(v) == 'boolean' then
+ vim.o[k] = clean_value(v)
+ if v then
+ vim.cmd(string.format("set %s", k))
+ else
+ vim.cmd(string.format("set no%s", k))
+ end
+ else
+ vim.cmd(string.format("set %s=%s", k, clean_value(v)))
+ end
+ end,
+
+ __add = function(left, right)
+ --[[
+ set.wildignore = set.wildignore + 'hello'
+ set.wildignore = set.wildignore + { '*.o', '*~', }
+ --]]
+
+ assert(left._option, "must have an option key")
+ if left._option == 'foldcolumn' then
+ error("not implemented for foldcolumn.. use a string")
+ end
+
+ local existing = if_nil(left._value, vim.o[left._option])
+ local current = convert_vimoption_to_lua(left._option, existing)
+ if not current then
+ left._value = convert_vimoption_to_lua(right)
+ end
+
+ left._value = add_value(current, right)
+ return left
+ end,
+
+ __sub = function(left, right)
+ assert(left._option, "must have an option key")
+
+ local existing = if_nil(left._value, vim.o[left._option])
+ local current = convert_vimoption_to_lua(left._option, existing)
+ if not current then
+ return left
+ end
+
+ left._value = remove_value(current, right)
+ return left
+ end
+}
+
+vim.opt = setmetatable({}, opt_mt)--}}}
diff --git a/nvim/.config/nvim/lua/nvim-lspconfig/init.lua b/nvim/.config/nvim/lua/nvim-lspconfig/init.lua
deleted file mode 100644
index 229b323..0000000
--- a/nvim/.config/nvim/lua/nvim-lspconfig/init.lua
+++ /dev/null
@@ -1,96 +0,0 @@
-local saga = require 'lspsaga'
-
-
-local on_attach = function(_, _)
- -- Keybindings for LSPs
- -- Note these are in on_attach so that they don't override bindings in a non-LSP setting
- vim.api.nvim_set_keymap("n", "gh", "lua require 'lspsaga.provider'.lsp_finder()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "gd", "lua require'lspsaga.provider'.preview_definition()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "ca", "lua require 'lspsaga.codeaction'.code_action()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("v", "ca", "'<,'>lua require 'lspsaga.codeaction'.range_code_action()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "K", "lua require('lspsaga.hover').render_hover_doc()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "gK", "lua require('lspsaga.signaturehelp').signature_help()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "gr", "lua require('lspsaga.rename').rename()",
- {noremap = true, silent = true})
-
- vim.api.nvim_set_keymap("n", "ge", "lua require('lspsaga.diagnostic').show_line_diagnostics()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "[e", "lua require('lspsaga.diagnostic').lsp_jump_diagnostic_next()",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "]e", "lua require('lspsaga.diagnostic').lsp_jump_diagnostic_prev()",
- {noremap = true, silent = true})
-
- vim.api.nvim_set_keymap("n", "C-f", "lua require('lspsaga.action').smart_scroll_with_saga(1)",
- {noremap = true, silent = true})
- vim.api.nvim_set_keymap("n", "C-b", "lua require('lspsaga.action').smart_scroll_with_saga(-1)",
- {noremap = true, silent = true})
-
- require("lspsaga").init_lsp_saga {
- error_sign = 'X',
- warn_sign = '⚠️',
- hint_sign = '⚡',
- infor_sign = 'ℹ️',
- code_action_icon = '💡',
- finder_definition_icon = '📖 ',
- finder_reference_icon = '🔖 ',
- finder_action_keys = {
- open = '',
- split = 's',
- vsplit = 'v',
- quit = '',
- scroll_down = '',
- scroll_up = ''
- },
- code_action_keys = {
- quit = '',
- exec = ''
- },
- rename_action_keys = {
- quit = '',
- exec = ''
- },
- definition_preview_icon = '📖 '
- }
-end
-
-require'lspconfig'.pyls.setup {on_attach = on_attach}
-require'lspconfig'.vimls.setup {on_attach = on_attach}
-require'lspconfig'.bashls.setup {on_attach = on_attach}
-require'lspconfig'.gopls.setup {on_attach = on_attach}
-require'lspconfig'.texlab.setup {on_attach = on_attach}
-
--- requires the lua-language-server package to be installed
--- The arch package defaults to the following directory
-local sumneko_root_path = "/usr/share/lua-language-server"
-require'lspconfig'.sumneko_lua.setup {
- cmd = { "lua-language-server", "-E", sumneko_root_path .. "/main.lua"};
- settings = {
- Lua = {
- runtime = {
- -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim)
- version = 'LuaJIT',
- -- Setup your lua path
- path = vim.split(package.path, ';'),
- },
- diagnostics = {
- -- Get the language server to recognize the `vim` global
- globals = {'vim'},
- },
- workspace = {
- -- Make the server aware of Neovim runtime files
- library = {
- [vim.fn.expand('$VIMRUNTIME/lua')] = true,
- [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true,
- },
- },
- },
- },
- on_attach = on_attach,
-}
-saga.init_lsp_saga()
diff --git a/nvim/.config/nvim/modules_experimental/base_no_plugins.vim b/nvim/.config/nvim/modules_experimental/base_no_plugins.vim
deleted file mode 100644
index 6bf3612..0000000
--- a/nvim/.config/nvim/modules_experimental/base_no_plugins.vim
+++ /dev/null
@@ -1,117 +0,0 @@
-" vim: set foldmethod=marker foldlevel=1 nomodeline:
-" ================================================================================
-" .init.vim / .vimrc of Marty Oehme {{{
-" ================================================================================
-"
-" - stolen from many different sources including
-" Steve Losh
-" Junegunn Choi
-" Tim Pope
-
-" this config does not set nocompatible - neovim does this automatically
-" this config does not set filetype plugin - vim-sensible does this
-" }}}
-" 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 academia.vim | q
-endif
-
-" automatically install any missing plugins
-autocmd VimEnter *
- \ if len(filter(values(g:plugs), '!isdirectory(v:val.dir)'))
- \| PlugInstall --sync | q
- \| endif
-"
-" set truecolor (neovim)
-set termguicolors
-
-" 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/
-set tabstop=2
-set shiftwidth=2
-set softtabstop=2
-set expandtab
-
-" 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
-set cursorline
-
-" shows linenumbers relative to the one you are on, for easy movement and
-" dNUMBERd deletions
-set number relativenumber
-
-" keeps an undofile next to files so that you can even undo if vim is closed
-" in between
-set undofile
-
-" ignores case by default but will use case when search is specifically not
-" all lowercased
-set ignorecase
-set smartcase
-
-" whenever vim loses focus, save
-au FocusLost * :wa
-
-" disables showing us the current mode in the command line since airline takes
-" care of it
-set noshowmode
-
-" highlight everything that goes over 80 columns
-highlight ColorColumn ctermbg=magenta
-call matchadd('ColorColumn', '\%81v', 100)
-
-" set our leader key to space since with hjkl, space is largely useless
-let mapleader = "\"
-" maps the leader for buffer local mappings (e.g. vim-waikiki for files under
-" the root dir to the same key -- might lead to incompatibilities, will have
-" to test)
-let maplocalleader = "\"
-" set jk to escape, in case capslock is not mapped to escape on the system
-inoremap jk
-
-" remove search highlights by pressing space+/ - the key for searching the
-" first place
-nnoremap / :noh
-
-" quickly edit vimrc with leader+V
-nnoremap V :vsp academia.vim
-" automatically source the vimrc file whenever it is saved (causes slowdown
-" when done in MANY successions)
-" au BufWritePost init.vim so ~/.config/nvim/init.vim
-" source vimrc with keystroke combination
-nnoremap VV :source academia.vim
-
-
-" 'open new buffer' with leader-t (opens new buffer and switches to it)
-" open actual new tab with leader-T
-nnoremap t :vsp .
-nnoremap T :tabedit .
-
-" stronger versions of left,right - move all the way
-nnoremap H ^
-nnoremap L $
-
-" }}}
-" CUSTOMIZATION {{{
-
-" defines plugin directory
-" Install plugins from vim with :PlugInstall
-silent! if plug#begin('~/.local/share/nvim/plugged')
-Plug 'christoomey/vim-tmux-navigator'
-" automatically switch between relative and absolute numbers as buffers move
-" into / out of focus (requires number & relativenumber to be set)
-Plug 'jeffkreeftmeijer/vim-numbertoggle'
-Plug 'rakr/vim-one'
-
-call plug#end()
-endif
-
-" }}}
-colo one
diff --git a/nvim/.config/nvim/plugin/completion-nvim.vim b/nvim/.config/nvim/plugin/completion-nvim.vim
deleted file mode 100644
index 3a089e1..0000000
--- a/nvim/.config/nvim/plugin/completion-nvim.vim
+++ /dev/null
@@ -1,73 +0,0 @@
-" use completion-nvim for all buffers (not just lsp)
-autocmd BufEnter * lua require'completion'.on_attach()
-
-"map to manually trigger completion
-imap (completion_smart_tab)
-imap (completion_smart_s_tab)
-" switch between completion sources manually with c-j/c-k
-" only do so if popupmenu is visible, otherwise normal function
-imap (completion_next_source)
-imap (completion_prev_source)
-
-" Set completeopt to have a better completion experience
-set completeopt=menuone,noinsert,noselect
-
-" Avoid showing message extra message when using completion
-set shortmess+=c
-
-" set loop of strategies in descending order
-let g:completion_matching_strategy_list = ['exact', 'substring', 'fuzzy']
-
-" even when backtracking enable completion
-let g:completion_trigger_on_delete = 1
-
-" switch between different completion changes when no completions found for
-" current one
-let g:completion_auto_change_source = 1
-
-" register new completion engines
-" (set in rtp/lua/*_complete.lua)
-"
-" pandoc citation key completion
-lua require'completion'.addCompletionSource('bibcite', require'pandoc_complete'.complete_item)
-
-" in pandoc files, normal completion should only come from buffer sources and
-" bibcite only invoked manually, since it takes long to parse
-augroup pandocCompletion
- autocmd!
- autocmd BufEnter * call SetupPandocCompletion()
-augroup end
-fun! SetupPandocCompletion()
- if &ft =~ 'pandoc'
- let g:completion_auto_change_source = 0
- return
- endif
- let g:completion_auto_change_source = 1
-endfun
-
-" the completion chains for different filetypes
-" see https://github.com/nvim-lua/completion-nvim/wiki/chain-complete-support
-" BUG for triggered only bibcite completion, see: https://github.com/nvim-lua/completion-nvim/issues/158
-let g:completion_chain_complete_list = {
- \ 'pandoc': [
- \ { 'complete_items': ['buffers', 'snippet']},
- \ { 'complete_items': ['bibcite']},
- \ { 'complete_items': ['path']},
- \ { 'mode': ''},
- \ { 'mode': ''}
- \],
- \ 'tex': [
- \ { 'complete_items': ['buffers', 'snippet']},
- \ { 'complete_items': ['bibcite']},
- \ { 'complete_items': ['path']},
- \ { 'mode': ''},
- \ { 'mode': ''}
- \],
- \ 'default': [
- \ { 'complete_items': [ 'ts', 'lsp', 'snippet' ]},
- \ { 'complete_items': [ 'buffers' ] },
- \ { 'complete_items': [ 'path' ], 'triggered_only': ['/'] },
- \ { 'mode': ''},
- \ { 'mode': ''}
- \]
- \}
diff --git a/nvim/.config/nvim/plugin/nvim-lspconfig.vim b/nvim/.config/nvim/plugin/nvim-lspconfig.vim
index 954c024..4ec5d2a 100644
--- a/nvim/.config/nvim/plugin/nvim-lspconfig.vim
+++ b/nvim/.config/nvim/plugin/nvim-lspconfig.vim
@@ -2,5 +2,4 @@ command! LspHover lua vim.lsp.buf.hover()
command! LspDisable lua vim.lsp.stop_client(vim.lsp.get_active_clients())
" actual LSP config takes place in lua ('lua/lsp')
-lua require("nvim-lspconfig")
setlocal omnifunc=v:lua.vim.lsp.omnifunc
diff --git a/nvim/.config/nvim/plugin/vim-terminator.vim b/nvim/.config/nvim/plugin/vim-terminator.vim
new file mode 100644
index 0000000..570a3b4
--- /dev/null
+++ b/nvim/.config/nvim/plugin/vim-terminator.vim
@@ -0,0 +1,16 @@
+let g:terminator_clear_default_mappings = "foo bar"
+let g:terminator_split_location = "vertical botright"
+
+nnoremap rr :TerminatorStartREPL
+nnoremap rs :TerminatorStopRun
+
+nnoremap rt :TerminatorRunFileInTerminal
+vnoremap rt :TerminatorRunPartOfFileInTerminal
+
+nnoremap rd :TerminatorSendDelimiterToTerminal
+vnoremap rd :TerminatorSendSelectionToTerminal
+
+nnoremap ra :norm O# In[ ]:hh
+
+" lets you send fragments from jupyter-style blocks and markdown fences
+let g:terminator_repl_delimiter_regex = '\(In\[.*\]:\|^```\)'
diff --git a/nvim/.config/nvim/plugin/wiki.vim b/nvim/.config/nvim/plugin/wiki.vim
index 22a4911..aa7eb24 100644
--- a/nvim/.config/nvim/plugin/wiki.vim
+++ b/nvim/.config/nvim/plugin/wiki.vim
@@ -24,7 +24,7 @@ function! WikiFileOpen(...) abort dict
silent execute '!xdg-open' fnameescape(self.path) '&'
return 1
endfunction
-let g:wiki_file_open = 'WikiFileOpen'
+let g:wiki_file_handler = 'WikiFileOpen'
" Zettelkasten functionality
@@ -67,9 +67,9 @@ function! ZettelOpenAtCursor(...) abort
" fall back to normal link opening otherwise
if l:zettel ==? ''
- call wiki#link#open()
+ call wiki#link#follow()
else
- call wiki#page#open(l:zettel)
+ call wiki#page#follow(l:zettel)
endif
catch /E716:/
call wiki#link#toggle(l:link)
diff --git a/nvim/.config/nvim/plugins.vim b/nvim/.config/nvim/plugins.vim
deleted file mode 100644
index 27a6f0e..0000000
--- a/nvim/.config/nvim/plugins.vim
+++ /dev/null
@@ -1,91 +0,0 @@
-" }}}
-" 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 'vifm/vifm.vim'
-
- " 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 '', @,
-
- " Fuzzy matching
-Plug 'junegunn/fzf', { 'dir': '~/.fzf', 'do': './install --bin' }
-Plug 'junegunn/fzf.vim'
-
- " neovim goodies: treesitter and lsp
-Plug 'neovim/nvim-lspconfig' " some commong language server configurations
-Plug 'glepnir/lspsaga.nvim' " nice and fast ui for lsp actions
-
-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 'nvim-treesitter/nvim-treesitter', {'do': ':TSUpdate'}
-Plug 'nvim-treesitter/completion-treesitter'
-
-
-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 or last 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 'euclidianAce/BetterLua.vim' " better syntax highlighting for lua
-
-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
diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add
index e857d92..3ced7ae 100644
--- a/nvim/.config/nvim/spell/en.utf-8.add
+++ b/nvim/.config/nvim/spell/en.utf-8.add
@@ -99,3 +99,4 @@ blog
flexicurity
indices
Anthropocene
+ecotourism