From 9628ff30b92b0e7ce24c4c5909f99ea32240f988 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 3 May 2022 10:11:00 +0200 Subject: [PATCH 01/15] nvim: Move cmp configuration to its own file While it is lsp adjacent, this muddles the waters too much and the configuration file was way too long. --- nvim/.config/nvim/lua/plug/_cmp.lua | 99 +++++++++++++++++++++++++++++ nvim/.config/nvim/lua/plug/_lsp.lua | 89 -------------------------- nvim/.config/nvim/lua/plugins.lua | 2 +- 3 files changed, 100 insertions(+), 90 deletions(-) create mode 100644 nvim/.config/nvim/lua/plug/_cmp.lua diff --git a/nvim/.config/nvim/lua/plug/_cmp.lua b/nvim/.config/nvim/lua/plug/_cmp.lua new file mode 100644 index 0000000..244cb49 --- /dev/null +++ b/nvim/.config/nvim/lua/plug/_cmp.lua @@ -0,0 +1,99 @@ +local cmp = require 'cmp' +local lspkind = require 'lspkind' + +local has_words_before = function() + local line, col = unpack(vim.api.nvim_win_get_cursor(0)) + return col ~= 0 and + vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, + col) + :match("%s") == nil +end + +local feedkey = function(key, mode) + vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), + mode, true) +end + +vim.o.completeopt = "menu,menuone,noselect" + +-- completion items +require('cmp').register_source('vCard', require('completion_vcard').setup_cmp( + '~/documents/contacts/myconts')) +vim.g.vsnip_snippet_dir = (vim.env.XDG_DATA_HOME or "~/.local/share") .. + "/nvim/snippets" +cmp.setup({ + snippet = {expand = function(args) vim.fn["vsnip#anonymous"](args.body) end}, + mapping = { + [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), {'i', 'c'}), + [''] = cmp.mapping(cmp.mapping.scroll_docs(4), {'i', 'c'}), + [''] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}), + [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. + [''] = cmp.mapping({ + i = cmp.mapping.abort(), + c = cmp.mapping.close() + }), + -- Accept currently selected item. If none selected, `select` first item. + -- Set `select` to `false` to only confirm explicitly selected items. + [''] = cmp.mapping.confirm({select = false}), + [""] = cmp.mapping(function(fallback) + if cmp.visible() then + cmp.select_next_item() + elseif vim.fn["vsnip#available"](1) == 1 then + feedkey("(vsnip-expand-or-jump)", "") + elseif has_words_before() then + cmp.complete() + else + fallback() + end + end, {"i", "s"}), + + [""] = cmp.mapping(function() + if cmp.visible() then + cmp.select_prev_item() + elseif vim.fn["vsnip#jumpable"](-1) == 1 then + feedkey("(vsnip-jump-prev)", "") + end + end, {"i", "s"}) + }, + formatting = { + format = lspkind.cmp_format({ + with_text = false, + menu = ({ + buffer = "B", + nvim_lua = "NLua", + tmux = "τ", + vCard = "VCARD" + }) + }) + }, + sources = cmp.config.sources({ + {name = 'path'}, {name = 'nvim_lsp'}, {name = 'treesitter'}, + {name = 'tmux'}, {name = 'vsnip'}, {name = 'latex_symbols'}, + {name = 'pandoc_references'}, {name = 'vCard'} + }, {{name = 'buffer'}, {name = 'spell'}}) +}) +if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft == + 'guihua_rust' then require'cmp'.setup.buffer {completion = {enable = false}} end + +-- Use buffer source for `/` search +cmp.setup.cmdline('/', { + mapping = cmp.mapping.preset.cmdline(), + sources = {{name = 'buffer'}}} +) + +-- Use cmdline & path source for ':' in vim +cmp.setup.cmdline(':', { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}}) +}) + +cmp.setup.filetype('gitcommit', { +sources = cmp.config.sources({ + { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. +}, { + { name = 'buffer' }, +}) +}) + +require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol + .make_client_capabilities()) diff --git a/nvim/.config/nvim/lua/plug/_lsp.lua b/nvim/.config/nvim/lua/plug/_lsp.lua index ccbbd85..9503e62 100644 --- a/nvim/.config/nvim/lua/plug/_lsp.lua +++ b/nvim/.config/nvim/lua/plug/_lsp.lua @@ -1,92 +1,3 @@ -local cmp = require 'cmp' -local lspkind = require 'lspkind' - -local has_words_before = function() - local line, col = unpack(vim.api.nvim_win_get_cursor(0)) - return col ~= 0 and - vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, - col) - :match("%s") == nil -end - -local feedkey = function(key, mode) - vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), - mode, true) -end - -vim.o.completeopt = "menu,menuone,noselect" - --- completion items -require('cmp').register_source('vCard', require('completion_vcard').setup_cmp( - '~/documents/contacts/myconts')) -vim.g.vsnip_snippet_dir = (vim.env.XDG_DATA_HOME or "~/.local/share") .. - "/nvim/snippets" -cmp.setup({ - snippet = {expand = function(args) vim.fn["vsnip#anonymous"](args.body) end}, - mapping = { - [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), {'i', 'c'}), - [''] = cmp.mapping(cmp.mapping.scroll_docs(4), {'i', 'c'}), - [''] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}), - [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. - [''] = cmp.mapping({ - i = cmp.mapping.abort(), - c = cmp.mapping.close() - }), - -- Accept currently selected item. If none selected, `select` first item. - -- Set `select` to `false` to only confirm explicitly selected items. - [''] = cmp.mapping.confirm({select = false}), - [""] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif vim.fn["vsnip#available"](1) == 1 then - feedkey("(vsnip-expand-or-jump)", "") - elseif has_words_before() then - cmp.complete() - else - fallback() - end - end, {"i", "s"}), - - [""] = cmp.mapping(function() - if cmp.visible() then - cmp.select_prev_item() - elseif vim.fn["vsnip#jumpable"](-1) == 1 then - feedkey("(vsnip-jump-prev)", "") - end - end, {"i", "s"}) - }, - formatting = { - format = lspkind.cmp_format({ - with_text = false, - menu = ({ - buffer = "B", - nvim_lua = "NLua", - tmux = "τ", - vCard = "VCARD" - }) - }) - }, - sources = cmp.config.sources({ - {name = 'path'}, {name = 'nvim_lsp'}, {name = 'treesitter'}, - {name = 'tmux'}, {name = 'vsnip'}, {name = 'latex_symbols'}, - {name = 'pandoc_references'}, {name = 'vCard'} - }, {{name = 'buffer'}, {name = 'spell'}}) -}) -if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft == - 'guihua_rust' then require'cmp'.setup.buffer {completion = {enable = false}} end - --- Use buffer source for `/` search -cmp.setup.cmdline('/', {sources = {{name = 'buffer'}}}) - --- Use cmdline & path source for ':' in vim -cmp.setup.cmdline(':', { - sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}}) -}) - -require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol - .make_client_capabilities()) - --- 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'navigator'.setup({ diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index a9ad28b..42ff713 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -224,6 +224,6 @@ require("packer").startup(function() 'cbarrete/completion-vcard' } } - require('plug._lsp') + require('plug._cmp') end) From e3b2f0f0e514a0af11861eca9e9063709dc0bb2e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 3 May 2022 10:11:36 +0200 Subject: [PATCH 02/15] nvim: Add basic neorg installation All defaults for now except for concealer installed which prettifies the neorg files. --- nvim/.config/nvim/lua/plug/_neorg.lua | 6 ++++++ nvim/.config/nvim/lua/plugins.lua | 7 +++++++ 2 files changed, 13 insertions(+) create mode 100644 nvim/.config/nvim/lua/plug/_neorg.lua diff --git a/nvim/.config/nvim/lua/plug/_neorg.lua b/nvim/.config/nvim/lua/plug/_neorg.lua new file mode 100644 index 0000000..71f5d1d --- /dev/null +++ b/nvim/.config/nvim/lua/plug/_neorg.lua @@ -0,0 +1,6 @@ +require("neorg").setup{ + load = { + ["core.defaults"] = {}, + ["core.norg.concealer"] = {} + } +} diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 42ff713..1084976 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -156,6 +156,13 @@ require("packer").startup(function() "folke/which-key.nvim", config = function() require("which-key").setup {} end } + -- extensive organization plugin mimicking orgmode + use { + "nvim-neorg/neorg", + config = function() require("plug._neorg") end, + requires = "nvim-lua/plenary.nvim", + tag = "*" + } -- fuzzy matching use { From ba5d5d2561e0a25c4df9f2d22acf85cf1c8d4fd0 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 3 May 2022 11:57:57 +0200 Subject: [PATCH 03/15] nvim: Fix cmp cmp-pandoc completion --- nvim/.config/nvim/lua/plug/_cmp.lua | 23 +++++++++++------------ nvim/.config/nvim/lua/plugins.lua | 6 +++--- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_cmp.lua b/nvim/.config/nvim/lua/plug/_cmp.lua index 244cb49..b4c0329 100644 --- a/nvim/.config/nvim/lua/plug/_cmp.lua +++ b/nvim/.config/nvim/lua/plug/_cmp.lua @@ -69,17 +69,24 @@ cmp.setup({ sources = cmp.config.sources({ {name = 'path'}, {name = 'nvim_lsp'}, {name = 'treesitter'}, {name = 'tmux'}, {name = 'vsnip'}, {name = 'latex_symbols'}, - {name = 'pandoc_references'}, {name = 'vCard'} - }, {{name = 'buffer'}, {name = 'spell'}}) + {name = 'cmp_pandoc'}, {name = 'vCard'}, { name = 'nvim_lua'} }, + {{name = 'buffer'}, {name = 'spell'}} + ) }) +require 'cmp_pandoc'.setup{ + bibliography = { + fields = { "type", "title", "author", "date" } + } +} + if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft == 'guihua_rust' then require'cmp'.setup.buffer {completion = {enable = false}} end -- Use buffer source for `/` search cmp.setup.cmdline('/', { mapping = cmp.mapping.preset.cmdline(), - sources = {{name = 'buffer'}}} -) + sources = cmp.config.sources({{name = 'buffer'}}) +}) -- Use cmdline & path source for ':' in vim cmp.setup.cmdline(':', { @@ -87,13 +94,5 @@ cmp.setup.cmdline(':', { sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}}) }) -cmp.setup.filetype('gitcommit', { -sources = cmp.config.sources({ - { name = 'cmp_git' }, -- You can specify the `cmp_git` source if you were installed it. -}, { - { name = 'buffer' }, -}) -}) - require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol .make_client_capabilities()) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index 1084976..a9048da 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -225,10 +225,10 @@ require("packer").startup(function() requires = { 'onsails/lspkind-nvim', 'andersevenrud/cmp-tmux', -- completion source from adjacent tmux panes 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', - 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', + 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua', 'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter', - 'f3fora/cmp-spell', 'jc-doyle/cmp-pandoc-references', - 'cbarrete/completion-vcard' + 'f3fora/cmp-spell', 'cbarrete/completion-vcard', + 'aspeddro/cmp-pandoc.nvim', 'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim' -- pandoc requires the 2 following } } require('plug._cmp') From 7fbdbf0203b38efbd47796cd162b1f13b8e07315 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 15:56:23 +0100 Subject: [PATCH 04/15] nvim: Update formatting --- nvim/.config/nvim/init.lua | 11 ++++--- nvim/.config/nvim/lua/plug/_autopair.lua | 8 ++--- nvim/.config/nvim/lua/plug/_cmp.lua | 32 +++++++++---------- nvim/.config/nvim/lua/plug/_gitsigns.lua | 40 ++++++++++++++++++++++++ nvim/.config/nvim/lua/plugins.lua | 20 ++++++------ nvim/.config/nvim/plugin/vim-pandoc.vim | 4 +-- 6 files changed, 78 insertions(+), 37 deletions(-) create mode 100644 nvim/.config/nvim/lua/plug/_gitsigns.lua diff --git a/nvim/.config/nvim/init.lua b/nvim/.config/nvim/init.lua index ad79d2c..1047d06 100644 --- a/nvim/.config/nvim/init.lua +++ b/nvim/.config/nvim/init.lua @@ -11,15 +11,18 @@ require('maps') vim.api.nvim_create_autocmd({ "TextYankPost" }, { command = 'silent! lua require"vim.highlight".on_yank{timeout=500}', desc = "Highlight yanked text whenevery yanking something", - group = vim.api.nvim_create_augroup('highlightyanks', { clear = true }), + group = vim.api.nvim_create_augroup('highlightyanks', { clear = true }) }) -- Special setting for editing gopass files - make sure nothing leaks outside the directories it is supposed to vim.api.nvim_create_autocmd({ "BufNewFile", "BufRead" }, { - pattern = { "/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt", "$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt" }, + pattern = { + "/dev/shm/gopass.*", "/dev/shm/pass.?*/?*.txt", + "$TMPDIR/pass.?*/?*.txt", "/tmp/pass.?*/?*.txt" + }, command = 'setlocal noswapfile nobackup noundofile nowritebackup viminfo=', desc = "Don't leak any information when editing potential password files", - group = vim.api.nvim_create_augroup('passnoleak', { clear = true }), + group = vim.api.nvim_create_augroup('passnoleak', { clear = true }) }) api.nvim_exec('runtime abbrev.vim', false) @@ -31,5 +34,5 @@ vim.api.nvim_create_autocmd({ "VimEnter" }, { vim.defer_fn(function() vim.loop.kill(pid, WINCH) end, 20) end, desc = "Fix neovim sizing issues if opening same time as alacritty", - group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true }), + group = vim.api.nvim_create_augroup('alacritty_fixsize', { clear = true }) }) diff --git a/nvim/.config/nvim/lua/plug/_autopair.lua b/nvim/.config/nvim/lua/plug/_autopair.lua index a2ad8a1..85f756d 100644 --- a/nvim/.config/nvim/lua/plug/_autopair.lua +++ b/nvim/.config/nvim/lua/plug/_autopair.lua @@ -1,4 +1,4 @@ -require('nvim-autopairs').setup({check_ts = true}) +require('nvim-autopairs').setup({ check_ts = true }) --- Auto-space rules local npairs = require 'nvim-autopairs' @@ -7,12 +7,10 @@ local Rule = require 'nvim-autopairs.rule' npairs.add_rules { Rule(' ', ' '):with_pair(function(opts) local pair = opts.line:sub(opts.col, opts.col + 1) - return vim.tbl_contains({'()', '[]', '{}'}, pair) + return vim.tbl_contains({ '()', '[]', '{}' }, pair) end) } local cmp_autopairs = require('nvim-autopairs.completion.cmp') local cmp = require('cmp') cmp.event:on('confirm_done', - cmp_autopairs.on_confirm_done({map_char = {tex = ''}})) --- add a lisp filetype (wrap my-function), FYI: Hardcoded = { "clojure", "clojurescript", "fennel", "janet" } -cmp_autopairs.lisp[#cmp_autopairs.lisp + 1] = "racket" + cmp_autopairs.on_confirm_done({ map_char = { tex = '' } })) diff --git a/nvim/.config/nvim/lua/plug/_cmp.lua b/nvim/.config/nvim/lua/plug/_cmp.lua index b4c0329..23b72b1 100644 --- a/nvim/.config/nvim/lua/plug/_cmp.lua +++ b/nvim/.config/nvim/lua/plug/_cmp.lua @@ -4,29 +4,29 @@ local lspkind = require 'lspkind' local has_words_before = function() local line, col = unpack(vim.api.nvim_win_get_cursor(0)) return col ~= 0 and - vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, - col) - :match("%s") == nil + vim.api.nvim_buf_get_lines(0, line - 1, line, true)[1]:sub(col, + col) + :match("%s") == nil end local feedkey = function(key, mode) vim.api.nvim_feedkeys(vim.api.nvim_replace_termcodes(key, true, true, true), - mode, true) + mode, true) end vim.o.completeopt = "menu,menuone,noselect" -- completion items require('cmp').register_source('vCard', require('completion_vcard').setup_cmp( - '~/documents/contacts/myconts')) + '~/documents/contacts/myconts')) vim.g.vsnip_snippet_dir = (vim.env.XDG_DATA_HOME or "~/.local/share") .. - "/nvim/snippets" + "/nvim/snippets" cmp.setup({ - snippet = {expand = function(args) vim.fn["vsnip#anonymous"](args.body) end}, + snippet = { expand = function(args) vim.fn["vsnip#anonymous"](args.body) end }, mapping = { - [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), {'i', 'c'}), - [''] = cmp.mapping(cmp.mapping.scroll_docs(4), {'i', 'c'}), - [''] = cmp.mapping(cmp.mapping.complete(), {'i', 'c'}), + [''] = cmp.mapping(cmp.mapping.scroll_docs(-4), { 'i', 'c' }), + [''] = cmp.mapping(cmp.mapping.scroll_docs(4), { 'i', 'c' }), + [''] = cmp.mapping(cmp.mapping.complete(), { 'i', 'c' }), [''] = cmp.config.disable, -- Specify `cmp.config.disable` if you want to remove the default `` mapping. [''] = cmp.mapping({ i = cmp.mapping.abort(), @@ -34,7 +34,7 @@ cmp.setup({ }), -- Accept currently selected item. If none selected, `select` first item. -- Set `select` to `false` to only confirm explicitly selected items. - [''] = cmp.mapping.confirm({select = false}), + [''] = cmp.mapping.confirm({ select = false }), [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_next_item() @@ -45,7 +45,7 @@ cmp.setup({ else fallback() end - end, {"i", "s"}), + end, { "i", "s" }), [""] = cmp.mapping(function() if cmp.visible() then @@ -53,7 +53,7 @@ cmp.setup({ elseif vim.fn["vsnip#jumpable"](-1) == 1 then feedkey("(vsnip-jump-prev)", "") end - end, {"i", "s"}) + end, { "i", "s" }) }, formatting = { format = lspkind.cmp_format({ @@ -80,18 +80,18 @@ require 'cmp_pandoc'.setup{ } if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft == - 'guihua_rust' then require'cmp'.setup.buffer {completion = {enable = false}} end + 'guihua_rust' then require 'cmp'.setup.buffer { completion = { enable = false } } end -- Use buffer source for `/` search cmp.setup.cmdline('/', { mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({{name = 'buffer'}}) + sources = cmp.config.sources({ { name = 'buffer' } }) }) -- Use cmdline & path source for ':' in vim cmp.setup.cmdline(':', { mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({{name = 'path'}}, {{name = 'cmdline'}}) + sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }) }) require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol diff --git a/nvim/.config/nvim/lua/plug/_gitsigns.lua b/nvim/.config/nvim/lua/plug/_gitsigns.lua new file mode 100644 index 0000000..378a12b --- /dev/null +++ b/nvim/.config/nvim/lua/plug/_gitsigns.lua @@ -0,0 +1,40 @@ +-- require('gitsigns').setup { +-- on_attach = function(bufnr) +-- local gs = package.loaded.gitsigns +-- +-- local function map(mode, l, r, opts) +-- opts = opts or {} +-- opts.buffer = bufnr +-- vim.keymap.set(mode, l, r, opts) +-- end +-- +-- -- Navigation +-- map('n', ']h', function() +-- if vim.wo.diff then return ']h' end +-- vim.schedule(function() gs.next_hunk() end) +-- return '' +-- end, {expr = true}) +-- +-- map('n', '[h', function() +-- if vim.wo.diff then return '[h' end +-- vim.schedule(function() gs.prev_hunk() end) +-- return '' +-- end, {expr = true}) +-- +-- -- Actions +-- map({'n', 'v'}, 'hs', ':Gitsigns stage_hunk') +-- map('n', 'hS', gs.stage_buffer) +-- map({'n', 'v'}, 'hr', ':Gitsigns reset_hunk') +-- map('n', 'hR', gs.reset_buffer) +-- map('n', 'hu', gs.undo_stage_hunk) +-- map('n', 'hp', gs.preview_hunk) +-- map('n', 'hb', function() gs.blame_line {full = true} end) +-- map('n', 'hB', gs.toggle_current_line_blame) +-- map('n', 'hd', gs.diffthis) +-- map('n', 'hD', function() gs.diffthis('~') end) +-- map('n', 'hdd', gs.toggle_deleted) +-- +-- -- Text object +-- map({'o', 'x'}, 'ih', ':Gitsigns select_hunk') +-- end +-- } diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index a9048da..abab70a 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -2,15 +2,15 @@ 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) + install_path) end -- Compile on plugin edits -vim.api.nvim_create_autocmd({ "BufWritePost" }, { +vim.api.nvim_create_autocmd({"BufWritePost"}, { pattern = "plugins.lua", command = "PackerCompile", desc = "Compile plugins after editing plugin list", - group = vim.api.nvim_create_augroup('compilepackages', { clear = true }) + group = vim.api.nvim_create_augroup('compilepackages', {clear = true}) }) local use = require("packer").use @@ -34,11 +34,7 @@ require("packer").startup(function() 'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter requires = {'nvim-lua/plenary.nvim'}, tag = 'release', - config = function() - require('gitsigns').setup { - keymaps = {['n ]c'] = nil, ['n [c'] = nil} - } - end, + config = function() require('plug._gitsigns') end, event = "BufRead" } use { @@ -213,11 +209,15 @@ require("packer").startup(function() -- lsp use 'neovim/nvim-lspconfig' -- some commong language server configurations - use 'simrat39/symbols-outline.nvim' -- vista-like outline view for code + use { + 'simrat39/symbols-outline.nvim', + config = function() require('symbols-outline').setup() end + } -- vista-like outline view for code use 'ray-x/lsp_signature.nvim' use { 'ray-x/navigator.lua', - requires = {'ray-x/guihua.lua', run = 'cd lua/fzy && make'} + requires = {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}, + config = function() require('plug._lsp') end } -- and completion use { diff --git a/nvim/.config/nvim/plugin/vim-pandoc.vim b/nvim/.config/nvim/plugin/vim-pandoc.vim index d662324..8387248 100644 --- a/nvim/.config/nvim/plugin/vim-pandoc.vim +++ b/nvim/.config/nvim/plugin/vim-pandoc.vim @@ -1,8 +1,8 @@ " PLUGIN: vim-pandoc " handle markdown files with pandoc (and pandoc syntax!) let g:pandoc#modules#disabled = [ "keyboard", "folding" ] -let g:pandoc#filetypes#pandoc_markdown = 1 -let g:pandoc#filetypes#handled = [ "extra", "latex", "markdown", "pandoc", "rst", "textile" ] +let g:pandoc#filetypes#pandoc_markdown = 0 +let g:pandoc#filetypes#handled = [ "extra", "latex", "markdown", "pandoc", "rst", "textile"] " disable all default keymaps let g:pandoc#keyboard#use_default_mappings=0 " needs to be set for wrapping and unwrapping of lines to work when doing j/k From 84714379ab26209ad6a2467062699b1b5e8f0f0e Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:02:00 +0100 Subject: [PATCH 05/15] nvim: Update autopairs rules --- nvim/.config/nvim/lua/plug/_autopair.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/nvim/.config/nvim/lua/plug/_autopair.lua b/nvim/.config/nvim/lua/plug/_autopair.lua index 85f756d..7a645e0 100644 --- a/nvim/.config/nvim/lua/plug/_autopair.lua +++ b/nvim/.config/nvim/lua/plug/_autopair.lua @@ -4,6 +4,23 @@ require('nvim-autopairs').setup({ check_ts = true }) local npairs = require 'nvim-autopairs' local Rule = require 'nvim-autopairs.rule' +npairs.setup({ + check_ts = true, + ts_config = { + lua = { 'string' }, -- it will not add a pair on that treesitter node + javascript = { 'template_string' }, + java = false -- don't check treesitter on java + } +}) + +local ts_conds = require('nvim-autopairs.ts-conds') + +-- press % => %% only while inside a comment or string +npairs.add_rules({ + Rule("%", "%", "lua"):with_pair(ts_conds.is_ts_node({ 'string', 'comment' })), + Rule("$", "$", "lua"):with_pair(ts_conds.is_not_ts_node({ 'function' })) +}) + npairs.add_rules { Rule(' ', ' '):with_pair(function(opts) local pair = opts.line:sub(opts.col, opts.col + 1) From 26c3124e95929b0af12fcd657508b6c8dd879f34 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:02:35 +0100 Subject: [PATCH 06/15] nvim: Remove non-working cmp plugins --- nvim/.config/nvim/lua/plug/_cmp.lua | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_cmp.lua b/nvim/.config/nvim/lua/plug/_cmp.lua index 23b72b1..c748c60 100644 --- a/nvim/.config/nvim/lua/plug/_cmp.lua +++ b/nvim/.config/nvim/lua/plug/_cmp.lua @@ -67,17 +67,11 @@ cmp.setup({ }) }, sources = cmp.config.sources({ - {name = 'path'}, {name = 'nvim_lsp'}, {name = 'treesitter'}, - {name = 'tmux'}, {name = 'vsnip'}, {name = 'latex_symbols'}, - {name = 'cmp_pandoc'}, {name = 'vCard'}, { name = 'nvim_lua'} }, - {{name = 'buffer'}, {name = 'spell'}} - ) + { name = 'path' }, { name = 'nvim_lsp' }, { name = 'treesitter' }, + { name = 'tmux' }, { name = 'vsnip' }, { name = 'latex_symbols' }, + { name = 'vCard' }, { name = 'nvim_lua' } + }, { { name = 'buffer' }, { name = 'spell' } }) }) -require 'cmp_pandoc'.setup{ - bibliography = { - fields = { "type", "title", "author", "date" } - } -} if vim.o.ft == 'clap_input' and vim.o.ft == 'guihua' and vim.o.ft == 'guihua_rust' then require 'cmp'.setup.buffer { completion = { enable = false } } end From 03a41487965c6cdf60966f93b16cf46d260f3038 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:03:07 +0100 Subject: [PATCH 07/15] nvim: Update deprecated cmp lsp method --- nvim/.config/nvim/lua/plug/_cmp.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_cmp.lua b/nvim/.config/nvim/lua/plug/_cmp.lua index c748c60..bad2eb5 100644 --- a/nvim/.config/nvim/lua/plug/_cmp.lua +++ b/nvim/.config/nvim/lua/plug/_cmp.lua @@ -88,5 +88,5 @@ cmp.setup.cmdline(':', { sources = cmp.config.sources({ { name = 'path' } }, { { name = 'cmdline' } }) }) -require('cmp_nvim_lsp').update_capabilities(vim.lsp.protocol - .make_client_capabilities()) +require('cmp_nvim_lsp').default_capabilities(vim.lsp.protocol + .make_client_capabilities()) From 0220f7f03fa8014b7f817ebaea73aa3833c23e95 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:03:30 +0100 Subject: [PATCH 08/15] nvim: Remove extraneous lsp setup for defaults --- nvim/.config/nvim/lua/plug/_lsp.lua | 64 +---------------------------- 1 file changed, 1 insertion(+), 63 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_lsp.lua b/nvim/.config/nvim/lua/plug/_lsp.lua index 9503e62..4bd08b7 100644 --- a/nvim/.config/nvim/lua/plug/_lsp.lua +++ b/nvim/.config/nvim/lua/plug/_lsp.lua @@ -1,65 +1,3 @@ -- The arch package defaults to the following directory -local sumneko_root_path = "/usr/share/lua-language-server" -require'navigator'.setup({ - lsp = { - servers = {'efm'}, - disable_lsp = {"pylsp", "jedi_language_server"}, - sumneko_lua = { - 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 additional globals - globals = { - 'vim', 'before_each', 'after_each', 'describe', - 'it', 'mock', 'stub' - } - }, - workspace = { - -- Make the server aware of additional runtime files - library = { - [vim.fn.expand('$VIMRUNTIME/lua')] = true, - [vim.fn.expand('$VIMRUNTIME/lua/vim/lsp')] = true, - ["/usr/share/lua/5.1/busted/"] = true - } - } - } - } - }, - efm = { - init_options = { - documentFormatting = true, - codeAction = true, - completion = true, - documentSymbol = true, - hover = true - }, - filetypes = {"sh"}, - settings = { - rootMarkers = {".git/"}, - languages = { - sh = { - { - lintCommand = 'shellcheck -f gcc -x', - lintFormats = { - '%f:%l:%c: %trror: %m', - '%f:%l:%c: %tarning: %m', '%f:%l:%c: %tote: %m' - } - }, - {formatCommand = 'shfmt -ci -s -bn', formatStdin = true} - } - } - } - } - - } -}) +require'navigator'.setup() require"lsp_signature".setup() From ff3b4ef60502f1d03c984dbfac4696a9bc1bcb20 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:03:53 +0100 Subject: [PATCH 09/15] nvim: Update neorg modules in use --- nvim/.config/nvim/lua/plug/_neorg.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_neorg.lua b/nvim/.config/nvim/lua/plug/_neorg.lua index 71f5d1d..90cb520 100644 --- a/nvim/.config/nvim/lua/plug/_neorg.lua +++ b/nvim/.config/nvim/lua/plug/_neorg.lua @@ -1,6 +1,8 @@ -require("neorg").setup{ +require("neorg").setup { load = { ["core.defaults"] = {}, - ["core.norg.concealer"] = {} + ["core.norg.concealer"] = {}, + ["core.norg.completion"] = { config = { engine = "nvim-cmp" } }, + ["core.norg.qol.toc"] = {} } } From af6e91561bc5471ba47546bc79242ab64c7e771d Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:04:37 +0100 Subject: [PATCH 10/15] nvim: Remove unnecessary augroup invocation --- nvim/.config/nvim/lua/plug/_format.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_format.lua b/nvim/.config/nvim/lua/plug/_format.lua index 85021e8..487b57e 100644 --- a/nvim/.config/nvim/lua/plug/_format.lua +++ b/nvim/.config/nvim/lua/plug/_format.lua @@ -1,5 +1,3 @@ -local augroup = require('helpers.augroup') - -- for each filetype autoformat on save -- TODO can automatically gather from formatter table keys? local prettierfmt = { From 86fdfbe3d5347bd4a804911222f920b5e972ec97 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:04:54 +0100 Subject: [PATCH 11/15] nvim: Update spellchecker --- nvim/.config/nvim/spell/en.utf-8.add | 1 + 1 file changed, 1 insertion(+) diff --git a/nvim/.config/nvim/spell/en.utf-8.add b/nvim/.config/nvim/spell/en.utf-8.add index 0276317..e752768 100644 --- a/nvim/.config/nvim/spell/en.utf-8.add +++ b/nvim/.config/nvim/spell/en.utf-8.add @@ -177,3 +177,4 @@ ascriptions exploitations tradeable reproducability +positivity From 27860162b48c79c2b319c6038896780736b338d4 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 1 Nov 2022 16:05:33 +0100 Subject: [PATCH 12/15] nvim: Update plugins for quarto --- nvim/.config/nvim/lua/plugins.lua | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index abab70a..bef6376 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -88,9 +88,14 @@ require("packer").startup(function() } -- writing - use {'vim-pandoc/vim-pandoc-syntax', ft = 'pandoc'} - use {'vim-pandoc/vim-pandoc', ft = 'pandoc'} - use {'vim-pandoc/vim-criticmarkup', ft = 'pandoc'} -- highlights for criticmarkup + use {'vim-pandoc/vim-pandoc-syntax'} + use {'vim-pandoc/vim-pandoc'} + use {'vim-pandoc/vim-criticmarkup'} + use { + "quarto-dev/quarto-vim", + requires = {{"vim-pandoc/vim-pandoc-syntax"}}, + ft = {"quarto"} + } use 'micarmst/vim-spellsync' -- personal dict improvements for git sync use { -- provide distraction free writing 'Pocco81/TrueZen.nvim', @@ -227,8 +232,8 @@ require("packer").startup(function() 'hrsh7th/cmp-nvim-lsp', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-path', 'hrsh7th/cmp-cmdline', 'hrsh7th/cmp-vsnip', 'hrsh7th/cmp-nvim-lua', 'kdheepak/cmp-latex-symbols', 'ray-x/cmp-treesitter', - 'f3fora/cmp-spell', 'cbarrete/completion-vcard', - 'aspeddro/cmp-pandoc.nvim', 'nvim-lua/plenary.nvim', 'jbyuki/nabla.nvim' -- pandoc requires the 2 following + 'f3fora/cmp-spell', 'cbarrete/completion-vcard' + } } require('plug._cmp') From 892544df8e1c1808099af9d9c2908011784f7871 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 4 Nov 2022 15:14:54 +0100 Subject: [PATCH 13/15] git: Add fetchall alias Added `git fetchall` (or `gfa`) alias which allows fetching the current branch from all connected remotes simultaneously. May have some unintended side effects when branches diverge, this is untested. --- git/.config/git/config | 1 + git/.config/sh/alias.d/git.sh | 1 + 2 files changed, 2 insertions(+) diff --git a/git/.config/git/config b/git/.config/git/config index d42caec..361923b 100644 --- a/git/.config/git/config +++ b/git/.config/git/config @@ -9,6 +9,7 @@ pushmerge = "push -o merge_request.merge_when_pipeline_succeeds" # see https://docs.gitlab.com/ce/user/project/push_options.html # merge-when-pipeline-succeeds-alias last = "diff HEAD~ HEAD" pushall = "!git remote | xargs -I R git push R" # push to all connected remotes + fetchall = "!git remote | xargs -I R git fetch R" # fetch from all connected remotes [commit] gpgsign = true # sign commits as me diff --git a/git/.config/sh/alias.d/git.sh b/git/.config/sh/alias.d/git.sh index db7df48..7e1b1de 100644 --- a/git/.config/sh/alias.d/git.sh +++ b/git/.config/sh/alias.d/git.sh @@ -47,6 +47,7 @@ alias glog='git log --stat' alias gloog='git log --stat -p' alias gf='git fetch' +alias gfa='git fetchall' alias gl='git pull' alias gpn='git push --dry-run' From 14f33460dfcb1aea6991874fffe9f5bafaeee33f Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Fri, 4 Nov 2022 15:23:40 +0100 Subject: [PATCH 14/15] tmux: Improve vim-style yanking Finally updated tmux scroll-mode yanking to use more vim-style bindings: Use `v` to select text normally, `V` to select line-wise and `C-v` to enable rectangle select. `y` yanks to the clipboard (and the internal tmux register as previously). Lastly, removed some left-over deprecated code concerning neovim cursor shape behavior. Was already commented out but now removed completely. HACK - the yanking to clipboard only works on wayland currently since it uses `wl-copy` directly instead of the `clip` script. The `clip` script is not invoked correctly with data being piped since it apparently does not recognize that it is in a piped call? --- tmux/.config/tmux/tmux.conf | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf index fcd03d7..5e477b4 100644 --- a/tmux/.config/tmux/tmux.conf +++ b/tmux/.config/tmux/tmux.conf @@ -1,6 +1,6 @@ # Layout of this conf file: # 1. Global Settings -# 2. Keybinds +# 2. Plugins # 3. Keybinds # 4. Theme @@ -27,11 +27,8 @@ set -g mouse on # allow truecolor support set -g default-terminal 'xterm-256color' set -ga terminal-overrides ',xterm-256color:Tc' -# Set Cursor terminal override, so nvim can change cursor style when changing modes -# more info see nvim, :help tui-cursor-shape -# LEGACY: this should not be necessary anymore -# set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q' set -g status-keys vi +set-window-option -g mode-keys vi set -g history-limit 10000 # Screen size is based on the smallest client looking at the current windows, not the smallest @@ -111,6 +108,12 @@ bind-key '-' split-window -v -c '#{pane_current_path}' # Open a sessions chooser bind C-s split-window -v "tmux list-sessions | sed -E 's/:.*$//' | grep -v \"^$(tmux display-message -p '#S')\$\" | fzf --reverse | xargs tmux switch-client -t" +# Make visual selections act a little more like vim +bind-key -T copy-mode-vi v send -X begin-selection +bind-key -T copy-mode-vi V send -X select-line +bind-key -T copy-mode-vi y send -X copy-pipe-and-cancel 'wl-copy' \; send -X rectangle-off +bind-key -T copy-mode-vi 'C-v' send -X begin-selection \; send -X rectangle-on + ##################### ## 4. THEME ## ##################### From fadacf5313ebfa1923c5a1d414a7ebf100ec8073 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 15 Nov 2022 18:09:25 +0100 Subject: [PATCH 15/15] nvim: Format plugins file --- nvim/.config/nvim/lua/plugins.lua | 50 +++++++++++++++++-------------- 1 file changed, 28 insertions(+), 22 deletions(-) diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index bef6376..3f11bdc 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -2,15 +2,15 @@ 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) + install_path) end -- Compile on plugin edits -vim.api.nvim_create_autocmd({"BufWritePost"}, { +vim.api.nvim_create_autocmd({ "BufWritePost" }, { pattern = "plugins.lua", command = "PackerCompile", desc = "Compile plugins after editing plugin list", - group = vim.api.nvim_create_augroup('compilepackages', {clear = true}) + group = vim.api.nvim_create_augroup('compilepackages', { clear = true }) }) local use = require("packer").use @@ -32,7 +32,7 @@ require("packer").startup(function() use 'vifm/vifm.vim' -- integrate file manager use { 'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter - requires = {'nvim-lua/plenary.nvim'}, + requires = { 'nvim-lua/plenary.nvim' }, tag = 'release', config = function() require('plug._gitsigns') end, event = "BufRead" @@ -49,7 +49,12 @@ require("packer").startup(function() } -- editing - use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr + -- use {'machakann/vim-sandwich', event = "BufRead"} -- surround things with other things using sa/sd/sr + use { + 'kylechui/nvim-surround', + tag = '*', + config = function() require('nvim-surround').setup() end + } -- surround things with other things using ys/cs/ds use { 'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers event = "BufRead" @@ -83,18 +88,18 @@ require("packer").startup(function() -- statusline use { 'nvim-lualine/lualine.nvim', - requires = {'kyazdani42/nvim-web-devicons', opt = true}, + requires = { 'kyazdani42/nvim-web-devicons', opt = true }, config = function() require('plug._lualine') end } -- writing - use {'vim-pandoc/vim-pandoc-syntax'} - use {'vim-pandoc/vim-pandoc'} - use {'vim-pandoc/vim-criticmarkup'} + use { 'vim-pandoc/vim-pandoc-syntax' } + use { 'vim-pandoc/vim-pandoc' } + use { 'vim-pandoc/vim-criticmarkup' } use { "quarto-dev/quarto-vim", - requires = {{"vim-pandoc/vim-pandoc-syntax"}}, - ft = {"quarto"} + requires = { { "vim-pandoc/vim-pandoc-syntax" } }, + ft = { "quarto" } } use 'micarmst/vim-spellsync' -- personal dict improvements for git sync use { -- provide distraction free writing @@ -104,17 +109,18 @@ require("packer").startup(function() integrations = { gitsigns = true, lualine = true, - tmux = {global = false}, + tmux = { global = false }, limelight = true } }) end } - use {'junegunn/limelight.vim', event = 'BufRead'} -- provide even distraction free-er writing (lowlight paragraphs) + use { 'junegunn/limelight.vim', event = 'BufRead' } -- provide even distraction free-er writing (lowlight paragraphs) use 'alok/notational-fzf-vim' -- quickly search through the wiki -- languages - use {'euclidianAce/BetterLua.vim', ft = 'lua'} -- better syntax highlighting for lua + use { 'euclidianAce/BetterLua.vim', ft = 'lua' } -- better syntax highlighting for lua + use 'aliou/bats.vim' -- enable syntax for bats shell-code testing library -- REPL work use { @@ -134,7 +140,7 @@ require("packer").startup(function() 'hanschen/vim-ipython-cell', -- send code 'cells' to REPL ft = "python", config = function() - vim.g.ipython_cell_highlight_cells_ft = {'python'} + vim.g.ipython_cell_highlight_cells_ft = { 'python' } vim.g.ipython_cell_insert_tag = "## Cell" end } @@ -169,19 +175,19 @@ require("packer").startup(function() use { "nvim-telescope/telescope.nvim", requires = { - {"nvim-lua/popup.nvim"}, {"nvim-lua/plenary.nvim"}, - {"nvim-telescope/telescope-fzf-native.nvim", run = 'make'} + { "nvim-lua/popup.nvim" }, { "nvim-lua/plenary.nvim" }, + { "nvim-telescope/telescope-fzf-native.nvim", run = 'make' } }, config = function() require('plug._telescope') end } use { 'protex/better-digraphs.nvim', - requires = {{"nvim-telescope/telescope.nvim"}} + requires = { { "nvim-telescope/telescope.nvim" } } } -- snippeting - use {"hrsh7th/vim-vsnip", event = "InsertEnter"} -- snippet engine - use {"rafamadriz/friendly-snippets", event = "InsertEnter"} -- many snippets + use { "hrsh7th/vim-vsnip", event = "InsertEnter" } -- snippet engine + use { "rafamadriz/friendly-snippets", event = "InsertEnter" } -- many snippets -- treesitter use { @@ -194,7 +200,7 @@ require("packer").startup(function() use { 'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches config = function() - require'nvim-treesitter.configs'.setup { + require 'nvim-treesitter.configs'.setup { textsubjects = { enable = true, keymaps = { @@ -221,7 +227,7 @@ require("packer").startup(function() use 'ray-x/lsp_signature.nvim' use { 'ray-x/navigator.lua', - requires = {'ray-x/guihua.lua', run = 'cd lua/fzy && make'}, + requires = { 'ray-x/guihua.lua', run = 'cd lua/fzy && make' }, config = function() require('plug._lsp') end } -- and completion