From ff18dde8e890149cd2fcb15cecdd06c8d9bfc60d Mon Sep 17 00:00:00 2001 From: FlorianLackermeierLaptop Date: Thu, 16 May 2024 09:31:50 +0200 Subject: [PATCH 1/5] Working on Laptop --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 88658ef3033..148a247a657 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,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` @@ -850,6 +850,8 @@ require('lazy').setup({ config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` + require('nvim-treesitter.install').compilers = {"clang"} + -- Prefer git instead of curl in order to improve connectivity in some environments require('nvim-treesitter.install').prefer_git = true ---@diagnostic disable-next-line: missing-fields From 0eeef36828c1b9ca4879223f4ff33bc6304e307b Mon Sep 17 00:00:00 2001 From: FlorianLackermeierLaptop Date: Thu, 16 May 2024 09:43:40 +0200 Subject: [PATCH 2/5] Changed colorscheme to gruvbox --- init.lua | 4 ++-- lua/custom/plugins/gruvbox_material.lua | 13 +++++++++++++ lua/custom/plugins/init.lua | 3 ++- 3 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 lua/custom/plugins/gruvbox_material.lua diff --git a/init.lua b/init.lua index 148a247a657..d357027c6b2 100644 --- a/init.lua +++ b/init.lua @@ -784,7 +784,7 @@ 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' -- You can configure highlights by doing something like: vim.cmd.hi 'Comment gui=none' @@ -887,7 +887,7 @@ require('lazy').setup({ -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. -- For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, { ui = { -- If you are using a Nerd Font: set icons to an empty table which will use the diff --git a/lua/custom/plugins/gruvbox_material.lua b/lua/custom/plugins/gruvbox_material.lua new file mode 100644 index 00000000000..8b82f2a046b --- /dev/null +++ b/lua/custom/plugins/gruvbox_material.lua @@ -0,0 +1,13 @@ +return{ + 'sainnhe/gruvbox-material', + priority = 1000, -- Make sure to load this before all the other start plugins. + 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 'gruvbox-material' + + -- You can configure highlights by doing something like: + -- vim.cmd.hi 'Comment gui=none' + end, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..3adb89b1a98 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,5 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { +} From 8372bece28cc5d6cb2742985c51cfe29331b92c6 Mon Sep 17 00:00:00 2001 From: "Lackermeier, Florian" Date: Thu, 16 May 2024 13:19:12 +0200 Subject: [PATCH 3/5] Added git and oil plugins --- init.lua | 6 +++--- lua/custom/plugins/oil.lua | 15 +++++++++++++++ lua/custom/plugins/vim_fugitive.lua | 6 ++++++ 3 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 lua/custom/plugins/oil.lua create mode 100644 lua/custom/plugins/vim_fugitive.lua diff --git a/init.lua b/init.lua index d357027c6b2..01aa51e48cc 100644 --- a/init.lua +++ b/init.lua @@ -850,7 +850,7 @@ require('lazy').setup({ config = function(_, opts) -- [[ Configure Treesitter ]] See `:help nvim-treesitter` - require('nvim-treesitter.install').compilers = {"clang"} + require('nvim-treesitter.install').compilers = {"clang", "gcc"} -- Prefer git instead of curl in order to improve connectivity in some environments require('nvim-treesitter.install').prefer_git = true @@ -876,9 +876,9 @@ require('lazy').setup({ -- 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.indent_line', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.autopairs', -- require 'kickstart.plugins.neo-tree', -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps diff --git a/lua/custom/plugins/oil.lua b/lua/custom/plugins/oil.lua new file mode 100644 index 00000000000..f943a03e32b --- /dev/null +++ b/lua/custom/plugins/oil.lua @@ -0,0 +1,15 @@ +return { + 'stevearc/oil.nvim', + -- Optional dependencies + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + require('oil').setup({ + view_options = { + -- Show files and directories starting with . + show_hidden = true + } + }) + vim.keymap.set("n", "-", "Oil", { desc = "Open parent directory" }) + end, +} + diff --git a/lua/custom/plugins/vim_fugitive.lua b/lua/custom/plugins/vim_fugitive.lua new file mode 100644 index 00000000000..1678884947f --- /dev/null +++ b/lua/custom/plugins/vim_fugitive.lua @@ -0,0 +1,6 @@ +return { + 'tpope/vim-fugitive', + config = function() + + end, +} From a010833bc33d6e061b070b9c5e75c6dc944bf689 Mon Sep 17 00:00:00 2001 From: "Lackermeier, Florian" Date: Thu, 16 May 2024 14:34:39 +0200 Subject: [PATCH 4/5] More stuff --- init.lua | 10 +++++----- lua/custom/plugins/auto_session.lua | 18 ++++++++++++++++++ .../{gruvbox_material.lua => colorschemes.lua} | 18 ++++++++++++++++++ lua/custom/plugins/undotree.lua | 6 ++++++ lua/custom/plugins/vim_fugitive.lua | 2 +- 5 files changed, 48 insertions(+), 6 deletions(-) create mode 100644 lua/custom/plugins/auto_session.lua rename lua/custom/plugins/{gruvbox_material.lua => colorschemes.lua} (63%) create mode 100644 lua/custom/plugins/undotree.lua diff --git a/init.lua b/init.lua index 01aa51e48cc..a1bbe4ce77e 100644 --- a/init.lua +++ b/init.lua @@ -718,9 +718,9 @@ require('lazy').setup({ -- No, but seriously. Please read `:help ins-completion`, it is really good! mapping = cmp.mapping.preset.insert { -- Select the [n]ext item - [''] = cmp.mapping.select_next_item(), + -- [''] = cmp.mapping.select_next_item(), -- Select the [p]revious item - [''] = cmp.mapping.select_prev_item(), + -- [''] = cmp.mapping.select_prev_item(), -- Scroll the documentation window [b]ack / [f]orward [''] = cmp.mapping.scroll_docs(-4), @@ -729,13 +729,13 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), -- Manually trigger a completion from nvim-cmp. -- Generally you don't need this, because nvim-cmp will display diff --git a/lua/custom/plugins/auto_session.lua b/lua/custom/plugins/auto_session.lua new file mode 100644 index 00000000000..066dca78847 --- /dev/null +++ b/lua/custom/plugins/auto_session.lua @@ -0,0 +1,18 @@ +return { + 'rmagatti/auto-session', + config = function() + require("auto-session").setup { + log_level = "error", + + cwd_change_handling = { + restore_upcoming_session = true, -- already the default, no need to specify like this, only here as an example + pre_cwd_changed_hook = nil, -- already the default, no need to specify like this, only here as an example + post_cwd_changed_hook = function() -- example refreshing the lualine status line _after_ the cwd changes + require("lualine").refresh() -- refresh lualine so the new session name is displayed in the status bar + end, + }, + } + end +} + + diff --git a/lua/custom/plugins/gruvbox_material.lua b/lua/custom/plugins/colorschemes.lua similarity index 63% rename from lua/custom/plugins/gruvbox_material.lua rename to lua/custom/plugins/colorschemes.lua index 8b82f2a046b..cd942ae01a0 100644 --- a/lua/custom/plugins/gruvbox_material.lua +++ b/lua/custom/plugins/colorschemes.lua @@ -1,4 +1,6 @@ return{ + { + -- Gruvbox colorscheme 'sainnhe/gruvbox-material', priority = 1000, -- Make sure to load this before all the other start plugins. init = function() @@ -10,4 +12,20 @@ return{ -- You can configure highlights by doing something like: -- vim.cmd.hi 'Comment gui=none' end, + }, + { + -- catpuccin colorscheme + "catppuccin/nvim", + priority = 1000, + }, + { + -- kanagawa.nvim colorscheme + 'rebelot/kanagawa.nvim', + priority = 1000, + }, + { + -- onedark colorscheme + 'navarasu/onedark.nvim', + priority = 1000, + }, } diff --git a/lua/custom/plugins/undotree.lua b/lua/custom/plugins/undotree.lua new file mode 100644 index 00000000000..86ea4b899b2 --- /dev/null +++ b/lua/custom/plugins/undotree.lua @@ -0,0 +1,6 @@ +return { + 'mbbill/undotree', + config = function() + vim.keymap.set('n', 'ut', vim.cmd.UndotreeToggle, { desc = "[u]ndo [t]ree"}) + end, +} diff --git a/lua/custom/plugins/vim_fugitive.lua b/lua/custom/plugins/vim_fugitive.lua index 1678884947f..a0f4779c6c0 100644 --- a/lua/custom/plugins/vim_fugitive.lua +++ b/lua/custom/plugins/vim_fugitive.lua @@ -1,6 +1,6 @@ return { 'tpope/vim-fugitive', config = function() - + vim.keymap.set('n', 'G', vim.cmd.G, { desc = 'Open [G]it Window' }) end, } From f9e717fda11277b1922ec784e9ec699b3e71c3d9 Mon Sep 17 00:00:00 2001 From: "Lackermeier, Florian" Date: Thu, 16 May 2024 15:35:09 +0200 Subject: [PATCH 5/5] Changed scroll keymaps --- init.lua | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index a1bbe4ce77e..8cf151fb871 100644 --- a/init.lua +++ b/init.lua @@ -185,10 +185,13 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } -- Use CTRL+ to switch between windows -- -- See `:help wincmd` for a list of all window commands -vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +-- vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) +-- vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) +-- vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) +-- vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('n', '', '', { desc = 'Scroll up' }) +vim.keymap.set('n', '', '', { desc = 'Scroll down' }) + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands`