dotfiles/nvim/.config/nvim/lua/plugins.lua
Marty Oehme e6d7578198
nvim: Switch from cmp-pandoc to cmp-pandoc-references
cmp-pandoc.nvim did not work sufficiently for my use case so far
(sometimes it did, most of the times it did not at all, every now and
again it sputtered some references to the list).

cmp-pandoc-references seems like a plugin kept relatively 'simple'
requiring no setup, a single `bibliography: ` line in the pandoc
meta-data header and it works flawlessly from there. I might delve
deeper at some point, especially with the papis.nvim integration, but
for now this is perfectly adequate.
2023-02-27 08:48:09 +01:00

197 lines
8.9 KiB
Lua

local writing_ft = { "quarto", "pandoc", "markdown", "text", "tex" }
return {
-- vim plugs
-- essential
{ 'numToStr/Navigator.nvim', 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
-- files
{ 'vifm/vifm.vim' }, -- integrate file manager
{
'lewis6991/gitsigns.nvim', -- show vcs changes on left-hand gutter
config = true,
event = "BufRead"
}, {
'norcalli/nvim-colorizer.lua', -- color hex, named colors in the correct preview scheme
config = true,
event = "VeryLazy"
}, {
'mhartington/formatter.nvim', -- auto formatting on save
config = function() require('plug._format') end,
event = "VeryLazy"
}, -- 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
config = function()
local augend = require("dial.augend")
require("dial.config").augends:register_group {
-- default augends used when no group name is specified
default = {
augend.integer.alias.decimal, augend.integer.alias.hex,
augend.date.alias["%Y/%m/%d"],
augend.date.alias["%Y-%m-%d"], augend.date.alias["%m/%d"],
augend.date.alias["%H:%M:%S"], augend.date.alias["%H:%M"],
augend.constant.alias.de_weekday_full,
augend.constant.alias.de_weekday,
augend.constant.alias.bool, augend.semver.alias.semver,
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.
cyclic = true -- "or" is incremented into "and".
},
augend.constant
.new {
elements = { "&&", "||" },
word = false,
cyclic = true
}
}
}
end,
event = "VeryLazy"
}, {
'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
event = "VeryLazy"
}, -- colorschemes
{ 'norcalli/nvim-base16.lua' }, --
-- statusline
{
'nvim-lualine/lualine.nvim',
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
config = function() require('plug._lualine') end
}, -- writing
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
'mickael-menu/zk-nvim',
config = function() require('zk').setup({ picker = "telescope" }) end
}, {
'quarto-dev/quarto-nvim',
dependencies = {
'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig',
'vim-pandoc/vim-pandoc-syntax'
},
config = function()
require 'quarto'.setup {
lspFeatures = {
enabled = true,
languages = { 'r', 'python', 'julia' },
diagnostics = { enabled = true, triggers = { "BufWrite" } },
completion = { enabled = true }
}
}
end,
ft = writing_ft
}, { '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)
{ '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
-- REPL work
{
'WhiteBlackGoose/magma-nvim-goose',
build = ":UpdateRemotePlugins",
config = function()
vim.g.magma_image_provider = "kitty"
vim.g.magma_automatically_open_output = false
end
}, -- nvim plugs
{
'echasnovski/mini.nvim',
version = '*',
config = function() require('plug._mini') end
}, {
"akinsho/nvim-toggleterm.lua", -- simpler, programmable and multiple terminal toggling for nvim
config = function() require('plug._toggleterm') end,
event = "BufWinEnter"
},
{
"folke/which-key.nvim",
config = function() require("which-key").setup {} end
}, -- fuzzy matching
{ "nvim-telescope/telescope-fzf-native.nvim", build = 'make' }, {
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/popup.nvim", "nvim-lua/plenary.nvim" },
config = function() require('plug._telescope') end
}, -- treesitter
{
'nvim-treesitter/nvim-treesitter',
build = ':TSUpdate',
config = function() require('plug._treesitter') end
}, { 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree
{ 'romgrk/nvim-treesitter-context', event = "BufReadPre", config = true }, -- show current cursor context at top of buffer
{
'RRethy/nvim-treesitter-textsubjects', -- allows using . and ; to target treesitter branches
config = function()
require 'nvim-treesitter.configs'.setup {
textsubjects = {
enable = true,
keymaps = {
['.'] = 'textsubjects-smart',
[';'] = 'textsubjects-container-outer'
}
}
}
end,
event = "BufReadPre"
}, { 'p00f/nvim-ts-rainbow', event = "BufReadPre" }, -- rainbow brackets using treesitter
{ 'JoosepAlviste/nvim-ts-context-commentstring', event = "BufReadPre" }, -- improves commenting plugin above by using ts
{
'lewis6991/spellsitter.nvim', -- uses treesitter to highlight spelling errors
config = function() require('spellsitter').setup() end,
event = "BufReadPre"
}, -- lsp
{
"VonHeikemen/lsp-zero.nvim",
dependencies = {
"neovim/nvim-lspconfig", "williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim", "hrsh7th/nvim-cmp",
"hrsh7th/cmp-buffer", "hrsh7th/cmp-path",
"saadparwaiz1/cmp_luasnip", "hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lua", "L3MON4D3/LuaSnip",
"rafamadriz/friendly-snippets", "andersevenrud/cmp-tmux",
"hrsh7th/cmp-nvim-lsp", "kdheepak/cmp-latex-symbols",
"ray-x/cmp-treesitter", "f3fora/cmp-spell", "hrsh7th/cmp-cmdline",
"cbarrete/completion-vcard", "jc-doyle/cmp-pandoc-references",
{ "lukas-reineke/lsp-format.nvim", config = true }
},
config = function() require('plug._cmp') end
}, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code
{ 'ray-x/lsp_signature.nvim', event = "VeryLazy" },
{ 'ray-x/guihua.lua', build = 'cd lua/fzy && make', event = "VeryLazy" }, {
'ray-x/navigator.lua',
config = function() require('plug._lsp') end,
event = "VeryLazy"
} -- and completion
-- { -- REQUIRES custom `yay -S --asdeps lua51-lyaml invocation` AND is suuper slow
-- "jghauser/papis.nvim",
-- after = { "telescope.nvim", "nvim-cmp" },
-- dependencies = {
-- "kkharji/sqlite.lua", "nvim-lua/plenary.nvim",
-- "MunifTanjim/nui.nvim", "nvim-treesitter/nvim-treesitter"
-- },
-- ft = writing_ft,
-- rocks = { "lyaml" },
-- config = function()
-- require('papis').setup({
-- papis_python = {
-- dir = "/home/marty/documents/library/academia",
-- info_name = "info.yaml",
-- notes_name = [[notes.qmd]]
-- }
-- })
-- end
-- }
}