From 954642753fe4ed59f79f3ed67060f779a14ea7aa Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Tue, 12 Dec 2023 10:39:45 +0000 Subject: [PATCH] Starts moving nvim config to lua --- .gitmodules | 66 --------- .../nvim/{after => after.old}/plugin/lsp.vim | 5 +- nvim/.config/nvim/after.old/plugin/test.md | 0 nvim/.config/nvim/init.lua | 83 ++++++++++++ nvim/.config/nvim/init.vim | 46 ------- nvim/.config/nvim/lazy-lock.json | 19 +++ nvim/.config/nvim/lua/plugins/cmp.lua | 107 +++++++++++++++ nvim/.config/nvim/lua/plugins/fzf.lua | 25 ++++ nvim/.config/nvim/lua/plugins/gruvbox.lua | 21 +++ nvim/.config/nvim/lua/plugins/init.lua | 3 + nvim/.config/nvim/lua/plugins/surround.lua | 4 + nvim/.config/nvim/lua/plugins/treesitter.lua | 14 ++ .../nvim/lua/plugins/ultimate-autopair.lua | 11 ++ nvim/.config/nvim/pack/bundle/opt/AnsiEsc.vim | 1 - .../pack/bundle/opt/deoplete-abook/.flake8 | 4 - .../pack/bundle/opt/deoplete-abook/LICENSE | 21 --- .../pack/bundle/opt/deoplete-abook/README.md | 19 --- .../autoload/health/deoplete_abook.vim | 35 ----- .../opt/deoplete-abook/doc/deoplete_abook.txt | 61 --------- .../sources/__pycache__/abook.cpython-310.pyc | Bin 2398 -> 0 bytes .../sources/__pycache__/abook.cpython-38.pyc | Bin 2361 -> 0 bytes .../sources/__pycache__/abook.cpython-39.pyc | Bin 2361 -> 0 bytes .../rplugin/python3/deoplete/sources/abook.py | 64 --------- .../.config/nvim/pack/bundle/opt/deoplete-lsp | 1 - .../nvim/pack/bundle/opt/deoplete-notmuch | 1 - .../nvim/pack/bundle/opt/deoplete.nvim | 1 - nvim/.config/nvim/pack/bundle/opt/firenvim | 1 - nvim/.config/nvim/pack/bundle/opt/fzf.vim | 1 - nvim/.config/nvim/pack/bundle/opt/gruvbox | 1 - .../.config/nvim/pack/bundle/opt/gruvbox-baby | 1 - nvim/.config/nvim/pack/bundle/opt/lexima.vim | 1 - .../nvim/pack/bundle/opt/nvim-lspconfig | 1 - .../nvim/pack/bundle/opt/nvim-treesitter | 1 - nvim/.config/nvim/pack/bundle/opt/ultisnips | 1 - .../.config/nvim/pack/bundle/opt/vim-fugitive | 1 - nvim/.config/nvim/pack/bundle/opt/vim-json | 1 - nvim/.config/nvim/pack/bundle/opt/vim-less | 1 - .../.config/nvim/pack/bundle/opt/vim-openscad | 1 - .../nvim/pack/bundle/opt/vim-projectionist | 1 - nvim/.config/nvim/pack/bundle/opt/vim-repeat | 1 - .../.config/nvim/pack/bundle/opt/vim-snippets | 1 - .../.config/nvim/pack/bundle/opt/vim-surround | 1 - .../nvim/pack/bundle/opt/vim-tridactyl | 1 - nvim/.config/nvim/pack/bundle/opt/vim-vinegar | 1 - nvim/.config/nvim/plugin/fzf.vim | 22 --- nvim/.config/nvim/plugin/mappings.lua | 125 ++++++++++++++++++ nvim/.config/nvim/plugin/mappings.vim | 95 ------------- nvim/.config/nvim/plugin/settings.lua | 77 +++++++++++ nvim/.config/nvim/plugin/settings.vim | 73 ---------- nvim/.config/nvim/plugin/treesitter.vim | 11 -- nvim/.config/nvim/spell/en.utf-8.add | 2 + nvim/.config/nvim/spell/en.utf-8.add.spl | Bin 0 -> 67 bytes nvim/.config/nvim/syntax/csv.vim | 54 ++++++++ 53 files changed, 548 insertions(+), 541 deletions(-) rename nvim/.config/nvim/{after => after.old}/plugin/lsp.vim (90%) create mode 100644 nvim/.config/nvim/after.old/plugin/test.md create mode 100644 nvim/.config/nvim/init.lua delete mode 100644 nvim/.config/nvim/init.vim create mode 100644 nvim/.config/nvim/lazy-lock.json create mode 100644 nvim/.config/nvim/lua/plugins/cmp.lua create mode 100644 nvim/.config/nvim/lua/plugins/fzf.lua create mode 100644 nvim/.config/nvim/lua/plugins/gruvbox.lua create mode 100644 nvim/.config/nvim/lua/plugins/init.lua create mode 100644 nvim/.config/nvim/lua/plugins/surround.lua create mode 100644 nvim/.config/nvim/lua/plugins/treesitter.lua create mode 100644 nvim/.config/nvim/lua/plugins/ultimate-autopair.lua delete mode 160000 nvim/.config/nvim/pack/bundle/opt/AnsiEsc.vim delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/.flake8 delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/LICENSE delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/README.md delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/autoload/health/deoplete_abook.vim delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/doc/deoplete_abook.txt delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/__pycache__/abook.cpython-310.pyc delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/__pycache__/abook.cpython-38.pyc delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/__pycache__/abook.cpython-39.pyc delete mode 100644 nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/abook.py delete mode 160000 nvim/.config/nvim/pack/bundle/opt/deoplete-lsp delete mode 160000 nvim/.config/nvim/pack/bundle/opt/deoplete-notmuch delete mode 160000 nvim/.config/nvim/pack/bundle/opt/deoplete.nvim delete mode 160000 nvim/.config/nvim/pack/bundle/opt/firenvim delete mode 160000 nvim/.config/nvim/pack/bundle/opt/fzf.vim delete mode 160000 nvim/.config/nvim/pack/bundle/opt/gruvbox delete mode 160000 nvim/.config/nvim/pack/bundle/opt/gruvbox-baby delete mode 160000 nvim/.config/nvim/pack/bundle/opt/lexima.vim delete mode 160000 nvim/.config/nvim/pack/bundle/opt/nvim-lspconfig delete mode 160000 nvim/.config/nvim/pack/bundle/opt/nvim-treesitter delete mode 160000 nvim/.config/nvim/pack/bundle/opt/ultisnips delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-fugitive delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-json delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-less delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-openscad delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-projectionist delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-repeat delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-snippets delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-surround delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-tridactyl delete mode 160000 nvim/.config/nvim/pack/bundle/opt/vim-vinegar delete mode 100644 nvim/.config/nvim/plugin/fzf.vim create mode 100644 nvim/.config/nvim/plugin/mappings.lua delete mode 100644 nvim/.config/nvim/plugin/mappings.vim create mode 100644 nvim/.config/nvim/plugin/settings.lua delete mode 100644 nvim/.config/nvim/plugin/settings.vim delete mode 100644 nvim/.config/nvim/plugin/treesitter.vim create mode 100644 nvim/.config/nvim/spell/en.utf-8.add create mode 100644 nvim/.config/nvim/spell/en.utf-8.add.spl create mode 100644 nvim/.config/nvim/syntax/csv.vim diff --git a/.gitmodules b/.gitmodules index d0517d3e..d3303671 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,69 +16,3 @@ [submodule "shells/zsh/plugins/git-fuzzy"] path = shells/zsh/plugins/git-fuzzy url = https://github.com/bigH/git-fuzzy -[submodule "nvim/.config/nvim/pack/opt/gruvbox"] - path = nvim/.config/nvim/pack/bundle/opt/gruvbox - url = https://github.com/morhetz/gruvbox.git -[submodule "nvim/.config/nvim/pack/bundle/opt/fzf.vim"] - path = nvim/.config/nvim/pack/bundle/opt/fzf.vim - url = https://github.com/junegunn/fzf.vim -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-tridactyl"] - path = nvim/.config/nvim/pack/bundle/opt/vim-tridactyl - url = https://github.com/tridactyl/vim-tridactyl -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-less"] - path = nvim/.config/nvim/pack/bundle/opt/vim-less - url = https://github.com/groenewege/vim-less -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-json"] - path = nvim/.config/nvim/pack/bundle/opt/vim-json - url = https://github.com/elzr/vim-json -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-vinegar"] - path = nvim/.config/nvim/pack/bundle/opt/vim-vinegar - url = https://github.com/tpope/vim-vinegar -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-surround"] - path = nvim/.config/nvim/pack/bundle/opt/vim-surround - url = https://github.com/tpope/vim-surround -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-repeat"] - path = nvim/.config/nvim/pack/bundle/opt/vim-repeat - url = https://github.com/tpope/vim-repeat -[submodule "nvim/.config/nvim/pack/bundle/opt/nvim-lspconfig"] - path = nvim/.config/nvim/pack/bundle/opt/nvim-lspconfig - url = https://github.com/neovim/nvim-lspconfig/ -[submodule "nvim/.config/nvim/pack/bundle/opt/deoplete.nvim"] - path = nvim/.config/nvim/pack/bundle/opt/deoplete.nvim - url = https://github.com/Shougo/deoplete.nvim -[submodule "nvim/.config/nvim/pack/bundle/opt/deoplete-notmuch"] - path = nvim/.config/nvim/pack/bundle/opt/deoplete-notmuch - url = https://github.com/paretje/deoplete-notmuch -[submodule "nvim/.config/nvim/pack/bundle/opt/deoplete-lsp"] - path = nvim/.config/nvim/pack/bundle/opt/deoplete-lsp - url = https://github.com/Shougo/deoplete-lsp -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-fugitive"] - path = nvim/.config/nvim/pack/bundle/opt/vim-fugitive - url = https://github.com/tpope/vim-fugitive -[submodule "nvim/.config/nvim/pack/bundle/opt/AnsiEsc.vim"] - path = nvim/.config/nvim/pack/bundle/opt/AnsiEsc.vim - url = https://github.com/vim-scripts/AnsiEsc.vim -[submodule "nvim/.config/nvim/pack/bundle/opt/firenvim"] - path = nvim/.config/nvim/pack/bundle/opt/firenvim - url = https://github.com/glacambre/firenvim -[submodule "nvim/.config/nvim/pack/bundle/opt/ultisnips"] - path = nvim/.config/nvim/pack/bundle/opt/ultisnips - url = https://github.com/SirVer/ultisnips -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-snippets"] - path = nvim/.config/nvim/pack/bundle/opt/vim-snippets - url = https://github.com/honza/vim-snippets -[submodule "nvim/.config/nvim/pack/bundle/opt/lexima.vim"] - path = nvim/.config/nvim/pack/bundle/opt/lexima.vim - url = https://github.com/cohama/lexima.vim -[submodule "nvim/.config/nvim/pack/bundle/opt/nvim-treesitter"] - path = nvim/.config/nvim/pack/bundle/opt/nvim-treesitter - url = https://github.com/nvim-treesitter/nvim-treesitter -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-projectionist"] - path = nvim/.config/nvim/pack/bundle/opt/vim-projectionist - url = https://github.com/tpope/vim-projectionist -[submodule "nvim/.config/nvim/pack/bundle/opt/gruvbox-baby"] - path = nvim/.config/nvim/pack/bundle/opt/gruvbox-baby - url = https://github.com/luisiacc/gruvbox-baby -[submodule "nvim/.config/nvim/pack/bundle/opt/vim-openscad"] - path = nvim/.config/nvim/pack/bundle/opt/vim-openscad - url = https://github.com/sirtaj/vim-openscad diff --git a/nvim/.config/nvim/after/plugin/lsp.vim b/nvim/.config/nvim/after.old/plugin/lsp.vim similarity index 90% rename from nvim/.config/nvim/after/plugin/lsp.vim rename to nvim/.config/nvim/after.old/plugin/lsp.vim index 8c68500c..027bd760 100644 --- a/nvim/.config/nvim/after/plugin/lsp.vim +++ b/nvim/.config/nvim/after.old/plugin/lsp.vim @@ -9,11 +9,12 @@ lua < + vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' + + -- Buffer local mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local opts = { buffer = ev.buf } + vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts) + vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts) + vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts) + vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts) + vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts) + vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts) + vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts) + vim.keymap.set('n', 'wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, opts) + vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts) + vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts) + vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts) + vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts) + --vim.keymap.set('n', 'f', function() + -- vim.lsp.buf.format { async = true } + --end, opts) + end, + }) + + end, +--},{ +-- "L3MON4D3/LuaSnip", +-- dependencies={ +-- "saadparwaiz1/cmp_luasnip", +-- "rafamadriz/friendly-snippets" +-- }, +-- config=function () +-- require("luasnip.loaders.from_vscode").lazy_load() +-- end, +-- keys = { +-- { "", function () +-- return require("luasnip").jumpable(1) and "luasnip-jump-next" or "" +-- end, expr = true, silent = true, mode = "i" +-- }, +-- { "", function() require("luasnip").jump(1) end, mode = "s" }, +-- { "", function() require("luasnip").jump(-1) end, mode = { "i", "s" } }, +-- } +},{ + "hrsh7th/nvim-cmp", + dependencies={ + "neovim/nvim-lspconfig", + --"L3MON4D3/LuaSnip", + "saadparwaiz1/cmp_luasnip", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + }, + opts=function() + local cmp = require("cmp") + local capabilities = require('cmp_nvim_lsp').default_capabilities() + + return { + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + --vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + require('luasnip').lsp_expand(args.body) -- For `luasnip` users. + -- require('snippy').expand_snippet(args.body) -- For `snippy` users. + -- vim.fn["UltiSnips#Anon"](args.body) -- For `ultisnips` users. + end, + }, + mapping = cmp.mapping.preset.insert({ + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete(), + [''] = cmp.mapping.abort(), + [''] = cmp.mapping.confirm({ select = true }), + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "luasnip" }, + { name = "path" }, + { name = "buffer" } + }) + } + end +}} + + + diff --git a/nvim/.config/nvim/lua/plugins/fzf.lua b/nvim/.config/nvim/lua/plugins/fzf.lua new file mode 100644 index 00000000..96b741e5 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/fzf.lua @@ -0,0 +1,25 @@ +return{ { + "junegunn/fzf.vim", + dependencies="junegunn/fzf", + init = function( lazy ) + vim.g.fzf_command_prefix="Fzf" + end, + config = function( lazy, opts) + vim.g.fzf_layout = { + window = { + width= 0.9, + height=0.8 + } + } + + vim.keymap.set('n', 'f', ':FzfFiles', {desc="Fuzzy find files"}) + vim.keymap.set('n', 'b', ':FzfBuffers', {desc="Fuzzy find buffers"}) + vim.keymap.set('n', 'h', ':FzfHelptags', {desc="Fuzzy find help tags"}) + vim.keymap.set('n', '/', ':FzfRg ', {desc="Fuzzy find RG"}) + vim.keymap.set('n', '\\/', ':FzfRg ^# ', {desc="Fuzzy find headings"}) + + end +} } + + + diff --git a/nvim/.config/nvim/lua/plugins/gruvbox.lua b/nvim/.config/nvim/lua/plugins/gruvbox.lua new file mode 100644 index 00000000..0dec88cd --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/gruvbox.lua @@ -0,0 +1,21 @@ +return {{ + "ellisonleao/gruvbox.nvim", + lazy = false, + priority=1000, + opts={ + terminal_colors = true, + italic = { + strings = false, + emphasis = false, + comments = true, + operators = false, + folds = true, + } + } +}} + +-- Colourscheme settings +-- vim.g.gruvbox_italic=1 +-- vim.g.gruvbox_hls_cursor="red" +-- vim.opt.termguicolors=true +--vim.cmd('colorscheme gruvbox') diff --git a/nvim/.config/nvim/lua/plugins/init.lua b/nvim/.config/nvim/lua/plugins/init.lua new file mode 100644 index 00000000..c7017034 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/init.lua @@ -0,0 +1,3 @@ +return { { + "tpope/vim-fugitive" +} } diff --git a/nvim/.config/nvim/lua/plugins/surround.lua b/nvim/.config/nvim/lua/plugins/surround.lua new file mode 100644 index 00000000..f7e46723 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/surround.lua @@ -0,0 +1,4 @@ +return {{ + "kylechui/nvim-surround", + opts={} +}} diff --git a/nvim/.config/nvim/lua/plugins/treesitter.lua b/nvim/.config/nvim/lua/plugins/treesitter.lua new file mode 100644 index 00000000..38f79fb7 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/treesitter.lua @@ -0,0 +1,14 @@ +return {{ + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + opts = { + ensure_installed = "all", + highlight = { + enable = true + }, + indent = { + enable = true + } + } + +}} diff --git a/nvim/.config/nvim/lua/plugins/ultimate-autopair.lua b/nvim/.config/nvim/lua/plugins/ultimate-autopair.lua new file mode 100644 index 00000000..9b1fd434 --- /dev/null +++ b/nvim/.config/nvim/lua/plugins/ultimate-autopair.lua @@ -0,0 +1,11 @@ +return {{ + 'altermo/ultimate-autopair.nvim', + event={'InsertEnter','CmdlineEnter'}, + branch='v0.6', --recomended as each new version will have breaking changes + opts={ + tabout={ + enable=true + } + }, +}} + diff --git a/nvim/.config/nvim/pack/bundle/opt/AnsiEsc.vim b/nvim/.config/nvim/pack/bundle/opt/AnsiEsc.vim deleted file mode 160000 index d2bb7878..00000000 --- a/nvim/.config/nvim/pack/bundle/opt/AnsiEsc.vim +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d2bb7878622e4c16203acf1c92a0f4bc7ac58003 diff --git a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/.flake8 b/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/.flake8 deleted file mode 100644 index 495e50bb..00000000 --- a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/.flake8 +++ /dev/null @@ -1,4 +0,0 @@ -[flake8] -exclude = .git,__pycache__,autoload,doc -max-complexity = 10 -max-line-length = 100 diff --git a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/LICENSE b/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/LICENSE deleted file mode 100644 index 5a37f2de..00000000 --- a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -MIT License - -Copyright (c) 2017 Filip Szymański - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/README.md b/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/README.md deleted file mode 100644 index e518b6d0..00000000 --- a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# deoplete-abook - -`Deoplete-abook` offers asynchronous completion of email addresses in [Mutt](http://www.mutt.org/) using [abook](http://abook.sourceforge.net/) contacts stored in a plain text database. -Inspired by [Greg Hurrell's](https://github.com/wincent) Vim screencast [#58](https://www.youtube.com/watch?v=BNnSjJOpXDk). - -## Installation - -To install `deoplete-abook`, use your favorite [Neovim](https://neovim.io/) plugin manager. - -#### Using [vim-plug](https://github.com/junegunn/vim-plug) - -```vim -Plug 'Shougo/deoplete.nvim', {'do': ':UpdateRemotePlugins'} -Plug 'fszymanski/deoplete-abook' -``` - -## Documentation - -For more information, see `:help deoplete_abook.txt`. diff --git a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/autoload/health/deoplete_abook.vim b/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/autoload/health/deoplete_abook.vim deleted file mode 100644 index 0fe8579d..00000000 --- a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/autoload/health/deoplete_abook.vim +++ /dev/null @@ -1,35 +0,0 @@ -scriptencoding utf-8 - -" Copyright (c) 2017 Filip Szymański. All rights reserved. -" Use of this source code is governed by an MIT license that can be -" found in the LICENSE file. - -function! s:check_deoplete() abort - if !empty(globpath(&runtimepath, 'plugin/deoplete.vim')) - call health#report_ok('Deoplete plugin is installed') - else - call health#report_error('Deoplete plugin is not installed', [ - \ 'The deoplete plugin can be found here: ' . - \ 'https://github.com/Shougo/deoplete.nvim' - \ ]) - endif -endfunction - -function! s:check_addressbook() abort - let datafile = get(g:, 'deoplete#sources#abook#datafile', - \ expand('~/.abook/addressbook')) - if filereadable(datafile) - call health#report_ok('Addressbook file was found: ' . datafile) - else - call health#report_error('Addressbook file was not found', - \ ['help: deoplete_abook.txt']) - endif -endfunction - -function! health#deoplete_abook#check() abort - call health#report_start('Dependencies') - call s:check_deoplete() - call s:check_addressbook() -endfunction - -" vim: ts=2 et sw=2 diff --git a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/doc/deoplete_abook.txt b/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/doc/deoplete_abook.txt deleted file mode 100644 index 1ad6bda4..00000000 --- a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/doc/deoplete_abook.txt +++ /dev/null @@ -1,61 +0,0 @@ -*deoplete_abook.txt* Deoplete source for abook contacts - -Author: Filip Szymański - -============================================================================== -CONTENTS *deoplete-abook-contents* - - 1. Introduction |deoplete-abook-introduction| - 2. Configuration |deoplete-abook-configuration| - 3. License |deoplete-abook-license| - 4. Bugs |deoplete-abook-bugs| - 5. Contributing |deoplete-abook-contributing| - -============================================================================== -INTRODUCTION *deoplete-abook-introduction* - -This deoplete[1] source offers asynchronous completion of email addresses -in Mutt[2] using abook[3] contacts stored in a plain text database. - -Note: Inspired by Greg Hurrell's[4] Vim screencast #58[5]. - -============================================================================== -CONFIGURATION *deoplete-abook-configuration* - - *g:deoplete#sources#abook#datafile* -Set this option to use an alternative addressbook file. -> - let g:deoplete#sources#abook#datafile = expand('~/path/to/addressbook') -< -Default: '~/.abook/addressbook' -Type: string - -============================================================================== -LICENSE *deoplete-abook-license* - -MIT - -============================================================================== -BUGS *deoplete-abook-bugs* - -If you find a bug please create an issue on GitHub. - -https://github.com/fszymanski/deoplete-abook/issues - -============================================================================== -CONTRIBUTING *deoplete-abook-contributing* - -Think you can make this plugin better? Awesome. Fork it on GitHub and create -a pull request. - -https://github.com/fszymanski/deoplete-abook - -============================================================================== - -[1] https://github.com/Shougo/deoplete.nvim -[2] http://www.mutt.org/ -[3] http://abook.sourceforge.net/ -[4] https://github.com/wincent -[5] https://www.youtube.com/watch?v=BNnSjJOpXDk - - vim: tw=78 ts=8 ft=help norl diff --git a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/__pycache__/abook.cpython-310.pyc b/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/__pycache__/abook.cpython-310.pyc deleted file mode 100644 index f5d66f6261bda91125fdc7d6550e41f60ab7e2b4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2398 zcmZuz-EI>{6rR~XuN}upz_g(Lkdn5rE!b4FQk5cF2=qq+gCJK+>1wkxwl`VtE;DN& zW>ZxKiL1VYeaR#ARpz!=yg`L3(R0Rj2!xG%X3or_eoC0l?I))1FnWi0&I_<6 zofj0ON0oIYlsv+rgP%E5#)y-uf9>P)^r*k#WF#>|+4ugaxu+U~u!#Cx1PM=jMPD76 z>)m0J1l{3iv@0;TzO4;BSJ`rybD`WIh|{(eSChe=2ey1|i6vT#6^K$*xe&oa5f@xJ-An-H&keDRGZg@+;ExK?1Z^sg>G3Sp zHS`fEvJRq#34YZuj#KN^s4+|OY|)_{!7?D%O2Dz)GV;gG`2mnFiT)(i10*djI9Yt zDX@;IN7hQ9)CqZlks2sHvm-u*Jzu@?h26vr9`S?;B>1E2UN169dM`wmYr@aoe$``TO4e#+<-yjtmYJ?smf@ z*#f>3OW@o~dUmvM3a;^~)r*h6+PkEzhnZkrP1UFLm;-rm;nz1bS>Do`vIGyA_yEj( z7v4?Gn-uSZ3M`)|aUnj2zOF{)gn5pzI2smz;Q+b#m6_4vF(<`zBU?JqTW3 z#|yAP9tYvlI{Ym|R{v5N0NC~FJ;PZ1{SxYvP0biy<}x)-OR RUBaT&x7)Q`%#P8t{s#&+U(Emj diff --git a/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/__pycache__/abook.cpython-38.pyc b/nvim/.config/nvim/pack/bundle/opt/deoplete-abook/rplugin/python3/deoplete/sources/__pycache__/abook.cpython-38.pyc deleted file mode 100644 index 14ef25e890c49844a0ee1c41e97e6eb46747ea86..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2361 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 = :FzfFiles -nnoremap b = :FzfBuffers -nnoremap h = :FzfHelptags -" The space is important at the end of this mapping -nnoremap / = :FzfRg - -function! s:read_template_into_buffer(template) - " has to be a function to avoid the extra space fzf#run insers otherwise - execute '0r ~/Templates/'.a:template -endfunction - -command! -bang -nargs=* LoadTemplate call fzf#run({ - \ 'source': 'ls -1 ~/Templates', - \ 'down': 20, - \ 'sink': function('read_template_into_buffer') - \ }) diff --git a/nvim/.config/nvim/plugin/mappings.lua b/nvim/.config/nvim/plugin/mappings.lua new file mode 100644 index 00000000..4a856d2c --- /dev/null +++ b/nvim/.config/nvim/plugin/mappings.lua @@ -0,0 +1,125 @@ + + +-- Swap : and ; in normal mode +vim.keymap.set('n', ';',':', {desc="Swaps semi colon to colon"}) +vim.keymap.set('n', ':',';', {desc="Swaps semi colon to colon"}) + +-- Swap : and ; in visual mode +vim.keymap.set('v', ';',':', {desc="Swaps semi colon to colon"}) +vim.keymap.set('v', ':',';', {desc="Swaps semi colon to colon"}) + +-- Make jj in insert mode go to normal mode +vim.keymap.set('i', 'jj','', {desc="jj to escape"}) + + +-- Make ctrl+hjkl change focus between windows +vim.keymap.set('n', '','h', {desc="Move to left window"}) +vim.keymap.set('n', '','j', {desc="Move to below window"}) +vim.keymap.set('n', '','k', {desc="Move to above window"}) +vim.keymap.set('n', '','l', {desc="Move to left window"}) + +if vim.fn.has('clipboard') == 1 then + vim.keymap.set('v', '','"+y"', {desc="Copy to system clipboard"}) + vim.keymap.set('i', '','"+pa', {desc="Paste from system clipboard"}) +end + + +-- Fix previous spelling mistake in insert mode +-- Shamelessly taken from https://castel.dev/post/lecture-notes-1/ +-- u - break undo sequence (new change) +-- - go into normal mode +-- [s - go to previous spelling mistake +-- 1z= - change to the top spelling suggestion +-- `] - go to the end of the last changed word +-- a - enter insert mode +-- u - break undo sequence (new change) +vim.keymap.set('i', '','u[s1z=`]au', {desc="Fix previous spelling mistake"}) + +-- Do Shebang line +-- - go into normal mode +-- :silent - run command silently +-- s/^/…/ - write at the begining of the line +-- - used to seperate commands +-- filetype detect - attempt to detect filetype again +-- :nohlsearch - un-hilight the search pattern +vim.keymap.set('i', '', ':silent s/^/#!\\/usr\\/bin\\/env / filetype detect:nohlsearcho', {desc="do shebang line"}) + + +-- Makes delete key work properly in insert mode +vim.keymap.set('i', '', '', {desc="Delete next character"}) + + + +-- Compiles documents +-- The uppercase versions don't push enter an extra time resulting in seeing +-- the output of the compile command. Useful for debugging +vim.keymap.set('n', 'cc', ':w! | !compiler "%"' ) +vim.keymap.set('n', 'cC', ':w! | !compiler "%"' ) +vim.keymap.set('n', 'cl', ':w! | !compiler "%" letter' ) +vim.keymap.set('n', 'cL', ':w! | !compiler "%" letter' ) +vim.keymap.set('n', 'cf', ':w! | !rt partialPdf --overwrite "%" ' ) +vim.keymap.set('n', 'cF', ':w! | !rt partialPdf --overwrite "%" ' ) +vim.keymap.set('n', 'Cf', ':w! | !rt fullReport . --overwrite ' ) +vim.keymap.set('n', 'CF', ':w! | !rt fullReport . --overwrite ' ) + +-- Opens the compiled documents +-- If something like html, it doesn't need to be compiled first +vim.keymap.set('n', 'co', ':!opout "%"', {desc="open compiled document"}) + +-- Makes vim default to very magic searching +vim.keymap.set({'n','v'}, '/', '/\\v', {desc="very magic search"}) + +-- re-select visual selection when using < or > +vim.keymap.set('v', '<', '', '>gv', {desc="Increase indent and re-select"}) + + +-- Easy quickfix jumping +-- zO - Opens folds +-- zz - Centers vertically +vim.keymap.set('n', '[c', ':cpreviouszOzz', {desc="previous quickfix"}) +vim.keymap.set('n', ']c', ':cnextzOzz', {desc="next quickfix"}) + + +-- Debugging mappings +-- See `:help vim.diagnostic.*` for documentation on any of the below functions +vim.keymap.set('n', 'e', vim.diagnostic.open_float) +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next) +--vim.keymap.set('n', 'q', vim.diagnostic.setloclist) + +-- Open currend directory +vim.keymap.set('n', '-', ':e %:h', {desc="Open directory"}) + + + +-- Leaving these as old-style to remind me to come back and make them proper lua +vim.cmd([[ + +" Mappings for my encoding functions +vnoremap [b :call mine#encoding#wrapper('base64Encode') +vnoremap ]b :call mine#encoding#wrapper('base64Decode') +vnoremap [u :call mine#encoding#wrapper('urlEncode') +vnoremap ]u :call mine#encoding#wrapper('urlDecode') +vnoremap [U :call mine#encoding#wrapper('urlEncodeAll') +vnoremap ]U :call mine#encoding#wrapper('urlDecode') +vnoremap [h :call mine#encoding#wrapper('hexEncode') +vnoremap ]h :call mine#encoding#wrapper('hexDecode') + + +" Run proselint and put it in the quickfix list +nnoremap p :call mine#functions#proselint() + +if has('nvim') + if !empty($SUDO_ASKPASS) + cnoremap WW w !sudo -A tee % > /dev/null + else + cnoremap WW echo "SUDO_ASKPASS variable needs to be set" + endif +else + cnoremap WW w !sudo tee % > /dev/null +endif + +nnoremap ve :edit $HOME/.config/nvim/init.vim + +]]) diff --git a/nvim/.config/nvim/plugin/mappings.vim b/nvim/.config/nvim/plugin/mappings.vim deleted file mode 100644 index c26cceca..00000000 --- a/nvim/.config/nvim/plugin/mappings.vim +++ /dev/null @@ -1,95 +0,0 @@ -" Swaps semi colon to colon in normal mode -nnoremap ; : -nnoremap : ; - -" Swaps semi colon to colon in visual mode -vnoremap ; : -vnoremap : ; - -" Make jj in insert mode go to normal mode -inoremap jj - -" Make ctrl+hjkl change focus between windows -nnoremap h -nnoremap j -nnoremap k -nnoremap l - -if has('clipboard') - " Make Ctrl C and Ctrl V work on system clipboard - " if in visual or insert mode respectively - vnoremap "+y - inoremap "+pa -endif - -" Fix previous spelling mistake in insert mode -" Shamelessly taken from https://castel.dev/post/lecture-notes-1/ -" u - break undo sequence (new change) -" - go into normal mode -" [s - go to previous spelling mistake -" 1z= - change to the top spelling suggestion -" `] - go to the end of the last changed word -" a - enter insert mode -" u - break undo sequence (new change) -inoremap u[s1z=`]au - -" Do Shebang line -" - go into normal mode -" :silent - run command silently -" s/^/…/ - write at the begining of the line -" - used to seperate commands -" filetype detect - attempt to detect filetype again -" :nohlsearch - un-hilight the search pattern -inoremap :silent s/^/#!\/usr\/bin\/env / filetype detect:nohlsearcho -" alternative: inoremap :silent exe ".!which " s/^/#!/ filetype detectYpDi - -" Mappings for my encoding functions -vnoremap [b :call mine#encoding#wrapper('base64Encode') -vnoremap ]b :call mine#encoding#wrapper('base64Decode') -vnoremap [u :call mine#encoding#wrapper('urlEncode') -vnoremap ]u :call mine#encoding#wrapper('urlDecode') -vnoremap [U :call mine#encoding#wrapper('urlEncodeAll') -vnoremap ]U :call mine#encoding#wrapper('urlDecode') -vnoremap [h :call mine#encoding#wrapper('hexEncode') -vnoremap ]h :call mine#encoding#wrapper('hexDecode') - -" Makes the delete key work in insert mode -inoremap - -" Compiles documents -" The uppercase versions don't push enter an extra time resulting in seeing -" the output of the compile command. Useful for debugging -nnoremap cc :w! \| !compiler % -nnoremap cC :w! \| !compiler % -nnoremap cl :w! \| !compiler % letter -nnoremap cL :w! \| !compiler % letter - -" Opens the compiled documents -" If something like html, it doesn't need to be compiled first -nnoremap co :!opout % - -" Makes vim default to "very magic" searching -nnoremap / /\v -vnoremap / /\v - -" Makes vim re-select visual selection when using < or > -vnoremap < >gv - -nnoremap [c :cpreviouszOzz -nnoremap ]c :cnextzOzz - -" Run proselint and put it in the quickfix list -nnoremap p :call mine#functions#proselint() - -if has('nvim') - if !empty($SUDO_ASKPASS) - cnoremap WW w !sudo -A tee % > /dev/null - else - cnoremap WW echo "SUDO_ASKPASS variable needs to be set" - endif -else - cnoremap WW w !sudo tee % > /dev/null -endif - -nnoremap ve :edit $HOME/.config/nvim/init.vim diff --git a/nvim/.config/nvim/plugin/settings.lua b/nvim/.config/nvim/plugin/settings.lua new file mode 100644 index 00000000..b8c3aef4 --- /dev/null +++ b/nvim/.config/nvim/plugin/settings.lua @@ -0,0 +1,77 @@ +-- Set spellcheck language to english +vim.opt.spelllang=en_gb + +-- Set default split to be right or bottom +vim.opt.splitright=true +vim.opt.splitbelow=true + +-- Tell vim it's a fast terminal +vim.opt.ttyfast=true + +-- set relative ruler with current line as real line number +vim.opt.relativenumber=true +vim.opt.number=true + +-- Allows vim to background buffers without saving +vim.opt.hidden=true + +-- Sets vim to smart case +-- If search is all lowercase, search insensitively; if you include a capital +-- it becomes a case sensitive match +vim.opt.ignorecase=true +vim.opt.smartcase=true + +-- Makes vim try to keep 5 lines visible at the top and bottom +vim.opt.scrolloff=5 + +-- set tabwidth +vim.opt.autoindent=true +vim.opt.smartindent=true +vim.opt.shiftwidth=4 +vim.opt.tabstop=4 + +-- Add invisivle character reperesentation +vim.opt.list=true +vim.opt.listchars={ + tab="» ", + trail="␣" +} + +-- Stops vim wrapping in the middle of a word +vim.opt.linebreak=true + +-- Sets tool for opening non-text files with gx +-- If in netrw, this is run with just x +vim.g.netrw_browsex_viewer = "opout" + +-- Automatically insert comment leader after hitting enter (r) or when pushing o or O (o) +vim.opt.formatoptions:append('r') +vim.opt.formatoptions:append('o') + +-- Show the results of the substitute command as you type +vim.opt.inccommand = 'nosplit' + +-- Sets the default fold method to indent +vim.opt.foldmethod = 'indent' + + +-- Need to find out how to do this in lua +vim.cmd([[ + +if executable('rg') + set grepprg=rg\ --vimgrep\ --no-heading\ --color=never\ --glob=\"!shell-logs/*\" + set grepformat=%f:%l:%c:%m,%f:%l:%m +endif + +augroup colorcols + autocmd! + autocmd FileType,VimEnter,BufEnter * call mine#functions#colorcols() +augroup end + +" share data between nvim instances (registers etc) +augroup SHADA + autocmd! + autocmd CursorHold,TextYankPost,FocusGained,FocusLost * + \ if exists(':rshada') | rshada | wshada | endif +augroup END +]]) diff --git a/nvim/.config/nvim/plugin/settings.vim b/nvim/.config/nvim/plugin/settings.vim deleted file mode 100644 index c231053c..00000000 --- a/nvim/.config/nvim/plugin/settings.vim +++ /dev/null @@ -1,73 +0,0 @@ -" Set colourscheme to gruvbox -let g:gruvbox_italic=1 -set termguicolors -colorscheme gruvbox - -" Set spellcheck language to english -set spelllang=en_gb - -" Set default split to be right or bottom -set splitright -set splitbelow - -" Tell vim it's a fast terminal -set ttyfast - -" set relative ruler with current line as real line number -set relativenumber -set number - -" Allows vim to background buffers without saving -set hidden - -" Sets vim to smart case -" If search is all lowercase, search insensitively; if you include a capital -" it becomes a case sensitive match -set ignorecase smartcase - -" Makes vim try to keep 5 lines visible at the top and bottom -set scrolloff=5 - -" set tabwidth -set autoindent -set smartindent -set shiftwidth=4 -set tabstop=4 - -" Add invisivle character reperesentation -set list listchars=tab:»\ ,trail:\␣,eol:↩ - -" Stops vim wrapping in the middle of a word -set linebreak - -" Sets tool for opening non-text files with gx -" If in netrw, this is run with just x -let g:netrw_browsex_viewer = "opout" - -" Automatically insert comment leader after hitting enter -set formatoptions+=r -" Automatically insert comment leader after hitting o or O -set formatoptions+=o - -" Show the results of the substitute command as you type -set inccommand=nosplit - -" Sets the default fold method to indent -set foldmethod=indent - -if executable('rg') - set grepprg=rg\ --vimgrep\ --no-heading\ --color=never\ --glob=\"!shell-logs/*\" - set grepformat=%f:%l:%c:%m,%f:%l:%m -endif - -augroup colorcols - autocmd! - autocmd FileType,VimEnter,BufEnter * call mine#functions#colorcols() -augroup end - -" share data between nvim instances (registers etc) -augroup SHADA - autocmd! - autocmd CursorHold,TextYankPost,FocusGained,FocusLost * - \ if exists(':rshada') | rshada | wshada | endif -augroup END diff --git a/nvim/.config/nvim/plugin/treesitter.vim b/nvim/.config/nvim/plugin/treesitter.vim deleted file mode 100644 index 32681ea0..00000000 --- a/nvim/.config/nvim/plugin/treesitter.vim +++ /dev/null @@ -1,11 +0,0 @@ -lua <