From d7348e755b005780a6478e4b29b52ed20e5b45fd Mon Sep 17 00:00:00 2001 From: David Ponte Date: Tue, 22 Apr 2025 18:01:31 +0200 Subject: [PATCH 01/14] feat: add monokai colorscheme and nvim-tree plugin configuration --- init.lua | 37 +++++++++++++++++++++++++---- lua/custom/plugins/codam-header.lua | 17 +++++++++++++ lua/kickstart/plugins/nvim-tree.lua | 16 +++++++++++++ 3 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 lua/custom/plugins/codam-header.lua create mode 100644 lua/kickstart/plugins/nvim-tree.lua diff --git a/init.lua b/init.lua index 776c6873ff6..8ef39791e03 100644 --- a/init.lua +++ b/init.lua @@ -889,6 +889,13 @@ require('lazy').setup({ vim.cmd.colorscheme 'tokyonight-night' end, }, + { + 'tanvirtin/monokai.nvim', + config = function() + -- pcall(vim.cmd, [[colorscheme monokai]]) + require('monokai').setup { palette = require('monokai').classic } + end + }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -936,7 +943,22 @@ require('lazy').setup({ main = 'nvim-treesitter.configs', -- Sets main module to use for opts -- [[ Configure Treesitter ]] See `:help nvim-treesitter` opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, + ensure_installed = { + 'bash', + 'c', + 'diff', + 'html', + 'lua', + 'luadoc', + 'markdown', + 'markdown_inline', + 'query', + 'vim', + 'vimdoc', + 'javascript', + 'rust', + 'typescript', + }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -976,12 +998,19 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, - -- + { import = 'custom.plugins' }, + { + 'BeerB34r/codam-header.nvim', + cmd = 'Stdheader', + config = function() + require('custom.plugins.codam-header').config() + end, + lazy = true, + }, -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! -- In normal mode type `sh` then write `lazy.nvim-plugin` - -- you can continue same window with `sr` which resumes last telescope search + -- you can co tinue same window with `sr` which resumes last telescope search }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/custom/plugins/codam-header.lua b/lua/custom/plugins/codam-header.lua new file mode 100644 index 00000000000..ec221987943 --- /dev/null +++ b/lua/custom/plugins/codam-header.lua @@ -0,0 +1,17 @@ +-- Codam header +return { + config = function() + require('codamheader').setup { + auto_update = true, + user = 'dponte', + mail = 'dponte@student.codam.nl', + git = { + enabled = false, + bin = 'git', + user_global = true, + email_global = true, + }, + exascii_left = false, + } + end, +} diff --git a/lua/kickstart/plugins/nvim-tree.lua b/lua/kickstart/plugins/nvim-tree.lua new file mode 100644 index 00000000000..4419a1cce40 --- /dev/null +++ b/lua/kickstart/plugins/nvim-tree.lua @@ -0,0 +1,16 @@ +require('nvim-tree').setup { + sort = { + sorter = 'case_sensitive', + folders_first = true, + files_first = false, + }, + view = { + width = 30, + }, + renderer = { + group_empty = true, + }, + filters = { + dotfiles = true, + }, +} From 53a462532617bb4eef8f190db8742ce0f6af2e7c Mon Sep 17 00:00:00 2001 From: David Ponte Date: Tue, 22 Apr 2025 20:51:31 +0200 Subject: [PATCH 02/14] refactor: update codam-header plugin configuration and clean up unused code feat: nvim-tree and neo-tree fully functional --- init.lua | 159 +++++----------------------- lua/custom/plugins/codam-header.lua | 26 ++--- lua/custom/plugins/nvim-tree.lua | 25 +++++ lua/kickstart/plugins/nvim-tree.lua | 16 --- lua/options.lua | 70 ++++++++++++ 5 files changed, 130 insertions(+), 166 deletions(-) create mode 100644 lua/custom/plugins/nvim-tree.lua delete mode 100644 lua/kickstart/plugins/nvim-tree.lua create mode 100644 lua/options.lua diff --git a/init.lua b/init.lua index 8ef39791e03..71156af80d4 100644 --- a/init.lua +++ b/init.lua @@ -1,25 +1,5 @@ --[[ -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== -======== .-----. ======== -======== .----------------------. | === | ======== -======== |.-""""""""""""""""""-.| |-----| ======== -======== || || | === | ======== -======== || KICKSTART.NVIM || |-----| ======== -======== || || | === | ======== -======== || || |-----| ======== -======== ||:Tutor || |:::::| ======== -======== |'-..................-'| |____o| ======== -======== `"")----------------(""` ___________ ======== -======== /::::::::::| |::::::::::\ \ no mouse \ ======== -======== /:::========| |==hjkl==:::\ \ required \ ======== -======== '""""""""""""' '""""""""""""' '""""""""""' ======== -======== ======== -===================================================================== -===================================================================== - What is Kickstart? Kickstart.nvim is *not* a distribution. @@ -43,39 +23,6 @@ What is Kickstart? Kickstart Guide: - TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. - - If you don't know what this means, type the following: - - - - : - - Tutor - - - - (If you already know the Neovim basics, you can skip this step.) - - Once you've completed that, you can continue working through **AND READING** the rest - of the kickstart init.lua. - - Next, run AND READ `:help`. - This will open up a help window with some basic information - about reading, navigating and searching the builtin help documentation. - - This should be the first place you go to look when you're stuck or confused - with something. It's one of my favorite Neovim features. - - MOST IMPORTANTLY, we provide a keymap "sh" to [s]earch the [h]elp documentation, - which is very useful when you're not exactly sure of what you're looking for. - - I have left several `:help X` comments throughout the init.lua - These are hints about where to find more information about the relevant settings, - plugins or Neovim features used in Kickstart. - - NOTE: Look for lines like this - - Throughout the file. These are for you, the reader, to help you understand what is happening. - Feel free to delete them once you know what you're doing, but they should serve as a guide - for when you are first encountering a few different constructs in your Neovim config. - If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. I hope you enjoy your Neovim journey, @@ -90,76 +37,18 @@ P.S. You can delete this when you're done too. It's your config now! :) 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 - --- [[ Setting options ]] --- See `:help vim.opt` --- NOTE: You can change these options as you wish! --- For more options, you can see `:help option-list` - --- Make line numbers default -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 - --- Enable mouse mode, can be useful for resizing splits for example! -vim.opt.mouse = 'a' - --- Don't show the mode, since it's already in the status line -vim.opt.showmode = false - --- Sync clipboard between OS and Neovim. --- Schedule the setting after `UiEnter` because it can increase startup-time. --- Remove this option if you want your OS clipboard to remain independent. --- See `:help 'clipboard'` -vim.schedule(function() - vim.opt.clipboard = 'unnamedplus' -end) +-- Disables netrw for better file explorers +vim.g.loaded_netrw = 1 +vim.g.loaded_netrwPlugin = 1 --- Enable break indent -vim.opt.breakindent = true +-- optionally enable 24-bit colour +vim.opt.termguicolors = true --- Save undo history -vim.opt.undofile = true - --- Case-insensitive searching UNLESS \C or one or more capital letters in the search term -vim.opt.ignorecase = true -vim.opt.smartcase = true - --- Keep signcolumn on by default -vim.opt.signcolumn = 'yes' - --- Decrease update time -vim.opt.updatetime = 250 - --- Decrease mapped sequence wait time -vim.opt.timeoutlen = 300 - --- Configure how new splits should be opened -vim.opt.splitright = true -vim.opt.splitbelow = true - --- Sets how neovim will display certain whitespace characters in the editor. --- See `:help 'list'` --- and `:help 'listchars'` -vim.opt.list = true -vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } - --- Preview substitutions live, as you type! -vim.opt.inccommand = 'split' - --- Show which line your cursor is on -vim.opt.cursorline = true - --- Minimal number of screen lines to keep above and below the cursor. -vim.opt.scrolloff = 10 +-- Set to true if you have a Nerd Font installed and selected in the terminal +vim.g.have_nerd_font = false --- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), --- instead raise a dialog asking if you wish to save the current file(s) --- See `:help 'confirm'` -vim.opt.confirm = true +-- Load options from options.lua +require 'options' -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` @@ -453,6 +342,13 @@ require('lazy').setup({ end, { desc = '[S]earch [N]eovim files' }) end, }, + -- { + -- 'nvim-tree/nvim-tree.lua', + -- dependencies = { 'nvim-tree/nvim-web-devicons' }, -- Optional, for file icons + -- config = function() + -- require('nvim-tree').setup {} + -- end, + -- }, -- LSP Plugins { @@ -894,7 +790,7 @@ require('lazy').setup({ config = function() -- pcall(vim.cmd, [[colorscheme monokai]]) require('monokai').setup { palette = require('monokai').classic } - end + end, }, -- Highlight todo, notes, etc in comments @@ -987,26 +883,19 @@ 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.lint', - -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.debug', + require 'kickstart.plugins.indent_line', + require 'kickstart.plugins.lint', + require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- 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. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. { import = 'custom.plugins' }, - { - 'BeerB34r/codam-header.nvim', - cmd = 'Stdheader', - config = function() - require('custom.plugins.codam-header').config() - end, - lazy = true, - }, + -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! -- In normal mode type `sh` then write `lazy.nvim-plugin` diff --git a/lua/custom/plugins/codam-header.lua b/lua/custom/plugins/codam-header.lua index ec221987943..ecb1c718031 100644 --- a/lua/custom/plugins/codam-header.lua +++ b/lua/custom/plugins/codam-header.lua @@ -1,17 +1,13 @@ --- Codam header return { - config = function() - require('codamheader').setup { - auto_update = true, - user = 'dponte', - mail = 'dponte@student.codam.nl', - git = { - enabled = false, - bin = 'git', - user_global = true, - email_global = true, - }, - exascii_left = false, - } + "f-ras/codam-header.nvim", + cmd = { "Stdheader" }, + opts = { + auto_update = true, -- Update header when saving. + user = 'dponte', + mail = 'dponte@student.codam.nl', -- Your mail. + -- add other options. + }, + config = function(_, opts) + require("codamheader").setup(opts) end, -} +} \ No newline at end of file diff --git a/lua/custom/plugins/nvim-tree.lua b/lua/custom/plugins/nvim-tree.lua new file mode 100644 index 00000000000..febf277d8c2 --- /dev/null +++ b/lua/custom/plugins/nvim-tree.lua @@ -0,0 +1,25 @@ +return { + 'nvim-tree/nvim-tree.lua', + dependencies = { 'nvim-tree/nvim-web-devicons' }, -- Optional, for file icons + config = function() + require('nvim-tree').setup { + sort = { + sorter = 'case_sensitive', + folders_first = true, + files_first = false, + }, + view = { + width = 30, + }, + renderer = { + group_empty = true, + }, + filters = { + dotfiles = true, + }, + } + + -- Key mapping to toggle NvimTree + vim.keymap.set('n', '', ':NvimTreeToggle', { desc = 'Toggle NvimTree' }) + end, +} diff --git a/lua/kickstart/plugins/nvim-tree.lua b/lua/kickstart/plugins/nvim-tree.lua deleted file mode 100644 index 4419a1cce40..00000000000 --- a/lua/kickstart/plugins/nvim-tree.lua +++ /dev/null @@ -1,16 +0,0 @@ -require('nvim-tree').setup { - sort = { - sorter = 'case_sensitive', - folders_first = true, - files_first = false, - }, - view = { - width = 30, - }, - renderer = { - group_empty = true, - }, - filters = { - dotfiles = true, - }, -} diff --git a/lua/options.lua b/lua/options.lua new file mode 100644 index 00000000000..52268c17363 --- /dev/null +++ b/lua/options.lua @@ -0,0 +1,70 @@ +-- [[ Setting options ]] +-- See `:help vim.opt` +-- NOTE: You can change these options as you wish! +-- For more options, you can see `:help option-list` + +-- Make line numbers default +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 + +-- Enable mouse mode, can be useful for resizing splits for example! +vim.opt.mouse = 'a' + +-- Don't show the mode, since it's already in the status line +vim.opt.showmode = false + +-- Sync clipboard between OS and Neovim. +-- Schedule the setting after `UiEnter` because it can increase startup-time. +-- Remove this option if you want your OS clipboard to remain independent. +-- See `:help 'clipboard'` +vim.schedule(function() + vim.opt.clipboard = 'unnamedplus' +end) + +-- Enable break indent +vim.opt.breakindent = true + +-- Save undo history +vim.opt.undofile = true + +-- Case-insensitive searching UNLESS \C or one or more capital letters in the search term +vim.opt.ignorecase = true +vim.opt.smartcase = true + +-- Keep signcolumn on by default +vim.opt.signcolumn = 'yes' + +-- Decrease update time +vim.opt.updatetime = 250 + +-- Decrease mapped sequence wait time +vim.opt.timeoutlen = 300 + +-- Configure how new splits should be opened +vim.opt.splitright = true +vim.opt.splitbelow = true + +-- swapfile +vim.opt.swapfile = false + +-- Sets how neovim will display certain whitespace characters in the editor. +-- See `:help 'list'` +-- and `:help 'listchars'` +vim.opt.list = true +vim.opt.listchars = { tab = '» ', trail = '·', nbsp = '␣' } + +-- Preview substitutions live, as you type! +vim.opt.inccommand = 'split' + +-- Show which line your cursor is on +vim.opt.cursorline = true + +-- Minimal number of screen lines to keep above and below the cursor. +vim.opt.scrolloff = 10 + +-- if performing an operation that would fail due to unsaved changes in the buffer (like `:q`), +-- instead raise a dialog asking if you wish to save the current file(s) +-- See `:help 'confirm'` +vim.opt.confirm = true From 5153613b3be6bda083595cdb96b2eba72dca05f5 Mon Sep 17 00:00:00 2001 From: David Ponte Date: Mon, 28 Apr 2025 15:56:40 +0200 Subject: [PATCH 03/14] Adds window resizing keymaps and Monokai theme Implements keymaps for window resizing and maximizing, providing more flexibility in window management. Also, includes Monokai theme with classic palette as a user option. Adds cpp to ensure_installed languages for treesitter. Add C LSP in Mason Plugin Added after folder to make sure comment string isn't altered by other plugins --- after/ftplugin/c.lua | 5 +++++ ftplugin/c.lua | 19 +++++++++++++++++++ init.lua | 43 +++++++++++++++++++++++++++---------------- 3 files changed, 51 insertions(+), 16 deletions(-) create mode 100644 after/ftplugin/c.lua create mode 100644 ftplugin/c.lua diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua new file mode 100644 index 00000000000..9fb44987097 --- /dev/null +++ b/after/ftplugin/c.lua @@ -0,0 +1,5 @@ +local set = vim.opt_local + +set.shiftwidth = 4 +set.tabstop = 4 +set.commentstring = '/* %s */' diff --git a/ftplugin/c.lua b/ftplugin/c.lua new file mode 100644 index 00000000000..7894aabecba --- /dev/null +++ b/ftplugin/c.lua @@ -0,0 +1,19 @@ +-- local set = vim.opt_local + +-- Define a custom command ':intmain' that inserts int main() {} template +vim.api.nvim_create_user_command('IntMain', function() + local current_line = vim.api.nvim_win_get_cursor(0)[1] + local lines = { + '#include ', + '', + 'int main ()', + '{', + ' ', + ' printf();', + ' return 0;', + '}', + } + vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, lines) + -- Position cursor inside the function body + vim.api.nvim_win_set_cursor(0, { current_line + 1, 4 }) +end, {}) diff --git a/init.lua b/init.lua index 71156af80d4..84493aa7183 100644 --- a/init.lua +++ b/init.lua @@ -51,12 +51,29 @@ vim.g.have_nerd_font = false require 'options' -- [[ Basic Keymaps ]] --- See `:help vim.keymap.set()` +-- `:help vim.keymap.set()` -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') +-- Resize window +-- Leader+<: Decrease window width +vim.keymap.set('n', '<', 'vertical resize -5', { silent = true, desc = 'Decrease window width' }) + +-- Leader+>: Increase window width +vim.keymap.set('n', '>', 'vertical resize +5', { silent = true, desc = 'Increase window width' }) + +-- Alternative keys for larger adjustments +vim.keymap.set('n', '[', 'vertical resize -10', { silent = true, desc = 'Decrease window width more' }) +vim.keymap.set('n', ']', 'vertical resize +10', { silent = true, desc = 'Increase window width more' }) + +-- Leader+=: Equal width for all windows +vim.keymap.set('n', '=', '=', { silent = true, desc = 'Equal size all windows' }) + +-- Leader+|: Maximize current window width +vim.keymap.set('n', '|', '|', { silent = true, desc = 'Maximize window width' }) + -- Diagnostic keymaps vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) @@ -342,13 +359,6 @@ require('lazy').setup({ end, { desc = '[S]earch [N]eovim files' }) end, }, - -- { - -- 'nvim-tree/nvim-tree.lua', - -- dependencies = { 'nvim-tree/nvim-web-devicons' }, -- Optional, for file icons - -- config = function() - -- require('nvim-tree').setup {} - -- end, - -- }, -- LSP Plugins { @@ -764,6 +774,13 @@ require('lazy').setup({ }, }, + { + 'tanvirtin/monokai.nvim', + config = function() + -- pcall(vim.cmd, [[colorscheme monokai]]) + require('monokai').setup { palette = require('monokai').classic } + 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. @@ -775,7 +792,7 @@ require('lazy').setup({ ---@diagnostic disable-next-line: missing-fields require('tokyonight').setup { styles = { - comments = { italic = false }, -- Disable italics in comments + -- comments = { italic = false }, -- Disable italics in comments }, } @@ -785,13 +802,6 @@ require('lazy').setup({ vim.cmd.colorscheme 'tokyonight-night' end, }, - { - 'tanvirtin/monokai.nvim', - config = function() - -- pcall(vim.cmd, [[colorscheme monokai]]) - require('monokai').setup { palette = require('monokai').classic } - end, - }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, @@ -842,6 +852,7 @@ require('lazy').setup({ ensure_installed = { 'bash', 'c', + 'cpp', 'diff', 'html', 'lua', From 10ccea08ec78cd5e0595bb3bf99cc9588ab8f055 Mon Sep 17 00:00:00 2001 From: David Ponte Date: Sun, 4 May 2025 19:12:56 +0200 Subject: [PATCH 04/14] fix: correct command name casing and adjust indentation in C template feat: add Monokai Pro and Monokai Nightasty theme configurations --- ftplugin/c.lua | 15 +++++-- init.lua | 108 ++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 117 insertions(+), 6 deletions(-) diff --git a/ftplugin/c.lua b/ftplugin/c.lua index 7894aabecba..9fdf210e5d8 100644 --- a/ftplugin/c.lua +++ b/ftplugin/c.lua @@ -1,6 +1,6 @@ -- local set = vim.opt_local --- Define a custom command ':intmain' that inserts int main() {} template +-- Define a custom command ':IntMain' that inserts int main() {} template vim.api.nvim_create_user_command('IntMain', function() local current_line = vim.api.nvim_win_get_cursor(0)[1] local lines = { @@ -8,12 +8,19 @@ vim.api.nvim_create_user_command('IntMain', function() '', 'int main ()', '{', - ' ', - ' printf();', - ' return 0;', + ' ', + ' printf();', + ' return 0;', '}', } vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, lines) -- Position cursor inside the function body vim.api.nvim_win_set_cursor(0, { current_line + 1, 4 }) end, {}) + +vim.api.nvim_create_user_command('Libft', function() + local current_line = vim.api.nvim_win_get_cursor(0)[1] + vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, { + '#include "libft.h"', + }) +end, {}) diff --git a/init.lua b/init.lua index 84493aa7183..5b89c74682e 100644 --- a/init.lua +++ b/init.lua @@ -742,7 +742,8 @@ require('lazy').setup({ appearance = { -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned - nerd_font_variant = 'mono', + -- nerd_font_variant = 'mono', + nerd_font_variant = 'normal', }, completion = { @@ -773,7 +774,109 @@ require('lazy').setup({ signature = { enabled = true }, }, }, + { + 'loctvl842/monokai-pro.nvim', + opts = { + transparent_background = true, + terminal_colors = true, + devicons = true, -- highlight the icons of `nvim-web-devicons` + styles = { + comment = { italic = true }, + keyword = { italic = true }, -- any other keyword + type = { italic = true }, -- (preferred) int, long, char, etc + storageclass = { italic = true }, -- static, register, volatile, etc + structure = { italic = true }, -- struct, union, enum, etc + parameter = { italic = true }, -- parameter pass in function + annotation = { italic = true }, + tag_attribute = { italic = true }, -- attribute of tag in reactjs + }, + filter = 'pro', -- classic | octagon | pro | machine | ristretto | spectrum + -- Enable this will disable filter option + day_night = { + enable = false, -- turn off by default + day_filter = 'pro', -- classic | octagon | pro | machine | ristretto | spectrum + night_filter = 'spectrum', -- classic | octagon | pro | machine | ristretto | spectrum + }, + inc_search = 'background', -- underline | background + background_clear = { + -- -- "float_win", + -- "toggleterm", + 'telescope', + -- "which-key", + 'renamer', + 'notify', + 'nvim-tree', + 'neo-tree', + 'bufferline', -- better used if background of `neo-tree` or `nvim-tree` is cleared + }, -- "float_win", "toggleterm", "telescope", "which-key", "renamer", "neo-tree", "nvim-tree", "bufferline" + plugins = { + bufferline = { + underline_selected = false, + underline_visible = false, + }, + indent_blankline = { + context_highlight = 'default', -- default | pro + context_start_underline = false, + }, + }, + ---@param cs Colorscheme + ---@param p ColorschemeOptions + ---@param Config MonokaiProOptions + ---@param hp Helper + override = function(cs, p, Config, hp) end, + }, + config = function(_, opts) + require('monokai-pro').setup(opts) + vim.cmd 'colorscheme monokai-pro' + end, + }, + { + + 'polirritmico/monokai-nightasty.nvim', + lazy = false, + priority = 1000, + keys = { + { 'tt', 'MonokaiToggleLight', desc = 'Monokai-Nightasty: Toggle dark/light theme.' }, + }, + ---@module "monokai-nightasty" + ---@type monokai.UserConfig + opts = { + dark_style_background = 'transparent', -- default | dark | transparent | #RRGGBB + light_style_background = 'transparent', -- default | dark | transparent | #RRGGBB + markdown_header_marks = true, + hl_styles = { + keywords = { italic = true }, + comments = { italic = true }, + floats = 'dark', + }, + terminal_colors = function(colors) + return { fg = colors.fg_dark } + end, + on_colors = function(colors) + if vim.o.background == 'light' then + -- Custom colors for light theme + colors.comment = '#2d7e79' + colors.lualine.normal_bg = '#7ebd00' + else + -- Custom colors for dark theme + colors.border = colors.magenta + colors.lualine.normal_bg = colors.green + end + end, + on_highlights = function(highlights, colors) + -- You could add styles like bold, underline, italic + highlights.TelescopeSelection = { bold = true } + highlights.TelescopeBorder = { fg = colors.grey } + highlights['@lsp.type.property.lua'] = { fg = colors.fg } + end, + }, + config = function(_, opts) + vim.opt.cursorline = true -- Highlight line at the cursor position + vim.o.background = 'dark' -- Default to dark theme + require('monokai-nightasty').load(opts) + end, + }, { 'tanvirtin/monokai.nvim', config = function() @@ -791,8 +894,9 @@ require('lazy').setup({ config = function() ---@diagnostic disable-next-line: missing-fields require('tokyonight').setup { + transparent = true, styles = { - -- comments = { italic = false }, -- Disable italics in comments + comments = { italic = true }, -- Disable italics in comments }, } From 7214203534f96a285d437025bf46243726bcb875 Mon Sep 17 00:00:00 2001 From: dvdgamer Date: Sat, 10 May 2025 11:14:11 +0200 Subject: [PATCH 05/14] feat: add custom commands for commenting and uncommenting lines in C files --- after/ftplugin/c.lua | 1 + ftplugin/c.lua | 39 ++++++++++++++++++++++++++++++++++++++- init.lua | 38 ++------------------------------------ 3 files changed, 41 insertions(+), 37 deletions(-) diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua index 9fb44987097..49d6e7d17ec 100644 --- a/after/ftplugin/c.lua +++ b/after/ftplugin/c.lua @@ -2,4 +2,5 @@ local set = vim.opt_local set.shiftwidth = 4 set.tabstop = 4 +vim.g.sleuth_automatic = 0 set.commentstring = '/* %s */' diff --git a/ftplugin/c.lua b/ftplugin/c.lua index 9fdf210e5d8..417483a0c42 100644 --- a/ftplugin/c.lua +++ b/ftplugin/c.lua @@ -1,4 +1,9 @@ --- local set = vim.opt_local +-- Import vim module +local set = vim.opt_local + +set.shiftwidth = 4 +set.tabstop = 4 +set.commentstring = '/* %s */' -- Define a custom command ':IntMain' that inserts int main() {} template vim.api.nvim_create_user_command('IntMain', function() @@ -24,3 +29,35 @@ vim.api.nvim_create_user_command('Libft', function() '#include "libft.h"', }) end, {}) + +vim.api.nvim_create_user_command('CommentRestOfFile', function() + local current_line = vim.api.nvim_win_get_cursor(0)[1] + local last_line = vim.api.nvim_buf_line_count(0) + + -- Get all lines from current to end of file + local lines = vim.api.nvim_buf_get_lines(0, current_line - 1, last_line, false) + + -- Prefix each line with // + for i = 1, #lines do + lines[i] = '//' .. lines[i] + end + + -- Set the modified lines back in the buffer + vim.api.nvim_buf_set_lines(0, current_line - 1, last_line, false, lines) +end, {}) + +vim.api.nvim_create_user_command('UncommentRestOfFile', function () + local current_line = vim.api.nvim_win_get_cursor(0)[1] + local last_line = vim.api.nvim_buf_line_count(0) + + -- Get all lines from current to end of file + local lines = vim.api.nvim_buf_get_lines(0, current_line - 1, last_line, false) + + -- Remove leading // if present + for i = 1, #lines do + lines[i] = lines[i]:gsub("^%s*//", "") + end + + -- Set the modified lines back in the buffer + vim.api.nvim_buf_set_lines(0, current_line - 1, last_line, false, lines) +end, {}) diff --git a/init.lua b/init.lua index 5b89c74682e..984c90b797d 100644 --- a/init.lua +++ b/init.lua @@ -1,38 +1,4 @@ ---[[ - -What is Kickstart? - - Kickstart.nvim is *not* a distribution. - - Kickstart.nvim is a starting point for your own configuration. - The goal is that you can read every line of code, top-to-bottom, understand - what your configuration is doing, and modify it to suit your needs. - - Once you've done that, you can start exploring, configuring and tinkering to - make Neovim your own! That might mean leaving Kickstart just the way it is for a while - or immediately breaking it into modular pieces. It's up to you! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example which will only take 10-15 minutes: - - https://learnxinyminutes.com/docs/lua/ - - After understanding a bit more about Lua, you can use `:help lua-guide` as a - reference for how Neovim integrates Lua. - - :help lua-guide - - (or HTML version): https://neovim.io/doc/user/lua-guide.html - -Kickstart Guide: - -If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. - -I hope you enjoy your Neovim journey, -- TJ - -P.S. You can delete this when you're done too. It's your config now! :) ---]] - -- Set as the leader key --- See `:help mapleader` -- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' @@ -793,7 +759,7 @@ require('lazy').setup({ filter = 'pro', -- classic | octagon | pro | machine | ristretto | spectrum -- Enable this will disable filter option day_night = { - enable = false, -- turn off by default + enable = true, -- turn off by default day_filter = 'pro', -- classic | octagon | pro | machine | ristretto | spectrum night_filter = 'spectrum', -- classic | octagon | pro | machine | ristretto | spectrum }, @@ -806,7 +772,7 @@ require('lazy').setup({ 'renamer', 'notify', 'nvim-tree', - 'neo-tree', + -- 'neo-tree', 'bufferline', -- better used if background of `neo-tree` or `nvim-tree` is cleared }, -- "float_win", "toggleterm", "telescope", "which-key", "renamer", "neo-tree", "nvim-tree", "bufferline" plugins = { From ccd6fa7cf9a072653580c454bc090aec9929ee72 Mon Sep 17 00:00:00 2001 From: David Ponte Date: Mon, 12 May 2025 16:05:38 +0200 Subject: [PATCH 06/14] fix: enable Nerd Font support and adjust font variant settings --- after/ftplugin/c.lua | 44 ++++++++++++++++++++++++++++++++++++++++++++ init.lua | 8 +++----- 2 files changed, 47 insertions(+), 5 deletions(-) diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua index 49d6e7d17ec..d21fe8c6808 100644 --- a/after/ftplugin/c.lua +++ b/after/ftplugin/c.lua @@ -1,6 +1,50 @@ local set = vim.opt_local +<<<<<<< Updated upstream set.shiftwidth = 4 set.tabstop = 4 vim.g.sleuth_automatic = 0 +======= +-- Use tabs instead of spaces +set.expandtab = false -- Use real tabs, not spaces +set.shiftwidth = 4 -- Size of an indent +set.tabstop = 4 -- Size of a tab +set.softtabstop = 0 -- Disable softtabstop +>>>>>>> Stashed changes set.commentstring = '/* %s */' + +-- Define a custom command ':IntMain' that inserts int main() {} template +vim.api.nvim_create_user_command('IntMain', function() + local current_line = vim.api.nvim_win_get_cursor(0)[1] + local lines = { + '#include ', + '', + 'int main ()', + '{', + ' ', + ' printf();', + ' return 0;', + '}', + } + vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, lines) + -- Position cursor inside the function body + vim.api.nvim_win_set_cursor(0, { current_line + 1, 4 }) + end, {}) + + vim.api.nvim_create_user_command('Libft', function() + local current_line = vim.api.nvim_win_get_cursor(0)[1] + vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, { + '#include "libft.h"', + }) + end, {}) + + -- Force these settings after any other scripts might have changed them + vim.api.nvim_create_autocmd("FileType", { + pattern = "c", + callback = function() + vim.opt_local.tabstop = 4 + vim.opt_local.shiftwidth = 4 + vim.opt_local.softtabstop = 4 + vim.opt_local.expandtab = true + end + }) \ No newline at end of file diff --git a/init.lua b/init.lua index 984c90b797d..2e32c731724 100644 --- a/init.lua +++ b/init.lua @@ -11,7 +11,7 @@ vim.g.loaded_netrwPlugin = 1 vim.opt.termguicolors = true -- 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 -- Load options from options.lua require 'options' @@ -708,8 +708,8 @@ require('lazy').setup({ appearance = { -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' -- Adjusts spacing to ensure icons are aligned - -- nerd_font_variant = 'mono', - nerd_font_variant = 'normal', + nerd_font_variant = 'mono', + -- nerd_font_variant = 'normal', }, completion = { @@ -797,7 +797,6 @@ require('lazy').setup({ end, }, { - 'polirritmico/monokai-nightasty.nvim', lazy = false, priority = 1000, @@ -846,7 +845,6 @@ require('lazy').setup({ { 'tanvirtin/monokai.nvim', config = function() - -- pcall(vim.cmd, [[colorscheme monokai]]) require('monokai').setup { palette = require('monokai').classic } end, }, From ae42921568ada7ce8138f17c4c0f315b9cc4c4b0 Mon Sep 17 00:00:00 2001 From: David Ponte Date: Mon, 12 May 2025 16:05:56 +0200 Subject: [PATCH 07/14] fix: enable Nerd Font support and adjust font variant settings --- after/ftplugin/c.lua | 8 -------- 1 file changed, 8 deletions(-) diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua index d21fe8c6808..d590452d0b7 100644 --- a/after/ftplugin/c.lua +++ b/after/ftplugin/c.lua @@ -1,16 +1,8 @@ local set = vim.opt_local -<<<<<<< Updated upstream set.shiftwidth = 4 set.tabstop = 4 vim.g.sleuth_automatic = 0 -======= --- Use tabs instead of spaces -set.expandtab = false -- Use real tabs, not spaces -set.shiftwidth = 4 -- Size of an indent -set.tabstop = 4 -- Size of a tab -set.softtabstop = 0 -- Disable softtabstop ->>>>>>> Stashed changes set.commentstring = '/* %s */' -- Define a custom command ':IntMain' that inserts int main() {} template From 3b2e059139246891c19382e777f50c91d048722b Mon Sep 17 00:00:00 2001 From: dvdgamer Date: Fri, 16 May 2025 12:30:58 +0200 Subject: [PATCH 08/14] refactor: consolidate C file settings and commands into a single configuration --- after/ftplugin/c.lua | 131 +++++++++++++++++++++++++++++++------------ ftplugin/c.lua | 63 --------------------- 2 files changed, 95 insertions(+), 99 deletions(-) delete mode 100644 ftplugin/c.lua diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua index d590452d0b7..dc803aa3cf9 100644 --- a/after/ftplugin/c.lua +++ b/after/ftplugin/c.lua @@ -1,42 +1,101 @@ +-- Import vim module local set = vim.opt_local -set.shiftwidth = 4 -set.tabstop = 4 -vim.g.sleuth_automatic = 0 +-- Indentation settings +set.expandtab = true -- Convert tabs to spaces +set.shiftwidth = 4 -- Indent size for autoindent +set.tabstop = 4 -- How wide tabs appear +set.softtabstop = 4 -- How many spaces Tab key inserts/removes + +-- Comment string for commentary plugins set.commentstring = '/* %s */' +-- Disable vim-sleuth for C files +vim.g.sleuth_automatic = 0 + -- Define a custom command ':IntMain' that inserts int main() {} template vim.api.nvim_create_user_command('IntMain', function() - local current_line = vim.api.nvim_win_get_cursor(0)[1] - local lines = { - '#include ', - '', - 'int main ()', - '{', - ' ', - ' printf();', - ' return 0;', - '}', - } - vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, lines) - -- Position cursor inside the function body - vim.api.nvim_win_set_cursor(0, { current_line + 1, 4 }) - end, {}) - - vim.api.nvim_create_user_command('Libft', function() - local current_line = vim.api.nvim_win_get_cursor(0)[1] - vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, { - '#include "libft.h"', - }) - end, {}) - - -- Force these settings after any other scripts might have changed them - vim.api.nvim_create_autocmd("FileType", { - pattern = "c", - callback = function() - vim.opt_local.tabstop = 4 - vim.opt_local.shiftwidth = 4 - vim.opt_local.softtabstop = 4 - vim.opt_local.expandtab = true - end - }) \ No newline at end of file + local current_line = vim.api.nvim_win_get_cursor(0)[1] + local lines = { + '#include ', + '', + 'int main(void)', + '{', + ' ', + ' printf("Hello, world!\\n");', + ' return 0;', + '}', + } + vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, lines) + -- Position cursor inside the function body + vim.api.nvim_win_set_cursor(0, { current_line + 4, 4 }) +end, {}) + +-- Define a custom command ':Libft' that inserts libft.h include +vim.api.nvim_create_user_command('Libft', function() + local current_line = vim.api.nvim_win_get_cursor(0)[1] + vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, { + '#include "libft.h"', + }) +end, {}) + +-- Define a custom command ':CommentRestOfFile' that comments out rest of file +vim.api.nvim_create_user_command('CommentRestOfFile', function() + local current_line = vim.api.nvim_win_get_cursor(0)[1] + local last_line = vim.api.nvim_buf_line_count(0) + + -- Get all lines from current to end of file + local lines = vim.api.nvim_buf_get_lines(0, current_line - 1, last_line, false) + + -- Prefix each line with // + for i = 1, #lines do + lines[i] = '//' .. lines[i] + end + + -- Set the modified lines back in the buffer + vim.api.nvim_buf_set_lines(0, current_line - 1, last_line, false, lines) +end, {}) + +-- Define a custom command ':UncommentRestOfFile' that removes comments from rest of file +vim.api.nvim_create_user_command('UncommentRestOfFile', function () + local current_line = vim.api.nvim_win_get_cursor(0)[1] + local last_line = vim.api.nvim_buf_line_count(0) + + -- Get all lines from current to end of file + local lines = vim.api.nvim_buf_get_lines(0, current_line - 1, last_line, false) + + -- Remove leading // if present + for i = 1, #lines do + lines[i] = lines[i]:gsub("^%s*//", "") + end + + -- Set the modified lines back in the buffer + vim.api.nvim_buf_set_lines(0, current_line - 1, last_line, false, lines) +end, {}) + +-- -- Debugging command to check indentation settings +-- vim.api.nvim_create_user_command('CheckIndent', function() +-- print("expandtab: " .. tostring(vim.bo.expandtab)) +-- print("tabstop: " .. vim.bo.tabstop) +-- print("shiftwidth: " .. vim.bo.shiftwidth) +-- print("softtabstop: " .. vim.bo.softtabstop) +-- end, {}) + +-- Force settings to apply after all other scripts have loaded +vim.api.nvim_create_autocmd("BufEnter", { + pattern = "*.c,*.h", + callback = function() + vim.opt_local.expandtab = true + vim.opt_local.tabstop = 4 + vim.opt_local.shiftwidth = 4 + vim.opt_local.softtabstop = 4 + end +}) + +-- Add any C-specific key mappings you want here +-- Example: Map F5 to compile and run the current file +vim.keymap.set('n', '', function() + local filename = vim.fn.expand('%:r') + vim.cmd('write') + vim.cmd('belowright split | terminal gcc -Wall -Wextra -Werror % -o ' .. filename .. ' && ./' .. filename) +end, { buffer = true, desc = 'Compile and run C file' }) diff --git a/ftplugin/c.lua b/ftplugin/c.lua deleted file mode 100644 index 417483a0c42..00000000000 --- a/ftplugin/c.lua +++ /dev/null @@ -1,63 +0,0 @@ --- Import vim module -local set = vim.opt_local - -set.shiftwidth = 4 -set.tabstop = 4 -set.commentstring = '/* %s */' - --- Define a custom command ':IntMain' that inserts int main() {} template -vim.api.nvim_create_user_command('IntMain', function() - local current_line = vim.api.nvim_win_get_cursor(0)[1] - local lines = { - '#include ', - '', - 'int main ()', - '{', - ' ', - ' printf();', - ' return 0;', - '}', - } - vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, lines) - -- Position cursor inside the function body - vim.api.nvim_win_set_cursor(0, { current_line + 1, 4 }) -end, {}) - -vim.api.nvim_create_user_command('Libft', function() - local current_line = vim.api.nvim_win_get_cursor(0)[1] - vim.api.nvim_buf_set_lines(0, current_line - 1, current_line - 1, false, { - '#include "libft.h"', - }) -end, {}) - -vim.api.nvim_create_user_command('CommentRestOfFile', function() - local current_line = vim.api.nvim_win_get_cursor(0)[1] - local last_line = vim.api.nvim_buf_line_count(0) - - -- Get all lines from current to end of file - local lines = vim.api.nvim_buf_get_lines(0, current_line - 1, last_line, false) - - -- Prefix each line with // - for i = 1, #lines do - lines[i] = '//' .. lines[i] - end - - -- Set the modified lines back in the buffer - vim.api.nvim_buf_set_lines(0, current_line - 1, last_line, false, lines) -end, {}) - -vim.api.nvim_create_user_command('UncommentRestOfFile', function () - local current_line = vim.api.nvim_win_get_cursor(0)[1] - local last_line = vim.api.nvim_buf_line_count(0) - - -- Get all lines from current to end of file - local lines = vim.api.nvim_buf_get_lines(0, current_line - 1, last_line, false) - - -- Remove leading // if present - for i = 1, #lines do - lines[i] = lines[i]:gsub("^%s*//", "") - end - - -- Set the modified lines back in the buffer - vim.api.nvim_buf_set_lines(0, current_line - 1, last_line, false, lines) -end, {}) From deb4ac9890aea0f517f8c8056a33a0192a4d483d Mon Sep 17 00:00:00 2001 From: dvdgamer Date: Mon, 19 May 2025 18:09:38 +0200 Subject: [PATCH 09/14] fix: adjust indentation settings and clean up comment handling in C commands --- after/ftplugin/c.lua | 35 ++++++++--------------------------- 1 file changed, 8 insertions(+), 27 deletions(-) diff --git a/after/ftplugin/c.lua b/after/ftplugin/c.lua index dc803aa3cf9..01126cbb00b 100644 --- a/after/ftplugin/c.lua +++ b/after/ftplugin/c.lua @@ -2,10 +2,10 @@ local set = vim.opt_local -- Indentation settings -set.expandtab = true -- Convert tabs to spaces -set.shiftwidth = 4 -- Indent size for autoindent -set.tabstop = 4 -- How wide tabs appear -set.softtabstop = 4 -- How many spaces Tab key inserts/removes +set.expandtab = false -- Convert tabs to spaces +set.shiftwidth = 4 -- Indent size for autoindent +set.tabstop = 4 -- How wide tabs appear +-- set.softtabstop = 4 -- How many spaces Tab key inserts/removes -- Comment string for commentary plugins set.commentstring = '/* %s */' @@ -57,7 +57,7 @@ vim.api.nvim_create_user_command('CommentRestOfFile', function() end, {}) -- Define a custom command ':UncommentRestOfFile' that removes comments from rest of file -vim.api.nvim_create_user_command('UncommentRestOfFile', function () +vim.api.nvim_create_user_command('UncommentRestOfFile', function() local current_line = vim.api.nvim_win_get_cursor(0)[1] local last_line = vim.api.nvim_buf_line_count(0) @@ -66,36 +66,17 @@ vim.api.nvim_create_user_command('UncommentRestOfFile', function () -- Remove leading // if present for i = 1, #lines do - lines[i] = lines[i]:gsub("^%s*//", "") + lines[i] = lines[i]:gsub('^%s*//', '') end -- Set the modified lines back in the buffer vim.api.nvim_buf_set_lines(0, current_line - 1, last_line, false, lines) end, {}) --- -- Debugging command to check indentation settings --- vim.api.nvim_create_user_command('CheckIndent', function() --- print("expandtab: " .. tostring(vim.bo.expandtab)) --- print("tabstop: " .. vim.bo.tabstop) --- print("shiftwidth: " .. vim.bo.shiftwidth) --- print("softtabstop: " .. vim.bo.softtabstop) --- end, {}) - --- Force settings to apply after all other scripts have loaded -vim.api.nvim_create_autocmd("BufEnter", { - pattern = "*.c,*.h", - callback = function() - vim.opt_local.expandtab = true - vim.opt_local.tabstop = 4 - vim.opt_local.shiftwidth = 4 - vim.opt_local.softtabstop = 4 - end -}) - -- Add any C-specific key mappings you want here -- Example: Map F5 to compile and run the current file vim.keymap.set('n', '', function() - local filename = vim.fn.expand('%:r') - vim.cmd('write') + local filename = vim.fn.expand '%:r' + vim.cmd 'write' vim.cmd('belowright split | terminal gcc -Wall -Wextra -Werror % -o ' .. filename .. ' && ./' .. filename) end, { buffer = true, desc = 'Compile and run C file' }) From 565208bd0f8cfdf1da956caab0d84cc2f09c9a3e Mon Sep 17 00:00:00 2001 From: David Ponte Date: Mon, 7 Jul 2025 13:15:29 +0200 Subject: [PATCH 10/14] feat: add AutoSession plugin for automatic session management --- init.lua | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/init.lua b/init.lua index 2e32c731724..453cb2d4a22 100644 --- a/init.lua +++ b/init.lua @@ -147,7 +147,18 @@ require('lazy').setup({ }, }, }, + { -- AutoSession takes advantage of Neovim's existing session management capabilities to provide seamless automatic session management + 'rmagatti/auto-session', + lazy = false, + ---enables autocomptete for opts + ---@module "auto-session" + ---@type AutoSession.Config + opts = { + suppressed_dirs = { '~/', '~/Projects', '~/Downloads', '/' }, + -- log_level = 'debug', + }, + }, -- NOTE: Plugins can also be configured to run Lua code when they are loaded. -- -- This is often very useful to both group configuration, as well as handle @@ -740,6 +751,18 @@ require('lazy').setup({ signature = { enabled = true }, }, }, + -- -- Norminette checker + -- { + -- 'hardyrafael17/norminette42.nvim', + -- config = function() + -- local norminette = require 'norminette' + -- norminette.setup { + -- runOnSave = true, + -- maxErrorsToShow = 5, + -- active = true, + -- } + -- end, + -- }, { 'loctvl842/monokai-pro.nvim', opts = { From ac6f81f25a3a7d47f2fa840c8f9c6d1e221b6f3c Mon Sep 17 00:00:00 2001 From: David Ponte Date: Tue, 8 Jul 2025 11:53:35 +0200 Subject: [PATCH 11/14] added rose-pine colorscheme --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 453cb2d4a22..8745caf402a 100644 --- a/init.lua +++ b/init.lua @@ -893,7 +893,7 @@ require('lazy').setup({ vim.cmd.colorscheme 'tokyonight-night' end, }, - + { 'rose-pine/neovim', name = 'rose-pine' }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, From 203846f146e567238fbd19493a9fbada21075502 Mon Sep 17 00:00:00 2001 From: David Ponte Date: Mon, 21 Jul 2025 12:40:35 +0200 Subject: [PATCH 12/14] added rose pine theme with costum options --- init.lua | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 8745caf402a..3ca0cb779fb 100644 --- a/init.lua +++ b/init.lua @@ -893,7 +893,36 @@ require('lazy').setup({ vim.cmd.colorscheme 'tokyonight-night' end, }, - { 'rose-pine/neovim', name = 'rose-pine' }, + { + 'rose-pine/neovim', + config = function() + require('rose-pine').setup { + variant = 'auto', -- auto, main, moon, or dawn + dark_variant = 'main', -- main, moon, or dawn + dim_inactive_windows = false, + extend_background_behind_borders = true, + + enable = { + terminal = true, + legacy_highlights = true, + migrations = true, + }, + + styles = { + bold = true, + italic = true, + transparency = false, + }, + + highlight_groups = { + Comment = { fg = 'foam' }, + -- StatusLine = { fg = "love", bg = "love", blend = 15 }, + -- VertSplit = { fg = "muted", bg = "muted" }, + -- Visual = { fg = "base", bg = "text", inherit = false }, + }, + } + end, + }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, From 569ead03570625ff2261189eabb62154a6315e06 Mon Sep 17 00:00:00 2001 From: David Ponte Date: Mon, 21 Jul 2025 12:53:57 +0200 Subject: [PATCH 13/14] fix: small changes to make the styler happy --- init.lua | 1 - lua/custom/plugins/codam-header.lua | 11 ++++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 6ff3fb0644b..cd2ffa8b4c5 100644 --- a/init.lua +++ b/init.lua @@ -3,7 +3,6 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' - -- Disables netrw for better file explorers vim.g.loaded_netrw = 1 vim.g.loaded_netrwPlugin = 1 diff --git a/lua/custom/plugins/codam-header.lua b/lua/custom/plugins/codam-header.lua index ecb1c718031..1ac68c1e57c 100644 --- a/lua/custom/plugins/codam-header.lua +++ b/lua/custom/plugins/codam-header.lua @@ -1,13 +1,14 @@ return { - "f-ras/codam-header.nvim", - cmd = { "Stdheader" }, + 'f-ras/codam-header.nvim', + cmd = { 'Stdheader' }, opts = { auto_update = true, -- Update header when saving. user = 'dponte', - mail = 'dponte@student.codam.nl', -- Your mail. + mail = 'dponte@student.codam.nl', -- Your mail. -- add other options. }, config = function(_, opts) - require("codamheader").setup(opts) + require('codamheader').setup(opts) end, -} \ No newline at end of file +} + From b507bbc80923fa78a00f017c685630515d9d6be7 Mon Sep 17 00:00:00 2001 From: David Ponte Date: Mon, 21 Jul 2025 12:56:27 +0200 Subject: [PATCH 14/14] fix: small changes to make the styler happy --- lua/custom/plugins/codam-header.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/custom/plugins/codam-header.lua b/lua/custom/plugins/codam-header.lua index 1ac68c1e57c..a2bcbcfb4cd 100644 --- a/lua/custom/plugins/codam-header.lua +++ b/lua/custom/plugins/codam-header.lua @@ -11,4 +11,3 @@ return { require('codamheader').setup(opts) end, } -