diff --git a/init.lua b/init.lua index 6ea0e850..d46c4a05 100644 --- a/init.lua +++ b/init.lua @@ -5,7 +5,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.opt` @@ -13,10 +13,10 @@ vim.g.have_nerd_font = false -- For more options, you can see `:help option-list` -- Make line numbers default -vim.opt.number = true +-- vim.opt.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true +vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' @@ -139,6 +139,7 @@ vim.opt.rtp:prepend(lazypath) -- -- NOTE: Here is where you install your plugins. require('lazy').setup({ + { 'catppuccin/nvim', name = 'catppuccin', priority = 1000 }, { 'zbirenbaum/copilot.lua', cmd = 'Copilot', @@ -244,20 +245,26 @@ require('lazy').setup({ config = function() -- This is the function that runs, AFTER loading require('which-key').setup() - -- Document existing key chains - require('which-key').register { - ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, - ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + require('which-key').add { + { 'c', group = '[C]ode' }, + { 'c_', hidden = true }, + { 'd', group = '[D]ocument' }, + { 'd_', hidden = true }, + { 'h', group = 'Git [H]unk' }, + { 'h_', hidden = true }, + { 'r', group = '[R]ename' }, + { 'r_', hidden = true }, + { 's', group = '[S]earch' }, + { 's_', hidden = true }, + { 't', group = '[T]oggle' }, + { 't_', hidden = true }, + { 'w', group = '[W]orkspace' }, + { 'w_', hidden = true }, + } + + require('which-key').add { + { 'h', group = 'Git [H]unk', mode = 'v' }, } - -- visual mode - require('which-key').register({ - ['h'] = { 'Git [H]unk' }, - }, { mode = 'v' }) end, }, @@ -730,7 +737,7 @@ require('lazy').setup({ -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }, sources = { - { name = 'copilot', group_index = 2 }, + { name = 'copilot' }, { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'path' }, @@ -750,7 +757,8 @@ require('lazy').setup({ -- 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 'tokyonight-night' + -- vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'catppuccin-frappe' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none'