From a701962f67f1285ae4621bfee867c5b27d5409f9 Mon Sep 17 00:00:00 2001 From: Thomas Dorsch Date: Wed, 13 Aug 2025 07:13:54 +0000 Subject: [PATCH] Replacing colorscheme with cattpuccin, adding custom init.lua Custom init.lua will overwrite / extend stuff which is placed in the main init.lua --- init.lua | 42 +++++++++++++++---------------- lua/custom/plugins/cattpuccin.lua | 12 +++++++++ lua/custom/plugins/init.lua | 16 ++++++++++++ 3 files changed, 49 insertions(+), 21 deletions(-) create mode 100644 lua/custom/plugins/cattpuccin.lua diff --git a/init.lua b/init.lua index 7ea96864..f23748a6 100644 --- a/init.lua +++ b/init.lua @@ -876,27 +876,27 @@ require('lazy').setup({ }, }, - { -- 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', - priority = 1000, -- Make sure to load this before all the other start plugins. - config = function() - ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments - }, - } - - -- 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' - 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', + -- priority = 1000, -- Make sure to load this before all the other start plugins. + -- config = function() + -- ---@diagnostic disable-next-line: missing-fields + -- require('tokyonight').setup { + -- styles = { + -- comments = { italic = false }, -- Disable italics in comments + -- }, + -- } + -- + -- -- 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' + -- end, + -- }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, diff --git a/lua/custom/plugins/cattpuccin.lua b/lua/custom/plugins/cattpuccin.lua new file mode 100644 index 00000000..bba8440a --- /dev/null +++ b/lua/custom/plugins/cattpuccin.lua @@ -0,0 +1,12 @@ +return { + "catppuccin/nvim", + name = "catppuccin", + priority = 1001, + config = function() + require("catppuccin").setup({ + flavour = "mocha" + }) + vim.cmd.colorscheme "catppuccin" + end, +} + diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8..cfdcf3c2 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,20 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information + +-- Set the blinking cursor settings +vim.o.guicursor = 'n-v:block,i:ver25,r-cr-o:hor20,a:blinkwait700-blinkoff400-blinkon250' + +-- Make sure, that when we exit nvim the previous cursor settings get restored +vim.cmd [[ + augroup RestoreCursorShapeOnExit + autocmd! + autocmd VimLeave * set guicursor=a:block20 + augroup END +]] + +-- Remap for dealing with word wrap in v mode +vim.keymap.set('v', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +vim.keymap.set('v', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + return {}