From aa0432684fd9c71b7a20414ca767ac33b11b882a Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Wed, 1 Oct 2025 22:01:58 +0100 Subject: [PATCH 1/4] Update configuration --- init.lua | 14 +++++------ lua/custom/plugins/comment.lua | 14 +++++++++++ lua/custom/plugins/copilot.lua | 26 +++++++++++++++++++++ lua/custom/plugins/init.lua | 8 ++++++- lua/custom/plugins/masonconfig.lua | 31 +++++++++++++++++++++++++ lua/custom/plugins/neo-tree-config.lua | 32 ++++++++++++++++++++++++++ lua/custom/plugins/tabs.lua | 26 +++++++++++++++++++++ 7 files changed, 143 insertions(+), 8 deletions(-) create mode 100644 lua/custom/plugins/comment.lua create mode 100644 lua/custom/plugins/copilot.lua create mode 100644 lua/custom/plugins/masonconfig.lua create mode 100644 lua/custom/plugins/neo-tree-config.lua create mode 100644 lua/custom/plugins/tabs.lua diff --git a/init.lua b/init.lua index b98ffc6198a..219095de5bc 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.o` @@ -102,7 +102,7 @@ vim.g.have_nerd_font = false vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' @@ -975,16 +975,16 @@ require('lazy').setup({ -- -- 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.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' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` -- Or use telescope! diff --git a/lua/custom/plugins/comment.lua b/lua/custom/plugins/comment.lua new file mode 100644 index 00000000000..b610b7f34c3 --- /dev/null +++ b/lua/custom/plugins/comment.lua @@ -0,0 +1,14 @@ +return { + { + 'numToStr/Comment.nvim', + config = function(_, opts) + require('Comment').setup(opts) + + vim.keymap.set('n', '/', function() + require('Comment.api').toggle.linewise.current() + end, { desc = 'comment toggle' }) + + vim.keymap.set('v', '/', "lua require('Comment.api').toggle.linewise(vim.fn.visualmode())", { desc = 'comment toggle' }) + end, + }, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua new file mode 100644 index 00000000000..203bda613d0 --- /dev/null +++ b/lua/custom/plugins/copilot.lua @@ -0,0 +1,26 @@ +return { + { + 'zbirenbaum/copilot.lua', + cmd = 'Copilot', + event = 'InsertEnter', + config = function() + require('copilot').setup { + suggestion = { + enabled = true, + auto_trigger = true, + keymap = { + accept = '', + }, + }, + panel = { + enabled = true, + auto_refresh = true, + }, + filetypes = { + ['*'] = true, + typescript = true, + }, + } + end, + }, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..fbc067bcaa0 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,10 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + require 'custom.plugins.comment', + require 'custom.plugins.tabs', + require 'custom.plugins.copilot', + require 'custom.plugins.masonconfig', + require 'custom.plugins.neo-tree-config', +} diff --git a/lua/custom/plugins/masonconfig.lua b/lua/custom/plugins/masonconfig.lua new file mode 100644 index 00000000000..d4fa5be9bff --- /dev/null +++ b/lua/custom/plugins/masonconfig.lua @@ -0,0 +1,31 @@ +return { + { + 'williamboman/mason.nvim', + opts = function(_, opts) + -- Ensure these tools are installed + opts.ensure_installed = opts.ensure_installed or {} + + local ensure_installed = { + 'ts_ls', + 'biome', + 'docker_compose_language_service', + 'dockerls', + 'graphql', + 'jsonls', + 'sqlls', + 'yamlls', + 'eslint', + 'bashls', + } + + -- Merge with existing ensure_installed if any + for _, tool in ipairs(ensure_installed) do + if not vim.tbl_contains(opts.ensure_installed, tool) then + table.insert(opts.ensure_installed, tool) + end + end + + return opts + end, + }, +} diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua new file mode 100644 index 00000000000..6e0394a7062 --- /dev/null +++ b/lua/custom/plugins/neo-tree-config.lua @@ -0,0 +1,32 @@ +return { + { + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v3.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', + 'MunifTanjim/nui.nvim', + }, + keys = { + { 'e', desc = 'Open NeoTree' }, + { 'n', desc = 'Focus NeoTree' }, + }, + config = function() + local toggle_tree = function() + vim.cmd 'Neotree toggle' + vim.opt.relativenumber = true -- Use relative line numbers + end + + -- Set up your custom keymaps + vim.keymap.set('n', 'e', toggle_tree, { desc = 'Open NeoTree' }) + vim.keymap.set('n', 'n', function() + vim.cmd 'Neotree focus' + end, { desc = 'Focus NeoTree' }) + + -- Setup neo-tree + require('neo-tree').setup { + -- Add any neo-tree options here if needed + } + end, + }, +} diff --git a/lua/custom/plugins/tabs.lua b/lua/custom/plugins/tabs.lua new file mode 100644 index 00000000000..88c00344ddf --- /dev/null +++ b/lua/custom/plugins/tabs.lua @@ -0,0 +1,26 @@ +return { + { + 'romgrk/barbar.nvim', + dependencies = { + 'lewis6991/gitsigns.nvim', -- OPTIONAL: for git status + 'nvim-tree/nvim-web-devicons', -- OPTIONAL: for file icons + }, + init = function() + local map = vim.api.nvim_set_keymap + local opts = { noremap = true, silent = true } + vim.g.barbar_auto_setup = false + map('n', '', 'BufferNext', opts) + map('n', '', 'BufferPrevious', opts) + map('n', 'xx', 'BufferClose', opts) + map('n', 'xl', 'BufferCloseBuffersRight', opts) + map('n', 'xh', 'BufferCloseBuffersLeft', opts) + end, + opts = { + -- lazy.nvim will automatically call setup for you. put your options here, anything missing will use the default: + animation = true, + -- insert_at_start = true, + -- …etc. + }, + version = '^1.0.0', -- optional: only update when a new 1.x version is released + }, +} From bbda49daf5c3242e397740a78445f59a320d0268 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 2 Oct 2025 00:06:55 +0100 Subject: [PATCH 2/4] Upate Mason Config --- init.lua | 10 +++++++++ lua/custom/plugins/init.lua | 1 - lua/custom/plugins/masonconfig.lua | 31 -------------------------- lua/custom/plugins/neo-tree-config.lua | 4 +--- 4 files changed, 11 insertions(+), 35 deletions(-) delete mode 100644 lua/custom/plugins/masonconfig.lua diff --git a/init.lua b/init.lua index 219095de5bc..20ae6563e5a 100644 --- a/init.lua +++ b/init.lua @@ -716,6 +716,16 @@ require('lazy').setup({ local ensure_installed = vim.tbl_keys(servers or {}) vim.list_extend(ensure_installed, { 'stylua', -- Used to format Lua code + 'ts_ls', + 'biome', + 'docker_compose_language_service', + 'dockerls', + 'graphql', + 'jsonls', + 'sqlls', + 'yamlls', + 'eslint', + 'bashls', }) require('mason-tool-installer').setup { ensure_installed = ensure_installed } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index fbc067bcaa0..846e264a413 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -6,6 +6,5 @@ return { require 'custom.plugins.comment', require 'custom.plugins.tabs', require 'custom.plugins.copilot', - require 'custom.plugins.masonconfig', require 'custom.plugins.neo-tree-config', } diff --git a/lua/custom/plugins/masonconfig.lua b/lua/custom/plugins/masonconfig.lua deleted file mode 100644 index d4fa5be9bff..00000000000 --- a/lua/custom/plugins/masonconfig.lua +++ /dev/null @@ -1,31 +0,0 @@ -return { - { - 'williamboman/mason.nvim', - opts = function(_, opts) - -- Ensure these tools are installed - opts.ensure_installed = opts.ensure_installed or {} - - local ensure_installed = { - 'ts_ls', - 'biome', - 'docker_compose_language_service', - 'dockerls', - 'graphql', - 'jsonls', - 'sqlls', - 'yamlls', - 'eslint', - 'bashls', - } - - -- Merge with existing ensure_installed if any - for _, tool in ipairs(ensure_installed) do - if not vim.tbl_contains(opts.ensure_installed, tool) then - table.insert(opts.ensure_installed, tool) - end - end - - return opts - end, - }, -} diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 6e0394a7062..925a5a846f3 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -24,9 +24,7 @@ return { end, { desc = 'Focus NeoTree' }) -- Setup neo-tree - require('neo-tree').setup { - -- Add any neo-tree options here if needed - } + require('neo-tree').setup {} end, }, } From ba8725e5fed363c9c1e056655df4f098349de09e Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 2 Oct 2025 01:02:40 +0100 Subject: [PATCH 3/4] Add copilot chat and other nice things --- lua/custom/plugins/copilot-chat.lua | 18 ++++++++++++++++++ lua/custom/plugins/copilot.lua | 2 +- lua/custom/plugins/init.lua | 1 + lua/custom/plugins/neo-tree-config.lua | 8 +++++++- lua/custom/plugins/sleuth.lua | 7 +++++++ 5 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 lua/custom/plugins/copilot-chat.lua create mode 100644 lua/custom/plugins/sleuth.lua diff --git a/lua/custom/plugins/copilot-chat.lua b/lua/custom/plugins/copilot-chat.lua new file mode 100644 index 00000000000..1fc3dad331e --- /dev/null +++ b/lua/custom/plugins/copilot-chat.lua @@ -0,0 +1,18 @@ +return { + { + 'CopilotC-Nvim/CopilotChat.nvim', + dependencies = { + { 'nvim-lua/plenary.nvim', branch = 'master' }, + }, + build = 'make tiktoken', + init = function() + local map = vim.api.nvim_set_keymap + local opts = { noremap = true, silent = true } + + map('n', 'ch', 'CopilotChatToggle', opts) + end, + opts = { + -- See Configuration section for options + }, + }, +} diff --git a/lua/custom/plugins/copilot.lua b/lua/custom/plugins/copilot.lua index 203bda613d0..0e67f891e8a 100644 --- a/lua/custom/plugins/copilot.lua +++ b/lua/custom/plugins/copilot.lua @@ -6,7 +6,7 @@ return { config = function() require('copilot').setup { suggestion = { - enabled = true, + enabled = false, auto_trigger = true, keymap = { accept = '', diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 846e264a413..a65d8b465e9 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -7,4 +7,5 @@ return { require 'custom.plugins.tabs', require 'custom.plugins.copilot', require 'custom.plugins.neo-tree-config', + require 'custom.plugins.sleuth', } diff --git a/lua/custom/plugins/neo-tree-config.lua b/lua/custom/plugins/neo-tree-config.lua index 925a5a846f3..1492b22ec0c 100644 --- a/lua/custom/plugins/neo-tree-config.lua +++ b/lua/custom/plugins/neo-tree-config.lua @@ -24,7 +24,13 @@ return { end, { desc = 'Focus NeoTree' }) -- Setup neo-tree - require('neo-tree').setup {} + require('neo-tree').setup { + filesystem = { + follow_current_file = { + enabled = true, + }, + }, + } end, }, } diff --git a/lua/custom/plugins/sleuth.lua b/lua/custom/plugins/sleuth.lua new file mode 100644 index 00000000000..48bc789ade6 --- /dev/null +++ b/lua/custom/plugins/sleuth.lua @@ -0,0 +1,7 @@ +return { + { + 'tpope/vim-sleuth', + config = function() end, + opts = {}, + }, +} From d0316e95b17406c8d140f1a7a50efd3f291054a2 Mon Sep 17 00:00:00 2001 From: Fraser Fewster Date: Thu, 13 Nov 2025 11:41:54 +0000 Subject: [PATCH 4/4] Update theme --- init.lua | 49 ++++++++++---------- lua/custom/plugins/init.lua | 2 + lua/custom/plugins/theme.lua | 86 ++++++++++++++++++++++++++++++++++++ 3 files changed, 113 insertions(+), 24 deletions(-) create mode 100644 lua/custom/plugins/theme.lua diff --git a/init.lua b/init.lua index 20ae6563e5a..f2cbbdc6af2 100644 --- a/init.lua +++ b/init.lua @@ -537,7 +537,7 @@ require('lazy').setup({ -- Rename the variable under your cursor. -- Most Language Servers support renaming across files, etc. - map('grn', vim.lsp.buf.rename, '[R]e[n]ame') + map('rn', vim.lsp.buf.rename, '[R]e[n]ame') -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. @@ -553,7 +553,7 @@ require('lazy').setup({ -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. @@ -722,7 +722,6 @@ require('lazy').setup({ 'dockerls', 'graphql', 'jsonls', - 'sqlls', 'yamlls', 'eslint', 'bashls', @@ -886,27 +885,29 @@ 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' + -- -- vim.cmd.colorscheme 'aliqyan-21/darkvoid.nvim' + -- vim.cmd.colorscheme 'nordic' + -- 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/init.lua b/lua/custom/plugins/init.lua index a65d8b465e9..bf56c776e96 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -6,6 +6,8 @@ return { require 'custom.plugins.comment', require 'custom.plugins.tabs', require 'custom.plugins.copilot', + require 'custom.plugins.copilot-chat', require 'custom.plugins.neo-tree-config', require 'custom.plugins.sleuth', + require 'custom.plugins.theme', } diff --git a/lua/custom/plugins/theme.lua b/lua/custom/plugins/theme.lua new file mode 100644 index 00000000000..90d3f78de44 --- /dev/null +++ b/lua/custom/plugins/theme.lua @@ -0,0 +1,86 @@ +-- return { +-- 'AlexvZyl/nordic.nvim', +-- lazy = false, +-- priority = 1000, +-- config = function() +-- require('nordic').load() +-- vim.cmd.colorscheme 'nordic' +-- end, +-- } + +return { + 'rebelot/kanagawa.nvim', + lazy = false, + priority = 1000, + config = function() + require('kanagawa').setup { + commentStyle = { + italic = true, + }, + -- optional: your custom config here + } + vim.cmd 'colorscheme kanagawa-dragon' + end, +} + +-- return { +-- 'aliqyan-21/darkvoid.nvim', +-- priority = 1000, +-- lazy = false, +-- init = function() +-- require('darkvoid').setup { +-- glow = true, +-- transparent = true, +-- colors = { +-- fg = '#c0c0c0', +-- bg = '#1c1c1c', +-- cursor = '#fdd41b', +-- line_nr = '#404040', +-- visual = '#303030', +-- comment = '#737373', +-- string = '#66b2b2', +-- func = '#1bfd9c', +-- kw = '#fe5e58', +-- identifier = '#b1b1b1', +-- type = '#a1a1a1', +-- search_highlight = '#fdd41b', +-- operator = '#1bfd9c', +-- bracket = '#e6e6e6', +-- preprocessor = '#4b8902', +-- bool = '#d1d1d1', +-- constant = '#b2d8d8', +-- +-- -- gitsigns colors +-- added = '#baffc9', +-- changed = '#ffffba', +-- removed = '#ffb3ba', +-- +-- -- Pmenu colors +-- pmenu_bg = '#1c1c1c', +-- pmenu_sel_bg = '#1bfd9c', +-- pmenu_fg = '#c0c0c0', +-- +-- -- EndOfBuffer color +-- eob = '#3c3c3c', +-- +-- -- Telescope specific colors +-- border = '#fe5e58', +-- title = '#ffffff', +-- +-- -- bufferline specific colors +-- bufferline_selection = '#1bfd9c', +-- +-- -- LSP diagnostics colors +-- error = '#dea6a0', +-- warning = '#d6efd8', +-- hint = '#bedc74', +-- info = '#7fa1c3', +-- }, +-- } +-- -- You can configure highlights by doing something like: +-- vim.cmd.hi 'Comment gui=none' +-- vim.cmd.hi 'Normal guibg=none' +-- vim.cmd.hi 'Normal guibg=none' +-- vim.cmd.colorscheme 'darkvoid' +-- end, +-- }