From 4b0e638557617dda8bacef06ffab27968d5f864d Mon Sep 17 00:00:00 2001 From: dover_shen Date: Thu, 22 Aug 2024 03:00:52 +0800 Subject: [PATCH] patch-2024/08/22 --- init.lua | 30 +++++++++++++++++++----------- lua/custom/plugins/harpoon.lua | 24 ++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index df6e0279..ada39865 100644 --- a/init.lua +++ b/init.lua @@ -1,4 +1,4 @@ --- Set as the leader key +-- Set as the leader keyinit -- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) vim.g.mapleader = ' ' @@ -6,7 +6,6 @@ vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal vim.g.have_nerd_font = true - -- [[ Setting options ]] -- See `:help vim.opt` -- NOTE: You can change these options as you wish! @@ -522,6 +521,7 @@ require('lazy').setup({ prettierd = {}, prettier = {}, eslint = {}, + eslint_d = {}, html = {}, cssls = {}, @@ -738,24 +738,23 @@ require('lazy').setup({ -- 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', + 'sainnhe/everforest', + -- 'catppuccin/nvim', priority = 1000, -- Make sure to load this before all the other start plugins. + config = function() + vim.g.everforest_enable_italic = true + -- vim.g.everforest_background = 'hard' + end, init = function() -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'kanagawa' + vim.cmd.colorscheme 'everforest' + -- vim.cmd.colorscheme 'catppuccin-frappe' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' end, - config = function() - require('kanagawa').setup { - background = { - dark = 'dragon', - }, - } - end, }, -- Highlight todo, notes, etc in comments @@ -823,6 +822,15 @@ require('lazy').setup({ additional_vim_regex_highlighting = { 'ruby' }, }, indent = { enable = true, disable = { 'ruby' } }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = 'gnn', + node_incremental = 'grn', + scope_incremental = 'grc', + node_decremental = 'grm', + }, + }, }, config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` diff --git a/lua/custom/plugins/harpoon.lua b/lua/custom/plugins/harpoon.lua index 65b172d0..a2359f23 100644 --- a/lua/custom/plugins/harpoon.lua +++ b/lua/custom/plugins/harpoon.lua @@ -26,6 +26,18 @@ return { vim.keymap.set('n', '4', function() harpoon:list():select(4) end) + vim.keymap.set('n', '5', function() + harpoon:list():select(5) + end) + vim.keymap.set('n', '6', function() + harpoon:list():select(6) + end) + vim.keymap.set('n', '7', function() + harpoon:list():select(7) + end) + vim.keymap.set('n', '8', function() + harpoon:list():select(8) + end) vim.keymap.set('n', '', function() harpoon:list():replace_at(1) end) @@ -38,5 +50,17 @@ return { vim.keymap.set('n', '', function() harpoon:list():replace_at(4) end) + vim.keymap.set('n', '', function() + harpoon:list():replace_at(5) + end) + vim.keymap.set('n', '', function() + harpoon:list():replace_at(6) + end) + vim.keymap.set('n', '', function() + harpoon:list():replace_at(7) + end) + vim.keymap.set('n', '', function() + harpoon:list():replace_at(8) + end) end, }