From 36d411dafa7306bfa6847905570529f34b83caca Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Wed, 22 Mar 2023 10:35:00 +0100 Subject: [PATCH] nvim: Format files --- nvim/.config/nvim/lua/plug/_lsp.lua | 37 ++++++++++-------- nvim/.config/nvim/lua/plugins.lua | 60 ++++++++++++++++------------- 2 files changed, 53 insertions(+), 44 deletions(-) diff --git a/nvim/.config/nvim/lua/plug/_lsp.lua b/nvim/.config/nvim/lua/plug/_lsp.lua index ce866a8..ee86304 100644 --- a/nvim/.config/nvim/lua/plug/_lsp.lua +++ b/nvim/.config/nvim/lua/plug/_lsp.lua @@ -136,9 +136,12 @@ cmp.setup({ { name = 'luasnip', keyword_length = 2 }, { name = 'pandoc_references' }, { name = 'nvim_lua' }, - { name = 'beancount', option = { - account = vim.env["HOME"] .. '/documents/records/budget/main.beancount' -- TODO implement dynamically - } }, + { + name = 'beancount', + option = { + account = vim.env["HOME"] .. '/documents/records/budget/main.beancount' -- TODO implement dynamically + } + }, { name = 'calc' }, { name = 'path' }, { name = 'buffer', keyword_length = 3 }, @@ -150,7 +153,7 @@ cmp.setup({ { name = 'vCard' }, }, mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs( -4), + [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [""] = cmp.mapping({ i = function(fallback) @@ -179,8 +182,8 @@ cmp.setup({ [""] = cmp.mapping(function(fallback) if cmp.visible() then cmp.select_prev_item() - elseif luasnip.jumpable( -1) then - luasnip.jump( -1) + elseif luasnip.jumpable(-1) then + luasnip.jump(-1) else fallback() end @@ -194,17 +197,17 @@ cmp.setup({ vim_item.kind = string.format('%s', kind_icons[vim_item.kind]) -- Source vim_item.menu = ({ - buffer = "[Buf]", - calc = "[Cal]", - digraphs = "[Dig]", - latex_symbols = "[LaTeX]", - luasnip = "[Snip]", - nvim_lsp = "[Lsp]", - nvim_lua = "[Lua]", - pandoc_references = "[Bib]", - spell = "[Spl]", - vCard = "[vCrd]", - })[entry.source.name] + buffer = "[Buf]", + calc = "[Cal]", + digraphs = "[Dig]", + latex_symbols = "[LaTeX]", + luasnip = "[Snip]", + nvim_lsp = "[Lsp]", + nvim_lua = "[Lua]", + pandoc_references = "[Bib]", + spell = "[Spl]", + vCard = "[vCrd]", + })[entry.source.name] return vim_item end }, diff --git a/nvim/.config/nvim/lua/plugins.lua b/nvim/.config/nvim/lua/plugins.lua index e3c96bc..d833ab9 100644 --- a/nvim/.config/nvim/lua/plugins.lua +++ b/nvim/.config/nvim/lua/plugins.lua @@ -4,13 +4,13 @@ return { -- vim plugs -- essential { 'numToStr/Navigator.nvim', branch = "master", config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits - { 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative - { 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank - { 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak + { 'jeffkreeftmeijer/vim-numbertoggle', event = "BufEnter" }, -- toggles numbers to absolute for all buffers but the current which is relative + { 'ojroques/vim-oscyank', event = "VeryLazy" }, -- yank from *anywhere* (even ssh session) to clipboard, using :OSCYank + { 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak -- files - { 'vifm/vifm.vim' }, -- integrate file manager + { 'vifm/vifm.vim' }, -- integrate file manager { - 'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter + 'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter opts = { numhl = true, signcolumn = false }, event = "BufRead" }, { @@ -25,10 +25,10 @@ return { 'mhartington/formatter.nvim', -- auto formatting on save config = function() require('plug._format') end, event = "VeryLazy" -}, -- editing +}, -- editing { 'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy" }, -- surround things with other things using ys/cs/ds { - 'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers + 'monaqa/dial.nvim', -- extend the ^a / ^x possibilities to dates, hex, alphabets, markdown headers config = function() local augend = require("dial.augend") require("dial.config").augends:register_group { @@ -44,15 +44,15 @@ return { augend.constant.alias.Alpha, augend.constant.alias.alpha, augend.hexcolor.new { case = "lower" }, augend.constant.new { elements = { "and", "or" }, - word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. + word = true, -- if false, "sand" is incremented into "sor", "doctor" into "doctand", etc. cyclic = true -- "or" is incremented into "and". }, augend.constant - .new { - elements = { "&&", "||" }, - word = false, - cyclic = true - } + .new { + elements = { "&&", "||" }, + word = false, + cyclic = true + } } } end, @@ -61,7 +61,7 @@ return { 'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch event = "VeryLazy" }, { - 'junegunn/vim-easy-align', -- Align tables and other alignable things + 'junegunn/vim-easy-align', -- Align tables and other alignable things event = "VeryLazy" }, { 'edKotinsky/Arduino.nvim', ft = 'arduino', config = true }, -- statusline { @@ -69,7 +69,7 @@ return { requires = { 'kyazdani42/nvim-web-devicons', opt = true }, config = function() require('plug._lualine') end }, -- writing - { 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, { + { 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, { 'mickael-menu/zk-nvim', config = function() require('zk').setup({ picker = "telescope" }) end }, { @@ -84,7 +84,8 @@ return { 'quarto-dev/quarto-nvim', dependencies = { 'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig', - 'vim-pandoc/vim-pandoc-syntax' + 'vim-pandoc/vim-pandoc-syntax', 'hrsh7th/nvim-cmp', + 'nvim-treesitter/nvim-treesitter' }, config = function() require 'quarto'.setup { @@ -109,18 +110,23 @@ return { desc = "Inspect object in kernel" } } -}, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync - { 'folke/zen-mode.nvim', config = true, event = "VeryLazy" }, -- provide distraction free writing - { 'folke/twilight.nvim', event = "VeryLazy" }, -- provide even distraction free-er writing (lowlight paragraphs) - { 'JellyApple102/easyread.nvim', config = true, ft = writing_ft, cmd = 'EasyreadToggle' }, -- enable 'speed-reading' mode (bionic reading) - { 'marty-oehme/zettelkasten.nvim', ft = writing_ft, event = "VeryLazy" }, -- simple static markdown linking +}, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync + { 'folke/zen-mode.nvim', config = true, event = "VeryLazy" }, -- provide distraction free writing + { 'folke/twilight.nvim', event = "VeryLazy" }, -- provide even distraction free-er writing (lowlight paragraphs) { - "iamcco/markdown-preview.nvim", -- generate an auto-updating html preview for md files + 'JellyApple102/easyread.nvim', + config = true, + ft = writing_ft, + cmd = 'EasyreadToggle' + }, -- enable 'speed-reading' mode (bionic reading) + { 'marty-oehme/zettelkasten.nvim', ft = writing_ft, event = "VeryLazy" }, -- simple static markdown linking + { + "iamcco/markdown-preview.nvim", -- generate an auto-updating html preview for md files build = function() vim.fn["mkdp#util#install"]() end, ft = writing_ft - }, -- languages - { 'euclidianAce/BetterLua.vim', ft = 'lua' }, -- better syntax highlighting for lua - { 'aliou/bats.vim', ft = { "bash", "sh", "zsh", "bats" } }, -- enable syntax for bats shell-code testing library + }, -- languages + { 'euclidianAce/BetterLua.vim', ft = 'lua' }, -- better syntax highlighting for lua + { 'aliou/bats.vim', ft = { "bash", "sh", "zsh", "bats" } }, -- enable syntax for bats shell-code testing library -- REPL work { @@ -172,7 +178,7 @@ return { }, { 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree { - 'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches + 'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches config = function() require 'nvim-treesitter.configs'.setup { textsubjects = { @@ -226,7 +232,7 @@ return { config = function() require('plug._lsp') end, branch = "v2.x" }, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code - { 'ray-x/lsp_signature.nvim', config = true }, -- UI improvements + { 'ray-x/lsp_signature.nvim', config = true }, -- UI improvements { 'stevearc/dressing.nvim', config = true }, { 'rcarriga/nvim-notify', config = function() vim.notify = require("notify") end