From 71503c529dbc2516fced09073240f5ff0173ccb8 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 14 Dec 2023 21:07:40 -0600 Subject: [PATCH 01/56] ignore tutorialized init comments --- init.lua | 102 ------------------------------------------------- lazy-lock.json | 28 ++++++++++++++ 2 files changed, 28 insertions(+), 102 deletions(-) create mode 100644 lazy-lock.json diff --git a/init.lua b/init.lua index cf4a3790026..cdcae01c58d 100644 --- a/init.lua +++ b/init.lua @@ -1,52 +1,9 @@ ---[[ - -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== - -Kickstart.nvim is *not* a distribution. - -Kickstart.nvim is a template 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 should start exploring, configuring and tinkering to - explore Neovim! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example: - - https://learnxinyminutes.com/docs/lua/ - - - And then you can explore or search through `:help lua-guide` - - https://neovim.io/doc/user/lua-guide.html - - -Kickstart Guide: - -I have left several `:help X` comments throughout the init.lua -You should run that command and read that help section for more information. - -In addition, I have some `NOTE:` items throughout the file. -These are for you, the reader to help 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 nvim config. - -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 required (otherwise wrong leader will be used) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- [[ Install `lazy.nvim` plugin manager ]] -- https://github.com/folke/lazy.nvim --- `:help lazy.nvim.txt` for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system { @@ -61,14 +18,7 @@ end vim.opt.rtp:prepend(lazypath) -- [[ Configure plugins ]] --- NOTE: Here is where you install your plugins. --- You can configure plugins using the `config` key. --- --- You can also configure plugins after the setup call, --- as they will be available in your neovim runtime. require('lazy').setup({ - -- NOTE: First, some plugins that don't require any configuration - -- Git related plugins 'tpope/vim-fugitive', 'tpope/vim-rhubarb', @@ -76,18 +26,14 @@ require('lazy').setup({ -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', - -- NOTE: This is where your plugins related to LSP can be installed. - -- The configuration is done below. Search for lspconfig to find it below. { -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', dependencies = { - -- Automatically install LSPs to stdpath for neovim 'williamboman/mason.nvim', 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP - -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` { 'j-hui/fidget.nvim', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! @@ -118,7 +64,6 @@ require('lazy').setup({ -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', opts = { - -- See `:help gitsigns.txt` signs = { add = { text = '+' }, change = { text = '~' }, @@ -201,7 +146,6 @@ require('lazy').setup({ { -- Set lualine as statusline 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` opts = { options = { icons_enabled = false, @@ -215,8 +159,6 @@ require('lazy').setup({ { -- Add indentation guides even on blank lines 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help ibl` main = 'ibl', opts = {}, }, @@ -231,12 +173,8 @@ require('lazy').setup({ dependencies = { 'nvim-lua/plenary.nvim', -- Fuzzy Finder Algorithm which requires local dependencies to be built. - -- Only load if `make` is available. Make sure you have the system - -- requirements installed. { 'nvim-telescope/telescope-fzf-native.nvim', - -- NOTE: If you are having trouble with this installation, - -- refer to the README for telescope-fzf-native for more instructions. build = 'make', cond = function() return vim.fn.executable 'make' == 1 @@ -260,18 +198,10 @@ require('lazy').setup({ -- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.debug', - -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` - -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping - -- up-to-date with whatever is in the kickstart repo. - -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- - -- For additional information see: https://github.com/folke/lazy.nvim#-structuring-your-plugins -- { import = 'custom.plugins' }, }, {}) -- [[ Setting options ]] --- See `:help vim.o` --- NOTE: You can change these options as you wish! -- Set highlight on search vim.o.hlsearch = false @@ -283,8 +213,6 @@ vim.wo.number = true vim.o.mouse = 'a' -- Sync clipboard between OS and Neovim. --- Remove this option if you want your OS clipboard to remain independent. --- See `:help 'clipboard'` vim.o.clipboard = 'unnamedplus' -- Enable break indent @@ -307,13 +235,9 @@ vim.o.timeoutlen = 300 -- Set completeopt to have a better completion experience vim.o.completeopt = 'menuone,noselect' --- NOTE: You should make sure your terminal supports this vim.o.termguicolors = true -- [[ Basic Keymaps ]] - --- Keymaps for better default experience --- See `:help vim.keymap.set()` vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) -- Remap for dealing with word wrap @@ -327,7 +251,6 @@ vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open float vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) -- [[ Highlight on yank ]] --- See `:help vim.highlight.on_yank()` local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) vim.api.nvim_create_autocmd('TextYankPost', { callback = function() @@ -338,7 +261,6 @@ vim.api.nvim_create_autocmd('TextYankPost', { }) -- [[ Configure Telescope ]] --- See `:help telescope` and `:help telescope.setup()` require('telescope').setup { defaults = { mappings = { @@ -389,11 +311,9 @@ end vim.api.nvim_create_user_command('LiveGrepGitRoot', live_grep_git_root, {}) --- See `:help telescope.builtin` vim.keymap.set('n', '?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' }) vim.keymap.set('n', '', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' }) vim.keymap.set('n', '/', function() - -- You can pass additional configuration to telescope to change theme, layout, etc. require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { winblend = 10, previewer = false, @@ -418,8 +338,6 @@ vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { de vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) -- [[ Configure Treesitter ]] --- See `:help nvim-treesitter` --- Defer Treesitter setup after first render to improve startup time of 'nvim {filename}' vim.defer_fn(function() require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter @@ -487,14 +405,7 @@ vim.defer_fn(function() end, 0) -- [[ Configure LSP ]] --- This function gets run when an LSP connects to a particular buffer. local on_attach = function(_, bufnr) - -- 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 - -- many times. - -- - -- 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 nmap = function(keys, func, desc) if desc then desc = 'LSP: ' .. desc @@ -513,7 +424,6 @@ local on_attach = function(_, bufnr) nmap('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') nmap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') - -- See `:help K` for why this keymap nmap('K', vim.lsp.buf.hover, 'Hover Documentation') nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') @@ -543,7 +453,6 @@ require('which-key').register { ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, } -- register which-key VISUAL mode --- required for visual hs (hunk stage) to work require('which-key').register({ [''] = { name = 'VISUAL ' }, ['h'] = { 'Git [H]unk' }, @@ -555,13 +464,6 @@ require('mason').setup() require('mason-lspconfig').setup() -- Enable the following language servers --- Feel free to add/remove any LSPs that you want here. They will automatically be installed. --- --- Add any additional override configuration in the following tables. They will be passed to --- the `settings` field of the server config. You must look up that documentation yourself. --- --- If you want to override the default filetypes that your language server will attach to you can --- define the property 'filetypes' to the map in question. local servers = { -- clangd = {}, -- gopls = {}, @@ -574,8 +476,6 @@ local servers = { Lua = { workspace = { checkThirdParty = false }, telemetry = { enable = false }, - -- NOTE: toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, }, }, } @@ -606,7 +506,6 @@ mason_lspconfig.setup_handlers { } -- [[ Configure nvim-cmp ]] --- See `:help cmp` local cmp = require 'cmp' local luasnip = require 'luasnip' require('luasnip.loaders.from_vscode').lazy_load() @@ -657,5 +556,4 @@ cmp.setup { }, } --- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..bd2fa4e4599 --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,28 @@ +{ + "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, + "LuaSnip": { "branch": "master", "commit": "6a001360cea89df50f7c5cc8c7a75e6a21f1ef5c" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, + "fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" }, + "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" }, + "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, + "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, + "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } +} \ No newline at end of file From c033a705cede1ddfa26f3d5941b12c48c9b50535 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 14 Dec 2023 21:37:51 -0600 Subject: [PATCH 02/56] configure catppuccin theme --- init.lua | 19 +++++++++++++++---- lazy-lock.json | 1 + lua/custom/plugins/init.lua | 10 +++++----- 3 files changed, 21 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index cdcae01c58d..df79a36c0f6 100644 --- a/init.lua +++ b/init.lua @@ -192,13 +192,10 @@ require('lazy').setup({ build = ':TSUpdate', }, - -- NOTE: Next Step on Your Neovim Journey: Add/Configure additional "plugins" for kickstart - -- These are some example plugins that I've included in the kickstart repository. - -- Uncomment any of the lines below to enable them. -- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.debug', - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, }, {}) -- [[ Setting options ]] @@ -555,5 +552,19 @@ cmp.setup { { name = 'path' }, }, } +-- Configure Theme +require('catppuccin').setup({ + flavour = 'macchiato', + no_italic = false, + styles = { + comments = { 'italic' }, + conditionals = { 'italic' }, + }, + integrations = { + treesitter = true, + }, +}) + +vim.cmd.colorscheme 'catppuccin' -- vim: ts=2 sts=2 sw=2 et diff --git a/lazy-lock.json b/lazy-lock.json index bd2fa4e4599..0ee326fd62b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,6 +1,7 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, "LuaSnip": { "branch": "master", "commit": "6a001360cea89df50f7c5cc8c7a75e6a21f1ef5c" }, + "catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..fbaa3fcdeb6 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,5 +1,5 @@ --- You can add your own plugins here or in other files in this directory! --- I promise not to create any merge conflicts in this directory :) --- --- See the kickstart.nvim README for more information -return {} +return { + -- Theme + { 'catppuccin/nvim', name='catppuccin', priority = 1000 }, +} + From c1610371bbbc0247941897b598917b6eab48a0e1 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 14 Dec 2023 22:05:27 -0600 Subject: [PATCH 03/56] initialize oil plugin --- init.lua | 4 ++++ lazy-lock.json | 1 + lua/custom/plugins/init.lua | 2 ++ 3 files changed, 7 insertions(+) diff --git a/init.lua b/init.lua index df79a36c0f6..528d83f1582 100644 --- a/init.lua +++ b/init.lua @@ -552,6 +552,10 @@ cmp.setup { { name = 'path' }, }, } +-- Configure Oil +require('oil').setup() +vim.keymap.set('n', '-', 'Oil --float', { desc = 'Open current directory' }) + -- Configure Theme require('catppuccin').setup({ flavour = 'macchiato', diff --git a/lazy-lock.json b/lazy-lock.json index 0ee326fd62b..0dfb61fcbc2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -18,6 +18,7 @@ "nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" }, "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, "onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index fbaa3fcdeb6..1e90faabae6 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,4 +1,6 @@ return { + -- File Browser + { 'stevearc/oil.nvim' }, -- Theme { 'catppuccin/nvim', name='catppuccin', priority = 1000 }, } From 03bd849e9c6fcbf9df9e8fa3edc1469f313ae4d9 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 14 Dec 2023 22:19:23 -0600 Subject: [PATCH 04/56] setup editor options --- init.lua | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 528d83f1582..72e9a131c41 100644 --- a/init.lua +++ b/init.lua @@ -200,20 +200,33 @@ require('lazy').setup({ -- [[ Setting options ]] --- Set highlight on search -vim.o.hlsearch = false +-- Line numbers +vim.opt.nu = true +vim.opt.relativenumber = true --- Make line numbers default -vim.wo.number = true +-- Highlighting on search +vim.opt.hlsearch = true +vim.opt.incsearch = true -- Enable mouse mode -vim.o.mouse = 'a' +vim.opt.mouse = 'a' -- Sync clipboard between OS and Neovim. -vim.o.clipboard = 'unnamedplus' +vim.opt.clipboard = 'unnamedplus' --- Enable break indent -vim.o.breakindent = true +-- Handle indentation +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true +vim.opt.smartindent = true +vim.opt.breakindent = true + +-- Remove line wrapping +vim.opt.wrap = false + +-- Scroll buffer +vim.opt.scrolloff = 8 -- Save undo history vim.o.undofile = true From fc3965db1c2bb6b8edd084fdfd639f8edb18541a Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 18 Dec 2023 18:45:05 -0600 Subject: [PATCH 05/56] install typescript language server --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 72e9a131c41..a397ead6d15 100644 --- a/init.lua +++ b/init.lua @@ -479,7 +479,7 @@ local servers = { -- gopls = {}, -- pyright = {}, -- rust_analyzer = {}, - -- tsserver = {}, + tsserver = {}, -- html = { filetypes = { 'html', 'twig', 'hbs'} }, lua_ls = { From 05984d51eb7108a1313f533bd214be6df804071a Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 18 Dec 2023 19:15:03 -0600 Subject: [PATCH 06/56] install rust analyzer --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index a397ead6d15..722766486ea 100644 --- a/init.lua +++ b/init.lua @@ -478,7 +478,7 @@ local servers = { -- clangd = {}, -- gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, + rust_analyzer = { filetypes = {'rust', 'rs'}}, tsserver = {}, -- html = { filetypes = { 'html', 'twig', 'hbs'} }, From 9eb34622d761e687c06b756aa2bf3180699da816 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 18 Dec 2023 19:20:55 -0600 Subject: [PATCH 07/56] include rust autoformatting on save --- lazy-lock.json | 1 + lua/custom/plugins/init.lua | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/lazy-lock.json b/lazy-lock.json index 0dfb61fcbc2..b61d1eb8591 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -21,6 +21,7 @@ "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, "onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 1e90faabae6..d809eb452cf 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,6 +1,16 @@ return { -- File Browser { 'stevearc/oil.nvim' }, + + -- Rust Format on Save + { + 'rust-lang/rust.vim', + ft = "rust", + init = function () + vim.g.rustfmt_autosave = 1 + end + }, + -- Theme { 'catppuccin/nvim', name='catppuccin', priority = 1000 }, } From 118a47dba4c8e8580f28ea200ce459d652b0c95f Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 19 Dec 2023 13:44:12 -0600 Subject: [PATCH 08/56] disable mouse support --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 722766486ea..a1bc1aaf2a2 100644 --- a/init.lua +++ b/init.lua @@ -209,7 +209,7 @@ vim.opt.hlsearch = true vim.opt.incsearch = true -- Enable mouse mode -vim.opt.mouse = 'a' +vim.opt.mouse = '' -- Sync clipboard between OS and Neovim. vim.opt.clipboard = 'unnamedplus' From c5922f155d569ea02c8f8102ad79347833f91ef7 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 19 Dec 2023 13:50:30 -0600 Subject: [PATCH 09/56] remap autocomplete navitgation --- init.lua | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/init.lua b/init.lua index a1bc1aaf2a2..c8af5b77d4f 100644 --- a/init.lua +++ b/init.lua @@ -536,28 +536,10 @@ cmp.setup { [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, - [''] = cmp.mapping.confirm { + [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true, }, - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_next_item() - elseif luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - else - fallback() - end - end, { 'i', 's' }), - [''] = cmp.mapping(function(fallback) - if cmp.visible() then - cmp.select_prev_item() - elseif luasnip.locally_jumpable(-1) then - luasnip.jump(-1) - else - fallback() - end - end, { 'i', 's' }), }, sources = { { name = 'nvim_lsp' }, From 3bc070e283cef72d13da12b7d92501c1a00d1d92 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 19 Dec 2023 18:47:58 -0600 Subject: [PATCH 10/56] install and configure todo comments plugin --- .gitignore | 1 + init.lua | 5 +++++ lazy-lock.json | 1 + lua/custom/plugins/init.lua | 6 ++++++ 4 files changed, 13 insertions(+) diff --git a/.gitignore b/.gitignore index d699e1d68cc..770c212db00 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ tags test.sh .luarc.json nvim +spell diff --git a/init.lua b/init.lua index c8af5b77d4f..eec899a9d80 100644 --- a/init.lua +++ b/init.lua @@ -551,6 +551,9 @@ cmp.setup { require('oil').setup() vim.keymap.set('n', '-', 'Oil --float', { desc = 'Open current directory' }) +-- Configure Todo-Comments +require('todo-comments').setup() + -- Configure Theme require('catppuccin').setup({ flavour = 'macchiato', @@ -565,5 +568,7 @@ require('catppuccin').setup({ }) vim.cmd.colorscheme 'catppuccin' +vim.opt.spell = true +vim.opt.spelloptions = 'camel' -- vim: ts=2 sts=2 sw=2 et diff --git a/lazy-lock.json b/lazy-lock.json index b61d1eb8591..0831d179c0a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -24,6 +24,7 @@ "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, + "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index d809eb452cf..d1f16ecf61c 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -13,5 +13,11 @@ return { -- Theme { 'catppuccin/nvim', name='catppuccin', priority = 1000 }, + + -- Better Comments + { + 'folke/todo-comments.nvim', + dependencies = { 'nvim-lua//plenary.nvim' } + }, } From e4865c366791e339b4565d1dcfafa3392fa645a4 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 19 Dec 2023 18:49:37 -0600 Subject: [PATCH 11/56] remove unnecessary notes --- lua/kickstart/plugins/debug.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 7fc783fabd4..2e8962b116a 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -7,9 +7,9 @@ -- kickstart.nvim and not kitchen-sink.nvim ;) return { - -- NOTE: Yes, you can install new plugins here! + -- NOTE Yes, you can install new plugins here! 'mfussenegger/nvim-dap', - -- NOTE: And you can specify dependencies as well + -- NOTE And you can specify dependencies as well dependencies = { -- Creates a beautiful debugger UI 'rcarriga/nvim-dap-ui', From 67f0f6ffbf56e74740d62f86d71b5ab41aa11fd4 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 17:13:29 -0600 Subject: [PATCH 12/56] refactor plugin installation to plugins folder --- init.lua | 181 +----------------------------------------------- lua/plugins.lua | 179 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 180 insertions(+), 180 deletions(-) create mode 100644 lua/plugins.lua diff --git a/init.lua b/init.lua index eec899a9d80..09f56b8ad4c 100644 --- a/init.lua +++ b/init.lua @@ -17,186 +17,7 @@ if not vim.loop.fs_stat(lazypath) then end vim.opt.rtp:prepend(lazypath) --- [[ Configure plugins ]] -require('lazy').setup({ - -- Git related plugins - 'tpope/vim-fugitive', - 'tpope/vim-rhubarb', - - -- Detect tabstop and shiftwidth automatically - 'tpope/vim-sleuth', - - { - -- LSP Configuration & Plugins - 'neovim/nvim-lspconfig', - dependencies = { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - - -- Useful status updates for LSP - { 'j-hui/fidget.nvim', opts = {} }, - - -- Additional lua configuration, makes nvim stuff amazing! - 'folke/neodev.nvim', - }, - }, - - { - -- Autocompletion - 'hrsh7th/nvim-cmp', - dependencies = { - -- Snippet Engine & its associated nvim-cmp source - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip', - - -- Adds LSP completion capabilities - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-path', - - -- Adds a number of user-friendly snippets - 'rafamadriz/friendly-snippets', - }, - }, - - -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, - { - -- Adds git related signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - on_attach = function(bufnr) - local gs = package.loaded.gitsigns - - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end - - -- Navigation - map({ 'n', 'v' }, ']c', function() - if vim.wo.diff then - return ']c' - end - vim.schedule(function() - gs.next_hunk() - end) - return '' - end, { expr = true, desc = 'Jump to next hunk' }) - - map({ 'n', 'v' }, '[c', function() - if vim.wo.diff then - return '[c' - end - vim.schedule(function() - gs.prev_hunk() - end) - return '' - end, { expr = true, desc = 'Jump to previous hunk' }) - - -- Actions - -- visual mode - map('v', 'hs', function() - gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'stage git hunk' }) - map('v', 'hr', function() - gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'reset git hunk' }) - -- normal mode - map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) - map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) - map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) - map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) - map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) - map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) - map('n', 'hb', function() - gs.blame_line { full = false } - end, { desc = 'git blame line' }) - map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) - map('n', 'hD', function() - gs.diffthis '~' - end, { desc = 'git diff against last commit' }) - - -- Toggles - map('n', 'tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' }) - map('n', 'td', gs.toggle_deleted, { desc = 'toggle git show deleted' }) - - -- Text object - map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select git hunk' }) - end, - }, - }, - - { - -- Theme inspired by Atom - 'navarasu/onedark.nvim', - priority = 1000, - config = function() - vim.cmd.colorscheme 'onedark' - end, - }, - - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - opts = { - options = { - icons_enabled = false, - theme = 'onedark', - component_separators = '|', - section_separators = '', - }, - }, - }, - - { - -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - main = 'ibl', - opts = {}, - }, - - -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, - - -- Fuzzy Finder (files, lsp, etc) - { - 'nvim-telescope/telescope.nvim', - branch = '0.1.x', - dependencies = { - 'nvim-lua/plenary.nvim', - -- Fuzzy Finder Algorithm which requires local dependencies to be built. - { - 'nvim-telescope/telescope-fzf-native.nvim', - build = 'make', - cond = function() - return vim.fn.executable 'make' == 1 - end, - }, - }, - }, - - { - -- Highlight, edit, and navigate code - 'nvim-treesitter/nvim-treesitter', - dependencies = { - 'nvim-treesitter/nvim-treesitter-textobjects', - }, - build = ':TSUpdate', - }, - - -- require 'kickstart.plugins.autoformat', - -- require 'kickstart.plugins.debug', - - { import = 'custom.plugins' }, -}, {}) +require('lazy').setup('plugins'); -- [[ Setting options ]] diff --git a/lua/plugins.lua b/lua/plugins.lua new file mode 100644 index 00000000000..f544cbb22fa --- /dev/null +++ b/lua/plugins.lua @@ -0,0 +1,179 @@ +return { + -- Git related plugins + 'tpope/vim-fugitive', + 'tpope/vim-rhubarb', + + -- Detect tabstop and shiftwidth automatically + 'tpope/vim-sleuth', + + { + -- LSP Configuration & Plugins + 'neovim/nvim-lspconfig', + dependencies = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + + -- Useful status updates for LSP + { 'j-hui/fidget.nvim', opts = {} }, + + -- Additional lua configuration, makes nvim stuff amazing! + 'folke/neodev.nvim', + }, + }, + + { + -- Autocompletion + 'hrsh7th/nvim-cmp', + dependencies = { + -- Snippet Engine & its associated nvim-cmp source + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + + -- Adds LSP completion capabilities + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-path', + + -- Adds a number of user-friendly snippets + 'rafamadriz/friendly-snippets', + }, + }, + + -- Useful plugin to show you pending keybinds. + { 'folke/which-key.nvim', opts = {} }, + { + -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + on_attach = function(bufnr) + local gs = package.loaded.gitsigns + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map({ 'n', 'v' }, ']c', function() + if vim.wo.diff then + return ']c' + end + vim.schedule(function() + gs.next_hunk() + end) + return '' + end, { expr = true, desc = 'Jump to next hunk' }) + + map({ 'n', 'v' }, '[c', function() + if vim.wo.diff then + return '[c' + end + vim.schedule(function() + gs.prev_hunk() + end) + return '' + end, { expr = true, desc = 'Jump to previous hunk' }) + + -- Actions + -- visual mode + map('v', 'hs', function() + gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'stage git hunk' }) + map('v', 'hr', function() + gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'reset git hunk' }) + -- normal mode + map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) + map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) + map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) + map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) + map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) + map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) + map('n', 'hb', function() + gs.blame_line { full = false } + end, { desc = 'git blame line' }) + map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) + map('n', 'hD', function() + gs.diffthis '~' + end, { desc = 'git diff against last commit' }) + + -- Toggles + map('n', 'tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' }) + map('n', 'td', gs.toggle_deleted, { desc = 'toggle git show deleted' }) + + -- Text object + map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select git hunk' }) + end, + }, + }, + + { + -- Theme inspired by Atom + 'navarasu/onedark.nvim', + priority = 1000, + config = function() + vim.cmd.colorscheme 'onedark' + end, + }, + + { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + opts = { + options = { + icons_enabled = false, + theme = 'onedark', + component_separators = '|', + section_separators = '', + }, + }, + }, + + { + -- Add indentation guides even on blank lines + 'lukas-reineke/indent-blankline.nvim', + main = 'ibl', + opts = {}, + }, + + -- "gc" to comment visual regions/lines + { 'numToStr/Comment.nvim', opts = {} }, + + -- Fuzzy Finder (files, lsp, etc) + { + 'nvim-telescope/telescope.nvim', + branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim', + -- Fuzzy Finder Algorithm which requires local dependencies to be built. + { + 'nvim-telescope/telescope-fzf-native.nvim', + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, + }, + }, + + { + -- Highlight, edit, and navigate code + 'nvim-treesitter/nvim-treesitter', + dependencies = { + 'nvim-treesitter/nvim-treesitter-textobjects', + }, + build = ':TSUpdate', + }, + + -- require 'kickstart.plugins.autoformat', + -- require 'kickstart.plugins.debug', + + { import = 'custom.plugins' }, +}; From 0a67a2effdfdad42379da9c3b5579b00aab60ac8 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 17:21:28 -0600 Subject: [PATCH 13/56] modularize all custom plugins --- lua/custom/plugins/init.lua | 23 ----------------------- lua/plugins.lua | 2 -- lua/plugins/catpuccin.lua | 1 + lua/plugins/oil.lua | 1 + lua/plugins/rust.lua | 7 +++++++ lua/plugins/todocomments.lua | 4 ++++ 6 files changed, 13 insertions(+), 25 deletions(-) delete mode 100644 lua/custom/plugins/init.lua create mode 100644 lua/plugins/catpuccin.lua create mode 100644 lua/plugins/oil.lua create mode 100644 lua/plugins/rust.lua create mode 100644 lua/plugins/todocomments.lua diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua deleted file mode 100644 index d1f16ecf61c..00000000000 --- a/lua/custom/plugins/init.lua +++ /dev/null @@ -1,23 +0,0 @@ -return { - -- File Browser - { 'stevearc/oil.nvim' }, - - -- Rust Format on Save - { - 'rust-lang/rust.vim', - ft = "rust", - init = function () - vim.g.rustfmt_autosave = 1 - end - }, - - -- Theme - { 'catppuccin/nvim', name='catppuccin', priority = 1000 }, - - -- Better Comments - { - 'folke/todo-comments.nvim', - dependencies = { 'nvim-lua//plenary.nvim' } - }, -} - diff --git a/lua/plugins.lua b/lua/plugins.lua index f544cbb22fa..1c9e767bf53 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -174,6 +174,4 @@ return { -- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.debug', - - { import = 'custom.plugins' }, }; diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua new file mode 100644 index 00000000000..56b8bb9ab11 --- /dev/null +++ b/lua/plugins/catpuccin.lua @@ -0,0 +1 @@ +return { 'catppuccin/nvim', name='catppuccin', priority = 1000 }; diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua new file mode 100644 index 00000000000..2950bbf77b3 --- /dev/null +++ b/lua/plugins/oil.lua @@ -0,0 +1 @@ +return { 'stevearc/oil.nvim' }; diff --git a/lua/plugins/rust.lua b/lua/plugins/rust.lua new file mode 100644 index 00000000000..e2a56aeca90 --- /dev/null +++ b/lua/plugins/rust.lua @@ -0,0 +1,7 @@ +return { + 'rust-lang/rust.vim', + ft = "rust", + init = function () + vim.g.rustfmt_autosave = 1 + end +}; diff --git a/lua/plugins/todocomments.lua b/lua/plugins/todocomments.lua new file mode 100644 index 00000000000..165d8eaeb5a --- /dev/null +++ b/lua/plugins/todocomments.lua @@ -0,0 +1,4 @@ +return { + 'folke/todo-comments.nvim', + dependencies = { 'nvim-lua//plenary.nvim' } +}; From e31671d714905418ff44037562e53a8c4b432e80 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 17:25:12 -0600 Subject: [PATCH 14/56] remove unused theme --- lua/plugins.lua | 9 --------- 1 file changed, 9 deletions(-) diff --git a/lua/plugins.lua b/lua/plugins.lua index 1c9e767bf53..f0377166064 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -114,15 +114,6 @@ return { }, }, - { - -- Theme inspired by Atom - 'navarasu/onedark.nvim', - priority = 1000, - config = function() - vim.cmd.colorscheme 'onedark' - end, - }, - { -- Set lualine as statusline 'nvim-lualine/lualine.nvim', From a65fbaf5baa484d059a9b5cee5fa3deb75151a45 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 17:51:47 -0600 Subject: [PATCH 15/56] configure catpuccin in module --- init.lua | 14 -------------- lua/plugins/catpuccin.lua | 17 ++++++++++++++++- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/init.lua b/init.lua index 09f56b8ad4c..25c6e8d7e65 100644 --- a/init.lua +++ b/init.lua @@ -375,20 +375,6 @@ vim.keymap.set('n', '-', 'Oil --float', { desc = 'Open current -- Configure Todo-Comments require('todo-comments').setup() --- Configure Theme -require('catppuccin').setup({ - flavour = 'macchiato', - no_italic = false, - styles = { - comments = { 'italic' }, - conditionals = { 'italic' }, - }, - integrations = { - treesitter = true, - }, -}) - -vim.cmd.colorscheme 'catppuccin' vim.opt.spell = true vim.opt.spelloptions = 'camel' diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua index 56b8bb9ab11..ade84e6ccc4 100644 --- a/lua/plugins/catpuccin.lua +++ b/lua/plugins/catpuccin.lua @@ -1 +1,16 @@ -return { 'catppuccin/nvim', name='catppuccin', priority = 1000 }; +return { 'catppuccin/nvim', name='catppuccin', priority = 1000, + config = function() + require('catppuccin').setup({ + flavour = "macchiato", + no_italic = false, + styles = { + comments = { 'italic' }, + conditionals = { 'italic' }, + }, + integrations = { + treesitter = true, + } + }) + vim.cmd.colorscheme 'catppuccin' + end +}; From 216440979eca0204befe1089ac3c35075ddd46fa Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 17:56:35 -0600 Subject: [PATCH 16/56] handle setup for all custom plugins in their respective modules --- init.lua | 6 ------ lua/plugins/oil.lua | 7 ++++++- lua/plugins/todocomments.lua | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 25c6e8d7e65..e16d1b43559 100644 --- a/init.lua +++ b/init.lua @@ -368,12 +368,6 @@ cmp.setup { { name = 'path' }, }, } --- Configure Oil -require('oil').setup() -vim.keymap.set('n', '-', 'Oil --float', { desc = 'Open current directory' }) - --- Configure Todo-Comments -require('todo-comments').setup() vim.opt.spell = true vim.opt.spelloptions = 'camel' diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index 2950bbf77b3..36593445307 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -1 +1,6 @@ -return { 'stevearc/oil.nvim' }; +return { 'stevearc/oil.nvim', + config = function() + require("oil").setup(); + vim.keymap.set('n', '-', 'Oil --float', { desc = 'Open current directory' }) + end +}; diff --git a/lua/plugins/todocomments.lua b/lua/plugins/todocomments.lua index 165d8eaeb5a..2797ff53d3b 100644 --- a/lua/plugins/todocomments.lua +++ b/lua/plugins/todocomments.lua @@ -1,4 +1,5 @@ return { 'folke/todo-comments.nvim', - dependencies = { 'nvim-lua//plenary.nvim' } + dependencies = { 'nvim-lua//plenary.nvim' }, + config = {} }; From 26b5b21aa403d2ffcfce06f579809ab0b0b8179e Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 18:26:43 -0600 Subject: [PATCH 17/56] refactor large plugin files into modules --- lua/plugins.lua | 158 --------------------------------- lua/plugins/autocompletion.lua | 16 ++++ lua/plugins/blankline.lua | 5 ++ lua/plugins/gitsigns.lua | 73 +++++++++++++++ lua/plugins/lspconfig.lua | 14 +++ lua/plugins/lualine.lua | 12 +++ lua/plugins/telescope.lua | 16 ++++ lua/plugins/treesitter.lua | 7 ++ 8 files changed, 143 insertions(+), 158 deletions(-) create mode 100644 lua/plugins/autocompletion.lua create mode 100644 lua/plugins/blankline.lua create mode 100644 lua/plugins/gitsigns.lua create mode 100644 lua/plugins/lspconfig.lua create mode 100644 lua/plugins/lualine.lua create mode 100644 lua/plugins/telescope.lua create mode 100644 lua/plugins/treesitter.lua diff --git a/lua/plugins.lua b/lua/plugins.lua index f0377166064..df7180560c9 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -1,168 +1,10 @@ return { - -- Git related plugins 'tpope/vim-fugitive', 'tpope/vim-rhubarb', - - -- Detect tabstop and shiftwidth automatically 'tpope/vim-sleuth', - - { - -- LSP Configuration & Plugins - 'neovim/nvim-lspconfig', - dependencies = { - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - - -- Useful status updates for LSP - { 'j-hui/fidget.nvim', opts = {} }, - - -- Additional lua configuration, makes nvim stuff amazing! - 'folke/neodev.nvim', - }, - }, - - { - -- Autocompletion - 'hrsh7th/nvim-cmp', - dependencies = { - -- Snippet Engine & its associated nvim-cmp source - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip', - - -- Adds LSP completion capabilities - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-path', - - -- Adds a number of user-friendly snippets - 'rafamadriz/friendly-snippets', - }, - }, - - -- Useful plugin to show you pending keybinds. { 'folke/which-key.nvim', opts = {} }, - { - -- Adds git related signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - on_attach = function(bufnr) - local gs = package.loaded.gitsigns - - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end - - -- Navigation - map({ 'n', 'v' }, ']c', function() - if vim.wo.diff then - return ']c' - end - vim.schedule(function() - gs.next_hunk() - end) - return '' - end, { expr = true, desc = 'Jump to next hunk' }) - - map({ 'n', 'v' }, '[c', function() - if vim.wo.diff then - return '[c' - end - vim.schedule(function() - gs.prev_hunk() - end) - return '' - end, { expr = true, desc = 'Jump to previous hunk' }) - - -- Actions - -- visual mode - map('v', 'hs', function() - gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'stage git hunk' }) - map('v', 'hr', function() - gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'reset git hunk' }) - -- normal mode - map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) - map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) - map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) - map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) - map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) - map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) - map('n', 'hb', function() - gs.blame_line { full = false } - end, { desc = 'git blame line' }) - map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) - map('n', 'hD', function() - gs.diffthis '~' - end, { desc = 'git diff against last commit' }) - - -- Toggles - map('n', 'tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' }) - map('n', 'td', gs.toggle_deleted, { desc = 'toggle git show deleted' }) - - -- Text object - map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select git hunk' }) - end, - }, - }, - - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - opts = { - options = { - icons_enabled = false, - theme = 'onedark', - component_separators = '|', - section_separators = '', - }, - }, - }, - - { - -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - main = 'ibl', - opts = {}, - }, - - -- "gc" to comment visual regions/lines { 'numToStr/Comment.nvim', opts = {} }, - -- Fuzzy Finder (files, lsp, etc) - { - 'nvim-telescope/telescope.nvim', - branch = '0.1.x', - dependencies = { - 'nvim-lua/plenary.nvim', - -- Fuzzy Finder Algorithm which requires local dependencies to be built. - { - 'nvim-telescope/telescope-fzf-native.nvim', - build = 'make', - cond = function() - return vim.fn.executable 'make' == 1 - end, - }, - }, - }, - - { - -- Highlight, edit, and navigate code - 'nvim-treesitter/nvim-treesitter', - dependencies = { - 'nvim-treesitter/nvim-treesitter-textobjects', - }, - build = ':TSUpdate', - }, - -- require 'kickstart.plugins.autoformat', -- require 'kickstart.plugins.debug', }; diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua new file mode 100644 index 00000000000..b92b6da239b --- /dev/null +++ b/lua/plugins/autocompletion.lua @@ -0,0 +1,16 @@ +return { + -- Autocompletion + 'hrsh7th/nvim-cmp', + dependencies = { + -- Snippet Engine & its associated nvim-cmp source + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + + -- Adds LSP completion capabilities + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-path', + + -- Adds a number of user-friendly snippets + 'rafamadriz/friendly-snippets', + } +} diff --git a/lua/plugins/blankline.lua b/lua/plugins/blankline.lua new file mode 100644 index 00000000000..91babce6554 --- /dev/null +++ b/lua/plugins/blankline.lua @@ -0,0 +1,5 @@ +return { + 'lukas-reineke/indent-blankline.nvim', + main = 'ibl', + opts = {}, +} diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua new file mode 100644 index 00000000000..0b1c73786a8 --- /dev/null +++ b/lua/plugins/gitsigns.lua @@ -0,0 +1,73 @@ +return { + -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + on_attach = function(bufnr) + local gs = package.loaded.gitsigns + + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end + + -- Navigation + map({ 'n', 'v' }, ']c', function() + if vim.wo.diff then + return ']c' + end + vim.schedule(function() + gs.next_hunk() + end) + return '' + end, { expr = true, desc = 'Jump to next hunk' }) + + map({ 'n', 'v' }, '[c', function() + if vim.wo.diff then + return '[c' + end + vim.schedule(function() + gs.prev_hunk() + end) + return '' + end, { expr = true, desc = 'Jump to previous hunk' }) + + -- Actions + -- visual mode + map('v', 'hs', function() + gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'stage git hunk' }) + map('v', 'hr', function() + gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'reset git hunk' }) + -- normal mode + map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) + map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) + map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) + map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) + map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) + map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) + map('n', 'hb', function() + gs.blame_line { full = false } + end, { desc = 'git blame line' }) + map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) + map('n', 'hD', function() + gs.diffthis '~' + end, { desc = 'git diff against last commit' }) + + -- Toggles + map('n', 'tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' }) + map('n', 'td', gs.toggle_deleted, { desc = 'toggle git show deleted' }) + + -- Text object + map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select git hunk' }) + end + } +} diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua new file mode 100644 index 00000000000..b28c83b10b7 --- /dev/null +++ b/lua/plugins/lspconfig.lua @@ -0,0 +1,14 @@ +return { + -- LSP Configuration & Plugins + 'neovim/nvim-lspconfig', + dependencies = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + + -- Useful status updates for LSP + { 'j-hui/fidget.nvim', opts = {} }, + + -- Additional lua configuration, makes nvim stuff amazing! + 'folke/neodev.nvim', + } +} diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua new file mode 100644 index 00000000000..074ea501149 --- /dev/null +++ b/lua/plugins/lualine.lua @@ -0,0 +1,12 @@ +return { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + opts = { + options = { + icons_enabled = false, + theme = 'onedark', + component_separators = '|', + section_separators = '', + } + } +} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua new file mode 100644 index 00000000000..1fcfda56bb7 --- /dev/null +++ b/lua/plugins/telescope.lua @@ -0,0 +1,16 @@ +return { + 'nvim-telescope/telescope.nvim', + branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim', + + -- Fuzzy Finder Algorithm which requires local dependencies to be built. + { + 'nvim-telescope/telescope-fzf-native.nvim', + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + end, + }, + }, +} diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua new file mode 100644 index 00000000000..a3e92911958 --- /dev/null +++ b/lua/plugins/treesitter.lua @@ -0,0 +1,7 @@ +return { + 'nvim-treesitter/nvim-treesitter', + dependencies = { + 'nvim-treesitter/nvim-treesitter-textobjects', + }, + build = ':TSUpdate', +} From bee32df567610b374cab920ff21cc02442adc035 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 18:36:07 -0600 Subject: [PATCH 18/56] create and configure whichkey module --- init.lua | 21 --------------------- lua/plugins.lua | 1 - lua/plugins/whichkey.lua | 20 ++++++++++++++++++++ 3 files changed, 20 insertions(+), 22 deletions(-) create mode 100644 lua/plugins/whichkey.lua diff --git a/init.lua b/init.lua index e16d1b43559..aa38724ef25 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,6 @@ --- Set as the leader key vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' --- [[ Install `lazy.nvim` plugin manager ]] --- https://github.com/folke/lazy.nvim local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then vim.fn.system { @@ -16,7 +13,6 @@ if not vim.loop.fs_stat(lazypath) then } end vim.opt.rtp:prepend(lazypath) - require('lazy').setup('plugins'); -- [[ Setting options ]] @@ -272,23 +268,6 @@ local on_attach = function(_, bufnr) end, { desc = 'Format current buffer with LSP' }) end --- document existing key chains -require('which-key').register { - ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, - ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, -} --- register which-key VISUAL mode -require('which-key').register({ - [''] = { name = 'VISUAL ' }, - ['h'] = { 'Git [H]unk' }, -}, { mode = 'v' }) - -- mason-lspconfig requires that these setup functions are called in this order -- before setting up the servers. require('mason').setup() diff --git a/lua/plugins.lua b/lua/plugins.lua index df7180560c9..ef1a1c08c2a 100644 --- a/lua/plugins.lua +++ b/lua/plugins.lua @@ -2,7 +2,6 @@ return { 'tpope/vim-fugitive', 'tpope/vim-rhubarb', 'tpope/vim-sleuth', - { 'folke/which-key.nvim', opts = {} }, { 'numToStr/Comment.nvim', opts = {} }, -- require 'kickstart.plugins.autoformat', diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua new file mode 100644 index 00000000000..7dc820a9d45 --- /dev/null +++ b/lua/plugins/whichkey.lua @@ -0,0 +1,20 @@ +return { 'folke/which-key.nvim', opts = {}, + config = function() + -- document existing key chains + require('which-key').register { + ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, + ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, + ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, + ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, + ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, + ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, + ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, + } + -- register which-key VISUAL mode + require('which-key').register({ + [''] = { name = 'VISUAL ' }, + ['h'] = { 'Git [H]unk' }, + }, { mode = 'v' }) + end +} From 4840b5d97fdedf441585b677e46fe8ee98fbb36f Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 19:01:16 -0600 Subject: [PATCH 19/56] configure treesiter in treesitter module --- init.lua | 67 ----------------------------------- lua/plugins/treesitter.lua | 71 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+), 67 deletions(-) diff --git a/init.lua b/init.lua index aa38724ef25..a4818e3c8f5 100644 --- a/init.lua +++ b/init.lua @@ -164,73 +164,6 @@ vim.keymap.set('n', 'sG', ':LiveGrepGitRoot', { desc = '[S]earch by vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) --- [[ Configure Treesitter ]] -vim.defer_fn(function() - require('nvim-treesitter.configs').setup { - -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' }, - - -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) - auto_install = false, - - highlight = { enable = true }, - indent = { enable = true }, - incremental_selection = { - enable = true, - keymaps = { - init_selection = '', - node_incremental = '', - scope_incremental = '', - node_decremental = '', - }, - }, - textobjects = { - select = { - enable = true, - lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim - keymaps = { - -- You can use the capture groups defined in textobjects.scm - ['aa'] = '@parameter.outer', - ['ia'] = '@parameter.inner', - ['af'] = '@function.outer', - ['if'] = '@function.inner', - ['ac'] = '@class.outer', - ['ic'] = '@class.inner', - }, - }, - move = { - enable = true, - set_jumps = true, -- whether to set jumps in the jumplist - goto_next_start = { - [']m'] = '@function.outer', - [']]'] = '@class.outer', - }, - goto_next_end = { - [']M'] = '@function.outer', - [']['] = '@class.outer', - }, - goto_previous_start = { - ['[m'] = '@function.outer', - ['[['] = '@class.outer', - }, - goto_previous_end = { - ['[M'] = '@function.outer', - ['[]'] = '@class.outer', - }, - }, - swap = { - enable = true, - swap_next = { - ['a'] = '@parameter.inner', - }, - swap_previous = { - ['A'] = '@parameter.inner', - }, - }, - }, - } -end, 0) - -- [[ Configure LSP ]] local on_attach = function(_, bufnr) local nmap = function(keys, func, desc) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index a3e92911958..f440189e523 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,7 +1,78 @@ +local text_objects = { + select = { + enable = true, + lookahead = true, -- Automatically jump forward to textobj, similar to targets.vim + keymaps = { + -- You can use the capture groups defined in textobjects.scm + ['aa'] = '@parameter.outer', + ['ia'] = '@parameter.inner', + ['af'] = '@function.outer', + ['if'] = '@function.inner', + ['ac'] = '@class.outer', + ['ic'] = '@class.inner', + }, + }, + move = { + enable = true, + set_jumps = true, -- whether to set jumps in the jumplist + goto_next_start = { + [']m'] = '@function.outer', + [']]'] = '@class.outer', + }, + goto_next_end = { + [']M'] = '@function.outer', + [']['] = '@class.outer', + }, + goto_previous_start = { + ['[m'] = '@function.outer', + ['[['] = '@class.outer', + }, + goto_previous_end = { + ['[M'] = '@function.outer', + ['[]'] = '@class.outer', + }, + }, + swap = { + enable = true, + swap_next = { + ['a'] = '@parameter.inner', + }, + swap_previous = { + ['A'] = '@parameter.inner', + }, + }, +} + return { 'nvim-treesitter/nvim-treesitter', dependencies = { 'nvim-treesitter/nvim-treesitter-textobjects', }, build = ':TSUpdate', + config = function() + vim.defer_fn(function() + -- FIX: Missing required fields in type `TSConfig` + require('nvim-treesitter.configs').setup { + -- Add languages to be installed here that you want installed for treesitter + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' }, + + -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) + auto_install = false, + + highlight = { enable = true }, + indent = { enable = true }, + incremental_selection = { + enable = true, + keymaps = { + init_selection = '', + node_incremental = '', + scope_incremental = '', + node_decremental = '', + }, + }, + textobjects = text_objects, + } + end, 0) + end } + From 3831de930ca772a60303e8e5711aae94929ee6ab Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 19:10:02 -0600 Subject: [PATCH 20/56] refactor vim options into new file --- init.lua | 74 ++---------------------------------------------- lua/settings.lua | 72 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 74 insertions(+), 72 deletions(-) create mode 100644 lua/settings.lua diff --git a/init.lua b/init.lua index a4818e3c8f5..288ce8f261d 100644 --- a/init.lua +++ b/init.lua @@ -13,79 +13,9 @@ if not vim.loop.fs_stat(lazypath) then } end vim.opt.rtp:prepend(lazypath) -require('lazy').setup('plugins'); - --- [[ Setting options ]] - --- Line numbers -vim.opt.nu = true -vim.opt.relativenumber = true - --- Highlighting on search -vim.opt.hlsearch = true -vim.opt.incsearch = true - --- Enable mouse mode -vim.opt.mouse = '' - --- Sync clipboard between OS and Neovim. -vim.opt.clipboard = 'unnamedplus' - --- Handle indentation -vim.opt.tabstop = 4 -vim.opt.softtabstop = 4 -vim.opt.shiftwidth = 4 -vim.opt.expandtab = true -vim.opt.smartindent = true -vim.opt.breakindent = true - --- Remove line wrapping -vim.opt.wrap = false - --- Scroll buffer -vim.opt.scrolloff = 8 - --- Save undo history -vim.o.undofile = true --- Case-insensitive searching UNLESS \C or capital in search -vim.o.ignorecase = true -vim.o.smartcase = true - --- Keep signcolumn on by default -vim.wo.signcolumn = 'yes' - --- Decrease update time -vim.o.updatetime = 250 -vim.o.timeoutlen = 300 - --- Set completeopt to have a better completion experience -vim.o.completeopt = 'menuone,noselect' - -vim.o.termguicolors = true - --- [[ Basic Keymaps ]] -vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) - --- Remap for dealing with word wrap -vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) -vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) - --- Diagnostic keymaps -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) -vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) - --- [[ Highlight on yank ]] -local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) -vim.api.nvim_create_autocmd('TextYankPost', { - callback = function() - vim.highlight.on_yank() - end, - group = highlight_group, - pattern = '*', -}) +require('lazy').setup('plugins'); +require('lua/settings'); -- [[ Configure Telescope ]] require('telescope').setup { diff --git a/lua/settings.lua b/lua/settings.lua new file mode 100644 index 00000000000..905f368f1c2 --- /dev/null +++ b/lua/settings.lua @@ -0,0 +1,72 @@ +-- Line numbers +vim.opt.nu = true +vim.opt.relativenumber = true + +-- Highlighting on search +vim.opt.hlsearch = true +vim.opt.incsearch = true + +-- Enable mouse mode +vim.opt.mouse = '' + +-- FIX: shared clipboard not working +-- Sync clipboard between OS and Neovim. +vim.opt.clipboard = 'unnamedplus' + +-- FIX: tabs do not seem to be working as expected +-- Handle indentation +vim.opt.tabstop = 4 +vim.opt.softtabstop = 4 +vim.opt.shiftwidth = 4 +vim.opt.expandtab = true +vim.opt.smartindent = true +vim.opt.breakindent = true + +-- Remove line wrapping +vim.opt.wrap = false + +-- Scroll buffer +vim.opt.scrolloff = 8 + +-- Save undo history +vim.o.undofile = true + +-- Case-insensitive searching UNLESS \C or capital in search +vim.o.ignorecase = true +vim.o.smartcase = true + +-- Keep signcolumn on by default +vim.wo.signcolumn = 'yes' + +-- Decrease update time +vim.o.updatetime = 250 +vim.o.timeoutlen = 300 + +-- Set completeopt to have a better completion experience +vim.o.completeopt = 'menuone,noselect' + +vim.o.termguicolors = true + +-- [[ Basic Keymaps ]] +vim.keymap.set({ 'n', 'v' }, '', '', { silent = true }) + +-- Remap for dealing with word wrap +vim.keymap.set('n', 'k', "v:count == 0 ? 'gk' : 'k'", { expr = true, silent = true }) +vim.keymap.set('n', 'j', "v:count == 0 ? 'gj' : 'j'", { expr = true, silent = true }) + +-- Diagnostic keymaps +vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous diagnostic message' }) +vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next diagnostic message' }) +vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Open floating diagnostic message' }) +vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostics list' }) + +-- Highlight on yank +local highlight_group = vim.api.nvim_create_augroup('YankHighlight', { clear = true }) +vim.api.nvim_create_autocmd('TextYankPost', { + callback = function() + vim.highlight.on_yank() + end, + group = highlight_group, + pattern = '*', +}) + From 8b6091717a7a64c282e12951553d62b93f6108c5 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 19:25:01 -0600 Subject: [PATCH 21/56] configure telescope from telescope module --- init.lua | 76 --------------------------------------- lua/plugins/telescope.lua | 73 +++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 76 deletions(-) diff --git a/init.lua b/init.lua index 288ce8f261d..c3185061c4b 100644 --- a/init.lua +++ b/init.lua @@ -18,82 +18,6 @@ require('lazy').setup('plugins'); require('lua/settings'); -- [[ Configure Telescope ]] -require('telescope').setup { - defaults = { - mappings = { - i = { - [''] = false, - [''] = false, - }, - }, - }, -} - --- Enable telescope fzf native, if installed -pcall(require('telescope').load_extension, 'fzf') - --- Telescope live_grep in git root --- Function to find the git root directory based on the current buffer's path -local function find_git_root() - -- Use the current buffer's path as the starting point for the git search - local current_file = vim.api.nvim_buf_get_name(0) - local current_dir - local cwd = vim.fn.getcwd() - -- If the buffer is not associated with a file, return nil - if current_file == '' then - current_dir = cwd - else - -- Extract the directory from the current file's path - current_dir = vim.fn.fnamemodify(current_file, ':h') - end - - -- Find the Git root directory from the current file's path - local git_root = vim.fn.systemlist('git -C ' .. vim.fn.escape(current_dir, ' ') .. ' rev-parse --show-toplevel')[1] - if vim.v.shell_error ~= 0 then - print 'Not a git repository. Searching on current working directory' - return cwd - end - return git_root -end - --- Custom live_grep function to search in git root -local function live_grep_git_root() - local git_root = find_git_root() - if git_root then - require('telescope.builtin').live_grep { - search_dirs = { git_root }, - } - end -end - -vim.api.nvim_create_user_command('LiveGrepGitRoot', live_grep_git_root, {}) - -vim.keymap.set('n', '?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' }) -vim.keymap.set('n', '', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' }) -vim.keymap.set('n', '/', function() - require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { - winblend = 10, - previewer = false, - }) -end, { desc = '[/] Fuzzily search in current buffer' }) - -local function telescope_live_grep_open_files() - require('telescope.builtin').live_grep { - grep_open_files = true, - prompt_title = 'Live Grep in Open Files', - } -end -vim.keymap.set('n', 's/', telescope_live_grep_open_files, { desc = '[S]earch [/] in Open Files' }) -vim.keymap.set('n', 'ss', require('telescope.builtin').builtin, { desc = '[S]earch [S]elect Telescope' }) -vim.keymap.set('n', 'gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' }) -vim.keymap.set('n', 'sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' }) -vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' }) -vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) -vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) -vim.keymap.set('n', 'sG', ':LiveGrepGitRoot', { desc = '[S]earch by [G]rep on Git Root' }) -vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) -vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) - -- [[ Configure LSP ]] local on_attach = function(_, bufnr) local nmap = function(keys, func, desc) diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index 1fcfda56bb7..aa12e1ca7aa 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,3 +1,31 @@ +local function telescope_live_grep_open_files() + require('telescope.builtin').live_grep { + grep_open_files = true, + prompt_title = 'Live Grep in Open Files', + } +end + +local function keymaps() + vim.keymap.set('n', '?', require('telescope.builtin').oldfiles, { desc = '[?] Find recently opened files' }) + vim.keymap.set('n', '', require('telescope.builtin').buffers, { desc = '[ ] Find existing buffers' }) + vim.keymap.set('n', '/', function() + require('telescope.builtin').current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { + winblend = 10, + previewer = false, + }) + end, { desc = '[/] Fuzzily search in current buffer' }) + vim.keymap.set('n', 's/', telescope_live_grep_open_files, { desc = '[S]earch [/] in Open Files' }) + vim.keymap.set('n', 'ss', require('telescope.builtin').builtin, { desc = '[S]earch [S]elect Telescope' }) + vim.keymap.set('n', 'gf', require('telescope.builtin').git_files, { desc = 'Search [G]it [F]iles' }) + vim.keymap.set('n', 'sf', require('telescope.builtin').find_files, { desc = '[S]earch [F]iles' }) + vim.keymap.set('n', 'sh', require('telescope.builtin').help_tags, { desc = '[S]earch [H]elp' }) + vim.keymap.set('n', 'sw', require('telescope.builtin').grep_string, { desc = '[S]earch current [W]ord' }) + vim.keymap.set('n', 'sg', require('telescope.builtin').live_grep, { desc = '[S]earch by [G]rep' }) + vim.keymap.set('n', 'sG', ':LiveGrepGitRoot', { desc = '[S]earch by [G]rep on Git Root' }) + vim.keymap.set('n', 'sd', require('telescope.builtin').diagnostics, { desc = '[S]earch [D]iagnostics' }) + vim.keymap.set('n', 'sr', require('telescope.builtin').resume, { desc = '[S]earch [R]esume' }) +end + return { 'nvim-telescope/telescope.nvim', branch = '0.1.x', @@ -13,4 +41,49 @@ return { end, }, }, + config = function() + require('telescope').setup { + defaults = { + mappings = { + i = { + [''] = false, + [''] = false, + }, + }, + }, + } + + pcall(require('telescope').load_extension, 'fzf') + + local function find_git_root() + local current_file = vim.api.nvim_buf_get_name(0) + local current_dir + local cwd = vim.fn.getcwd() + if current_file == '' then + current_dir = cwd + else + current_dir = vim.fn.fnamemodify(current_file, ':h') + end + + local git_root = vim.fn.systemlist('git -C ' .. vim.fn.escape(current_dir, ' ') .. ' rev-parse --show-toplevel')[1] + if vim.v.shell_error ~= 0 then + print 'Not a git repository. Searching on current working directory' + return cwd + end + return git_root + end + + local function live_grep_git_root() + local git_root = find_git_root() + if git_root then + require('telescope.builtin').live_grep { + search_dirs = { git_root }, + } + end + end + + vim.api.nvim_create_user_command('LiveGrepGitRoot', live_grep_git_root, {}) + + keymaps() + end } From 5f50cd8368e4da96e14e5e8b3eb2c6c818379a42 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 19:38:53 -0600 Subject: [PATCH 22/56] configure lsp config from lsp config module --- init.lua | 87 --------------------------------------- lua/plugins/lspconfig.lua | 86 +++++++++++++++++++++++++++++++++++++- lua/settings.lua | 4 ++ 3 files changed, 89 insertions(+), 88 deletions(-) diff --git a/init.lua b/init.lua index c3185061c4b..dd3239fb275 100644 --- a/init.lua +++ b/init.lua @@ -17,91 +17,6 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup('plugins'); require('lua/settings'); --- [[ Configure Telescope ]] --- [[ Configure LSP ]] -local on_attach = function(_, bufnr) - local nmap = function(keys, func, desc) - if desc then - desc = 'LSP: ' .. desc - end - - vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) - end - - nmap('rn', vim.lsp.buf.rename, '[R]e[n]ame') - nmap('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') - - nmap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') - nmap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') - nmap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') - nmap('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') - nmap('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') - nmap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') - - nmap('K', vim.lsp.buf.hover, 'Hover Documentation') - nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') - - -- Lesser used LSP functionality - nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') - nmap('wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder') - nmap('wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder') - nmap('wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, '[W]orkspace [L]ist Folders') - - -- Create a command `:Format` local to the LSP buffer - vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) - vim.lsp.buf.format() - end, { desc = 'Format current buffer with LSP' }) -end - --- mason-lspconfig requires that these setup functions are called in this order --- before setting up the servers. -require('mason').setup() -require('mason-lspconfig').setup() - --- Enable the following language servers -local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - rust_analyzer = { filetypes = {'rust', 'rs'}}, - tsserver = {}, - -- html = { filetypes = { 'html', 'twig', 'hbs'} }, - - lua_ls = { - Lua = { - workspace = { checkThirdParty = false }, - telemetry = { enable = false }, - }, - }, -} - --- Setup neovim lua configuration -require('neodev').setup() - --- nvim-cmp supports additional completion capabilities, so broadcast that to servers -local capabilities = vim.lsp.protocol.make_client_capabilities() -capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) - --- Ensure the servers above are installed -local mason_lspconfig = require 'mason-lspconfig' - -mason_lspconfig.setup { - ensure_installed = vim.tbl_keys(servers), -} - -mason_lspconfig.setup_handlers { - function(server_name) - require('lspconfig')[server_name].setup { - capabilities = capabilities, - on_attach = on_attach, - settings = servers[server_name], - filetypes = (servers[server_name] or {}).filetypes, - } - end, -} - -- [[ Configure nvim-cmp ]] local cmp = require 'cmp' local luasnip = require 'luasnip' @@ -135,7 +50,5 @@ cmp.setup { }, } -vim.opt.spell = true -vim.opt.spelloptions = 'camel' -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index b28c83b10b7..122cda6007e 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,3 +1,34 @@ +local function keymaps(bufnr) + local keymap = function(keys, func, desc) + if desc then + desc = 'LSP: ' .. desc + end + + vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) + end + + keymap('rn', vim.lsp.buf.rename, '[R]e[n]ame') + keymap('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') + + keymap('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + keymap('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + keymap('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + keymap('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') + keymap('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') + keymap('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') + + keymap('K', vim.lsp.buf.hover, 'Hover Documentation') + keymap('', vim.lsp.buf.signature_help, 'Signature Documentation') + + -- Lesser used LSP functionality + keymap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + keymap('wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder') + keymap('wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder') + keymap('wl', function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, '[W]orkspace [L]ist Folders') +end + return { -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', @@ -10,5 +41,58 @@ return { -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', - } + }, + config = function() + local on_attach = function(_, bufnr) + keymaps(bufnr) + + -- Create a command `:Format` local to the LSP buffer + vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) + vim.lsp.buf.format() + end, { desc = 'Format current buffer with LSP' }) + end + + -- mason-lspconfig requires that these setup functions are called in this order + -- before setting up the servers. + require('mason').setup() + require('mason-lspconfig').setup() + + -- Enable the following language servers + local servers = { + rust_analyzer = { filetypes = {'rust', 'rs'}}, + tsserver = {}, + lua_ls = { + Lua = { + workspace = { checkThirdParty = false }, + telemetry = { enable = false }, + }, + }, + } + + -- Setup neovim lua configuration + require('neodev').setup() + + -- nvim-cmp supports additional completion capabilities, so broadcast that to servers + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) + + -- Ensure the servers above are installed + local mason_lspconfig = require 'mason-lspconfig' + + mason_lspconfig.setup { + ensure_installed = vim.tbl_keys(servers), + } + + mason_lspconfig.setup_handlers { + function(server_name) + require('lspconfig')[server_name].setup { + capabilities = capabilities, + on_attach = on_attach, + settings = servers[server_name], + filetypes = (servers[server_name] or {}).filetypes, + } + end, + } + + end } diff --git a/lua/settings.lua b/lua/settings.lua index 905f368f1c2..d793e745619 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -13,6 +13,10 @@ vim.opt.mouse = '' -- Sync clipboard between OS and Neovim. vim.opt.clipboard = 'unnamedplus' +-- Enable spell check +vim.opt.spell = true +vim.opt.spelloptions = 'camel' + -- FIX: tabs do not seem to be working as expected -- Handle indentation vim.opt.tabstop = 4 From 684fcff874d2938f9254e86f75bc219b0a0e6bb6 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 19:42:29 -0600 Subject: [PATCH 23/56] handle autocomplete setup from autocomplete module --- init.lua | 34 --------------------------------- lua/plugins/autocompletion.lua | 35 +++++++++++++++++++++++++++++++++- 2 files changed, 34 insertions(+), 35 deletions(-) diff --git a/init.lua b/init.lua index dd3239fb275..1ebbe5ede14 100644 --- a/init.lua +++ b/init.lua @@ -17,38 +17,4 @@ vim.opt.rtp:prepend(lazypath) require('lazy').setup('plugins'); require('lua/settings'); --- [[ Configure nvim-cmp ]] -local cmp = require 'cmp' -local luasnip = require 'luasnip' -require('luasnip.loaders.from_vscode').lazy_load() -luasnip.config.setup {} - -cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - completion = { - completeopt = 'menu,menuone,noinsert', - }, - mapping = cmp.mapping.preset.insert { - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete {}, - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, - }, - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - }, -} - - -- vim: ts=2 sts=2 sw=2 et diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index b92b6da239b..a85c720280b 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -12,5 +12,38 @@ return { -- Adds a number of user-friendly snippets 'rafamadriz/friendly-snippets', - } + }, + config = function() + local cmp = require 'cmp' + local luasnip = require 'luasnip' + require('luasnip.loaders.from_vscode').lazy_load() + luasnip.config.setup {} + + cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + completion = { + completeopt = 'menu,menuone,noinsert', + }, + mapping = cmp.mapping.preset.insert { + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete {}, + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + { name = 'path' }, + }, + } + end } From 3493e38f5e5cc4dfdfd72dee93f2b4bc5077ca70 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 8 Jan 2024 22:18:01 -0600 Subject: [PATCH 24/56] fix setting path --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1ebbe5ede14..625c2f24b2e 100644 --- a/init.lua +++ b/init.lua @@ -15,6 +15,6 @@ end vim.opt.rtp:prepend(lazypath) require('lazy').setup('plugins'); -require('lua/settings'); +require('settings'); -- vim: ts=2 sts=2 sw=2 et From b54823553088b24022b834e5117438e897246ffc Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Sat, 20 Jan 2024 18:37:21 -0600 Subject: [PATCH 25/56] match scroll doc binding to similar vim binding --- lua/plugins/autocompletion.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index a85c720280b..250b9c04415 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -31,7 +31,7 @@ return { mapping = cmp.mapping.preset.insert { [''] = cmp.mapping.select_next_item(), [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, [''] = cmp.mapping.confirm { From 78c348716c037f4184d185736058c6dc7f4753ef Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Sat, 20 Jan 2024 18:42:56 -0600 Subject: [PATCH 26/56] restore mason config timing for dap startup --- lua/plugins/autocompletion.lua | 2 +- lua/plugins/lspconfig.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index 250b9c04415..d14bdfa6883 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -32,7 +32,7 @@ return { [''] = cmp.mapping.select_next_item(), [''] = cmp.mapping.select_prev_item(), [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, [''] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 122cda6007e..a35480b1f52 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -33,7 +33,7 @@ return { -- LSP Configuration & Plugins 'neovim/nvim-lspconfig', dependencies = { - 'williamboman/mason.nvim', + { 'williamboman/mason.nvim', config = true }, 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP From d6009d6e52e495419222f0cd8ba640a4c2cd8722 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Sat, 20 Jan 2024 18:46:46 -0600 Subject: [PATCH 27/56] use all required treesitter parameters --- lua/plugins/treesitter.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index f440189e523..42e19d64c70 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -51,14 +51,14 @@ return { build = ':TSUpdate', config = function() vim.defer_fn(function() - -- FIX: Missing required fields in type `TSConfig` require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' }, - -- Autoinstall languages that are not installed. Defaults to false (but you can change for yourself!) auto_install = false, - + sync_install = false, + ignore_install = {}, + modules = {}, highlight = { enable = true }, indent = { enable = true }, incremental_selection = { From 5e15695ea778fb99d72c4e88b075e4cf6d6b3cc6 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 25 Jan 2024 01:22:53 -0600 Subject: [PATCH 28/56] install git fugitive and create initial git shortcuts --- lazy-lock.json | 1 - lua/plugins/fugitive.lua | 7 +++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/fugitive.lua diff --git a/lazy-lock.json b/lazy-lock.json index 0831d179c0a..5f7ad537d87 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -19,7 +19,6 @@ "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, - "onedark.nvim": { "branch": "master", "commit": "c5476a091b0f1b4e853db91c91ff941f848a1cdd" }, "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua new file mode 100644 index 00000000000..f04de7c8171 --- /dev/null +++ b/lua/plugins/fugitive.lua @@ -0,0 +1,7 @@ +return { 'tpope/vim-fugitive', + config = function() + vim.keymap.set('n', 'gs', 'Git', { desc = '[G]it [S]tatus' }); + vim.keymap.set('n', 'ga', 'Git add -A', { desc = 'Stage [A]ll [G]it files' }); + vim.keymap.set('n', 'gc', 'Git commit', { desc = '[C]ommit staged [G]it files' }); + end +}; From 95532ea93b99c38f99b5a4abd4f09885f7f29e94 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 25 Jan 2024 01:29:15 -0600 Subject: [PATCH 29/56] add shortcut to git log graph oneline --- lua/plugins/fugitive.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index f04de7c8171..1a0aa0d5375 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -3,5 +3,6 @@ return { 'tpope/vim-fugitive', vim.keymap.set('n', 'gs', 'Git', { desc = '[G]it [S]tatus' }); vim.keymap.set('n', 'ga', 'Git add -A', { desc = 'Stage [A]ll [G]it files' }); vim.keymap.set('n', 'gc', 'Git commit', { desc = '[C]ommit staged [G]it files' }); + vim.keymap.set('n', 'gg', 'Git log --graph --oneline', { desc = '[G]it log [G]raph' }); end }; From 0f98cf51a45d659bb674874d251ad7b43de20006 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 25 Jan 2024 01:39:23 -0600 Subject: [PATCH 30/56] stage git hunk command as git subcommands --- lua/plugins/gitsigns.lua | 22 +++++++++++----------- lua/plugins/whichkey.lua | 2 +- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 0b1c73786a8..1d4223ee7f7 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -41,24 +41,24 @@ return { -- Actions -- visual mode - map('v', 'hs', function() + map('v', 'ghs', function() gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'stage git hunk' }) - map('v', 'hr', function() + map('v', 'ghr', function() gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end, { desc = 'reset git hunk' }) -- normal mode - map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) - map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) - map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) - map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) - map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) - map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) - map('n', 'hb', function() + map('n', 'ghs', gs.stage_hunk, { desc = 'git stage hunk' }) + map('n', 'ghr', gs.reset_hunk, { desc = 'git reset hunk' }) + map('n', 'ghS', gs.stage_buffer, { desc = 'git Stage buffer' }) + map('n', 'ghu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) + map('n', 'ghR', gs.reset_buffer, { desc = 'git Reset buffer' }) + map('n', 'ghp', gs.preview_hunk, { desc = 'preview git hunk' }) + map('n', 'ghb', function() gs.blame_line { full = false } end, { desc = 'git blame line' }) - map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) - map('n', 'hD', function() + map('n', 'ghd', gs.diffthis, { desc = 'git diff against index' }) + map('n', 'ghD', function() gs.diffthis '~' end, { desc = 'git diff against last commit' }) diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index 7dc820a9d45..c5dbc0616b6 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -5,7 +5,7 @@ return { 'folke/which-key.nvim', opts = {}, ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + ['gh'] = { name = '[G]it [H]unk', _ = 'which_key_ignore' }, ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, From 5eb3d923c14913d2cd586ada5359878811049a0f Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 25 Jan 2024 01:51:39 -0600 Subject: [PATCH 31/56] fix labeling and remove unused git hunk shortcuts --- lua/plugins/gitsigns.lua | 27 +++++++++++---------------- lua/plugins/whichkey.lua | 1 - 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 1d4223ee7f7..9865461db03 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -43,31 +43,26 @@ return { -- visual mode map('v', 'ghs', function() gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'stage git hunk' }) + end, { desc = '[S]tage [G]it [H]unk' }) map('v', 'ghr', function() gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'reset git hunk' }) + end, { desc = '[R]eset [G]it [H]unk' }) -- normal mode - map('n', 'ghs', gs.stage_hunk, { desc = 'git stage hunk' }) - map('n', 'ghr', gs.reset_hunk, { desc = 'git reset hunk' }) - map('n', 'ghS', gs.stage_buffer, { desc = 'git Stage buffer' }) - map('n', 'ghu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) - map('n', 'ghR', gs.reset_buffer, { desc = 'git Reset buffer' }) - map('n', 'ghp', gs.preview_hunk, { desc = 'preview git hunk' }) + map('n', 'ghs', gs.stage_hunk, { desc = '[G]it [S]tage [H]unk' }) + map('n', 'ghr', gs.reset_hunk, { desc = '[G]it [R]eset [H]unk' }) + map('n', 'ghS', gs.stage_buffer, { desc = '[G]it [S]tage buffer' }) + map('n', 'ghu', gs.undo_stage_hunk, { desc = '[U]ndo stage [H]unk' }) + map('n', 'ghR', gs.reset_buffer, { desc = '[G]it [R]eset buffer' }) + map('n', 'ghp', gs.preview_hunk, { desc = '[P]review [G]it [H]unk' }) map('n', 'ghb', function() gs.blame_line { full = false } - end, { desc = 'git blame line' }) - map('n', 'ghd', gs.diffthis, { desc = 'git diff against index' }) - map('n', 'ghD', function() - gs.diffthis '~' - end, { desc = 'git diff against last commit' }) + end, { desc = '[G]it blame line' }) -- Toggles - map('n', 'tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' }) - map('n', 'td', gs.toggle_deleted, { desc = 'toggle git show deleted' }) + map('n', 'ghx', gs.toggle_deleted, { desc = 'toggle [G]it show deleted' }) -- Text object - map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select git hunk' }) + map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select [G]it [H]unk' }) end } } diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index c5dbc0616b6..2e7edbc9fc4 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -8,7 +8,6 @@ return { 'folke/which-key.nvim', opts = {}, ['gh'] = { name = '[G]it [H]unk', _ = 'which_key_ignore' }, ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, } -- register which-key VISUAL mode From a5e4878030f13537597cd9921b4190368d08c130 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 25 Jan 2024 01:57:33 -0600 Subject: [PATCH 32/56] add git blame shortcut --- lua/plugins/fugitive.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index 1a0aa0d5375..db236f84571 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -4,5 +4,6 @@ return { 'tpope/vim-fugitive', vim.keymap.set('n', 'ga', 'Git add -A', { desc = 'Stage [A]ll [G]it files' }); vim.keymap.set('n', 'gc', 'Git commit', { desc = '[C]ommit staged [G]it files' }); vim.keymap.set('n', 'gg', 'Git log --graph --oneline', { desc = '[G]it log [G]raph' }); + vim.keymap.set('n', 'gb', 'Git blame', { desc = '[G]it [B]lame' }); end }; From f047e7db9ca26b6e092c0f6b30f73ba4f3a10a6a Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 25 Jan 2024 13:00:36 -0600 Subject: [PATCH 33/56] show branch names in git graph view --- lua/plugins/fugitive.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index db236f84571..af264934632 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -3,7 +3,7 @@ return { 'tpope/vim-fugitive', vim.keymap.set('n', 'gs', 'Git', { desc = '[G]it [S]tatus' }); vim.keymap.set('n', 'ga', 'Git add -A', { desc = 'Stage [A]ll [G]it files' }); vim.keymap.set('n', 'gc', 'Git commit', { desc = '[C]ommit staged [G]it files' }); - vim.keymap.set('n', 'gg', 'Git log --graph --oneline', { desc = '[G]it log [G]raph' }); + vim.keymap.set('n', 'gg', 'Git log --graph --oneline --decorate=short', { desc = '[G]it log [G]raph' }); vim.keymap.set('n', 'gb', 'Git blame', { desc = '[G]it [B]lame' }); end }; From 176643529894b69a59ee5150c0c2a66ef57403e2 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Sat, 27 Jan 2024 17:12:55 -0600 Subject: [PATCH 34/56] include svelte for treesitter --- lua/plugins/treesitter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 42e19d64c70..962f6466b50 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -53,7 +53,7 @@ return { vim.defer_fn(function() require('nvim-treesitter.configs').setup { -- Add languages to be installed here that you want installed for treesitter - ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'vimdoc', 'vim', 'bash' }, + ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'tsx', 'javascript', 'typescript', 'svelte', 'vimdoc', 'vim', 'bash' }, auto_install = false, sync_install = false, From 14d05a65e7bf6a8b0f6bca23cce3b64eb92b8494 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Sat, 27 Jan 2024 17:28:33 -0600 Subject: [PATCH 35/56] install svelte-language-server --- lua/plugins/lspconfig.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a35480b1f52..99b3e842560 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -59,14 +59,15 @@ return { -- Enable the following language servers local servers = { - rust_analyzer = { filetypes = {'rust', 'rs'}}, - tsserver = {}, lua_ls = { Lua = { workspace = { checkThirdParty = false }, telemetry = { enable = false }, }, }, + rust_analyzer = { filetypes = {'rust', 'rs'}}, + svelte = { filetypes = {'svelte'} }, + tsserver = {}, } -- Setup neovim lua configuration From b90c5501eacf9d55f3e3c4c69945347ae91ff092 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Sat, 27 Jan 2024 17:30:04 -0600 Subject: [PATCH 36/56] format lspconfig file --- lua/plugins/lspconfig.lua | 55 +++++++++++++++++++-------------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index 99b3e842560..7535e7a73e6 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,10 +1,10 @@ local function keymaps(bufnr) local keymap = function(keys, func, desc) - if desc then - desc = 'LSP: ' .. desc - end + if desc then + desc = 'LSP: ' .. desc + end - vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) + vim.keymap.set('n', keys, func, { buffer = bufnr, desc = desc }) end keymap('rn', vim.lsp.buf.rename, '[R]e[n]ame') @@ -25,7 +25,7 @@ local function keymaps(bufnr) keymap('wa', vim.lsp.buf.add_workspace_folder, '[W]orkspace [A]dd Folder') keymap('wr', vim.lsp.buf.remove_workspace_folder, '[W]orkspace [R]emove Folder') keymap('wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) end, '[W]orkspace [L]ist Folders') end @@ -37,7 +37,7 @@ return { 'williamboman/mason-lspconfig.nvim', -- Useful status updates for LSP - { 'j-hui/fidget.nvim', opts = {} }, + { 'j-hui/fidget.nvim', opts = {} }, -- Additional lua configuration, makes nvim stuff amazing! 'folke/neodev.nvim', @@ -46,10 +46,10 @@ return { local on_attach = function(_, bufnr) keymaps(bufnr) - -- Create a command `:Format` local to the LSP buffer - vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) - vim.lsp.buf.format() - end, { desc = 'Format current buffer with LSP' }) + -- Create a command `:Format` local to the LSP buffer + vim.api.nvim_buf_create_user_command(bufnr, 'Format', function(_) + vim.lsp.buf.format() + end, { desc = 'Format current buffer with LSP' }) end -- mason-lspconfig requires that these setup functions are called in this order @@ -59,15 +59,15 @@ return { -- Enable the following language servers local servers = { - lua_ls = { - Lua = { - workspace = { checkThirdParty = false }, - telemetry = { enable = false }, + lua_ls = { + Lua = { + workspace = { checkThirdParty = false }, + telemetry = { enable = false }, + }, }, - }, - rust_analyzer = { filetypes = {'rust', 'rs'}}, - svelte = { filetypes = {'svelte'} }, - tsserver = {}, + rust_analyzer = { filetypes = { 'rust', 'rs' } }, + svelte = { filetypes = { 'svelte' } }, + tsserver = {}, } -- Setup neovim lua configuration @@ -81,19 +81,18 @@ return { local mason_lspconfig = require 'mason-lspconfig' mason_lspconfig.setup { - ensure_installed = vim.tbl_keys(servers), + ensure_installed = vim.tbl_keys(servers), } mason_lspconfig.setup_handlers { - function(server_name) - require('lspconfig')[server_name].setup { - capabilities = capabilities, - on_attach = on_attach, - settings = servers[server_name], - filetypes = (servers[server_name] or {}).filetypes, - } - end, + function(server_name) + require('lspconfig')[server_name].setup { + capabilities = capabilities, + on_attach = on_attach, + settings = servers[server_name], + filetypes = (servers[server_name] or {}).filetypes, + } + end, } - end } From 152611874aa413b00d31d60a7117535b5f222db5 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 11:18:03 -0600 Subject: [PATCH 37/56] fix shared clipboard with os --- lua/settings.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/settings.lua b/lua/settings.lua index d793e745619..6837c983761 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -11,7 +11,7 @@ vim.opt.mouse = '' -- FIX: shared clipboard not working -- Sync clipboard between OS and Neovim. -vim.opt.clipboard = 'unnamedplus' +vim.opt.clipboard = 'unnamed,unnamedplus' -- Enable spell check vim.opt.spell = true From 11fdede2f8462258fe38da2ca9b6dae2e166cae6 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 11:20:14 -0600 Subject: [PATCH 38/56] enable cursor line highlighting --- lua/settings.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/settings.lua b/lua/settings.lua index 6837c983761..43f38458663 100644 --- a/lua/settings.lua +++ b/lua/settings.lua @@ -9,10 +9,12 @@ vim.opt.incsearch = true -- Enable mouse mode vim.opt.mouse = '' --- FIX: shared clipboard not working -- Sync clipboard between OS and Neovim. vim.opt.clipboard = 'unnamed,unnamedplus' +-- Enables cursor-line highlighting +vim.opt.cursorline = true + -- Enable spell check vim.opt.spell = true vim.opt.spelloptions = 'camel' From de1dacb829f2ec5b7264591cc051fc4e4b782b85 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 11:29:57 -0600 Subject: [PATCH 39/56] plugin description commenting --- lazy-lock.json | 38 ++++++++++++++++++------------------ lua/plugins/catpuccin.lua | 1 + lua/plugins/fugitive.lua | 1 + lua/plugins/gitsigns.lua | 1 + lua/plugins/lspconfig.lua | 1 + lua/plugins/lualine.lua | 1 + lua/plugins/oil.lua | 1 + lua/plugins/rust.lua | 1 + lua/plugins/telescope.lua | 1 + lua/plugins/todocomments.lua | 1 + lua/plugins/treesitter.lua | 1 + lua/plugins/whichkey.lua | 1 + 12 files changed, 30 insertions(+), 19 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 5f7ad537d87..6147d872f28 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,30 +1,30 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "6a001360cea89df50f7c5cc8c7a75e6a21f1ef5c" }, - "catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" }, + "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" }, + "catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, - "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" }, - "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" }, - "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, - "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, - "plenary.nvim": { "branch": "master", "commit": "55d9fe89e33efd26f532ef20223e5f9430c8b0c0" }, + "fidget.nvim": { "branch": "main", "commit": "a3e1e79116ceb93d4c8c0ff432bf506b3213a24d" }, + "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" }, + "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, + "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, + "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" }, + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, + "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "nvim-lspconfig": { "branch": "master", "commit": "d12140c5687a1186b95b3f42dbc6cc769df0cf0d" }, + "nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "8edd5a6d96936bdff23333d3bc177481388839e5" }, + "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, + "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, - "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, + "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, + "vim-fugitive": { "branch": "master", "commit": "e7bf502a6ae492f42a91d231864e25630286319b" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua index ade84e6ccc4..bbbe48088e6 100644 --- a/lua/plugins/catpuccin.lua +++ b/lua/plugins/catpuccin.lua @@ -1,3 +1,4 @@ +-- Default theme return { 'catppuccin/nvim', name='catppuccin', priority = 1000, config = function() require('catppuccin').setup({ diff --git a/lua/plugins/fugitive.lua b/lua/plugins/fugitive.lua index af264934632..de7b9232a1e 100644 --- a/lua/plugins/fugitive.lua +++ b/lua/plugins/fugitive.lua @@ -1,3 +1,4 @@ +-- UI for git commands return { 'tpope/vim-fugitive', config = function() vim.keymap.set('n', 'gs', 'Git', { desc = '[G]it [S]tatus' }); diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua index 9865461db03..50f9d25103a 100644 --- a/lua/plugins/gitsigns.lua +++ b/lua/plugins/gitsigns.lua @@ -1,3 +1,4 @@ +-- Displays git changes in gutter return { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', diff --git a/lua/plugins/lspconfig.lua b/lua/plugins/lspconfig.lua index a35480b1f52..c56c32aa626 100644 --- a/lua/plugins/lspconfig.lua +++ b/lua/plugins/lspconfig.lua @@ -1,3 +1,4 @@ +-- Configuration for language servers local function keymaps(bufnr) local keymap = function(keys, func, desc) if desc then diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 074ea501149..849b18955d9 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,3 +1,4 @@ +-- Informational line at bottom of screen return { -- Set lualine as statusline 'nvim-lualine/lualine.nvim', diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index 36593445307..492c860e568 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -1,3 +1,4 @@ +-- file browser return { 'stevearc/oil.nvim', config = function() require("oil").setup(); diff --git a/lua/plugins/rust.lua b/lua/plugins/rust.lua index e2a56aeca90..9fec3d2fcef 100644 --- a/lua/plugins/rust.lua +++ b/lua/plugins/rust.lua @@ -1,3 +1,4 @@ +-- rust language integrations return { 'rust-lang/rust.vim', ft = "rust", diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua index aa12e1ca7aa..c77ae8b6db8 100644 --- a/lua/plugins/telescope.lua +++ b/lua/plugins/telescope.lua @@ -1,3 +1,4 @@ +-- Fuzzy finder local function telescope_live_grep_open_files() require('telescope.builtin').live_grep { grep_open_files = true, diff --git a/lua/plugins/todocomments.lua b/lua/plugins/todocomments.lua index 2797ff53d3b..e4ef92f9a5d 100644 --- a/lua/plugins/todocomments.lua +++ b/lua/plugins/todocomments.lua @@ -1,3 +1,4 @@ +-- Comment highlighting for specific comment types (TODO, NOTE, HACK, FIX) return { 'folke/todo-comments.nvim', dependencies = { 'nvim-lua//plenary.nvim' }, diff --git a/lua/plugins/treesitter.lua b/lua/plugins/treesitter.lua index 42e19d64c70..d6d0a26cd9d 100644 --- a/lua/plugins/treesitter.lua +++ b/lua/plugins/treesitter.lua @@ -1,3 +1,4 @@ +-- code token highlighting local text_objects = { select = { enable = true, diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index 2e7edbc9fc4..509fbd0777b 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -1,3 +1,4 @@ +-- displays command and key chain options and help return { 'folke/which-key.nvim', opts = {}, config = function() -- document existing key chains From 90db684e6d6970797c6334bafbcd05150dc3943b Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 11:42:28 -0600 Subject: [PATCH 40/56] add and configure bracket pairing with autocompletion --- lazy-lock.json | 1 + lua/plugins/autocompletion.lua | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lazy-lock.json b/lazy-lock.json index 6147d872f28..34e95550509 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -14,6 +14,7 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, + "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, "nvim-lspconfig": { "branch": "master", "commit": "d12140c5687a1186b95b3f42dbc6cc769df0cf0d" }, "nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" }, diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index d14bdfa6883..15d4607744e 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -12,10 +12,18 @@ return { -- Adds a number of user-friendly snippets 'rafamadriz/friendly-snippets', + + -- Auto-closing brackets, quotes, etc. + 'windwp/nvim-autopairs', }, config = function() + local cmp_autopairs = require('nvim-autopairs.completion.cmp') local cmp = require 'cmp' local luasnip = require 'luasnip' + + require('nvim-autopairs').setup(); + cmp.event:on('confirm_done', cmp_autopairs.on_confirm_done()) + require('luasnip.loaders.from_vscode').lazy_load() luasnip.config.setup {} From 0309f492102f6362e9db16f8089fd27954544414 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 11:49:30 -0600 Subject: [PATCH 41/56] update key bindings and display for autocompletion --- lua/plugins/autocompletion.lua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index 15d4607744e..3bceaca560a 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -37,8 +37,8 @@ return { completeopt = 'menu,menuone,noinsert', }, mapping = cmp.mapping.preset.insert { - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), [''] = cmp.mapping.scroll_docs(-4), [''] = cmp.mapping.scroll_docs(4), [''] = cmp.mapping.complete {}, @@ -52,6 +52,9 @@ return { { name = 'luasnip' }, { name = 'path' }, }, + experimental = { + ghost_text = true, + } } end } From 7cec2bf60559a60a30aef3f4e26bf03fed13f2cc Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 11:50:14 -0600 Subject: [PATCH 42/56] formating --- lua/plugins/autocompletion.lua | 46 +++++++++++++++++----------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/lua/plugins/autocompletion.lua b/lua/plugins/autocompletion.lua index 3bceaca560a..f46633fe2e4 100644 --- a/lua/plugins/autocompletion.lua +++ b/lua/plugins/autocompletion.lua @@ -28,30 +28,30 @@ return { luasnip.config.setup {} cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - completion = { - completeopt = 'menu,menuone,noinsert', - }, - mapping = cmp.mapping.preset.insert { - [''] = cmp.mapping.select_next_item(), - [''] = cmp.mapping.select_prev_item(), - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete {}, - [''] = cmp.mapping.confirm { - behavior = cmp.ConfirmBehavior.Replace, - select = true, + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + completion = { + completeopt = 'menu,menuone,noinsert', + }, + mapping = cmp.mapping.preset.insert { + [''] = cmp.mapping.select_next_item(), + [''] = cmp.mapping.select_prev_item(), + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + [''] = cmp.mapping.complete {}, + [''] = cmp.mapping.confirm { + behavior = cmp.ConfirmBehavior.Replace, + select = true, + }, + }, + sources = { + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + { name = 'path' }, }, - }, - sources = { - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, - }, experimental = { ghost_text = true, } From 19f7ff62354a0e58bc5f577d3ec19ce2517f64af Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 11:54:06 -0600 Subject: [PATCH 43/56] explicitly apply color theme to plugins --- lua/plugins/catpuccin.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua index bbbe48088e6..65a9c8854d4 100644 --- a/lua/plugins/catpuccin.lua +++ b/lua/plugins/catpuccin.lua @@ -1,5 +1,8 @@ -- Default theme -return { 'catppuccin/nvim', name='catppuccin', priority = 1000, +return { + 'catppuccin/nvim', + name = 'catppuccin', + priority = 1000, config = function() require('catppuccin').setup({ flavour = "macchiato", @@ -9,6 +12,10 @@ return { 'catppuccin/nvim', name='catppuccin', priority = 1000, conditionals = { 'italic' }, }, integrations = { + cmp = true, + gitsigns = true, + mason = true, + telescope = true, treesitter = true, } }) From 04a331f3ce11f9ed915b0892d9600381c48b34b5 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 12:13:36 -0600 Subject: [PATCH 44/56] update lualine configuration --- lua/plugins/lualine.lua | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua index 849b18955d9..ef96d38b026 100644 --- a/lua/plugins/lualine.lua +++ b/lua/plugins/lualine.lua @@ -1,13 +1,16 @@ --- Informational line at bottom of screen +-- Informational status line at bottom of screen return { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - opts = { - options = { - icons_enabled = false, - theme = 'onedark', + 'nvim-lualine/lualine.nvim', + opts = { + options = { + theme = 'catppuccin', component_separators = '|', section_separators = '', + }, + sections = { + lualine_c = { + { "filename", path = 1 } + } } } } From 9459f0f20e6ff8fe36db681d8e01ca87d075a981 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 12:18:45 -0600 Subject: [PATCH 45/56] install and configure markdown preview plugin --- lazy-lock.json | 2 ++ lua/plugins/markdownpreview.lua | 12 ++++++++++++ 2 files changed, 14 insertions(+) create mode 100644 lua/plugins/markdownpreview.lua diff --git a/lazy-lock.json b/lazy-lock.json index 34e95550509..8944688185f 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -8,9 +8,11 @@ "fidget.nvim": { "branch": "main", "commit": "a3e1e79116ceb93d4c8c0ff432bf506b3213a24d" }, "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" }, "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, diff --git a/lua/plugins/markdownpreview.lua b/lua/plugins/markdownpreview.lua new file mode 100644 index 00000000000..5ea063bf0c1 --- /dev/null +++ b/lua/plugins/markdownpreview.lua @@ -0,0 +1,12 @@ +return { + 'iamcco/markdown-preview.nvim', + ft = 'markdown', + build = function() + vim.fn['mkdp#util#install']() + end, + cmd = { + 'MarkdownPreviewToggle', + 'MarkdownPreview', + 'MarkdownStop', + }, +} From 46496f572d32a1768180b0335c04e29b1c706b53 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 12:26:48 -0600 Subject: [PATCH 46/56] install and configure vim surround plugin --- lazy-lock.json | 1 + lua/plugins/oil.lua | 3 ++- lua/plugins/vimsurround.lua | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/vimsurround.lua diff --git a/lazy-lock.json b/lazy-lock.json index 8944688185f..f48886b900a 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -30,5 +30,6 @@ "vim-fugitive": { "branch": "master", "commit": "e7bf502a6ae492f42a91d231864e25630286319b" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index 492c860e568..5217417633d 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -1,5 +1,6 @@ -- file browser -return { 'stevearc/oil.nvim', +return { + 'stevearc/oil.nvim', config = function() require("oil").setup(); vim.keymap.set('n', '-', 'Oil --float', { desc = 'Open current directory' }) diff --git a/lua/plugins/vimsurround.lua b/lua/plugins/vimsurround.lua new file mode 100644 index 00000000000..4f101a3ad84 --- /dev/null +++ b/lua/plugins/vimsurround.lua @@ -0,0 +1,5 @@ +return { + { + 'tpope/vim-surround' + } +} From b35041ab69fb42d45e76fba6d8de1be26fd6f906 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 5 Feb 2024 12:52:19 -0600 Subject: [PATCH 47/56] install and configure harpoon --- lua/plugins/catpuccin.lua | 1 + lua/plugins/harpoon.lua | 52 +++++++++++++++++++++++++++++++++++++++ lua/plugins/oil.lua | 2 +- lua/plugins/whichkey.lua | 1 + 4 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 lua/plugins/harpoon.lua diff --git a/lua/plugins/catpuccin.lua b/lua/plugins/catpuccin.lua index 65a9c8854d4..4e7767b5cca 100644 --- a/lua/plugins/catpuccin.lua +++ b/lua/plugins/catpuccin.lua @@ -14,6 +14,7 @@ return { integrations = { cmp = true, gitsigns = true, + harpoon = true, mason = true, telescope = true, treesitter = true, diff --git a/lua/plugins/harpoon.lua b/lua/plugins/harpoon.lua new file mode 100644 index 00000000000..38a16cfc367 --- /dev/null +++ b/lua/plugins/harpoon.lua @@ -0,0 +1,52 @@ +-- tag and quickly switch between buffers +return { + 'thePrimeagen/harpoon', + config = function() + local harpoon_mark = require('harpoon.mark') + local harpoon_ui = require("harpoon.ui") + + vim.keymap.set('n', 'ho', function() + harpoon_ui.toggle_quick_menu() + end, { desc = '[O]pen [H]arpoon' }) + + vim.keymap.set('n', 'ha', function() + harpoon_mark.add_file() + end, { desc = '[A]dd [H]arpoon file' }) + + vim.keymap.set('n', 'hr', function() + harpoon_mark.rm_file() + end, { desc = '[R]emove [H]arpoon file' }) + + vim.keymap.set('n', 'hc', function() + harpoon_mark.clear_all() + end, { desc = '[C]lear [H]arpoon files' }) + + vim.keymap.set('n', 'hl', function() + harpoon_ui.nav_next() + end, { desc = 'Next [H]arpoon file' }) + + vim.keymap.set('n', 'hh', function() + harpoon_ui.nav_prev() + end, { desc = 'Previous [H]arpoon file' }) + + vim.keymap.set('n', '1', function() + harpoon_ui.nav_file(1) + end, { desc = 'Navigate to file [1]' }) + + vim.keymap.set('n', '2', function() + harpoon_ui.nav_file(2) + end, { desc = 'Navigate to file [2]' }) + + vim.keymap.set('n', '3', function() + harpoon_ui.nav_file(3) + end, { desc = 'Navigate to file [3]' }) + + vim.keymap.set('n', '4', function() + harpoon_ui.nav_file(4) + end, { desc = 'Navigate to file [4]' }) + + vim.keymap.set('n', '5', function() + harpoon_ui.nav_file(5) + end, { desc = 'Navigate to file [5]' }) + end +} diff --git a/lua/plugins/oil.lua b/lua/plugins/oil.lua index 5217417633d..fe5a871d10b 100644 --- a/lua/plugins/oil.lua +++ b/lua/plugins/oil.lua @@ -2,7 +2,7 @@ return { 'stevearc/oil.nvim', config = function() - require("oil").setup(); + require('oil').setup() vim.keymap.set('n', '-', 'Oil --float', { desc = 'Open current directory' }) end }; diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua index 509fbd0777b..f0a90b209e8 100644 --- a/lua/plugins/whichkey.lua +++ b/lua/plugins/whichkey.lua @@ -7,6 +7,7 @@ return { 'folke/which-key.nvim', opts = {}, ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, ['g'] = { name = '[G]it', _ = 'which_key_ignore' }, ['gh'] = { name = '[G]it [H]unk', _ = 'which_key_ignore' }, + ['h'] = { name = '[H]arpoon'}, ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, From b0863fc19d614652af4de454205b349361e265ac Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 26 Feb 2024 01:59:48 -0600 Subject: [PATCH 48/56] update plenary package --- lazy-lock.json | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index f48886b900a..664127b3ac2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,33 +1,33 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" }, - "catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" }, + "LuaSnip": { "branch": "master", "commit": "6a001360cea89df50f7c5cc8c7a75e6a21f1ef5c" }, + "catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "fidget.nvim": { "branch": "main", "commit": "a3e1e79116ceb93d4c8c0ff432bf506b3213a24d" }, - "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" }, - "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, - "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, - "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, - "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" }, - "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, - "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, + "neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" }, "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, - "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, - "nvim-lspconfig": { "branch": "master", "commit": "d12140c5687a1186b95b3f42dbc6cc769df0cf0d" }, - "nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "8edd5a6d96936bdff23333d3bc177481388839e5" }, - "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" }, + "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, - "vim-fugitive": { "branch": "master", "commit": "e7bf502a6ae492f42a91d231864e25630286319b" }, + "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, + "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, From 9f5b90a43211aaf760b946c1e88fa3277ac35ad4 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 12 Mar 2024 11:19:52 -0500 Subject: [PATCH 49/56] test startify configurationw --- lazy-lock.json | 37 +++++++++++++++++++------------------ lua/plugins/startify.lua | 4 ++++ 2 files changed, 23 insertions(+), 18 deletions(-) create mode 100644 lua/plugins/startify.lua diff --git a/lazy-lock.json b/lazy-lock.json index 664127b3ac2..b40d721ea42 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,35 +1,36 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "6a001360cea89df50f7c5cc8c7a75e6a21f1ef5c" }, - "catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" }, + "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" }, + "catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" }, - "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, - "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, + "fidget.nvim": { "branch": "main", "commit": "a3e1e79116ceb93d4c8c0ff432bf506b3213a24d" }, + "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" }, + "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, - "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, - "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, + "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, + "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, + "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, - "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, - "neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" }, + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, - "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, - "nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" }, - "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, - "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, + "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, + "nvim-lspconfig": { "branch": "master", "commit": "d12140c5687a1186b95b3f42dbc6cc769df0cf0d" }, + "nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "8edd5a6d96936bdff23333d3bc177481388839e5" }, + "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, - "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, + "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, + "vim-fugitive": { "branch": "master", "commit": "e7bf502a6ae492f42a91d231864e25630286319b" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, + "vim-startify": { "branch": "master", "commit": "4e089dffdad46f3f5593f34362d530e8fe823dcf" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/plugins/startify.lua b/lua/plugins/startify.lua new file mode 100644 index 00000000000..b87a2ebe9d1 --- /dev/null +++ b/lua/plugins/startify.lua @@ -0,0 +1,4 @@ +-- startup screen +return { + 'mhinz/vim-startify' +} From 8365e20434b44f3b3f3feed1ab7316ef6f4da634 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 12 Mar 2024 11:32:45 -0500 Subject: [PATCH 50/56] install and test mini starter --- lazy-lock.json | 2 +- lua/plugins/ministarter.lua | 7 +++++++ lua/plugins/startify.lua | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 lua/plugins/ministarter.lua diff --git a/lazy-lock.json b/lazy-lock.json index b40d721ea42..efe6452b747 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -15,6 +15,7 @@ "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" }, "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "mini.nvim": { "branch": "main", "commit": "f24747266a047617d06605a2316aa6c071662fa2" }, "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, @@ -30,7 +31,6 @@ "vim-fugitive": { "branch": "master", "commit": "e7bf502a6ae492f42a91d231864e25630286319b" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, - "vim-startify": { "branch": "master", "commit": "4e089dffdad46f3f5593f34362d530e8fe823dcf" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/plugins/ministarter.lua b/lua/plugins/ministarter.lua new file mode 100644 index 00000000000..89c17150906 --- /dev/null +++ b/lua/plugins/ministarter.lua @@ -0,0 +1,7 @@ +-- startup screen +return { + 'echasnovski/mini.nvim', + config = function() + require('mini.starter').setup(); + end +} diff --git a/lua/plugins/startify.lua b/lua/plugins/startify.lua index b87a2ebe9d1..531b40ffe5d 100644 --- a/lua/plugins/startify.lua +++ b/lua/plugins/startify.lua @@ -1,4 +1,4 @@ -- startup screen return { - 'mhinz/vim-startify' + -- 'mhinz/vim-startify' } From d69f78eac1987a173a87a4a2964fc1bb7fbb95a9 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 12 Mar 2024 11:56:53 -0500 Subject: [PATCH 51/56] initial mini starter configuration --- lua/plugins/ministarter.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lua/plugins/ministarter.lua b/lua/plugins/ministarter.lua index 89c17150906..85ac0ad6ece 100644 --- a/lua/plugins/ministarter.lua +++ b/lua/plugins/ministarter.lua @@ -2,6 +2,19 @@ return { 'echasnovski/mini.nvim', config = function() - require('mini.starter').setup(); + local mini = require('mini.starter'); + mini.setup({ + items = { + -- FIX: either install telescope browser extension, or remove browser from telescope options + mini.sections.telescope(), + mini.sections.recent_files(5, true, true), + mini.sections.builtin_actions(), + }, + content_hooks = { + mini.gen_hook.adding_bullet('-'), + mini.gen_hook.aligning('center', 'center'), + }, + footer = '', + }) end } From 4dc0fad655c0b197ff39396acbc42d57591508ea Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 12 Mar 2024 12:10:33 -0500 Subject: [PATCH 52/56] remove startify and set open starter keybinding --- lua/plugins/ministarter.lua | 5 +++++ lua/plugins/startify.lua | 4 ---- 2 files changed, 5 insertions(+), 4 deletions(-) delete mode 100644 lua/plugins/startify.lua diff --git a/lua/plugins/ministarter.lua b/lua/plugins/ministarter.lua index 85ac0ad6ece..32469a3f7a1 100644 --- a/lua/plugins/ministarter.lua +++ b/lua/plugins/ministarter.lua @@ -1,3 +1,4 @@ +-- TODO: Look into mini starter sessions? -- startup screen return { 'echasnovski/mini.nvim', @@ -16,5 +17,9 @@ return { }, footer = '', }) + + vim.keymap.set('n', '=', function() + mini.open() + end, { desc = 'Open starter' }) end } diff --git a/lua/plugins/startify.lua b/lua/plugins/startify.lua deleted file mode 100644 index 531b40ffe5d..00000000000 --- a/lua/plugins/startify.lua +++ /dev/null @@ -1,4 +0,0 @@ --- startup screen -return { - -- 'mhinz/vim-startify' -} From e1eb3f70d1db3f95f94dd18581791bc2f98de197 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Tue, 12 Mar 2024 12:26:36 -0500 Subject: [PATCH 53/56] set bullet point glyph --- lua/plugins/ministarter.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/plugins/ministarter.lua b/lua/plugins/ministarter.lua index 32469a3f7a1..e9be8ce3d65 100644 --- a/lua/plugins/ministarter.lua +++ b/lua/plugins/ministarter.lua @@ -12,7 +12,7 @@ return { mini.sections.builtin_actions(), }, content_hooks = { - mini.gen_hook.adding_bullet('-'), + mini.gen_hook.adding_bullet(' '), mini.gen_hook.aligning('center', 'center'), }, footer = '', From 0e5968ecd55bc36e89914d6345b05178b363e8cf Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 3 Jun 2024 10:30:48 -0500 Subject: [PATCH 54/56] install the vim tmux navigator plugin --- lazy-lock.json | 1 + lua/plugins/vimtmuxnavigator.lua | 5 +++++ 2 files changed, 6 insertions(+) create mode 100644 lua/plugins/vimtmuxnavigator.lua diff --git a/lazy-lock.json b/lazy-lock.json index efe6452b747..ed84e97e343 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -32,5 +32,6 @@ "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, + "vim-tmux-navigator": { "branch": "master", "commit": "5b3c701686fb4e6629c100ed32e827edf8dad01e" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" } } \ No newline at end of file diff --git a/lua/plugins/vimtmuxnavigator.lua b/lua/plugins/vimtmuxnavigator.lua new file mode 100644 index 00000000000..e5e9aa73cc1 --- /dev/null +++ b/lua/plugins/vimtmuxnavigator.lua @@ -0,0 +1,5 @@ +return { + { + 'christoomey/vim-tmux-navigator' + } +} From 9649f0d65911246fae07d12678195a663dd3bf7f Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Mon, 3 Jun 2024 10:45:26 -0500 Subject: [PATCH 55/56] include telescope file browser as a dependency --- lazy-lock.json | 1 + lua/plugins/ministarter.lua | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index efe6452b747..1284b171c16 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -25,6 +25,7 @@ "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, + "telescope-file-browser.nvim": { "branch": "master", "commit": "1280db1f835bd6b73a485d6f1149e02df67533c4" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, diff --git a/lua/plugins/ministarter.lua b/lua/plugins/ministarter.lua index e9be8ce3d65..c88ad161d01 100644 --- a/lua/plugins/ministarter.lua +++ b/lua/plugins/ministarter.lua @@ -1,12 +1,13 @@ --- TODO: Look into mini starter sessions? -- startup screen return { 'echasnovski/mini.nvim', + dependencies = { + 'nvim-telescope/telescope-file-browser.nvim', + }, config = function() local mini = require('mini.starter'); mini.setup({ items = { - -- FIX: either install telescope browser extension, or remove browser from telescope options mini.sections.telescope(), mini.sections.recent_files(5, true, true), mini.sections.builtin_actions(), From aa2bcf86f46ab202d150438fb4708bcd54971b70 Mon Sep 17 00:00:00 2001 From: Nick Burt Date: Thu, 29 Aug 2024 10:54:10 -0500 Subject: [PATCH 56/56] include rose pine theme option --- lazy-lock.json | 37 +++++++++++++++++++------------------ lua/plugins/rosepine.lua | 1 + 2 files changed, 20 insertions(+), 18 deletions(-) create mode 100644 lua/plugins/rosepine.lua diff --git a/lazy-lock.json b/lazy-lock.json index 0a75ce11390..de42eca37cf 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,35 +1,36 @@ { "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "2dbef19461198630b3d7c39f414d09fb07d1fdd2" }, - "catppuccin": { "branch": "main", "commit": "c2034f7b549152e5cc757820426341ea5000bc7a" }, + "LuaSnip": { "branch": "master", "commit": "6a001360cea89df50f7c5cc8c7a75e6a21f1ef5c" }, + "catppuccin": { "branch": "main", "commit": "64dc309bc157779691be38bbfc5123584e0a4a85" }, "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "fidget.nvim": { "branch": "main", "commit": "a3e1e79116ceb93d4c8c0ff432bf506b3213a24d" }, - "friendly-snippets": { "branch": "main", "commit": "b8fae73a479ae0a1c54f5c98fa687ae8a0addc53" }, - "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" }, + "fidget.nvim": { "branch": "main", "commit": "7b9c383438a2e490e37d57b07ddeae3ab4f4cf69" }, + "friendly-snippets": { "branch": "main", "commit": "53d3df271d031c405255e99410628c26a8f0d2b0" }, + "gitsigns.nvim": { "branch": "main", "commit": "d195f0c35ced5174d3ecce1c4c8ebb3b5bc23fa9" }, "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, - "indent-blankline.nvim": { "branch": "master", "commit": "12e92044d313c54c438bd786d11684c88f6f78cd" }, - "lazy.nvim": { "branch": "main", "commit": "aedcd79811d491b60d0a6577a9c1701063c2a609" }, - "lualine.nvim": { "branch": "master", "commit": "7d131a8d3ba5016229e8a1d08bf8782acea98852" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7206c77cb931f79885fc47f88ae18f99148392eb" }, + "lazy.nvim": { "branch": "main", "commit": "96584866b9c5e998cbae300594d0ccfd0c464627" }, + "lualine.nvim": { "branch": "master", "commit": "2248ef254d0a1488a72041cfb45ca9caada6d994" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "0954d7730e749d606ddf8d7ae8846848be435d53" }, - "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "9453e3d6cd2ca45d96e20f343e8f1b927364b630" }, + "mason.nvim": { "branch": "main", "commit": "41e75af1f578e55ba050c863587cffde3556ffa6" }, "mini.nvim": { "branch": "main", "commit": "f24747266a047617d06605a2316aa6c071662fa2" }, - "neodev.nvim": { "branch": "main", "commit": "0ee95ecefc8ea45898a0383364f736e098c8703f" }, + "neodev.nvim": { "branch": "main", "commit": "ef351fae5df2559956398923c5d38c9b64e7d898" }, "nvim-autopairs": { "branch": "master", "commit": "096d0baecc34f6c5d8a6dd25851e9d5ad338209b" }, - "nvim-cmp": { "branch": "main", "commit": "04e0ca376d6abdbfc8b52180f8ea236cbfddf782" }, - "nvim-lspconfig": { "branch": "master", "commit": "d12140c5687a1186b95b3f42dbc6cc769df0cf0d" }, - "nvim-treesitter": { "branch": "master", "commit": "4fbf150a1621d52f17b099506e1a32f107079210" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "8edd5a6d96936bdff23333d3bc177481388839e5" }, - "oil.nvim": { "branch": "master", "commit": "bf753c3e3f8736939ad5597f92329dfe7b1df4f5" }, + "nvim-cmp": { "branch": "main", "commit": "538e37ba87284942c1d76ed38dd497e54e65b891" }, + "nvim-lspconfig": { "branch": "master", "commit": "84f2dd42efffa20d505ac44c78568d778ca7e0a1" }, + "nvim-treesitter": { "branch": "master", "commit": "ab818bf5a2ee21515ade9afcf428e98056b6197b" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ec1c5bdb3d87ac971749fa6c7dbc2b14884f1f6a" }, + "oil.nvim": { "branch": "master", "commit": "24027ed8d7f3ee5c38cfd713915e2e16d89e79b3" }, "plenary.nvim": { "branch": "master", "commit": "4f71c0c4a196ceb656c824a70792f3df3ce6bb6d" }, + "rose-pine": { "branch": "main", "commit": "8b1fd252255a7f2c41b4192a787ab62660b29f72" }, "rust.vim": { "branch": "master", "commit": "889b9a7515db477f4cb6808bef1769e53493c578" }, "telescope-file-browser.nvim": { "branch": "master", "commit": "1280db1f835bd6b73a485d6f1149e02df67533c4" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "6c921ca12321edaa773e324ef64ea301a1d0da62" }, "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" }, - "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" }, - "vim-fugitive": { "branch": "master", "commit": "e7bf502a6ae492f42a91d231864e25630286319b" }, + "todo-comments.nvim": { "branch": "main", "commit": "4a6737a8d70fe1ac55c64dfa47fcb189ca431872" }, + "vim-fugitive": { "branch": "master", "commit": "46eaf8918b347906789df296143117774e827616" }, "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, "vim-surround": { "branch": "master", "commit": "3d188ed2113431cf8dac77be61b842acb64433d9" }, diff --git a/lua/plugins/rosepine.lua b/lua/plugins/rosepine.lua new file mode 100644 index 00000000000..0791580d6d8 --- /dev/null +++ b/lua/plugins/rosepine.lua @@ -0,0 +1 @@ +return { "rose-pine/neovim", name = "rose-pine" };