From 4f37e50551a65d68d5f5638871e6b230ee36b2b3 Mon Sep 17 00:00:00 2001 From: Beric Bearnson Date: Thu, 11 Apr 2024 09:28:15 -0600 Subject: [PATCH] Change theme, silent jump paragraphs, and add neotest --- init.lua | 48 ++++++++++++++++++++++--------------- lua/custom/plugins/init.lua | 1 + 2 files changed, 30 insertions(+), 19 deletions(-) diff --git a/init.lua b/init.lua index 70b9ec72..fd7dd21d 100644 --- a/init.lua +++ b/init.lua @@ -90,9 +90,18 @@ P.S. You can delete this when you're done too. It's your config now! :) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -vim.cmd.colorscheme 'habamax' vim.cmd [[command! -nargs=0 Q :q]] +-- Define a function to navigate by paragraph without affecting the jump list +local function navigateByParagraph(direction) + -- Send the movement command with 'keepjumps' prefix + vim.api.nvim_feedkeys(':keepjumps ' .. direction, 'n', true) +end + +-- Define mappings to navigate by paragraph +vim.api.nvim_set_keymap('n', '{', ':lua navigateByParagraph("{")', { noremap = true, silent = true }) +vim.api.nvim_set_keymap('n', '}', ':lua navigateByParagraph("}")', { noremap = true, silent = true }) + -- [[ Setting options ]] -- See `:help vim.opt` -- NOTE: You can change these options as you wish! @@ -724,22 +733,22 @@ require('lazy').setup { end, }, - -- { -- You can easily change to a different colorscheme. - -- -- Change the name of the colorscheme plugin below, and then - -- -- change the command in the config to whatever the name of that colorscheme is - -- -- - -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme` - -- 'folke/tokyonight.nvim', - -- lazy = false, -- make sure we load this during startup if it is your main colorscheme - -- priority = 1000, -- make sure to load this before all the other start plugins - -- config = function() - -- -- Load the colorscheme here - -- vim.cmd.colorscheme 'tokyonight-night' - -- - -- -- You can configure highlights by doing something like - -- vim.cmd.hi 'Comment gui=none' - -- end, - -- }, + { -- You can easily change to a different colorscheme. + -- Change the name of the colorscheme plugin below, and then + -- change the command in the config to whatever the name of that colorscheme is + -- + -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme` + 'rebelot/kanagawa.nvim', + lazy = false, -- make sure we load this during startup if it is your main colorscheme + priority = 1000, -- make sure to load this before all the other start plugins + config = function() + -- Load the colorscheme here + vim.cmd.colorscheme 'kanagawa' + + -- You can configure highlights by doing something like + vim.cmd.hi 'Comment gui=none' + end, + }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -805,6 +814,7 @@ require('lazy').setup { end, }, + { 'nvim-neotest/nvim-nio' }, -- The following two comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- put them in the right spots if you want. @@ -814,8 +824,8 @@ require('lazy').setup { -- Here are some example plugins that I've included in the kickstart repository. -- Uncomment any of the lines below to enable them (you will need to restart nvim). -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 77e4e3bc..9809e313 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -16,4 +16,5 @@ return { end, }, { 'tpope/vim-fugitive' }, + { 'rebelot/kanagawa.nvim' }, }