diff options
| author | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-04-19 23:35:38 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <jj@r.bdr.sh> | 2026-04-29 01:23:22 +0200 |
| commit | cb3048ea88f56fffa43eeb2cf8262e8518c6c0c4 (patch) | |
| tree | f1739c8cebc8fc97bb218ea025193c5d189d68eb /config | |
| parent | beb1fbaa17a4984a2730a560397d77dcd9bcf26f (diff) | |
Add some new plugins for neovim
Diffstat (limited to 'config')
| -rw-r--r-- | config/nvim/colors/tranquil-light.vim | 3 | ||||
| -rw-r--r-- | config/nvim/init.lua | 9 | ||||
| -rw-r--r-- | config/nvim/lazy-lock.json | 15 | ||||
| -rw-r--r-- | config/nvim/lua/lsp.lua | 21 | ||||
| -rw-r--r-- | config/nvim/lua/plugins.lua | 207 |
5 files changed, 225 insertions, 30 deletions
diff --git a/config/nvim/colors/tranquil-light.vim b/config/nvim/colors/tranquil-light.vim index daf285d..b477136 100644 --- a/config/nvim/colors/tranquil-light.vim +++ b/config/nvim/colors/tranquil-light.vim @@ -173,3 +173,6 @@ hi JannotateCursorLine guibg=#DAE6E3 " Marginalie hi MarginalieHighlight guibg=#DAE6E3 + +" Biscuit Ghost Text +hi BiscuitColor guifg=#CCCCCC diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 1c57f00..92695d2 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -35,6 +35,10 @@ vim.opt.foldnestmax = 10 -- Max 10 folds vim.opt.foldlevelstart = 99 -- Start with all folds open vim.opt.foldcolumn = "auto" +-- Leader Keys +vim.g.mapleader = ' ' +vim.g.maplocalleader = ';' + -- Relative Number Behavior vim.api.nvim_create_autocmd({'FocusLost', 'InsertEnter'}, { pattern = '*', @@ -109,6 +113,11 @@ vim.keymap.set("n", "-", "<CMD>Oil<CR>", { desc = "Open parent directory" }) -- UndoTree vim.keymap.set('n', '<leader>u', vim.cmd.UndotreeToggle) +-- Neotest +vim.keymap.set('n', '<Leader>xt', function() + require("neotest").run.run() +end) + -- Plugins require('plugins') require('treesitter_config') diff --git a/config/nvim/lazy-lock.json b/config/nvim/lazy-lock.json index f10c836..450230f 100644 --- a/config/nvim/lazy-lock.json +++ b/config/nvim/lazy-lock.json @@ -1,7 +1,8 @@ { + "FixCursorHold.nvim": { "branch": "master", "commit": "1900f89dc17c603eec29960f57c00bd9ae696495" }, "blink.cmp": { "branch": "main", "commit": "78336bc89ee5365633bcf754d93df01678b5c08f" }, "friendly-snippets": { "branch": "main", "commit": "6cd7280adead7f586db6fccbd15d2cac7e2188b9" }, - "fzf-lua": { "branch": "main", "commit": "8223eb24a7adf72c4b24e04b751486b492775414" }, + "fzf-lua": { "branch": "main", "commit": "ffa44ee9470743a7697d28df3a1a216fdfe2b09d" }, "gemini.vim": { "branch": "master", "commit": "c9efb59c97b71c28d4678c79fd21fbdd3a69d196" }, "image.nvim": { "branch": "master", "commit": "da2be65c153ba15a14a342b05591652a6df70d58" }, "jannotate.nvim": { "branch": "main", "commit": "6bb5fb17d7da5437ea27a6079216cc5663d5e717" }, @@ -9,20 +10,30 @@ "lazydev.nvim": { "branch": "main", "commit": "ff2cbcba459b637ec3fd165a2be59b7bbaeedf0d" }, "lua-utils.nvim": { "branch": "main", "commit": "e565749421f4bbb5d2e85e37c3cef9d56553d8bd" }, "marginalie.nvim": { "branch": "main", "commit": "0f7fa3e0b558eae20dd56d6ff62d08595a1b88d5" }, + "marks.nvim": { "branch": "master", "commit": "f353e8c08c50f39e99a9ed474172df7eddd89b72" }, + "mini.ai": { "branch": "main", "commit": "43eb2074843950a3a25aae56a5f41362ec043bfa" }, + "mini.icons": { "branch": "main", "commit": "bac6317300e205335df425296570d84322730067" }, "neogen": { "branch": "main", "commit": "23e7e9f883d01289ebd90e98025acc860ea26366" }, "neorg": { "branch": "main", "commit": "a09e0bb9b32e2d0406d4503ae8c1a7ad2ca83eae" }, "neorg-interim-ls": { "branch": "main", "commit": "898898f48fe7a2364d99d32f0dfd95dab5f8591f" }, + "neotest": { "branch": "master", "commit": "fd0b7986dd0ae04e38ec7dc0c78a432e3820839c" }, + "neotest-rspec": { "branch": "main", "commit": "e7dc67c1167a9e593c804a6be6808ba9a5920d43" }, + "neotest-rust": { "branch": "main", "commit": "2c9941d4a358839918fac21d20fc8fef0e1ad05f" }, "nota.nvim": { "branch": "main", "commit": "4f22d307fb9fd0f44f6e6767b97869a238f18160" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim-autopairs": { "branch": "master", "commit": "59bce2eef357189c3305e25bc6dd2d138c1683f5" }, + "nvim-biscuits": { "branch": "main", "commit": "d93dcdee3a3dfd5101785447658e744f153957db" }, "nvim-dap": { "branch": "master", "commit": "45a69eba683a2c448dd9ecfc4de89511f0646b5f" }, "nvim-dap-ui": { "branch": "master", "commit": "1a66cabaa4a4da0be107d5eda6d57242f0fe7e49" }, - "nvim-lspconfig": { "branch": "master", "commit": "e146efacbafed3789ac568abcc5a981c5decaa58" }, + "nvim-lspconfig": { "branch": "master", "commit": "8fde495949782bb61c2605174e231d145a048d8c" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-surround": { "branch": "main", "commit": "9291040de8cd8a4439eb64c441e8d5d2bf884a5a" }, "nvim-treesitter": { "branch": "main", "commit": "4916d6592ede8c07973490d9322f187e07dfefac" }, "nvim-treesitter-endwise": { "branch": "master", "commit": "8fe8a95630f4f2c72a87ba1927af649e0bfaa244" }, + "nvim-treesitter-textobjects": { "branch": "main", "commit": "851e865342e5a4cb1ae23d31caf6e991e1c99f1e" }, "oil.nvim": { "branch": "master", "commit": "0fcc83805ad11cf714a949c98c605ed717e0b83e" }, "pathlib.nvim": { "branch": "main", "commit": "57e5598af6fe253761c1b48e0b59b7cd6699e2c1" }, + "plenary.nvim": { "branch": "master", "commit": "74b06c6c75e4eeb3108ec01852001636d85a932b" }, "snes-syntax-vim": { "branch": "master", "commit": "a6a699c8905f7b6119bf91e44f960667d9f03d59" }, "sniprun": { "branch": "master", "commit": "6416f98924018385f7f5ebfe8dc773a4482426e4" }, "tree-sitter-api-notation": { "branch": "main", "commit": "9fecd8fabdc688b125f3a5e36060a7577549b71e" }, diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua index 2c2cbf2..9838887 100644 --- a/config/nvim/lua/lsp.lua +++ b/config/nvim/lua/lsp.lua @@ -116,6 +116,27 @@ vim.lsp.config('sourcekit', { }) vim.lsp.enable('sourcekit') +-- RUBY ------------------------------------------------------------------------ +vim.lsp.config('ruby', { + cmd = function(dispatchers, config) + return vim.lsp.rpc.start( + { 'mise x -- ruby-lsp' }, + dispatchers, + config and config.root_dir and { cwd = config.cmd_cwd or config.root_dir } + ) + end, + filetypes = { 'ruby', 'eruby' }, + root_markers = { 'Gemfile', '.git' }, + init_options = { + formatter = 'auto', + }, + reuse_client = function(client, config) + config.cmd_cwd = config.root_dir + return client.config.cmd_cwd == config.cmd_cwd + end, +}) +vim.lsp.enable('ruby') + -- Enable inlay hints for Rust when LSP attaches vim.api.nvim_create_autocmd('LspAttach', { callback = function(args) diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index ef68eee..7958eab 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -1,5 +1,3 @@ -vim.g.mapleader = ' ' -vim.g.maplocalleader = ';' local lazypath = vim.fn.stdpath('data') .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system({ 'git', @@ -59,7 +57,7 @@ require('lazy').setup({ 'ARM9/snes-syntax-vim', 'https://git.sr.ht/~torresjrjr/gemini.vim', - --'Debugging + -- Debugging & Testing { 'rcarriga/nvim-dap-ui', dependencies = { @@ -67,6 +65,27 @@ require('lazy').setup({ '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', @@ -80,6 +99,137 @@ require('lazy').setup({ '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 { @@ -129,6 +279,7 @@ require('lazy').setup({ -- Tools 'mbbill/undotree', 'milkypostman/vim-togglelist', + { 'nvim-mini/mini.icons', version = false }, { "3rd/image.nvim", build = false, @@ -164,33 +315,33 @@ require('lazy').setup({ '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", + 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" } }, }, - default_workspace = "brain", } - }, - ["external.interim-ls"] = {}, - ["core.completion"] = { - config = { engine = { module_name = "external.lsp-completion" } }, - }, - } -} + } }, { "michaelb/sniprun", |