From d40254d2b1a72d19af3385100634f14e93b89010 Mon Sep 17 00:00:00 2001 From: adamwm4 Date: Tue, 15 Apr 2025 17:19:52 -0500 Subject: [PATCH 1/6] switched to branch from base kickstart --- init.lua | 9 ++--- lua/custom/plugins/init.lua | 68 ++++++++++++++++++++++++++++++++++++- 2 files changed, 72 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 776c6873ff6..998f9ecfdd5 100644 --- a/init.lua +++ b/init.lua @@ -966,11 +966,12 @@ 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.lint', + 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.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'custom.plugins.init', -- 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. diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..8c086776a50 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,70 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} + +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.wrap = false + +vim.keymap.set('n', '', '10k', { desc = 'Scroll up and center' }) +vim.keymap.set('n', '', '10j', { desc = 'Scroll down and center' }) +vim.keymap.set('n', '', 'ggVGy', { desc = 'copy file', noremap = true }) + +return { + { + 'catppuccin/nvim', + name = 'catppuccin', + priority = 1000, + config = function() + require('catppuccin').setup { + flavour = 'mocha', + integrations = { + telescope = true, + treesitter = true, + cmp = true, + gitsigns = true, + }, + custom_highlights = function(colors) + return { + LineNr = { fg = colors.mauve }, + CursorLineNr = { fg = colors.lavender, bold = true }, + Visual = { bg = colors.surface1 }, + TelescopeSelection = { bg = colors.surface1 }, + } + end, + } + vim.cmd.colorscheme 'catppuccin' + end, + }, + + { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + theme = 'tokyo-night', + component_separators = '|', + section_separators = '', + }, + }, + }, + + { + 'NeogitOrg/neogit', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-telescope/telescope.nvim', + 'sindrets/diffview.nvim', + 'ibhagwan/fzf-lua', + }, + config = function() + local neogit = require 'neogit' + + vim.keymap.set('n', 'gg', neogit.open, { desc = 'Open Neogit' }) + + neogit.setup {} + end, + }, +} From f341887265676b64909e223de8655d3c61b2032e Mon Sep 17 00:00:00 2001 From: adamwm4 Date: Wed, 16 Apr 2025 16:53:49 -0500 Subject: [PATCH 2/6] adder explore short cut --- init.lua | 14 +++++++------- lua/custom/plugins/init.lua | 5 +++++ 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index 998f9ecfdd5..80c5a1c5c33 100644 --- a/init.lua +++ b/init.lua @@ -663,18 +663,18 @@ 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 = {}, - -- rust_analyzer = {}, + clangd = {}, + gopls = {}, + pyright = {}, + rust_analyzer = {}, + jdtls = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: -- https://github.com/pmizio/typescript-tools.nvim -- -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, - -- + ts_ls = {}, lua_ls = { -- cmd = { ... }, @@ -936,7 +936,7 @@ 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', 'java' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 8c086776a50..e938609e9f7 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -10,6 +10,7 @@ vim.opt.wrap = false vim.keymap.set('n', '', '10k', { desc = 'Scroll up and center' }) vim.keymap.set('n', '', '10j', { desc = 'Scroll down and center' }) vim.keymap.set('n', '', 'ggVGy', { desc = 'copy file', noremap = true }) +vim.keymap.set('n', 'e', ':Explore', { desc = 'copy file', noremap = true }) return { { @@ -68,4 +69,8 @@ return { neogit.setup {} end, }, + + { + 'mfussenegger/nvim-jdtls', + }, } From a3b7791f22382ac96866414a8575da260954ab95 Mon Sep 17 00:00:00 2001 From: adamwm4 Date: Wed, 16 Apr 2025 16:55:54 -0500 Subject: [PATCH 3/6] cleaned up custom thing --- lua/custom/plugins/init.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index e938609e9f7..e3325de9675 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -7,10 +7,10 @@ vim.opt.number = true vim.opt.relativenumber = true vim.opt.wrap = false -vim.keymap.set('n', '', '10k', { desc = 'Scroll up and center' }) -vim.keymap.set('n', '', '10j', { desc = 'Scroll down and center' }) -vim.keymap.set('n', '', 'ggVGy', { desc = 'copy file', noremap = true }) -vim.keymap.set('n', 'e', ':Explore', { desc = 'copy file', noremap = true }) +vim.keymap.set('n', '', '15k', { desc = 'Scroll up and center' }) +vim.keymap.set('n', '', '15j', { desc = 'Scroll down and center' }) +vim.keymap.set('n', '', 'ggVGy', { desc = 'Copy file' }) +vim.keymap.set('n', 'e', ':Explore', { desc = 'Open explorer' }) return { { From 98690636a9ddccc02048bafa3d4aa063ba50ac2f Mon Sep 17 00:00:00 2001 From: adamwm4 Date: Mon, 19 May 2025 08:38:01 -0500 Subject: [PATCH 4/6] fixed error; included autopairs; add svelte lsp --- init.lua | 61 +++++++++++++++++++++++++++++++++++-- lua/custom/plugins/init.lua | 1 - 2 files changed, 58 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 80c5a1c5c33..93d8d73078b 100644 --- a/init.lua +++ b/init.lua @@ -374,6 +374,59 @@ require('lazy').setup({ { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, }, config = function() + vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), + callback = function(event) + -- NOTE: Remember that Lua is a real programming language, and as such it is possible + -- to define small helper and utility functions so you don't have to repeat yourself. + -- In this case, we create a function that lets us more easily define mappings specific + -- for LSP related items. It sets the mode, buffer and description for us each time. + local map = function(keys, func, desc) + vim.keymap.set('n', keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) + end + + -- 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('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + + -- Find references for the word under your cursor. + map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + + -- Jump to the implementation of the word under your cursor. + -- Useful when your language has ways of declaring types without an actual implementation. + map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + + -- Jump to the type of the word under your cursor. + -- Useful when you're not sure what type a variable is and you want to see + -- the definition of its *type*, not where it was *defined*. + map('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') + + -- Fuzzy find all the symbols in your current document. + -- Symbols are things like variables, functions, types, etc. + map('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') + + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. + map('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') + + -- Rename the variable under your cursor. + -- Most Language Servers support renaming across files, etc. + map('lr', 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. + map('la', vim.lsp.buf.code_action, '[C]ode [A]ction') + + -- Opens a popup that displays documentation about the word under your cursor + -- See `:help K` for why this keymap. + map('K', vim.lsp.buf.hover, 'Hover Documentation') + + -- WARN: This is not Goto Definition, this is Goto Declaration. + -- For example, in C this would take you to the header. + map('gt', vim.lsp.buf.declaration, '[G]oto [T]ype Declaration') + end, + }) -- Telescope is a fuzzy finder that comes with a lot of different things that -- it can fuzzy find! It's more than just a "file finder", it can search -- many different aspects of Neovim, your workspace, LSP, and more! @@ -668,6 +721,8 @@ require('lazy').setup({ pyright = {}, rust_analyzer = {}, jdtls = {}, + svelte = {}, + marksman = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- -- Some languages (like typescript) have entire language plugins that can be useful: @@ -748,7 +803,7 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } + local disable_filetypes = { c = true, cpp = true, md = true } if disable_filetypes[vim.bo[bufnr].filetype] then return nil else @@ -936,7 +991,7 @@ 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', 'java' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'query', 'vim', 'vimdoc', 'java' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { @@ -968,7 +1023,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.debug', 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 require 'custom.plugins.init', diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index e3325de9675..14264423508 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -46,7 +46,6 @@ return { opts = { options = { icons_enabled = false, - theme = 'tokyo-night', component_separators = '|', section_separators = '', }, From 3babca60e7a701ff11864bbe10ac0c42e0ab15be Mon Sep 17 00:00:00 2001 From: Adam McNeil Date: Mon, 6 Oct 2025 15:53:45 -0500 Subject: [PATCH 5/6] broke custom init in to different files --- init.lua | 5 ---- lua/custom/plugins/catppuccin.lua | 25 ++++++++++++++++ lua/custom/plugins/firenvim.lua | 1 + lua/custom/plugins/init.lua | 49 ++----------------------------- lua/custom/plugins/lualline.lua | 12 ++++++++ lua/custom/plugins/nvim-tree.lua | 9 ++++++ 6 files changed, 50 insertions(+), 51 deletions(-) create mode 100644 lua/custom/plugins/catppuccin.lua create mode 100644 lua/custom/plugins/firenvim.lua create mode 100644 lua/custom/plugins/lualline.lua create mode 100644 lua/custom/plugins/nvim-tree.lua diff --git a/init.lua b/init.lua index 93d8d73078b..2f4ac252f33 100644 --- a/init.lua +++ b/init.lua @@ -716,12 +716,7 @@ 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 = {}, - rust_analyzer = {}, - jdtls = {}, - svelte = {}, marksman = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs -- diff --git a/lua/custom/plugins/catppuccin.lua b/lua/custom/plugins/catppuccin.lua new file mode 100644 index 00000000000..589901a7a65 --- /dev/null +++ b/lua/custom/plugins/catppuccin.lua @@ -0,0 +1,25 @@ +return { + 'catppuccin/nvim', + name = 'catppuccin', + priority = 1000, + config = function() + require('catppuccin').setup { + flavour = 'mocha', + integrations = { + telescope = true, + treesitter = true, + cmp = true, + gitsigns = true, + }, + custom_highlights = function(colors) + return { + LineNr = { fg = colors.mauve }, + CursorLineNr = { fg = colors.lavender, bold = true }, + Visual = { bg = colors.surface1 }, + TelescopeSelection = { bg = colors.surface1 }, + } + end, + } + vim.cmd.colorscheme 'catppuccin' + end, +} diff --git a/lua/custom/plugins/firenvim.lua b/lua/custom/plugins/firenvim.lua new file mode 100644 index 00000000000..78d03e49636 --- /dev/null +++ b/lua/custom/plugins/firenvim.lua @@ -0,0 +1 @@ +return { 'glacambre/firenvim', build = ':call firenvim#install(0)' } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 14264423508..4cc6ac8440d 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -10,48 +10,10 @@ vim.opt.wrap = false vim.keymap.set('n', '', '15k', { desc = 'Scroll up and center' }) vim.keymap.set('n', '', '15j', { desc = 'Scroll down and center' }) vim.keymap.set('n', '', 'ggVGy', { desc = 'Copy file' }) -vim.keymap.set('n', 'e', ':Explore', { desc = 'Open explorer' }) +vim.keymap.set('n', 'e', ':Neotree', { noremap = true, silent = true }) +-- vim.keymap.set('n', 'e', ':Explore', { desc = 'Open explorer' }) return { - { - 'catppuccin/nvim', - name = 'catppuccin', - priority = 1000, - config = function() - require('catppuccin').setup { - flavour = 'mocha', - integrations = { - telescope = true, - treesitter = true, - cmp = true, - gitsigns = true, - }, - custom_highlights = function(colors) - return { - LineNr = { fg = colors.mauve }, - CursorLineNr = { fg = colors.lavender, bold = true }, - Visual = { bg = colors.surface1 }, - TelescopeSelection = { bg = colors.surface1 }, - } - end, - } - vim.cmd.colorscheme 'catppuccin' - end, - }, - - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = false, - component_separators = '|', - section_separators = '', - }, - }, - }, - { 'NeogitOrg/neogit', dependencies = { @@ -62,14 +24,9 @@ return { }, config = function() local neogit = require 'neogit' - vim.keymap.set('n', 'gg', neogit.open, { desc = 'Open Neogit' }) - neogit.setup {} end, }, - - { - 'mfussenegger/nvim-jdtls', - }, } + diff --git a/lua/custom/plugins/lualline.lua b/lua/custom/plugins/lualline.lua new file mode 100644 index 00000000000..8b7f1f5376d --- /dev/null +++ b/lua/custom/plugins/lualline.lua @@ -0,0 +1,12 @@ +return { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = false, + component_separators = '|', + section_separators = '', + }, + }, +} diff --git a/lua/custom/plugins/nvim-tree.lua b/lua/custom/plugins/nvim-tree.lua new file mode 100644 index 00000000000..2e719982431 --- /dev/null +++ b/lua/custom/plugins/nvim-tree.lua @@ -0,0 +1,9 @@ +return { + 'nvim-tree/nvim-tree.lua', + dependencies = { + 'nvim-tree/nvim-web-devicons', + }, + config = function() + require('nvim-tree').setup {} + end, +} From cada131f26a626fa100cd66f1a8bb73ddace52d4 Mon Sep 17 00:00:00 2001 From: Adam McNeil Date: Tue, 7 Oct 2025 07:37:07 -0500 Subject: [PATCH 6/6] added copilot --- lua/custom/plugins/init.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 4cc6ac8440d..dd954b49bdf 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -4,6 +4,7 @@ -- See the kickstart.nvim README for more information vim.opt.number = true + vim.opt.relativenumber = true vim.opt.wrap = false @@ -28,5 +29,10 @@ return { neogit.setup {} end, }, + { + 'github/copilot.vim', + cmd = 'Copilot', -- Load Copilot only when the 'Copilot' command is invoked + event = 'InsertEnter', -- Load Copilot when entering insert mode + config = true, -- Automatically run the default setup + }, } -