Compare commits
No commits in common. "168475a988d57ab78eb54ff525d663e596cfd7ce" and "be9b5b9297e16628332d62b2f1758deb018cd8d0" have entirely different histories.
168475a988
...
be9b5b9297
3 changed files with 4 additions and 60 deletions
|
|
@ -86,7 +86,6 @@
|
||||||
"rainbow-delimiters.nvim": { "branch": "master", "commit": "1ab18259472d9fe5756750fec722c31bab1712da" },
|
"rainbow-delimiters.nvim": { "branch": "master", "commit": "1ab18259472d9fe5756750fec722c31bab1712da" },
|
||||||
"render-markdown.nvim": { "branch": "main", "commit": "6d03af10063d5a2fadec3559de5dfa68da7d00ef" },
|
"render-markdown.nvim": { "branch": "main", "commit": "6d03af10063d5a2fadec3559de5dfa68da7d00ef" },
|
||||||
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
|
"smartcolumn.nvim": { "branch": "main", "commit": "d01b99355c7fab13233f48d0f28dc097e68a03f7" },
|
||||||
"stay-centered.nvim": { "branch": "main", "commit": "e1a63ccaf2584e97c0ef8e64f9654c9a80d983f6" },
|
|
||||||
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
|
"stickybuf.nvim": { "branch": "master", "commit": "2160fcd536d81f5fa43f7167dba6634e814e3154" },
|
||||||
"texpresso.vim": { "branch": "main", "commit": "907838c08bbf99ad6bed3c908f1d0551a92ab4e0" },
|
"texpresso.vim": { "branch": "main", "commit": "907838c08bbf99ad6bed3c908f1d0551a92ab4e0" },
|
||||||
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
"todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
|
||||||
|
|
|
||||||
|
|
@ -210,45 +210,8 @@ return {
|
||||||
"echasnovski/mini.nvim",
|
"echasnovski/mini.nvim",
|
||||||
event = { "InsertEnter", "VeryLazy" },
|
event = { "InsertEnter", "VeryLazy" },
|
||||||
config = function()
|
config = function()
|
||||||
local ai = require("mini.ai")
|
-- manually create lazy loading scenarios
|
||||||
local function ai_buffer(ai_type)
|
require("mini.ai").setup()
|
||||||
local start_line, end_line = 1, vim.fn.line("$")
|
|
||||||
if ai_type == "i" then
|
|
||||||
-- Skip first and last blank lines for `i` textobject
|
|
||||||
local first_nonblank, last_nonblank = vim.fn.nextnonblank(start_line), vim.fn.prevnonblank(end_line)
|
|
||||||
-- Do nothing for buffer with all blanks
|
|
||||||
if first_nonblank == 0 or last_nonblank == 0 then
|
|
||||||
return { from = { line = start_line, col = 1 } }
|
|
||||||
end
|
|
||||||
start_line, end_line = first_nonblank, last_nonblank
|
|
||||||
end
|
|
||||||
|
|
||||||
local to_col = math.max(vim.fn.getline(end_line):len(), 1)
|
|
||||||
return { from = { line = start_line, col = 1 }, to = { line = end_line, col = to_col } }
|
|
||||||
end
|
|
||||||
ai.setup({
|
|
||||||
custom_textobjects = {
|
|
||||||
c = ai.gen_spec.treesitter({ a = "@class.outer", i = "@class.inner" }), -- class
|
|
||||||
d = { "%f[%d]%d+" }, -- digits
|
|
||||||
e = { -- single part of MultiCaseWords
|
|
||||||
{
|
|
||||||
"%u[%l%d]+%f[^%l%d]",
|
|
||||||
"%f[%S][%l%d]+%f[^%l%d]",
|
|
||||||
"%f[%P][%l%d]+%f[^%l%d]",
|
|
||||||
"^[%l%d]+%f[^%l%d]",
|
|
||||||
},
|
|
||||||
"^().*()$",
|
|
||||||
},
|
|
||||||
f = ai.gen_spec.treesitter({ a = "@function.outer", i = "@function.inner" }), -- function
|
|
||||||
g = ai_buffer, -- buffer with or without whitespace
|
|
||||||
o = ai.gen_spec.treesitter({ -- current 'codeblock'
|
|
||||||
a = { "@block.outer", "@conditional.outer", "@loop.outer" },
|
|
||||||
i = { "@block.inner", "@conditional.inner", "@loop.inner" },
|
|
||||||
}),
|
|
||||||
u = ai.gen_spec.function_call(), -- function [u]sage
|
|
||||||
U = ai.gen_spec.function_call({ name_pattern = "[%w_]" }), -- function [U]sage of last dot element
|
|
||||||
},
|
|
||||||
})
|
|
||||||
-- Align tables and other alignable things
|
-- Align tables and other alignable things
|
||||||
require("mini.align").setup({})
|
require("mini.align").setup({})
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,28 +33,10 @@ local prose_plugs = {
|
||||||
"folke/zen-mode.nvim",
|
"folke/zen-mode.nvim",
|
||||||
config = true,
|
config = true,
|
||||||
cmd = { "ZenMode" },
|
cmd = { "ZenMode" },
|
||||||
dependencies = { "folke/twilight.nvim", { "arnamak/stay-centered.nvim", opts = { enabled = false } } },
|
dependencies = { "folke/twilight.nvim" },
|
||||||
keys = {
|
keys = {
|
||||||
{
|
{
|
||||||
"[sz",
|
"[sz",
|
||||||
function()
|
|
||||||
require("zen-mode").close()
|
|
||||||
require("stay-centered").disable()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
desc = "stop center zen mode",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"]sz",
|
|
||||||
function()
|
|
||||||
require("zen-mode").open()
|
|
||||||
require("stay-centered").enable()
|
|
||||||
end,
|
|
||||||
silent = true,
|
|
||||||
desc = "start center zen mode",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"[sZ",
|
|
||||||
function()
|
function()
|
||||||
require("zen-mode").close()
|
require("zen-mode").close()
|
||||||
end,
|
end,
|
||||||
|
|
@ -62,7 +44,7 @@ local prose_plugs = {
|
||||||
desc = "stop zen mode",
|
desc = "stop zen mode",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"]sZ",
|
"]sz",
|
||||||
function()
|
function()
|
||||||
require("zen-mode").open()
|
require("zen-mode").open()
|
||||||
end,
|
end,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue