diff options
Diffstat (limited to 'dot_config/nvim/lua/plugins')
| -rw-r--r-- | dot_config/nvim/lua/plugins/colorscheme.lua | 2 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/gitsigns.lua | 20 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/gruvbox.lua | 1 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/harpoon.lua | 30 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/jinja.lua | 3 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/lsp-lines.lua | 35 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/lsp.lua | 334 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/neotest.lua | 44 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/obsidian.lua.tmpl | 82 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/oil.lua | 15 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/telescope.lua | 12 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/todo-comments.lua | 6 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/treesitter.lua | 132 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/undotree.lua | 8 | ||||
| -rw-r--r-- | dot_config/nvim/lua/plugins/which-key.lua | 4 |
15 files changed, 0 insertions, 728 deletions
diff --git a/dot_config/nvim/lua/plugins/colorscheme.lua b/dot_config/nvim/lua/plugins/colorscheme.lua deleted file mode 100644 index 7cc5fd9..0000000 --- a/dot_config/nvim/lua/plugins/colorscheme.lua +++ /dev/null @@ -1,2 +0,0 @@ --- return { "ellisonleao/gruvbox.nvim", priority = 1000, config = true } -return { "rose-pine/neovim", name = "rose-pine", priority = 1000, config = true } diff --git a/dot_config/nvim/lua/plugins/gitsigns.lua b/dot_config/nvim/lua/plugins/gitsigns.lua deleted file mode 100644 index dd89dfb..0000000 --- a/dot_config/nvim/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,20 +0,0 @@ -return { - "lewis6991/gitsigns.nvim", - config = function() - require("gitsigns").setup({ - current_line_blame = true, - current_line_blame_opts = { - virt_text = true, - delay = 1000 / 3, - }, - signs = { - add = { text = "┃" }, - change = { text = "┃" }, - delete = { text = "_" }, - topdelete = { text = "‾" }, - changedelete = { text = "~" }, - untracked = { text = "┆" }, - }, - }) - end, -} diff --git a/dot_config/nvim/lua/plugins/gruvbox.lua b/dot_config/nvim/lua/plugins/gruvbox.lua deleted file mode 100644 index a04d39c..0000000 --- a/dot_config/nvim/lua/plugins/gruvbox.lua +++ /dev/null @@ -1 +0,0 @@ -return { "ellisonleao/gruvbox.nvim", priority = 1000, config = true } diff --git a/dot_config/nvim/lua/plugins/harpoon.lua b/dot_config/nvim/lua/plugins/harpoon.lua deleted file mode 100644 index 695b69c..0000000 --- a/dot_config/nvim/lua/plugins/harpoon.lua +++ /dev/null @@ -1,30 +0,0 @@ -return { - "ThePrimeagen/harpoon", - branch = "harpoon2", - dependencies = { "nvim-lua/plenary.nvim" }, - config = function() - local harpoon = require("harpoon") - harpoon:setup() - - vim.keymap.set("n", "<leader>a", function() - harpoon:list():add() - end, { desc = "Mark file with Harpoon" }) - - vim.keymap.set("n", "<C-e>", function() - harpoon.ui:toggle_quick_menu(harpoon:list()) - end, { desc = "Open Harpoon menu" }) - - vim.keymap.set("n", "<leader>j", function() - harpoon:list():select(1) - end, { desc = "Open Harpoon file 1" }) - vim.keymap.set("n", "<leader>k", function() - harpoon:list():select(2) - end, { desc = "Open Harpoon file 2" }) - vim.keymap.set("n", "<leader>l", function() - harpoon:list():select(3) - end, { desc = "Open Harpoon file 3" }) - vim.keymap.set("n", "<leader>;", function() - harpoon:list():select(4) - end, { desc = "Open Harpoon file 4" }) - end, -} diff --git a/dot_config/nvim/lua/plugins/jinja.lua b/dot_config/nvim/lua/plugins/jinja.lua deleted file mode 100644 index 295db2f..0000000 --- a/dot_config/nvim/lua/plugins/jinja.lua +++ /dev/null @@ -1,3 +0,0 @@ -return { - "lepture/vim-jinja", -} diff --git a/dot_config/nvim/lua/plugins/lsp-lines.lua b/dot_config/nvim/lua/plugins/lsp-lines.lua deleted file mode 100644 index e15055e..0000000 --- a/dot_config/nvim/lua/plugins/lsp-lines.lua +++ /dev/null @@ -1,35 +0,0 @@ -return { - url = "https://git.sr.ht/~whynothugo/lsp_lines.nvim", - event = { "BufReadPre", "BufNewFile" }, - keys = { - -- The keys table here supports anything in the opts table for - -- vim.keymap.set, but be careful not to nest it in another table - -- like you would for that function. - -- { "<leader>di", desc = "Toggle [d]iagnostic [i]nline" }, - "<leader>di", - }, - opts = { - enabled = { - virtual_lines = true, - virtual_text = false, - }, - disabled = { - virtual_lines = false, - virtual_text = { spacing = 4, prefix = "●" }, - }, - }, - config = function(_, opts) - require("lsp_lines").setup() - local is_enabled = false - vim.diagnostic.config(opts.disabled) - - vim.keymap.set("n", "<leader>di", function() - is_enabled = not is_enabled - if is_enabled then - vim.diagnostic.config(opts.enabled) - else - vim.diagnostic.config(opts.disabled) - end - end, { desc = "Toggle [d]iagnostics [i]nline" }) - end, -} diff --git a/dot_config/nvim/lua/plugins/lsp.lua b/dot_config/nvim/lua/plugins/lsp.lua deleted file mode 100644 index f74243e..0000000 --- a/dot_config/nvim/lua/plugins/lsp.lua +++ /dev/null @@ -1,334 +0,0 @@ -return { - { - "VonHeikemen/lsp-zero.nvim", - branch = "v4.x", - lazy = true, - config = false, - }, - - { - "williamboman/mason.nvim", - lazy = false, - config = true, - }, - - -- Autocompletion - { - "hrsh7th/nvim-cmp", - event = { "InsertEnter", "CmdlineEnter" }, - dependencies = { - "L3MON4D3/LuaSnip", -- Snippet engine - "onsails/lspkind.nvim", -- Pretty formatting in the completion menu - - -- Completion sources - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-nvim-lsp-signature-help", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "saadparwaiz1/cmp_luasnip", - }, - config = function() - local cmp = require("cmp") - local luasnip = require("luasnip") - - cmp.setup({ - completion = { - -- See :help completeopt - completeopt = "menu,menuone,noinsert,preview", - }, - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - mapping = cmp.mapping.preset.insert({ - ["<C-n>"] = cmp.mapping.select_next_item({ behavior = cmp.SelectBehavior.Insert }), - ["<C-p>"] = cmp.mapping.select_prev_item({ behavior = cmp.SelectBehavior.Insert }), - ["<C-b>"] = cmp.mapping.scroll_docs(-4), - ["<C-f>"] = cmp.mapping.scroll_docs(4), - - -- Ctrl+Space does not currently work in Neovim core on Windows - -- https://github.com/neovim/neovim/issues/8435 - -- ["<C-Space>"] = cmp.mapping.complete(), - ["<C-c>"] = cmp.mapping.complete(), - - ["<C-e>"] = cmp.mapping.abort(), - ["<C-y>"] = cmp.mapping.confirm({ - -- Accept currently selected item - behavior = cmp.ConfirmBehavior.Insert, - select = true, - }), - ["<C-S-y>"] = cmp.mapping.confirm({ - -- Accept currently selected item, replacing stuff as needed - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }), - ["<CR>"] = cmp.mapping({ - -- https://github.com/hrsh7th/nvim-cmp/wiki/Example-mappings#safely-select-entries-with-cr - i = function(fallback) - -- In insert mode, only use Enter to complete something if cmp - -- is active and the user has explicitly selected an item - if cmp.visible() and cmp.get_active_entry() then - cmp.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = false }) - else - fallback() - end - end, - s = cmp.mapping.confirm({ select = true }), - c = cmp.mapping.confirm({ behavior = cmp.ConfirmBehavior.Replace, select = true }), - }), - }), - sorting = { - priority_weight = 2, - comparators = { - cmp.config.compare.exact, - - -- Mostly default sort order from cmp - cmp.config.compare.offset, - -- cmp.config.compare.scopes, --this is commented in nvim-cmp too - cmp.config.compare.score, - cmp.config.compare.recently_used, - cmp.config.compare.locality, - cmp.config.compare.kind, - cmp.config.compare.sort_text, - cmp.config.compare.length, - cmp.config.compare.order, - }, - }, - sources = { - -- LSP results should be first priority - { name = "nvim_lsp", group_index = 1 }, - - { name = "nvim_lsp_signature_help", group_index = 2 }, - { name = "lazydev", group_index = 2 }, - { name = "luasnip", group_index = 2 }, - { name = "path", group_index = 2 }, - { name = "buffer", group_index = 2, keyword_length = 5 }, - }, - ---@diagnostic disable-next-line: missing-fields - formatting = { - format = require("lspkind").cmp_format({ - mode = "symbol_text", - maxwidth = function() - return math.floor(0.45 * vim.o.columns) - end, - ellipsis_char = "...", - show_labelDetails = true, - }), - }, - experimental = { - ghost_text = { - hl_group = "LspCodeLens", - }, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - }) - end, - }, - - -- LSP - { - "neovim/nvim-lspconfig", - cmd = { "LspInfo", "LspInstall", "LspStart" }, - event = { "BufReadPre", "BufNewFile" }, - dependencies = { - { "hrsh7th/cmp-nvim-lsp" }, - { "williamboman/mason.nvim" }, - { "williamboman/mason-lspconfig.nvim" }, - }, - config = function() - local lsp_zero = require("lsp-zero") - - lsp_zero.extend_lspconfig({ - sign_text = true, - capabilities = require("cmp_nvim_lsp").default_capabilities(), - }) - - local border = { - { "🭽", "FloatBorder" }, - { "▔", "FloatBorder" }, - { "🭾", "FloatBorder" }, - { "▕", "FloatBorder" }, - { "🭿", "FloatBorder" }, - { "▁", "FloatBorder" }, - { "🭼", "FloatBorder" }, - { "▏", "FloatBorder" }, - } - - local border_handlers = { - ["textDocument/hover"] = vim.lsp.buf.hover({ border = border }), - ["textDocument/signatureHelp"] = vim.lsp.buf.signature_help({ border = border }) - } - - require("mason-lspconfig").setup({ - automatic_enable = { "basedpyright", "ruff", "lua_ls" }, - handlers = { - -- this first function is the "default handler" - -- it applies to every language server without a "custom handler" - function(server_name) - require("lspconfig")[server_name].setup({ handlers = border_handlers }) - end, - - ["basedpyright"] = function() - local lspconfig = require("lspconfig") - lspconfig.basedpyright.setup({ - settings = { - basedpyright = { - typeCheckingMode = "standard", - }, - }, - }) - end, - }, - }) - vim.lsp.inlay_hint.enable() - end, - }, - - -- Formatting - { - "stevearc/conform.nvim", - config = function() - local conform = require("conform") - local prettier = { "prettierd", "prettier" } - conform.setup({ - formatters_by_ft = { - lua = { "stylua" }, - python = { "ruff_format", lsp_format = "fallback" }, - go = { "gopls" }, - rust = { "clippy", lsp_format = "fallback" }, - markdown = prettier, - }, - format_after_save = { - async = true, - stop_after_first = true, - lsp_format = "fallback", - }, - }) - - local function format() - conform.format({ async = true, lsp_fallback = true }) - end - - vim.keymap.set({ "n", "v" }, "<leader>rf", format, { desc = "Reformat" }) - vim.api.nvim_create_user_command("Format", format, {}) - end, - }, - - -- Lint - { - "mfussenegger/nvim-lint", - dependencies = { - -- Additional lua configuration, makes nvim stuff amazing! - "folke/neodev.nvim", - }, - event = { - "BufReadPre", - "BufNewFile", - }, - opts = { - autocmd = { - events = { "BufEnter", "BufWritePost" }, - pattern = { "*.py", "*.lua", "*.js", "*.ts", }, - linters_by_ft = { - python = { "mypy" }, - }, - }, - on_demand = { - linters_by_ft = { - python = { "mypy", "pylint" }, - }, - }, - }, - config = function(_, opts) - local lint = require("lint") - lint.linters_by_ft = { - javascript = { "eslint_d" }, - typescript = { "eslint_d" }, - } - - local function lint_autocmd() - local filetype = vim.bo.filetype - local linter_names = opts.autocmd.linters_by_ft[filetype] or {} - require("lint").try_lint(linter_names) - end - - local function lint_on_demand() - local filetype = vim.bo.filetype - local linter_names = opts.on_demand.linters_by_ft[filetype] or {} - require("lint").try_lint(linter_names) - end - - local lint_augroup = vim.api.nvim_create_augroup("user-nvim-lint", { clear = true }) - vim.api.nvim_create_autocmd(opts.autocmd.events, { - group = lint_augroup, - pattern = opts.autocmd.pattern, - callback = lint_autocmd, - }) - - vim.keymap.set("n", "<leader>cl", lint_on_demand, { desc = "[C]ode [l]int" }) - - -- Hate to remove this because I was pretty proud of it, but I'm removing - -- Pylint altogether. Since this is just my code, I'm leaving it here - -- as a reference if I want to mess with it again later. - -- -- I use Pylint consistently, and I have some projects that enforce - -- -- that Pylint must be passing. However, I don't always want to see - -- -- low-severity Pylint warnings like "missing docstring" for things - -- -- I'm still actively writing. They can be distracting. - -- -- - -- -- Build out a simple behavior that switches the Pylint arguments - -- -- to include or exclude Pylint's complexity (C) and conventions (R) - -- -- messages. - -- -- - -- -- I intentionally make this a global user command instead of a - -- -- buffer-specific one. - -- - -- local default_pylint_args = vim.deepcopy(lint.linters.pylint.args) - -- local simple_pylint_args = vim.deepcopy(lint.linters.pylint.args) - -- table.insert(simple_pylint_args, "--disable=C,R") - -- - -- local disable_pylint_low_severity = false - -- local function toggle_pylint_severity_mode() - -- disable_pylint_low_severity = not disable_pylint_low_severity - -- if disable_pylint_low_severity then - -- lint.linters.pylint.args = simple_pylint_args - -- print("Pylint mode changed to error/warning only") - -- else - -- lint.linters.pylint.args = default_pylint_args - -- print("Pylint mode reset to default") - -- end - -- -- Run the linter again to remove leftover messages or restore - -- -- newly added ones - -- lint.try_lint() - -- end - -- - -- vim.api.nvim_create_user_command("PylintSeverityToggle", toggle_pylint_severity_mode, {}) - end, - }, - - -- Code actions - { - "aznhe21/actions-preview.nvim", - config = function() - vim.keymap.set({ "v", "n" }, "<leader>ca", require("actions-preview").code_actions) - end, - }, - - -- Cool neovim dev stuff - { - "folke/lazydev.nvim", - ft = "lua", -- only load on lua files - opts = { - library = { - -- See the configuration section for more details - -- Load luvit types when the `vim.uv` word is found - { path = "luvit-meta/library", words = { "vim%.uv" } }, - }, - }, - }, - - { "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings -} diff --git a/dot_config/nvim/lua/plugins/neotest.lua b/dot_config/nvim/lua/plugins/neotest.lua deleted file mode 100644 index 68e7bc3..0000000 --- a/dot_config/nvim/lua/plugins/neotest.lua +++ /dev/null @@ -1,44 +0,0 @@ -return { - "nvim-neotest/neotest", - ft = { "python" }, - dependencies = { - "nvim-lua/plenary.nvim", - "antoinemadec/FixCursorHold.nvim", - "nvim-treesitter/nvim-treesitter", - "nvim-neotest/neotest-python", - "nvim-neotest/nvim-nio", - }, - opts = function() - return { - adapters = { - require("neotest-python")({ - -- Use the current Python binary on the path. - -- This will usually be a virtual environment. - python = "python", - runner = "pytest", - is_test_file = function(file_path) ---@param file_path string - -- I place all of my Python test files in a - -- `tests` directory, and they all start with - -- `test_` per Pytest conventions. - local normalized_path = vim.fs.normalize(file_path) - return normalized_path:match("tests/.*%/test_.*%.py$") ~= nil - end, - }), - }, - } - end, - config = function(_, opts) - require("neotest").setup(opts) - - vim.keymap.set({ "n" }, "<leader>tr", require("neotest").run.run, { desc = "Neotest: run test at cursor" }) - vim.keymap.set({ "n" }, "<leader>tf", function() - require("neotest").run.run(vim.fn.expand("%")) - end, { desc = "Neotest: run all tests in current file" }) - vim.keymap.set( - { "n" }, - "<leader>ts", - require("neotest").summary.toggle, - { desc = "Neotest: toggle summary panel" } - ) - end, -} diff --git a/dot_config/nvim/lua/plugins/obsidian.lua.tmpl b/dot_config/nvim/lua/plugins/obsidian.lua.tmpl deleted file mode 100644 index 24982a6..0000000 --- a/dot_config/nvim/lua/plugins/obsidian.lua.tmpl +++ /dev/null @@ -1,82 +0,0 @@ --- vim:ft=lua - -return { - "epwalsh/obsidian.nvim", - version = "*", -- recommended, use latest release instead of latest commit - lazy = true, - ft = "markdown", - -- Replace the above line with this if you only want to load obsidian.nvim for markdown files in your vault: - -- event = { - -- -- If you want to use the home shortcut '~' here you need to call 'vim.fn.expand'. - -- -- E.g. "BufReadPre " .. vim.fn.expand "~" .. "/my-vault/**.md" - -- "BufReadPre path/to/my-vault/**.md", - -- "BufNewFile path/to/my-vault/**.md", - -- }, - keys = { - { "<leader>ob", vim.cmd.ObsidianBacklinks, desc = "Open Obsidian backlinks" }, - { "<leader>o/", vim.cmd.ObsidianSearch, desc = "Open Obsidian search" }, - { "<leader>op", vim.cmd.ObsidianQuickSwitch, desc = "Open Obsidian find files" }, - { "<leader>on", vim.cmd.ObsidianNew, desc = "Create new Obsidian note" }, - { "<leader>ot", vim.cmd.ObsidianToday, desc = "Open today's Obsidian daily note" }, - { "<leader>oy", vim.cmd.ObsidianYesterday, desc = "Open yesterday's Obsidian daily note" }, - { "<leader>ow", vim.cmd.ObsidianTomorrow, desc = "Open tomorrow's Obsidian daily note" }, - { "<leader>od", vim.cmd.ObsidianDailyNote, desc = "Open daily Obsidian note" }, - }, - dependencies = { - -- Required. - "nvim-lua/plenary.nvim", - - -- Optional - "hrsh7th/nvim-cmp", - "nvim-telescope/telescope.nvim", - "nvim-treesitter/nvim-treesitter", - }, - opts = { - workspaces = { - {{- if eq .chezmoi.os "windows" }} - { - name = "work", - path = "~/Documents/Vaults/Work", - }, - {{ else }} - { - name = "personal", - path = "~/Documents/Vaults/Personal", - }, - {{ end }} - }, - - ---@param title string - ---@return string - note_id_func = function(title) - local id = title:gsub(" ", "%-"):lower() - return id - end, - - templates = { - folder = "templates", - date_format = "%Y-%m-%d-%a", - substitutions = { - friendly_date_format = function() - return os.date("%A %B %d, %Y") - end - }, - }, - - daily_notes = { - folder = "dailies", - date_format = "%Y-%m-%d-%a", - alias_format = "%Y-%m-%d-%a", - template = "daily.md", - }, - - callbacks = { - enter_note = function() - -- The folds are too much for these notes - vim.opt_local.foldlevel = 99 - vim.opt_local.foldlevelstart = 99 - end, - }, - - }, -} diff --git a/dot_config/nvim/lua/plugins/oil.lua b/dot_config/nvim/lua/plugins/oil.lua deleted file mode 100644 index ac41c0a..0000000 --- a/dot_config/nvim/lua/plugins/oil.lua +++ /dev/null @@ -1,15 +0,0 @@ -return { - "stevearc/oil.nvim", - dependencies = { "nvim-tree/nvim-web-devicons" }, - lazy = false, - config = function() - require("oil").setup { - keymaps = { - -- Disabling because I want Telescope to find files in Oil - ["<C-p>"] = false - } - } - - vim.keymap.set("n", "g-", "<CMD>Oil<CR>", { desc = "Open parent directory" }) - end, -} diff --git a/dot_config/nvim/lua/plugins/telescope.lua b/dot_config/nvim/lua/plugins/telescope.lua deleted file mode 100644 index 89efb5c..0000000 --- a/dot_config/nvim/lua/plugins/telescope.lua +++ /dev/null @@ -1,12 +0,0 @@ -return { - 'nvim-telescope/telescope.nvim', branch = '0.1.x', - dependencies = { 'nvim-lua/plenary.nvim' }, - config = function() - -- Keymaps - local builtin = require 'telescope.builtin' - vim.keymap.set('n', '<C-p>', builtin.find_files, { desc = 'Find files' }) - vim.keymap.set('n', '<leader>/', builtin.live_grep, { desc = 'Live Grep' }) - vim.keymap.set('n', '<leader>vh', builtin.help_tags, { desc = 'Help menu' }) - end, -} - diff --git a/dot_config/nvim/lua/plugins/todo-comments.lua b/dot_config/nvim/lua/plugins/todo-comments.lua deleted file mode 100644 index b47cb51..0000000 --- a/dot_config/nvim/lua/plugins/todo-comments.lua +++ /dev/null @@ -1,6 +0,0 @@ -return { - "folke/todo-comments.nvim", - event = "VimEnter", - dependencies = { "nvim-lua/plenary.nvim" }, - opts = { signs = false }, -} diff --git a/dot_config/nvim/lua/plugins/treesitter.lua b/dot_config/nvim/lua/plugins/treesitter.lua deleted file mode 100644 index aade475..0000000 --- a/dot_config/nvim/lua/plugins/treesitter.lua +++ /dev/null @@ -1,132 +0,0 @@ -return { - "nvim-treesitter/nvim-treesitter", - dependencies = { - "nvim-treesitter/nvim-treesitter-textobjects", - }, - build = ":TSUpdate", - event = { "BufReadPre", "BufNewFile" }, - opts = { - -- List of parsers to install automatically - ensure_installed = { "lua", "vim", "vimdoc", "python", "json", "toml", "yaml", "bash", "javascript" }, - auto_install = true, - highlight = { - enable = true, - -- Setting this to true will run `:h syntax` and tree-sitter at the same time. - -- Set this to `true` if you depend on 'syntax' being enabled (like for indentation). - -- Using this option may slow down your editor, and you may see some duplicate highlights. - -- Instead of true it can also be a list of languages - additional_vim_regex_highlighting = false, - }, - indent = { - -- Syntax-aware indentation with the = operator - enable = true, - }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = "<leader>vn", - node_incremental = "n", - node_decremental = "<S-n>", - scope_incremental = false, - }, - }, - textobjects = { - move = { - enable = true, - - -- Add jumps to the jumplist for navigating with Ctrl+I/O - set_jumps = true, - goto_next_start = { - ["]m"] = { query = "@call.outer", desc = "Next method/function call start" }, - ["]f"] = { query = "@function.outer", desc = "Next function def start" }, - ["]c"] = { query = "@class.outer", desc = "Next class start" }, - ["]i"] = { query = "@conditional.outer", desc = "Next conditional start" }, - ["]l"] = { query = "@loop.outer", desc = "Next loop start" }, - - -- You can pass a query group to use query from `queries/<lang>/<query_group>.scm file in your runtime path. - -- Below example nvim-treesitter's `locals.scm` and `folds.scm`. They also provide highlights.scm and indent.scm. - ["]s"] = { query = "@scope", query_group = "locals", desc = "Next scope" }, - ["]z"] = { query = "@fold", query_group = "folds", desc = "Next fold" }, - }, - goto_next_end = { - ["]M"] = { query = "@call.outer", desc = "Next method/function call end" }, - ["]F"] = { query = "@function.outer", desc = "Next function def end" }, - ["]C"] = { query = "@class.outer", desc = "Next class end" }, - ["]I"] = { query = "@conditional.outer", desc = "Next conditional end" }, - ["]L"] = { query = "@loop.outer", desc = "Next loop end" }, - }, - goto_previous_start = { - ["[m"] = { query = "@call.outer", desc = "Previous method/function call start" }, - ["[f"] = { query = "@function.outer", desc = "Previous function def start" }, - ["[c"] = { query = "@class.outer", desc = "Previous class start" }, - ["[i"] = { query = "@conditional.outer", desc = "Previous conditional start" }, - ["[l"] = { query = "@loop.outer", desc = "Previous loop start" }, - }, - goto_previous_end = { - ["[M"] = { query = "@call.outer", desc = "Previous method/function call end" }, - ["[F"] = { query = "@function.outer", desc = "Previous function def end" }, - ["[C"] = { query = "@class.outer", desc = "Previous class end" }, - ["[I"] = { query = "@conditional.outer", desc = "Previous conditional end" }, - ["[L"] = { query = "@loop.outer", desc = "Previous loop end" }, - }, - }, - - select = { - enable = true, - - -- automatically jump forward to a text object if the - -- cursor isn't on one when triggering the plugin - lookahead = true, - - keymaps = { - -- Use = as an "assignment" text object - ["a="] = { query = "@assignment.outer", desc = "Select outer part of an assignment" }, - ["i="] = { query = "@assignment.inner", desc = "Select inner part of an assignment" }, - ["l="] = { query = "@assignment.lhs", desc = "Select left hand side of an assignment" }, - ["r="] = { query = "@assignment.rhs", desc = "Select right hand side of an assignment" }, - - -- Use "a" for "argument" - ["aa"] = { query = "@parameter.outer", desc = "Select outer part of an argument / parameter" }, - ["ia"] = { query = "@parameter.inner", desc = "Select inner part of an argument / parameter" }, - - -- Use "i" for "conditional" (saving c for class) - ["ai"] = { query = "@conditional.outer", desc = "Select outer part of a conditional" }, - ["ii"] = { query = "@conditional.inner", desc = "Select inner part of a conditional" }, - - -- Use "l" for "loop" - ["al"] = { query = "@loop.outer", desc = "Select outer part of a loop" }, - ["ij"] = { query = "@loop.inner", desc = "Select inner part of a loop" }, - - -- Use "f" for "function definition" (body of a function) - ["af"] = { query = "@function.outer", desc = "Select outer part of a function definition" }, - ["if"] = { query = "@function.inner", desc = "Select inner part of a function definition" }, - - -- Use "m" for "method call" (invocation of a function) - ["am"] = { query = "@call.outer", desc = "Select outer part of a method/function call" }, - ["im"] = { query = "@call.inner", desc = "Select inner part of a method/function call" }, - - -- Use "c" for "class" - ["ac"] = { query = "@class.outer", desc = "Select outer part of a class" }, - ["ic"] = { query = "@class.inner", desc = "Select inner part of a class" }, - }, - }, - - swap = { - enable = true, - swap_next = { - ["<leader>na"] = "@parameter.inner", -- Swap parameter with next - ["<leader>nf"] = "@function.outer", -- Swap function with next - }, - swap_previous = { - ["<leader>pa"] = "@parameter.inner", -- Swap parameter with previous - ["<leader>pf"] = "@function.outer", -- Swap function with previous - }, - }, - }, - }, - config = function(_, opts) - require("nvim-treesitter.configs").setup(opts) - vim.opt.foldmethod = "expr" - vim.opt.foldexpr = "nvim_treesitter#foldexpr()" - end, -} diff --git a/dot_config/nvim/lua/plugins/undotree.lua b/dot_config/nvim/lua/plugins/undotree.lua deleted file mode 100644 index 3465446..0000000 --- a/dot_config/nvim/lua/plugins/undotree.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - "jiaoshijie/undotree", - dependencies = "nvim-lua/plenary.nvim", - config = true, - keys = { -- load the plugin only when using it's keybinding: - { "<leader>u", "<cmd>lua require('undotree').toggle()<cr>", desc = "Toggle Undotree" }, - }, -} diff --git a/dot_config/nvim/lua/plugins/which-key.lua b/dot_config/nvim/lua/plugins/which-key.lua deleted file mode 100644 index 7410159..0000000 --- a/dot_config/nvim/lua/plugins/which-key.lua +++ /dev/null @@ -1,4 +0,0 @@ -return { - "folke/which-key.nvim", - event = "VeryLazy", -} |
