local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system({ 'git', 'clone', '--filter=blob:none', 'https://github.com/folke/lazy.nvim.git', '--branch=stable', -- latest stable release lazypath, }) end vim.opt.rtp:prepend(lazypath) require('lazy').setup({ { 'ibhagwan/fzf-lua', config = function() -- calling `setup` is optional for customization require('fzf-lua').setup({ winopts={ width=1, height=0.4, row=1 }, fzf_opts={ ['--layout']='default' }, fzf_colors = { ['fg'] = {'fg', 'Normal'}, ['bg'] = {'bg', 'Normal'}, ['hl'] = {'fg', 'Comment'}, ['fg+'] = {'fg', 'Type'}, ['bg+'] = {'bg', 'Comment'}, ['hl+'] = {'fg', '@fzf.hlplus'}, ['info'] = {'fg', 'PreProc'}, ['prompt'] = {'fg', 'Conditional'}, ['pointer'] = {'fg', 'Exception'}, ['marker'] = {'fg', 'Keyword'}, ['spinner'] = {'fg', 'Label'}, ['header'] = {'fg', 'Comment'} }, previewers = { builtin = { extensions = { ['png'] = { 'chafa', '-f', 'symbols', '{file}' }, ['gif'] = { 'chafa', '-f', 'symbols', '{file}' }, ['svg'] = { 'chafa', '-f', 'symbols', '{file}' }, ['jpg'] = { 'chafa', '-f', 'symbols', '{file}' }, ['jpeg'] = { 'chafa', '-f', 'symbols', '{file}' } } } } }) end }, -- Syntaxes 'ARM9/snes-syntax-vim', 'https://git.sr.ht/~torresjrjr/gemini.vim', { 'Julian/lean.nvim', event = { 'BufReadPre *.lean', 'BufNewFile *.lean' }, dependencies = {}, ---@type lean.Config opts = { mappings = true, } }, { "R-nvim/R.nvim", lazy = false }, -- Debugging & Testing { 'rcarriga/nvim-dap-ui', dependencies = { 'mfussenegger/nvim-dap', 'nvim-neotest/nvim-nio' } }, { "nvim-neotest/neotest", dependencies = { "nvim-neotest/nvim-nio", "nvim-lua/plenary.nvim", "antoinemadec/FixCursorHold.nvim", "nvim-treesitter/nvim-treesitter", -- The test runners "olimorris/neotest-rspec", "rouge8/neotest-rust", }, config = function() require("neotest").setup({ adapters = { require("neotest-rspec"), require("neotest-rust") }, }) end, }, -- Editing 'RRethy/nvim-treesitter-endwise', { 'windwp/nvim-autopairs', event = "InsertEnter", config = true }, 'michaeljsmith/vim-indent-object', { 'danymat/neogen', config = true }, { "chentoast/marks.nvim", event = "VeryLazy", opts = {}, }, { 'code-biscuits/nvim-biscuits', dependencies = { 'nvim-treesitter/nvim-treesitter', }, opts = {} }, { "nvim-treesitter/nvim-treesitter-textobjects", branch = "main", init = function() -- vim.g.no_plugin_maps = true end, config = function() require("nvim-treesitter-textobjects").setup { select = { lookahead = true, set_jumps = true, }, } -- Text Objects 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) vim.keymap.set({ "x", "o" }, "as", function() require "nvim-treesitter-textobjects.select".select_textobject("@local.scope", "locals") end) vim.keymap.set({ "x", "o" }, "aa", function() require "nvim-treesitter-textobjects.select".select_textobject("@parameter.outer", "textobjects") end) vim.keymap.set({ "x", "o" }, "ia", function() require "nvim-treesitter-textobjects.select".select_textobject("@parameter.inner", "textobjects") end) -- Moves 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) vim.keymap.set({ "n", "x", "o" }, "]o", function() require("nvim-treesitter-textobjects.move").goto_next_start({"@loop.inner", "@loop.outer"}, "textobjects") end) 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" }, "]k", function() require("nvim-treesitter-textobjects.move").goto_next_start("@conditional.outer", "textobjects") end) vim.keymap.set({ "n", "x", "o" }, "]K", function() require("nvim-treesitter-textobjects.move").goto_next_end("@conditional.outer", "textobjects") 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" }, "]a", function() require("nvim-treesitter-textobjects.move").goto_next_start("@parameter.inner", "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) vim.keymap.set({ "n", "x", "o" }, "[o", function() require("nvim-treesitter-textobjects.move").goto_previous_start({"@loop.inner", "@loop.outer"}, "textobjects") end) vim.keymap.set({ "n", "x", "o" }, "[s", function() require("nvim-treesitter-textobjects.move").goto_previous_start("@local.scope", "locals") end) vim.keymap.set({ "n", "x", "o" }, "[z", function() require("nvim-treesitter-textobjects.move").goto_previous_start("@fold", "folds") end) vim.keymap.set({ "n", "x", "o" }, "[k", function() require("nvim-treesitter-textobjects.move").goto_previous_start("@conditional.outer", "textobjects") end) vim.keymap.set({ "n", "x", "o" }, "[K", function() require("nvim-treesitter-textobjects.move").goto_previous_end("@conditional.outer", "textobjects") end) vim.keymap.set({ "n", "x", "o" }, "[a", function() require("nvim-treesitter-textobjects.move").goto_previous_start("@parameter.inner", "textobjects") end) end, }, { "kylechui/nvim-surround", event = "VeryLazy", -- Optional: See `:h nvim-surround.configuration` and `:h nvim-surround.setup` for details config = function() require("nvim-surround").setup() end }, -- Treesitter { 'nvim-treesitter/nvim-treesitter', lazy = false, build = ':TSUpdate', branch = 'main' }, 'https://git.sr.ht/~rbdr/tree-sitter-api-notation', 'https://git.sr.ht/~rbdr/tree-sitter-wmap', -- LSP { 'neovim/nvim-lspconfig', lazy = false, }, { 'saghen/blink.cmp', dependencies = { 'rafamadriz/friendly-snippets' }, version = '1.*', ---@module 'blink.cmp' ---@type blink.cmp.Config opts = { keymap = { preset = 'enter', [''] = { 'snippet_forward', 'select_next', 'fallback' }, [''] = { 'snippet_backward', 'select_prev', 'fallback' }, }, sources = { default = { 'lsp', 'path', 'buffer', 'snippets' }, per_filetype = { markdown = { 'lsp'}, norg = { 'lsp'} } }, fuzzy = { implementation = "prefer_rust_with_warning" }, }, opts_extend = { "sources.default" } }, { "folke/lazydev.nvim", ft = "lua", opts = {}, }, -- Tools 'mbbill/undotree', 'milkypostman/vim-togglelist', { 'nvim-mini/mini.icons', version = false }, { "3rd/image.nvim", build = false, opts = { processor = "magick_cli", } }, { 'folke/which-key.nvim', event = 'VeryLazy', init = function() vim.o.timeout = true vim.o.timeoutlen = 300 end, opts = {} }, { 'stevearc/oil.nvim', opts = { keymaps = { [''] = false, [''] = 'actions.preview' } } }, { 'nvim-neorg/neorg', lazy = false, version = "*", config = true, dependencies = { 'nvim-neorg/tree-sitter-norg', 'nvim-neorg/tree-sitter-norg-meta', }, opts = { load = { ["core.defaults"] = {}, ["core.concealer"] = {}, ["core.pivot"] = {}, ["core.latex.renderer"] = {}, ["core.journal"] = { config = { journal_folder = "periodic/daily", strategy = "flat", template_name = "../../templates/daily.norg", workspace = "brain", }, }, ["core.dirman"] = { config = { workspaces = { brain = "~/brain", }, default_workspace = "brain", } }, ["external.interim-ls"] = {}, ["core.completion"] = { config = { engine = { module_name = "external.lsp-completion" } }, }, } } }, { "michaelb/sniprun", branch = "master", build = "sh install.sh", -- do 'sh install.sh 1' if you want to force compile locally -- (instead of fetching a binary from the github release). Requires Rust >= 1.65 config = function() require("sniprun").setup({ -- your options }) end, }, 'benlubas/neorg-interim-ls', { 'https://git.sr.ht/~rbdr/nota.nvim', opts = { norg = true, } }, 'https://git.sr.ht/~rbdr/jannotate.nvim', 'https://git.sr.ht/~rbdr/marginalie.nvim' })