From b0e4c074f47352b904cdd4ac859be2e5f8f906ef Mon Sep 17 00:00:00 2001 From: a-rossetti Date: Wed, 20 Nov 2024 17:12:54 +0100 Subject: [PATCH 1/9] . --- init.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 08717d537e6..1026f542437 100644 --- a/init.lua +++ b/init.lua @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false 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' @@ -615,9 +615,9 @@ require('lazy').setup({ -- - settings (table): Override the default settings passed when initializing the server. -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, + clangd = {}, + gopls = {}, + pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- @@ -845,6 +845,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'. + require('tokyonight').setup { transparent = true } vim.cmd.colorscheme 'tokyonight-night' -- You can configure highlights by doing something like: From 0c9b81dd8af2c4952ef5c878475e638e5ff9b497 Mon Sep 17 00:00:00 2001 From: a-rossetti Date: Sun, 12 Jan 2025 14:58:45 +0100 Subject: [PATCH 2/9] added github copilot --- init.lua | 7 +++++++ pack/github/start/copilot.vim | 1 + 2 files changed, 8 insertions(+) create mode 160000 pack/github/start/copilot.vim diff --git a/init.lua b/init.lua index 1026f542437..1167ffa9696 100644 --- a/init.lua +++ b/init.lua @@ -919,6 +919,13 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, + { -- Integrated Github Copilot + 'github/copilot.vim', + cmd = 'Copilot', + event = 'InsertEnter', + build = ':Copilot auth', + }, + -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and -- place them in the correct locations. diff --git a/pack/github/start/copilot.vim b/pack/github/start/copilot.vim new file mode 160000 index 00000000000..87038123804 --- /dev/null +++ b/pack/github/start/copilot.vim @@ -0,0 +1 @@ +Subproject commit 87038123804796ca7af20d1b71c3428d858a9124 From 8f2adb18fa7ff6246d765b2dca1a978ac94d4758 Mon Sep 17 00:00:00 2001 From: a-rossetti Date: Sun, 12 Jan 2025 15:18:18 +0100 Subject: [PATCH 3/9] tweaked copilot, keybinds, comments --- init.lua | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 1167ffa9696..7f7d5eaf82d 100644 --- a/init.lua +++ b/init.lua @@ -160,6 +160,9 @@ vim.opt.scrolloff = 10 -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` +-- Change the default file explorer command to leader + e +vim.api.nvim_set_keymap('n', 'pv', ':Ex', { noremap = true, silent = true }) + -- Clear highlights on search when pressing in normal mode -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') @@ -175,11 +178,11 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn -- or just use to exit terminal mode vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) --- TIP: Disable arrow keys in normal mode --- vim.keymap.set('n', '', 'echo "Use h to move!!"') --- vim.keymap.set('n', '', 'echo "Use l to move!!"') --- vim.keymap.set('n', '', 'echo "Use k to move!!"') --- vim.keymap.set('n', '', 'echo "Use j to move!!"') +-- Disable arrow keys in normal mode +vim.keymap.set('n', '', 'echo "Use h to move!!"') +vim.keymap.set('n', '', 'echo "Use l to move!!"') +vim.keymap.set('n', '', 'echo "Use k to move!!"') +vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows @@ -193,6 +196,14 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the upper win -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` +-- Disable auto-commenting on new lines for all file types +vim.api.nvim_create_autocmd('FileType', { + pattern = '*', + callback = function() + vim.bo.formatoptions = vim.bo.formatoptions:gsub('c', ''):gsub('r', '') + end, +}) + -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.highlight.on_yank()` @@ -924,6 +935,11 @@ require('lazy').setup({ cmd = 'Copilot', event = 'InsertEnter', build = ':Copilot auth', + config = function() + vim.g.copilot_no_tab_map = true + vim.g.copilot_no_y_map = true + vim.api.nvim_set_keymap('i', '', 'copilot#Accept("")', { silent = true, expr = true }) + end, }, -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the From 56e244cb1ae95294ebfec4f17c5177c3d8425939 Mon Sep 17 00:00:00 2001 From: a-rossetti Date: Fri, 17 Jan 2025 15:19:00 +0100 Subject: [PATCH 4/9] removed conflicting shortcut --- init.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 7f7d5eaf82d..82944d0fb50 100644 --- a/init.lua +++ b/init.lua @@ -186,8 +186,10 @@ vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows --- -- See `:help wincmd` for a list of all window commands + +-- Unmap Ctrl+L from clearing the screen +vim.api.nvim_set_keymap('n', '', '', { noremap = true, silent = true }) 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' }) From fb6be9a8a92803ffd719ffc0406b557a1a45b7ba Mon Sep 17 00:00:00 2001 From: a-rossetti Date: Fri, 17 Jan 2025 15:36:53 +0100 Subject: [PATCH 5/9] fixing shortcut --- init.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 82944d0fb50..0c0699bc2d8 100644 --- a/init.lua +++ b/init.lua @@ -187,9 +187,8 @@ vim.keymap.set('n', '', 'echo "Use j to move!!"') -- Keybinds to make split navigation easier. -- Use CTRL+ to switch between windows -- See `:help wincmd` for a list of all window commands - -- Unmap Ctrl+L from clearing the screen -vim.api.nvim_set_keymap('n', '', '', { noremap = true, silent = true }) +vim.keymap.set('n', '', '', { noremap = true, silent = true }) 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' }) From 9e8d8426ba8e1cbb5acdc36980807102a0095202 Mon Sep 17 00:00:00 2001 From: a-rossetti Date: Fri, 17 Jan 2025 16:01:24 +0100 Subject: [PATCH 6/9] fixed same commad for terminal mode --- init.lua | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/init.lua b/init.lua index 0c0699bc2d8..bb3f8c54316 100644 --- a/init.lua +++ b/init.lua @@ -193,6 +193,11 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the left wind 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' }) +-- Same keymaps for terminal mode +vim.keymap.set('t', '', [[]], { desc = 'Move out of terminal mode and focus to the left window' }) +vim.keymap.set('t', '', [[]], { desc = 'Move out of terminal mode and focus to the right window' }) +vim.keymap.set('t', '', [[]], { desc = 'Move out of terminal mode and focus to the lower window' }) +vim.keymap.set('t', '', [[]], { desc = 'Move out of terminal mode and focus to the upper window' }) -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` From fe9096d0c167d1837f8be49629849e63b21e7749 Mon Sep 17 00:00:00 2001 From: a-rossetti Date: Fri, 31 Jan 2025 12:04:04 +0100 Subject: [PATCH 7/9] jsx tab size --- init.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/init.lua b/init.lua index bb3f8c54316..ffa6d21110f 100644 --- a/init.lua +++ b/init.lua @@ -157,6 +157,40 @@ vim.opt.cursorline = true -- Minimal number of screen lines to keep above and below the cursor. vim.opt.scrolloff = 10 +-- Tab size +-- Set global default tab size (optional) +vim.opt.tabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true + +-- Filetype-specific settings +vim.api.nvim_create_autocmd('FileType', { + pattern = 'c', + callback = function() + vim.opt_local.tabstop = 8 + vim.opt_local.shiftwidth = 8 + vim.opt_local.expandtab = true + end, +}) + +vim.api.nvim_create_autocmd('FileType', { + pattern = 'javascript', + callback = function() + vim.opt_local.tabstop = 2 + vim.opt_local.shiftwidth = 2 + vim.opt_local.expandtab = true + end, +}) + +vim.api.nvim_create_autocmd('FileType', { + pattern = 'jsx', + callback = function() + vim.opt_local.tabstop = 2 + vim.opt_local.shiftwidth = 2 + vim.opt_local.expandtab = true + end, +}) + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` From 6f87b9fe3144641bc9e9170aa62775f86747e8a7 Mon Sep 17 00:00:00 2001 From: rssndr Date: Sun, 4 May 2025 11:16:16 +0200 Subject: [PATCH 8/9] deactivated copilot --- init.lua | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init.lua b/init.lua index ffa6d21110f..1c1ff315241 100644 --- a/init.lua +++ b/init.lua @@ -970,6 +970,7 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, +--[[ { -- Integrated Github Copilot 'github/copilot.vim', cmd = 'Copilot', @@ -981,6 +982,7 @@ require('lazy').setup({ vim.api.nvim_set_keymap('i', '', 'copilot#Accept("")', { silent = true, expr = true }) end, }, +]]-- -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and From b4af4f58591a79c33b554fb7a64a53a254169dfc Mon Sep 17 00:00:00 2001 From: rssndr Date: Sat, 4 Oct 2025 21:51:13 +0200 Subject: [PATCH 9/9] updates --- init.lua | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index 1c1ff315241..b4e9c067389 100644 --- a/init.lua +++ b/init.lua @@ -885,22 +885,19 @@ require('lazy').setup({ 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. - 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'. - require('tokyonight').setup { transparent = true } - vim.cmd.colorscheme 'tokyonight-night' - - -- You can configure highlights by doing something like: - vim.cmd.hi 'Comment gui=none' + { + 'metalelf0/black-metal-theme-neovim', + lazy = false, -- Load early to ensure colorscheme is available + priority = 1000, -- High priority for colorschemes + config = function() + require('black-metal').setup { + theme = 'taake', -- Set Taake as the default theme + variant = 'dark', -- Use the dark variant (default) + alt_bg = false, -- Set to true for marduk-alt (lighter background) + transparent = true, -- For transparent background (like tokyonight) + } + -- Load the colorscheme after setup + vim.cmd.colorscheme 'taake' end, }, @@ -970,7 +967,7 @@ require('lazy').setup({ -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects }, ---[[ + --[[ { -- Integrated Github Copilot 'github/copilot.vim', cmd = 'Copilot', @@ -982,7 +979,8 @@ require('lazy').setup({ vim.api.nvim_set_keymap('i', '', 'copilot#Accept("")', { silent = true, expr = true }) end, }, -]]-- +]] + -- -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the -- init.lua. If you want these files, they are in the repository, so you can just download them and