Public Access
removed flash
This commit is contained in:
@@ -68,13 +68,6 @@ for i = 1, 9 do
|
||||
map("n", ("<leader>%d"):format(i), ("<cmd>BufferLineGoToBuffer %d<cr>"):format(i), silent)
|
||||
end
|
||||
|
||||
-- Flash
|
||||
map({ "n", "x", "o" }, "s", function() require("flash").jump() end, { desc = "Flash" })
|
||||
map({ "n", "x", "o" }, "S", function() require("flash").treesitter() end, { desc = "Flash Treesitter" })
|
||||
map("o", "r", function() require("flash").remote() end, { desc = "Remote Flash" })
|
||||
map({ "o", "x" }, "R", function() require("flash").treesitter_search() end, { desc = "Treesitter Search" })
|
||||
map("c", "<c-s>", function() require("flash").toggle() end, { desc = "Toggle Flash Search" })
|
||||
|
||||
-- Spell
|
||||
map("n", "<leader>sc", function()
|
||||
vim.wo.spell = not vim.wo.spell
|
||||
|
||||
+30
-3
@@ -19,7 +19,6 @@ vim.pack.add({
|
||||
{ src = "https://github.com/windwp/nvim-ts-autotag" },
|
||||
{ src = "https://github.com/folke/todo-comments.nvim" },
|
||||
{ src = "https://github.com/stevearc/conform.nvim" },
|
||||
{ src = "https://github.com/folke/flash.nvim" },
|
||||
{ src = "https://github.com/lewis6991/gitsigns.nvim" },
|
||||
{ src = "https://github.com/MeanderingProgrammer/render-markdown.nvim" },
|
||||
{ src = "https://github.com/folke/trouble.nvim" },
|
||||
@@ -38,7 +37,7 @@ vim.api.nvim_set_hl(0, "FlashLabel", { fg = "#1d2021", bg = "#fe8019", bold = tr
|
||||
for _, name in ipairs({
|
||||
"oil", "mini.pick", "mini.extra", "mason", "typst-preview", "nvim-autopairs",
|
||||
"trouble", "gitsigns", "nvim-web-devicons",
|
||||
"mini.ai", "nvim-ts-autotag", "todo-comments", "flash", "cssview",
|
||||
"mini.ai", "nvim-ts-autotag", "todo-comments", "cssview",
|
||||
}) do
|
||||
pcall(function() require(name).setup() end)
|
||||
end
|
||||
@@ -152,8 +151,36 @@ require("nvim-silicon").setup({
|
||||
return vim.fn.fnamemodify(vim.api.nvim_buf_get_name(0), ":t")
|
||||
end,
|
||||
})
|
||||
-- silicon's --tab-width replaces each tab with a fixed number of spaces
|
||||
-- instead of advancing to the next tab stop, so tab-indented files (e.g.
|
||||
-- assembly) come out misaligned. Expand tabs ourselves before shooting.
|
||||
local s = require("nvim-silicon")
|
||||
local function expand_tabs(line, ts)
|
||||
local out, col = {}, 0
|
||||
for i = 1, #line do
|
||||
local ch = line:sub(i, i)
|
||||
if ch == "\t" then
|
||||
local n = ts - (col % ts)
|
||||
out[#out + 1] = string.rep(" ", n)
|
||||
col = col + n
|
||||
else
|
||||
out[#out + 1] = ch
|
||||
col = col + 1
|
||||
end
|
||||
end
|
||||
return table.concat(out)
|
||||
end
|
||||
local orig_format_lines = s.format_lines
|
||||
s.format_lines = function(cmdline, args, options)
|
||||
local lines, cl = orig_format_lines(cmdline, args, options)
|
||||
local ts = vim.bo.tabstop
|
||||
for i, line in ipairs(lines) do
|
||||
lines[i] = expand_tabs(line, ts)
|
||||
end
|
||||
return lines, cl
|
||||
end
|
||||
|
||||
local function silicon_shot(to_clipboard)
|
||||
local s = require("nvim-silicon")
|
||||
s.options.background = silicon_bg[vim.bo.filetype] or "#1d2021"
|
||||
if to_clipboard then s.clip() else s.file() end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user