summaryrefslogtreecommitdiff
path: root/lua/plugins
diff options
context:
space:
mode:
authorbee <beebeeb5k@gmail.com>2026-05-05 22:37:10 +0530
committerbee <beebeeb5k@gmail.com>2026-05-05 22:37:10 +0530
commit9365a8e96827cbf7bc5adad6d29bcd05b4d761b2 (patch)
tree0998a5dcfc4517e4112a2c589e04ac0dbc1e011b /lua/plugins
parent0c50f17133b90c60735f1f51943f51f60372bdd3 (diff)
Migrate from nixcats to nix-wrapper-modules
Diffstat (limited to 'lua/plugins')
-rw-r--r--lua/plugins/ai.lua29
-rw-r--r--lua/plugins/completion.lua65
-rw-r--r--lua/plugins/debug.lua90
-rw-r--r--lua/plugins/formatter.lua47
-rw-r--r--lua/plugins/general.lua134
-rw-r--r--lua/plugins/git.lua98
-rw-r--r--lua/plugins/init.lua13
-rw-r--r--lua/plugins/linter.lua40
-rw-r--r--lua/plugins/misc.lua50
-rw-r--r--lua/plugins/picker.lua97
-rw-r--r--lua/plugins/tsitter.lua187
-rw-r--r--lua/plugins/ui.lua86
12 files changed, 0 insertions, 936 deletions
diff --git a/lua/plugins/ai.lua b/lua/plugins/ai.lua
deleted file mode 100644
index 0aa51d8..0000000
--- a/lua/plugins/ai.lua
+++ /dev/null
@@ -1,29 +0,0 @@
-return {
- {
- "opencode-nvim",
- for_cat = "ai",
- keys = {
- -- stylua: ignore start
- { '<leader>co', function() require('opencode').toggle() end, desc = 'Toggle opencode' },
- { '<leader>ca', function() require('opencode').ask() end, desc = 'Ask opencode', mode = { 'n', 'v' } },
- { '<leader>cA', function() require('opencode').ask('@buffer ', { submit = true }) end, desc = 'Ask opencode about current file', mode = { 'n', 'v' } },
- { '<leader>cn', function() require('opencode').command('session.new') end, desc = 'New session' },
- { '<leader>ce', function() require('opencode').prompt('Explain @this and its context') end, desc = 'Explain code at cursor', mode = { 'n', 'v' } },
- { '<leader>cr', function() require('opencode').prompt('Review @buffer for correctness and readability') end, desc = 'Review file' },
- { '<leader>cf', function() require('opencode').prompt('Fix @diagnostics') end, desc = 'Fix errors' },
- { '<leader>cp', function() require('opencode').prompt('Optimize @this for performance and readability') end, desc = 'Optimize selection', mode = 'v' },
- { '<leader>cd', function() require('opencode').prompt('Add documentation comments for @this') end, desc = 'Document selection', mode = 'v' },
- { '<leader>ct', function() require('opencode').prompt('Add tests for @this') end, desc = 'Test selection', mode = 'v' },
- { '<leader>cs', function() require('opencode').select() end, desc = 'Select opencode action', mode = { 'n', 'v' } },
- -- stylua: ignore end
- },
- before = function()
- vim.g.opencode_opts = {
- providers = {
- enabled = "terminal",
- tmux = {},
- },
- }
- end,
- },
-}
diff --git a/lua/plugins/completion.lua b/lua/plugins/completion.lua
deleted file mode 100644
index 79946e1..0000000
--- a/lua/plugins/completion.lua
+++ /dev/null
@@ -1,65 +0,0 @@
-return {
- {
- "blink.cmp",
- event = { "InsertEnter", "CmdlineEnter" },
- for_cat = "core.completion",
- load = function(name)
- require("lzextras").loaders.multi({
- name,
- -- "blink-ripgrep.nvim",
- "friendly-snippets",
- })
- end,
- after = function(_)
- require("blink.cmp").setup({
- keymap = { preset = "default" },
- appearance = { nerd_font_variant = "mono" },
- signature = { enabled = false },
- completion = {
- documentation = {
- auto_show = false,
- },
- menu = {
- draw = {
- columns = {
- { "label", "label_description", gap = 1 },
- { "kind_icon", "kind", gap = 1 },
- },
- treesitter = { "lsp" },
- },
- },
- },
- sources = {
- default = { "lsp", "path", "snippets", "buffer", "cmdline", "omni" },
- providers = {
- path = {
- score_offset = 25,
- },
- lsp = {
- fallbacks = {},
- score_offset = 20,
- },
- snippets = {
- score_offset = 20,
- },
- buffer = {
- score_offset = 5,
- },
- -- ripgrep = {
- -- module = "blink-ripgrep",
- -- name = "Ripgrep",
- -- opts = {
- -- project_root_marker = { ".git", "flake.nix", "flake.lock" },
- -- backend = {
- -- use = "gitgrep-or-ripgrep",
- -- customize_icon_highlight = false,
- -- },
- -- },
- -- },
- },
- },
- fuzzy = { implementation = "prefer_rust_with_warning" },
- })
- end,
- },
-}
diff --git a/lua/plugins/debug.lua b/lua/plugins/debug.lua
deleted file mode 100644
index 659336b..0000000
--- a/lua/plugins/debug.lua
+++ /dev/null
@@ -1,90 +0,0 @@
-return {
- {
- "nvim-dap-go",
- for_cat = { cat = "go", default = false },
- on_plugin = { "nvim-dap" },
- after = function(_)
- require("dap-go").setup()
- end,
- },
- {
- "nvim-dap",
- for_cat = "debug",
- on_require = { "dap" },
- keys = {
- { "<F5>", desc = "Debug: Start/Continue" },
- { "<F2>", desc = "Debug: Step Into" },
- { "<F3>", desc = "Debug: Step Over" },
- { "<F4>", desc = "Debug: Step Out" },
- { "<leader>b", desc = "Debug: Toggle Breakpoint" },
- { "<leader>B", desc = "Debug: Set Breakpoint" },
- { "<F7>", desc = "Debug: See last session result." },
- },
- load = function(name)
- require("lzextras").loaders.multi({
- name,
- "nvim-dap-ui",
- "nvim-dap-virtual-text",
- })
- end,
- after = function(_)
- local dap = require("dap")
- local dapui = require("dapui")
-
- -- Basic debugging keymaps, feel free to change to your liking!
- vim.keymap.set("n", "<F5>", dap.continue, { desc = "Debug: Start/Continue" })
- vim.keymap.set("n", "<F2>", dap.step_into, { desc = "Debug: Step Into" })
- vim.keymap.set("n", "<F3>", dap.step_over, { desc = "Debug: Step Over" })
- vim.keymap.set("n", "<F4>", dap.step_out, { desc = "Debug: Step Out" })
- vim.keymap.set("n", "<leader>b", dap.toggle_breakpoint, { desc = "Debug: Toggle Breakpoint" })
- vim.keymap.set("n", "<leader>B", function()
- dap.set_breakpoint(vim.fn.input("Breakpoint condition: "))
- end, { desc = "Debug: Set Breakpoint" })
-
- -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception.
- vim.keymap.set("n", "<F7>", dapui.toggle, { desc = "Debug: See last session result." })
-
- dap.listeners.after.event_initialized["dapui_config"] = dapui.open
- dap.listeners.before.event_terminated["dapui_config"] = dapui.close
- dap.listeners.before.event_exited["dapui_config"] = dapui.close
-
- -- Dap UI setup
- -- For more information, see |:help nvim-dap-ui|
- dapui.setup()
-
- require("nvim-dap-virtual-text").setup({
- -- enabled = true, -- enable this plugin (the default)
- -- enabled_commands = true, -- create commands DapVirtualTextEnable, DapVirtualTextDisable, DapVirtualTextToggle, (DapVirtualTextForceRefresh for refreshing when debug adapter did not notify its termination)
- -- highlight_changed_variables = true, -- highlight changed values with NvimDapVirtualTextChanged, else always NvimDapVirtualText
- -- highlight_new_as_changed = false, -- highlight new variables in the same way as changed variables (if highlight_changed_variables)
- -- show_stop_reason = true, -- show stop reason when stopped for exceptions
- -- commented = false, -- prefix virtual text with comment string
- -- only_first_definition = true, -- only show virtual text at first definition (if there are multiple)
- -- all_references = false, -- show virtual text on all all references of the variable (not only definitions)
- -- clear_on_continue = false, -- clear virtual text on "continue" (might cause flickering when stepping)
- -- --- A callback that determines how a variable is displayed or whether it should be omitted
- -- --- variable Variable https://microsoft.github.io/debug-adapter-protocol/specification#Types_Variable
- -- --- buf number
- -- --- stackframe dap.StackFrame https://microsoft.github.io/debug-adapter-protocol/specification#Types_StackFrame
- -- --- node userdata tree-sitter node identified as variable definition of reference (see `:h tsnode`)
- -- --- options nvim_dap_virtual_text_options Current options for nvim-dap-virtual-text
- -- --- string|nil A text how the virtual text should be displayed or nil, if this variable shouldn't be displayed
- -- display_callback = function(variable, buf, stackframe, node, options)
- -- if options.virt_text_pos == "inline" then
- -- return " = " .. variable.value
- -- else
- -- return variable.name .. " = " .. variable.value
- -- end
- -- end,
- -- -- position of virtual text, see `:h nvim_buf_set_extmark()`, default tries to inline the virtual text. Use 'eol' to set to end of line
- -- virt_text_pos = vim.fn.has("nvim-0.10") == 1 and "inline" or "eol",
- --
- -- -- experimental features:
- -- all_frames = false, -- show virtual text for all stack frames not only current. Only works for debugpy on my machine.
- -- virt_lines = false, -- show virtual lines instead of virtual text (will flicker!)
- -- virt_text_win_col = nil, -- position the virtual text at a fixed window column (starting from the first text column) ,
- -- -- e.g. 80 to position at column 80, see `:h nvim_buf_set_extmark()`
- })
- end,
- },
-}
diff --git a/lua/plugins/formatter.lua b/lua/plugins/formatter.lua
deleted file mode 100644
index a18610a..0000000
--- a/lua/plugins/formatter.lua
+++ /dev/null
@@ -1,47 +0,0 @@
-return {
- {
- "conform.nvim",
- event = { "BufReadPre", "BufNewFile" },
- for_cats = "core.general",
- after = function()
- local conform = require("conform")
-
- conform.setup({
- format_after_save = {
- lsp_format = "fallback",
- quiet = true,
- },
-
- formatters_by_ft = {
- lua = { "stylua" },
- go = { "gofmt" },
- rust = { "rustfmt" },
- toml = { "tombi" },
- java = { "google-java-format" },
- cmake = { "cmake_format" },
- typescript = { "prettierd" },
- javascript = { "prettierd" },
- c = { "clang-format" },
- cpp = { "clang-format" },
- qml = { "qmlformat" },
- python = { "ruff_fix", "ruff_organize_imports", "ruff_format" },
- },
-
- formatters = {
- ["google-java-format"] = {
- prepend_args = { "--aosp" },
- },
- ["clang-format"] = {
- prepend_args = { "-style={BasedOnStyle: LLVM, IndentWidth: 4, TabWidth: 4, UseTab: Never}" },
- },
- },
- })
-
- vim.keymap.set({ "n", "v" }, "<leader>lf", function()
- conform.format({ async = true })
- end, {
- desc = "Language format",
- })
- end,
- },
-}
diff --git a/lua/plugins/general.lua b/lua/plugins/general.lua
deleted file mode 100644
index 6716bbc..0000000
--- a/lua/plugins/general.lua
+++ /dev/null
@@ -1,134 +0,0 @@
-return {
- {
- "guess-indent.nvim",
- for_cat = "core.general",
- event = "DeferredUIEnter",
- after = function()
- require("guess-indent").setup({
- auto_cmd = true,
- override_editorconfig = true,
- filetype_exclude = {
- "netrw",
- "tutor",
- "oil",
- "gitcommit",
- },
- buftype_exclude = {
- "help",
- "nofile",
- "terminal",
- "prompt",
- },
- on_tab_options = {
- ["expandtab"] = false,
- },
- on_space_options = {
- ["expandtab"] = true,
- ["tabstop"] = "detected",
- ["softtabstop"] = "detected",
- ["shiftwidth"] = "detected",
- },
- })
- end,
- },
- {
- "nvim-surround",
- for_cat = "core.general",
- event = { "BufReadPre", "BufNewFile" },
- after = function()
- require("nvim-surround").setup()
- end,
- },
- {
- "oil.nvim",
- keys = { { "<leader>o", "<CMD>Oil<CR>", desc = "Open oil" } },
- for_cat = "core.general",
- after = function()
- require("oil").setup({
- default_file_explorer = true,
- columns = { "icon", "permissions", "size" },
- keymaps = {
- ["-"] = "actions.parent",
- ["<CR>"] = "actions.select",
- ["<C-v>"] = "actions.select_vsplit",
- ["<C-s>"] = "actions.select_split",
- },
- })
- end,
- },
- {
- "undotree",
- for_cat = "core.general",
- cmd = { "UndotreeToggle", "UndotreeHide", "UndotreeShow", "UndotreeFocus", "UndotreePersistUndo" },
- keys = { { "<leader>U", "<cmd>UndotreeToggle<CR>", mode = { "n" }, desc = "Undo Tree" } },
- before = function(_)
- vim.g.undotree_WindowLayout = 1
- vim.g.undotree_SplitWidth = 40
- vim.g.undotree_WindowLayout = 3
- end,
- },
- {
- "lazydev.nvim",
- ft = "lua",
- after = function()
- require("lazydev").setup({
- library = {
- { path = "${3rd}/luv/library", words = { "vim%.uv" } },
- },
-
- integrations = {
- -- Fixes lspconfig's workspace management for LuaLS
- -- Only create a new workspace if the buffer is not part
- -- of an existing workspace or one of its libraries
- lspconfig = true,
- -- add the cmp source for completion of:
- -- `require "modname"`
- -- `---@module "modname"`
- cmp = true,
- -- same, but for Coq
- coq = false,
- },
- })
- end,
- },
- {
- "trouble.nvim",
- for_cat = "core.general",
- cmd = "Trouble",
- keys = {
- {
- "<leader>xx",
- "<cmd>Trouble diagnostics toggle<cr>",
- desc = "Diagnostics (Trouble)",
- },
- {
- "<leader>xX",
- "<cmd>Trouble diagnostics toggle filter.buf=0<cr>",
- desc = "Buffer Diagnostics (Trouble)",
- },
- {
- "<leader>cs",
- "<cmd>Trouble symbols toggle focus=false<cr>",
- desc = "Symbols (Trouble)",
- },
- {
- "<leader>cl",
- "<cmd>Trouble lsp toggle focus=false win.position=right<cr>",
- desc = "LSP Definitions / references / ... (Trouble)",
- },
- {
- "<leader>xL",
- "<cmd>Trouble loclist toggle<cr>",
- desc = "Location List (Trouble)",
- },
- {
- "<leader>xQ",
- "<cmd>Trouble qflist toggle<cr>",
- desc = "Quickfix List (Trouble)",
- },
- },
- after = function()
- require("trouble").setup()
- end,
- },
-}
diff --git a/lua/plugins/git.lua b/lua/plugins/git.lua
deleted file mode 100644
index 0e333f8..0000000
--- a/lua/plugins/git.lua
+++ /dev/null
@@ -1,98 +0,0 @@
-return {
- {
- "neogit",
- for_cat = "core.git",
- keys = { { "<leader>gg", "<CMD>Neogit<CR>", desc = "Open Neogit Ui" } },
- cmd = { "Neogit" },
- after = function()
- require("neogit").setup({
- disable_hint = true,
- kind = "split_above",
-
- commit_editor = {
- kind = "tab",
- show_staged_diff = true,
- staged_diff_split_kind = "auto",
- spell_check = true,
- },
- })
- end,
- },
- {
- "gitsigns.nvim",
- event = { "DeferredUIEnter" },
- for_cat = "core.git",
- after = function(_)
- require("gitsigns").setup({
- signs = {
- add = { text = "+" },
- change = { text = "~" },
- delete = { text = "_" },
- topdelete = { text = "‾" },
- changedelete = { text = "~" },
- },
-
- on_attach = function(bufnr)
- local gs = package.loaded.gitsigns
-
- local function map(mode, l, r, opts)
- opts = opts or {}
- opts.buffer = bufnr
- vim.keymap.set(mode, l, r, opts)
- end
-
- -- Navigation
- map({ "n", "v" }, "]c", function()
- if vim.wo.diff then
- return "]c"
- end
- vim.schedule(function()
- gs.next_hunk()
- end)
- return "<Ignore>"
- end, { expr = true, desc = "Jump to next hunk" })
-
- map({ "n", "v" }, "[c", function()
- if vim.wo.diff then
- return "[c"
- end
- vim.schedule(function()
- gs.prev_hunk()
- end)
- return "<Ignore>"
- end, { expr = true, desc = "Jump to previous hunk" })
-
- -- Actions
- -- visual mode
- map("v", "<leader>hs", function()
- gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") })
- end, { desc = "stage git hunk" })
- map("v", "<leader>hr", function()
- gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") })
- end, { desc = "reset git hunk" })
- -- normal mode
- map("n", "<leader>gs", gs.stage_hunk, { desc = "git stage hunk" })
- map("n", "<leader>gr", gs.reset_hunk, { desc = "git reset hunk" })
- map("n", "<leader>gS", gs.stage_buffer, { desc = "git Stage buffer" })
- map("n", "<leader>gu", gs.undo_stage_hunk, { desc = "undo stage hunk" })
- map("n", "<leader>gR", gs.reset_buffer, { desc = "git Reset buffer" })
- map("n", "<leader>gp", gs.preview_hunk, { desc = "preview git hunk" })
- map("n", "<leader>gb", function()
- gs.blame_line({ full = false })
- end, { desc = "git blame line" })
- -- map('n', '<leader>gd', gs.diffthis, { desc = 'git diff against index' })
- map("n", "<leader>gD", function()
- gs.diffthis("~")
- end, { desc = "git diff against last commit" })
-
- -- Toggles
- map("n", "<leader>gtb", gs.toggle_current_line_blame, { desc = "toggle git blame line" })
- map("n", "<leader>gtd", gs.toggle_deleted, { desc = "toggle git show deleted" })
-
- -- Text object
- map({ "o", "x" }, "ih", ":<C-U>Gitsigns select_hunk<CR>", { desc = "select git hunk" })
- end,
- })
- end,
- },
-}
diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua
deleted file mode 100644
index 33575ee..0000000
--- a/lua/plugins/init.lua
+++ /dev/null
@@ -1,13 +0,0 @@
-return {
- { import = "plugins.ai" },
- { import = "plugins.general" },
- { import = "plugins.completion" },
- { import = "plugins.git" },
- { import = "plugins.formatter" },
- { import = "plugins.tsitter" },
- { import = "plugins.misc" },
- { import = "plugins.picker" },
- { import = "plugins.debug" },
- { import = "plugins.linter" },
- { import = "plugins.ui" },
-}
diff --git a/lua/plugins/linter.lua b/lua/plugins/linter.lua
deleted file mode 100644
index bd798ba..0000000
--- a/lua/plugins/linter.lua
+++ /dev/null
@@ -1,40 +0,0 @@
-return {
- {
- "nvim-lint",
- event = { "BufReadPre", "BufNewFile" },
- for_cats = "core.general",
- after = function()
- local lint = require("lint")
-
- lint.linters_by_ft = {
- python = { "ruff" },
- go = { "golangcilint" },
- -- rust = { "clippy" },
- c = { "clangtidy" },
- cpp = { "clangtidy" },
- java = { "checkstyle" },
- cmake = { "cmakelint" },
- javascript = { "eslint_d" },
- typescript = { "eslint_d" },
- }
-
- local lint_augroup = vim.api.nvim_create_augroup("lint", { clear = true })
-
- vim.api.nvim_create_autocmd({ "BufEnter", "BufWritePost" }, {
- group = lint_augroup,
- callback = function()
- lint.try_lint(nil, { ignore_errors = true })
- end,
- })
-
- vim.api.nvim_create_autocmd({ "InsertLeave" }, {
- group = lint_augroup,
- callback = function()
- if vim.bo.filetype ~= "rust" then
- lint.try_lint(nil, { ignore_errors = true })
- end
- end,
- })
- end,
- },
-}
diff --git a/lua/plugins/misc.lua b/lua/plugins/misc.lua
deleted file mode 100644
index 37185ae..0000000
--- a/lua/plugins/misc.lua
+++ /dev/null
@@ -1,50 +0,0 @@
-return {
- {
- "obsidian.nvim",
- for_cats = "misc",
- event = {
- "BufReadPre " .. vim.fn.expand("~") .. "/Notes/**/*.md",
- "BufNewFile " .. vim.fn.expand("~") .. "/Notes/**/*.md",
- },
- after = function()
- require("obsidian").setup({
- legacy_commands = false,
- workspaces = {
- {
- name = "personal",
- path = "~/Notes",
- },
- },
- })
- end,
- },
- {
- "typst-preview.nvim",
- ft = "typst",
- for_cats = "misc",
- after = function()
- require("typst-preview").setup({
- debug = false,
- open_cmd = nil,
- port = nil,
- invert_colors = "never",
- follow_cursor = true,
- dependencies_bin = {
- tinymist = "tinymist",
- websocat = "websocat",
- },
- extra_args = nil,
- get_root = function(path_of_main_file)
- local root = os.getenv("TYPST_ROOT")
- if root then
- return root
- end
- return vim.fn.fnamemodify(path_of_main_file, ":p:h")
- end,
- get_main_file = function(path_of_buffer)
- return path_of_buffer
- end,
- })
- end,
- },
-}
diff --git a/lua/plugins/picker.lua b/lua/plugins/picker.lua
deleted file mode 100644
index bf60d6a..0000000
--- a/lua/plugins/picker.lua
+++ /dev/null
@@ -1,97 +0,0 @@
-local telescope_builtin = function(key, action, desc)
- return {
- key,
- "<cmd>Telescope " .. action .. "<CR>",
- mode = { "n" },
- desc = desc,
- }
-end
-
-return {
- {
- "telescope.nvim",
- event = "DeferredUIEnter",
- for_cat = "core.picker",
- keys = {
- telescope_builtin("<leader>ff", "find_files", "Search files in cwd"),
- telescope_builtin("<leader>fb", "buffers", "Search files in cwd"),
- telescope_builtin("<leader>fo", "oldfiles", "Recent files"),
- telescope_builtin("<leader>fr", "registers", "Registers"),
- telescope_builtin("<leader>fj", "jumplist", "Jump list"),
- telescope_builtin("<leader>fm", "marks", "Marks"),
-
- telescope_builtin("<leader>fq", "quickfix", "Quickfix list"),
- telescope_builtin("<leader>fl", "loclist", "Location list"),
-
- telescope_builtin("<leader>st", "treesitter", "Treesitter symbols"),
-
- telescope_builtin("<leader>sc", "commands", "Commands"),
- telescope_builtin("<leader>sp", "spell_suggest", "Spell suggestions"),
-
- telescope_builtin("<leader>sg", "live_grep", "Search by grep"),
- telescope_builtin("<leader>ss", "grep_string", "Search string"),
- telescope_builtin("<leader>sk", "keymaps", "Search keymaps"),
- telescope_builtin("<leader>sh", "help_tags", "Search help tags"),
- telescope_builtin("<leader>/", "current_buffer_fuzzy_find", "Search in current buffer"),
-
- telescope_builtin("<leader>gc", "git_commits", "Git commits"),
- telescope_builtin("<leader>gB", "git_branches", "Git branches"),
- telescope_builtin("<leader>gs", "git_status", "Git status"),
- telescope_builtin("<leader>gS", "git_stash", "Git stash"),
-
- telescope_builtin("<leader>ls", "lsp_document_symbols", "Document symbols"),
- telescope_builtin("<leader>lS", "lsp_workspace_symbols", "Workspace symbols"),
- telescope_builtin("<leader>lds", "lsp_dynamic_workspace_symbols", "Workspace symbols"),
- telescope_builtin("<leader>ld", "diagnostics", "Diagnostics"),
- telescope_builtin("<leader>lD", "lsp_definitions", "LSP definitions"),
- telescope_builtin("<leader>li", "lsp_incoming_calls", "LSP incoming calls"),
- telescope_builtin("<leader>lo", "lsp_outgoing_calls", "LSP outgoing calls"),
- telescope_builtin("<leader>lt", "lsp_type_definitions", "LSP type definitions"),
- telescope_builtin("grr", "lsp_references", "LSP references"),
- telescope_builtin("gri", "lsp_implementations", "LSP implementations"),
- },
- load = function(name)
- require("lzextras").loaders.multi({
- name,
- "telescope-fzf-native.nvim",
- "telescope-ui-select.nvim",
- })
- end,
- after = function()
- require("telescope").setup({
- defaults = {
- mappings = {
- i = {
- ["<M-Enter>"] = "to_fuzzy_refine",
- },
- },
- },
- pickers = {
- buffers = {
- mappings = {
- i = {
- -- ["<C-d>"] = "delete_buffer",
- },
- n = {
- ["d"] = "delete_buffer",
- },
- },
- },
- },
- extensions = {
- fzf = {
- fuzzy = true,
- override_generic_sorter = true,
- override_file_sorter = true,
- case_mode = "smart_case",
- },
- ["ui-select"] = {
- require("telescope.themes").get_dropdown({}),
- },
- },
- })
- require("telescope").load_extension("fzf")
- require("telescope").load_extension("ui-select")
- end,
- },
-}
diff --git a/lua/plugins/tsitter.lua b/lua/plugins/tsitter.lua
deleted file mode 100644
index 0816c23..0000000
--- a/lua/plugins/tsitter.lua
+++ /dev/null
@@ -1,187 +0,0 @@
-return {
- {
- "nvim-treesitter",
- lazy = false,
- for_cats = "tsitter",
- after = function(plugin)
- ---@param buf integer
- ---@param language string
- local function treesitter_try_attach(buf, language)
- -- check if parser exists and load it
- if not vim.treesitter.language.add(language) then
- return false
- end
- -- enables syntax highlighting and other treesitter features
- vim.treesitter.start(buf, language)
-
- -- enables treesitter based folds
- vim.wo.foldexpr = "v:lua.vim.treesitter.foldexpr()"
-
- -- enables treesitter based indentation
- vim.bo.indentexpr = "v:lua.require'nvim-treesitter'.indentexpr()"
-
- return true
- end
-
- local installable_parsers = require("nvim-treesitter").get_available()
- vim.api.nvim_create_autocmd("FileType", {
- callback = function(args)
- local buf, filetype = args.buf, args.match
- local language = vim.treesitter.language.get_lang(filetype)
- if not language then
- return
- end
-
- if not treesitter_try_attach(buf, language) then
- if vim.tbl_contains(installable_parsers, language) then
- -- not already installed, so try to install them via nvim-treesitter if possible
- require("nvim-treesitter").install(language):await(function()
- treesitter_try_attach(buf, language)
- end)
- end
- end
- end,
- })
- end,
- },
-
- {
- "nvim-treesitter-textobjects",
- auto_enable = true,
- for_cats = "tsitter",
- lazy = false,
- before = function(plugin)
- -- https://github.com/nvim-treesitter/nvim-treesitter-textobjects/tree/main?tab=readme-ov-file#using-a-package-manager
- -- Disable entire built-in ftplugin mappings to avoid conflicts.
- -- See https://github.com/neovim/neovim/tree/master/runtime/ftplugin for built-in ftplugins.
- vim.g.no_plugin_maps = true
-
- -- Or, disable per filetype (add as you like)
- -- vim.g.no_python_maps = true
- -- vim.g.no_ruby_maps = true
- -- vim.g.no_rust_maps = true
- -- vim.g.no_go_maps = true
- end,
- after = function(plugin)
- require("nvim-treesitter-textobjects").setup({
- select = {
- -- Automatically jump forward to textobj, similar to targets.vim
- lookahead = true,
- -- You can choose the select mode (default is charwise 'v')
- --
- -- Can also be a function which gets passed a table with the keys
- -- * query_string: eg '@function.inner'
- -- * method: eg 'v' or 'o'
- -- and should return the mode ('v', 'V', or '<c-v>') or a table
- -- mapping query_strings to modes.
- selection_modes = {
- ["@parameter.outer"] = "v", -- charwise
- ["@function.outer"] = "V", -- linewise
- -- ['@class.outer'] = '<c-v>', -- blockwise
- },
- -- If you set this to `true` (default is `false`) then any textobject is
- -- extended to include preceding or succeeding whitespace. Succeeding
- -- whitespace has priority in order to act similarly to eg the built-in
- -- `ap`.
- --
- -- Can also be a function which gets passed a table with the keys
- -- * query_string: eg '@function.inner'
- -- * selection_mode: eg 'v'
- -- and should return true of false
- include_surrounding_whitespace = false,
- },
- move = {
- set_jumps = true,
- },
- })
-
- -- keymaps
- -- You can use the capture groups defined in `textobjects.scm`
- vim.keymap.set({ "x", "o" }, "am", function()
- require("nvim-treesitter-textobjects.select").select_textobject("@function.outer", "textobjects")
- end)
- vim.keymap.set({ "x", "o" }, "im", function()
- require("nvim-treesitter-textobjects.select").select_textobject("@function.inner", "textobjects")
- end)
- vim.keymap.set({ "x", "o" }, "ac", function()
- require("nvim-treesitter-textobjects.select").select_textobject("@class.outer", "textobjects")
- end)
- vim.keymap.set({ "x", "o" }, "ic", function()
- require("nvim-treesitter-textobjects.select").select_textobject("@class.inner", "textobjects")
- end)
- -- You can also use captures from other query groups like `locals.scm`
- vim.keymap.set({ "x", "o" }, "as", function()
- require("nvim-treesitter-textobjects.select").select_textobject("@local.scope", "locals")
- end)
- vim.keymap.set("n", "<leader>a", function()
- require("nvim-treesitter-textobjects.swap").swap_next("@parameter.inner")
- end)
- vim.keymap.set("n", "<leader>A", function()
- require("nvim-treesitter-textobjects.swap").swap_previous("@parameter.outer")
- end)
-
- -- You can use the capture groups defined in `textobjects.scm`
- vim.keymap.set({ "n", "x", "o" }, "]m", function()
- require("nvim-treesitter-textobjects.move").goto_next_start("@function.outer", "textobjects")
- end)
- vim.keymap.set({ "n", "x", "o" }, "]]", function()
- require("nvim-treesitter-textobjects.move").goto_next_start("@class.outer", "textobjects")
- end)
- -- You can also pass a list to group multiple queries.
- vim.keymap.set({ "n", "x", "o" }, "]o", function()
- require("nvim-treesitter-textobjects.move").goto_next_start(
- { "@loop.inner", "@loop.outer" },
- "textobjects"
- )
- end)
- -- You can also use captures from other query groups like `locals.scm` or `folds.scm`
- vim.keymap.set({ "n", "x", "o" }, "]s", function()
- require("nvim-treesitter-textobjects.move").goto_next_start("@local.scope", "locals")
- end)
- vim.keymap.set({ "n", "x", "o" }, "]z", function()
- require("nvim-treesitter-textobjects.move").goto_next_start("@fold", "folds")
- end)
-
- vim.keymap.set({ "n", "x", "o" }, "]M", function()
- require("nvim-treesitter-textobjects.move").goto_next_end("@function.outer", "textobjects")
- end)
- vim.keymap.set({ "n", "x", "o" }, "][", function()
- require("nvim-treesitter-textobjects.move").goto_next_end("@class.outer", "textobjects")
- end)
-
- vim.keymap.set({ "n", "x", "o" }, "[m", function()
- require("nvim-treesitter-textobjects.move").goto_previous_start("@function.outer", "textobjects")
- end)
- vim.keymap.set({ "n", "x", "o" }, "[[", function()
- require("nvim-treesitter-textobjects.move").goto_previous_start("@class.outer", "textobjects")
- end)
-
- vim.keymap.set({ "n", "x", "o" }, "[M", function()
- require("nvim-treesitter-textobjects.move").goto_previous_end("@function.outer", "textobjects")
- end)
- vim.keymap.set({ "n", "x", "o" }, "[]", function()
- require("nvim-treesitter-textobjects.move").goto_previous_end("@class.outer", "textobjects")
- end)
- local ts_repeat_move = require("nvim-treesitter-textobjects.repeatable_move")
-
- -- Repeat movement with ; and ,
- -- ensure ; goes forward and , goes backward regardless of the last direction
- -- vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move_next)
- -- vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_previous)
-
- -- vim way: ; goes to the direction you were moving.
- vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
- vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
-
- -- Optionally, make builtin f, F, t, T also repeatable with ; and ,
- vim.keymap.set({ "n", "x", "o" }, "f", ts_repeat_move.builtin_f_expr, { expr = true })
- vim.keymap.set({ "n", "x", "o" }, "F", ts_repeat_move.builtin_F_expr, { expr = true })
- vim.keymap.set({ "n", "x", "o" }, "t", ts_repeat_move.builtin_t_expr, { expr = true })
- vim.keymap.set({ "n", "x", "o" }, "T", ts_repeat_move.builtin_T_expr, { expr = true })
-
- -- NOTE: for more textobjects options, see the following link.
- -- This template is using the new `main` branch of the repo.
- -- https://github.com/nvim-treesitter/nvim-treesitter-textobjects/tree/main
- end,
- },
-}
diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua
deleted file mode 100644
index b2094eb..0000000
--- a/lua/plugins/ui.lua
+++ /dev/null
@@ -1,86 +0,0 @@
-return {
- {
- "lualine.nvim",
- for_cats = "ui",
- event = { "DeferredUIEnter" },
- after = function()
- require("lualine").setup({
- options = {
- component_separators = { left = "|", right = "|" },
- section_separators = {},
- },
- sections = {
- lualine_a = {
- {
- "mode",
- fmt = function(mode)
- return ({
- NORMAL = "(。•ᴗ•。)",
- INSERT = "(づ。◕‿‿◕。)づ",
- VISUAL = "(≧◡≦)",
- ["V-LINE"] = "(≧▿≦)",
- ["V-BLOCK"] = "(☆ω☆)",
- COMMAND = "( ̄ω ̄)",
- REPLACE = "(;ω;)",
- TERMINAL = "(^▽^)",
- })[mode] or mode
- end,
- },
- },
- },
- })
- end,
- },
- {
- "hlchunk.nvim",
- for_cats = "ui",
- event = { "BufReadPre", "BufNewFile" },
- after = function()
- local ignored_filetypes = {
- gitcommit = true,
- oil = true,
- Neogitstatus = true,
- TelescopePrompt = true,
- NvimTree = true,
- help = true,
- nix = true,
- }
-
- require("hlchunk").setup({
- chunk = {
- enable = true,
- priority = 15,
- -- style = {
- -- vim.api.nvim_get_hl(0, { name = "IndentBlanklineIndent1" }),
- -- vim.api.nvim_get_hl(0, { name = "DiagnosticError" }),
- -- },
- use_treesitter = false,
- chars = {
- horizontal_line = "─",
- vertical_line = "│",
- left_top = "┌",
- left_bottom = "└",
- right_arrow = "─",
- },
- textobject = "",
- exclude_filetypes = ignored_filetypes,
- max_file_size = 1024 * 1024,
- error_sign = true,
- -- animation related
- duration = 200,
- delay = 300,
- },
- indent = {
- enable = true,
- priority = 10,
- style = { vim.api.nvim_get_hl(0, { name = "Whitespace" }) },
- use_treesitter = false,
- exclude_filetypes = ignored_filetypes,
- chars = { "│" },
- ahead_lines = 5,
- delay = 100,
- },
- })
- end,
- },
-}