nvim: Format files
This commit is contained in:
parent
22cfa037df
commit
36d411dafa
2 changed files with 53 additions and 44 deletions
|
@ -136,9 +136,12 @@ cmp.setup({
|
||||||
{ name = 'luasnip', keyword_length = 2 },
|
{ name = 'luasnip', keyword_length = 2 },
|
||||||
{ name = 'pandoc_references' },
|
{ name = 'pandoc_references' },
|
||||||
{ name = 'nvim_lua' },
|
{ 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 = 'calc' },
|
||||||
{ name = 'path' },
|
{ name = 'path' },
|
||||||
{ name = 'buffer', keyword_length = 3 },
|
{ name = 'buffer', keyword_length = 3 },
|
||||||
|
@ -150,7 +153,7 @@ cmp.setup({
|
||||||
{ name = 'vCard' },
|
{ name = 'vCard' },
|
||||||
},
|
},
|
||||||
mapping = cmp.mapping.preset.insert({
|
mapping = cmp.mapping.preset.insert({
|
||||||
['<C-b>'] = cmp.mapping.scroll_docs( -4),
|
['<C-b>'] = cmp.mapping.scroll_docs(-4),
|
||||||
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
['<C-f>'] = cmp.mapping.scroll_docs(4),
|
||||||
["<CR>"] = cmp.mapping({
|
["<CR>"] = cmp.mapping({
|
||||||
i = function(fallback)
|
i = function(fallback)
|
||||||
|
@ -179,8 +182,8 @@ cmp.setup({
|
||||||
["<S-Tab>"] = cmp.mapping(function(fallback)
|
["<S-Tab>"] = cmp.mapping(function(fallback)
|
||||||
if cmp.visible() then
|
if cmp.visible() then
|
||||||
cmp.select_prev_item()
|
cmp.select_prev_item()
|
||||||
elseif luasnip.jumpable( -1) then
|
elseif luasnip.jumpable(-1) then
|
||||||
luasnip.jump( -1)
|
luasnip.jump(-1)
|
||||||
else
|
else
|
||||||
fallback()
|
fallback()
|
||||||
end
|
end
|
||||||
|
@ -194,17 +197,17 @@ cmp.setup({
|
||||||
vim_item.kind = string.format('%s', kind_icons[vim_item.kind])
|
vim_item.kind = string.format('%s', kind_icons[vim_item.kind])
|
||||||
-- Source
|
-- Source
|
||||||
vim_item.menu = ({
|
vim_item.menu = ({
|
||||||
buffer = "[Buf]",
|
buffer = "[Buf]",
|
||||||
calc = "[Cal]",
|
calc = "[Cal]",
|
||||||
digraphs = "[Dig]",
|
digraphs = "[Dig]",
|
||||||
latex_symbols = "[LaTeX]",
|
latex_symbols = "[LaTeX]",
|
||||||
luasnip = "[Snip]",
|
luasnip = "[Snip]",
|
||||||
nvim_lsp = "[Lsp]",
|
nvim_lsp = "[Lsp]",
|
||||||
nvim_lua = "[Lua]",
|
nvim_lua = "[Lua]",
|
||||||
pandoc_references = "[Bib]",
|
pandoc_references = "[Bib]",
|
||||||
spell = "[Spl]",
|
spell = "[Spl]",
|
||||||
vCard = "[vCrd]",
|
vCard = "[vCrd]",
|
||||||
})[entry.source.name]
|
})[entry.source.name]
|
||||||
return vim_item
|
return vim_item
|
||||||
end
|
end
|
||||||
},
|
},
|
||||||
|
|
|
@ -4,13 +4,13 @@ return {
|
||||||
-- vim plugs
|
-- vim plugs
|
||||||
-- essential
|
-- essential
|
||||||
{ 'numToStr/Navigator.nvim', branch = "master", config = true }, -- allow seamless navigation between vim buffers and tmux/wezterm splits
|
{ '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
|
{ '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
|
{ '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
|
{ 'ggandor/lightspeed.nvim', event = "VeryLazy" }, -- jump between letters with improved fFtT quicksearch, mimics sneak
|
||||||
-- files
|
-- 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 },
|
opts = { numhl = true, signcolumn = false },
|
||||||
event = "BufRead"
|
event = "BufRead"
|
||||||
}, {
|
}, {
|
||||||
|
@ -25,10 +25,10 @@ return {
|
||||||
'mhartington/formatter.nvim', -- auto formatting on save
|
'mhartington/formatter.nvim', -- auto formatting on save
|
||||||
config = function() require('plug._format') end,
|
config = function() require('plug._format') end,
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, -- editing
|
}, -- editing
|
||||||
{ 'kylechui/nvim-surround', version = '*', config = true, event = "VeryLazy" }, -- surround things with other things using ys/cs/ds
|
{ '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()
|
config = function()
|
||||||
local augend = require("dial.augend")
|
local augend = require("dial.augend")
|
||||||
require("dial.config").augends:register_group {
|
require("dial.config").augends:register_group {
|
||||||
|
@ -44,15 +44,15 @@ return {
|
||||||
augend.constant.alias.Alpha, augend.constant.alias.alpha,
|
augend.constant.alias.Alpha, augend.constant.alias.alpha,
|
||||||
augend.hexcolor.new { case = "lower" }, augend.constant.new {
|
augend.hexcolor.new { case = "lower" }, augend.constant.new {
|
||||||
elements = { "and", "or" },
|
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".
|
cyclic = true -- "or" is incremented into "and".
|
||||||
},
|
},
|
||||||
augend.constant
|
augend.constant
|
||||||
.new {
|
.new {
|
||||||
elements = { "&&", "||" },
|
elements = { "&&", "||" },
|
||||||
word = false,
|
word = false,
|
||||||
cyclic = true
|
cyclic = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
end,
|
end,
|
||||||
|
@ -61,7 +61,7 @@ return {
|
||||||
'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch
|
'tommcdo/vim-exchange', -- adds exchange operator with cx. common use: cxiw . on 2 words to switch
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, {
|
}, {
|
||||||
'junegunn/vim-easy-align', -- Align tables and other alignable things
|
'junegunn/vim-easy-align', -- Align tables and other alignable things
|
||||||
event = "VeryLazy"
|
event = "VeryLazy"
|
||||||
}, { 'edKotinsky/Arduino.nvim', ft = 'arduino', config = true }, -- statusline
|
}, { 'edKotinsky/Arduino.nvim', ft = 'arduino', config = true }, -- statusline
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ return {
|
||||||
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
requires = { 'kyazdani42/nvim-web-devicons', opt = true },
|
||||||
config = function() require('plug._lualine') end
|
config = function() require('plug._lualine') end
|
||||||
}, -- writing
|
}, -- writing
|
||||||
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
|
{ 'vim-pandoc/vim-criticmarkup', ft = writing_ft }, {
|
||||||
'mickael-menu/zk-nvim',
|
'mickael-menu/zk-nvim',
|
||||||
config = function() require('zk').setup({ picker = "telescope" }) end
|
config = function() require('zk').setup({ picker = "telescope" }) end
|
||||||
}, {
|
}, {
|
||||||
|
@ -84,7 +84,8 @@ return {
|
||||||
'quarto-dev/quarto-nvim',
|
'quarto-dev/quarto-nvim',
|
||||||
dependencies = {
|
dependencies = {
|
||||||
'jmbuhr/otter.nvim', 'neovim/nvim-lspconfig',
|
'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()
|
config = function()
|
||||||
require 'quarto'.setup {
|
require 'quarto'.setup {
|
||||||
|
@ -109,18 +110,23 @@ return {
|
||||||
desc = "Inspect object in kernel"
|
desc = "Inspect object in kernel"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync
|
}, { 'micarmst/vim-spellsync', event = "VeryLazy" }, -- personal dict improvements for git sync
|
||||||
{ 'folke/zen-mode.nvim', config = true, event = "VeryLazy" }, -- provide distraction free writing
|
{ '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)
|
{ '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
|
|
||||||
{
|
{
|
||||||
"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,
|
build = function() vim.fn["mkdp#util#install"]() end,
|
||||||
ft = writing_ft
|
ft = writing_ft
|
||||||
}, -- languages
|
}, -- languages
|
||||||
{ 'euclidianAce/BetterLua.vim', ft = 'lua' }, -- better syntax highlighting for lua
|
{ '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
|
{ 'aliou/bats.vim', ft = { "bash", "sh", "zsh", "bats" } }, -- enable syntax for bats shell-code testing library
|
||||||
|
|
||||||
-- REPL work
|
-- REPL work
|
||||||
{
|
{
|
||||||
|
@ -172,7 +178,7 @@ return {
|
||||||
},
|
},
|
||||||
{ 'nvim-treesitter/playground', cmd = "TSPlaygroundToggle" }, -- interactively view and query the treesitter tree
|
{ '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()
|
config = function()
|
||||||
require 'nvim-treesitter.configs'.setup {
|
require 'nvim-treesitter.configs'.setup {
|
||||||
textsubjects = {
|
textsubjects = {
|
||||||
|
@ -226,7 +232,7 @@ return {
|
||||||
config = function() require('plug._lsp') end,
|
config = function() require('plug._lsp') end,
|
||||||
branch = "v2.x"
|
branch = "v2.x"
|
||||||
}, { 'simrat39/symbols-outline.nvim', config = true, event = "VeryLazy" }, -- vista-like outline view for code
|
}, { '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 }, {
|
{ 'stevearc/dressing.nvim', config = true }, {
|
||||||
'rcarriga/nvim-notify',
|
'rcarriga/nvim-notify',
|
||||||
config = function() vim.notify = require("notify") end
|
config = function() vim.notify = require("notify") end
|
||||||
|
|
Loading…
Reference in a new issue