summaryrefslogtreecommitdiff
path: root/plugin/plugins
diff options
context:
space:
mode:
authorMohammad Reza Karimi <m.r.karimi.j@gmail.com>2026-01-20 15:55:27 -0500
committerMohammad Reza Karimi <m.r.karimi.j@gmail.com>2026-01-20 15:55:27 -0500
commitaa5717f00fd14430c80939a68d7107c26de6e554 (patch)
tree784e99d9b018e0554369c41cb33e2e195e28d3c6 /plugin/plugins
first commit
Diffstat (limited to 'plugin/plugins')
-rw-r--r--plugin/plugins/alacritty.lua4
-rw-r--r--plugin/plugins/conform.lua20
-rw-r--r--plugin/plugins/mini.lua37
-rw-r--r--plugin/plugins/oil.lua76
-rw-r--r--plugin/plugins/quicker.lua14
-rw-r--r--plugin/plugins/rendermark.lua11
-rw-r--r--plugin/plugins/scratch.vim15
-rw-r--r--plugin/plugins/vimtex.lua21
8 files changed, 198 insertions, 0 deletions
diff --git a/plugin/plugins/alacritty.lua b/plugin/plugins/alacritty.lua
new file mode 100644
index 0000000..f6a323d
--- /dev/null
+++ b/plugin/plugins/alacritty.lua
@@ -0,0 +1,4 @@
+local ok, alacritty = pcall(require, "alacritty")
+if not ok then return end
+
+alacritty.setup()
diff --git a/plugin/plugins/conform.lua b/plugin/plugins/conform.lua
new file mode 100644
index 0000000..7dfcbb7
--- /dev/null
+++ b/plugin/plugins/conform.lua
@@ -0,0 +1,20 @@
+---@diagnostic disable: param-type-mismatch
+
+require("conform").setup({
+ formatters_by_ft = {
+ lua = { "stylua" },
+ python = { "ruff_format" },
+ rust = { "rustfmt", lsp_format = "fallback" },
+ bash = { "shfmt" },
+ sh = { "shfmt" },
+ tex = { "latexindent" },
+ },
+ formatters = {
+ shfmt = {
+ append_args = { "-i", "4", "-fn" },
+ },
+ latexindent = {
+ append_args = { "-m", "-l" },
+ },
+ },
+})
diff --git a/plugin/plugins/mini.lua b/plugin/plugins/mini.lua
new file mode 100644
index 0000000..24027e0
--- /dev/null
+++ b/plugin/plugins/mini.lua
@@ -0,0 +1,37 @@
+require("mini.notify").setup({
+ lsp_progress = { enable = false },
+})
+
+local misc = require("mini.misc")
+misc.setup_restore_cursor()
+misc.setup_termbg_sync()
+
+vim.schedule(function()
+ local snippets = require("mini.snippets")
+ snippets.setup({
+ snippets = {
+ snippets.gen_loader.from_lang(),
+ },
+ })
+ local fin_stop = function(args)
+ if args.data.tabstop_to == "0" then snippets.session.stop() end
+ end
+ local au_opts = { pattern = "MiniSnippetsSessionJump", callback = fin_stop }
+ vim.api.nvim_create_autocmd("User", au_opts)
+end)
+
+vim.schedule(function()
+ local hipatterns = require("mini.hipatterns")
+ hipatterns.setup({
+ highlighters = {
+ fixme = { pattern = "FIXME", group = "MiniHipatternsFixme" },
+ todo = { pattern = "TODO", group = "MiniHipatternsTodo" },
+ note = { pattern = "NOTE", group = "MiniHipatternsNote" },
+ hex_color = hipatterns.gen_highlighter.hex_color(),
+ },
+ })
+end)
+
+vim.schedule(function()
+ require("mini.icons").setup()
+end)
diff --git a/plugin/plugins/oil.lua b/plugin/plugins/oil.lua
new file mode 100644
index 0000000..edb3c50
--- /dev/null
+++ b/plugin/plugins/oil.lua
@@ -0,0 +1,76 @@
+require("oil").setup({
+ default_file_explorer = true,
+ columns = {
+ "permissions",
+ "size",
+ -- "mtime",
+ },
+ buf_options = {
+ buflisted = false,
+ bufhidden = "hide",
+ },
+ win_options = {
+ wrap = false,
+ signcolumn = "no",
+ cursorcolumn = false,
+ foldcolumn = "0",
+ spell = false,
+ list = false,
+ conceallevel = 3,
+ concealcursor = "nvic",
+ },
+ delete_to_trash = false,
+ skip_confirm_for_simple_edits = false,
+ prompt_save_on_select_new_entry = true,
+ cleanup_delay_ms = 2000,
+ lsp_file_methods = {
+ enabled = true,
+ timeout_ms = 1000,
+ autosave_changes = false,
+ },
+ constrain_cursor = "editable",
+ watch_for_changes = false,
+ keymaps = {
+ ["g?"] = { "actions.show_help", mode = "n" },
+ ["<CR>"] = "actions.select",
+ ["<M-s>"] = { "actions.select", opts = { vertical = true } },
+ ["<M-h>"] = { "actions.select", opts = { horizontal = true } },
+ ["<M-t>"] = { "actions.select", opts = { tab = true } },
+ ["<C-p>"] = false,
+ ["<C-c>"] = { "actions.close", mode = "n" },
+ ["<C-l>"] = "actions.refresh",
+ ["-"] = { "actions.parent", mode = "n" },
+ ["_"] = { "actions.open_cwd", mode = "n" },
+ ["`"] = { "actions.cd", mode = "n" },
+ ["g~"] = { "actions.cd", opts = { scope = "tab" }, mode = "n" },
+ ["gs"] = false,
+ ["gx"] = "actions.open_external",
+ ["zh"] = { "actions.toggle_hidden", mode = "n" },
+ ["gt"] = "actions.open_terminal",
+ ["<Leader>Y"] = require("mo.oil-util").copy_to_clipboard,
+ ["<Leader>y"] = function() require("mo.oil-util").copy_to_clipboard({ full_path = false }) end,
+ ["<Leader>:"] = {
+ "actions.open_cmdline",
+ opts = { shorten_path = true, modify = ":h" },
+ },
+ ["<Leader>;"] = {
+ "actions.open_cmdline",
+ opts = { shorten_path = true },
+ },
+ },
+ use_default_keymaps = false,
+ view_options = {
+ show_hidden = false,
+ is_hidden_file = function(name, _bufnr)
+ local m = name:match("^%.")
+ return m ~= nil
+ end,
+ is_always_hidden = function(_name, _bufnr) return false end,
+ natural_order = "fast",
+ case_insensitive = false,
+ sort = {
+ { "type", "asc" },
+ { "name", "asc" },
+ },
+ },
+} --[[@as oil.SetupOpts]])
diff --git a/plugin/plugins/quicker.lua b/plugin/plugins/quicker.lua
new file mode 100644
index 0000000..05a537e
--- /dev/null
+++ b/plugin/plugins/quicker.lua
@@ -0,0 +1,14 @@
+require("quicker").setup({
+ keys = {
+ {
+ ">",
+ "<cmd>lua require('quicker').expand()<CR>",
+ desc = "Expand quickfix content",
+ },
+ {
+ "<",
+ "<cmd>lua require('quicker').shrink()<CR>",
+ desc = "Shrink quickfix content",
+ },
+ },
+})
diff --git a/plugin/plugins/rendermark.lua b/plugin/plugins/rendermark.lua
new file mode 100644
index 0000000..24e2d16
--- /dev/null
+++ b/plugin/plugins/rendermark.lua
@@ -0,0 +1,11 @@
+-- vim.api.nvim_create_autocmd("FileType", {
+-- pattern = { "markdown" },
+-- once = true,
+-- callback = function()
+-- vim.cmd([[ packadd render-markdown.nvim ]])
+-- require("render-markdown").setup({
+-- enabled = false,
+-- ignore = function(buf) return vim.bo[buf].buftype ~= "nofile" end
+-- })
+-- end,
+-- })
diff --git a/plugin/plugins/scratch.vim b/plugin/plugins/scratch.vim
new file mode 100644
index 0000000..059a21b
--- /dev/null
+++ b/plugin/plugins/scratch.vim
@@ -0,0 +1,15 @@
+if exists('g:loaded_scratch')
+ finish
+endif
+let g:loaded_scratch = 1
+
+command! -nargs=1 -complete=command Scratch call scratch#open(<q-args>, <q-mods>)
+command! -nargs=? Marks <mods> Scratch marks <args>
+command! -nargs=0 Messages <mods> Scratch messages
+command! -nargs=? Registers <mods> Scratch registers <args>
+command! -nargs=? Display <mods> Scratch display <args>
+command! -nargs=? -complete=highlight Highlight <mods> Scratch highlight <args>
+command! -nargs=0 Jumps <mods> Scratch jumps
+command! -nargs=0 Changes <mods> Scratch changes
+command! -nargs=0 Digraphs <mods> Scratch digraphs
+command! -nargs=0 Scriptnames <mods> Scratch scriptnames
diff --git a/plugin/plugins/vimtex.lua b/plugin/plugins/vimtex.lua
new file mode 100644
index 0000000..05dfa3a
--- /dev/null
+++ b/plugin/plugins/vimtex.lua
@@ -0,0 +1,21 @@
+vim.g.tex_flavor = "latex"
+vim.g.vimtex_compiler_silent = 0
+vim.g.vimtex_complete_bib = { simple = 0 }
+vim.g.vimtex_doc_handlers = { "vimtex#doc#handlers#texdoc" }
+vim.g.vimtex_format_enabled = 0
+vim.g.vimtex_include_search_enabled = 1
+vim.g.vimtex_indent_on_ampersands = 0
+vim.g.vimtex_quickfix_ignore_filters = {
+ "Generic hook",
+ "Package hyperref Warning: Token not allowed in a PDF string",
+ "destination with the same identifier",
+ "LaTeX Font Warning:",
+}
+vim.g.vimtex_quickfix_open_on_warning = 0
+vim.g.vimtex_syntax_conceal_disabled = 1
+vim.g.vimtex_syntax_enabled = 1
+vim.g.vimtex_view_automatic = 0
+vim.g.vimtex_view_forward_search_on_start = 0
+vim.g.vimtex_view_method = "zathura_simple"
+
+vim.cmd([[packadd vimtex]])