From 0d9c61c755d70561cd2726513091b09bf15e95ed Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Mon, 1 Sep 2025 19:31:48 -0400 Subject: [PATCH 01/18] unignoring lazy-lock --- .gitignore | 1 - lazy-lock.json | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 lazy-lock.json diff --git a/.gitignore b/.gitignore index 005b535b606..8a192cab54d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,3 @@ test.sh nvim spell/ -lazy-lock.json diff --git a/lazy-lock.json b/lazy-lock.json new file mode 100644 index 00000000000..308e54b667b --- /dev/null +++ b/lazy-lock.json @@ -0,0 +1,23 @@ +{ + "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, + "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, + "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" }, + "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, + "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "5e085efe67fccb13372d54331d849219662a7e93" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, + "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, + "mini.nvim": { "branch": "main", "commit": "ddb70da6ec6aa896cfde87350d1e8dffb57ddef0" }, + "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, + "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } +} From a7972bac961835839c9f671e0186995b9758f4da Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Mon, 1 Sep 2025 19:59:04 -0400 Subject: [PATCH 02/18] adding theme and cursor --- init.lua | 63 +++++++++++++++++++++++++++++++++++++++++++++----- lazy-lock.json | 3 ++- 2 files changed, 59 insertions(+), 7 deletions(-) diff --git a/init.lua b/init.lua index b98ffc6198a..daf1db402ef 100644 --- a/init.lua +++ b/init.lua @@ -91,7 +91,7 @@ vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' -- Set to true if you have a Nerd Font installed and selected in the terminal -vim.g.have_nerd_font = false +vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` @@ -158,6 +158,9 @@ vim.o.inccommand = 'split' -- Show which line your cursor is on vim.o.cursorline = true +-- Define a block-style cursor +vim.opt.guicursor = 'n-v-c-sm:block,i-ci-ve:blinkwait700-blinkon400-blinkoff250,r-cr-o:blinkon0' + -- Minimal number of screen lines to keep above and below the cursor. vim.o.scrolloff = 10 @@ -881,20 +884,68 @@ require('lazy').setup({ -- change the command in the config to whatever the name of that colorscheme is. -- -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', + 'catppuccin/nvim', priority = 1000, -- Make sure to load this before all the other start plugins. config = function() ---@diagnostic disable-next-line: missing-fields - require('tokyonight').setup { - styles = { - comments = { italic = false }, -- Disable italics in comments + require('catppuccin').setup { + flavour = 'auto', -- latte, frappe, macchiato, mocha + background = { -- :h background + light = 'latte', + dark = 'mocha', + }, + transparent_background = false, -- disables setting the background color. + float = { + transparent = false, -- enable transparent floating windows + solid = false, -- use solid styling for floating windows, see |winborder| + }, + show_end_of_buffer = false, -- shows the '~' characters after the end of buffers + term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`) + dim_inactive = { + enabled = false, -- dims the background color of inactive window + shade = 'dark', + percentage = 0.15, -- percentage of the shade to apply to the inactive window + }, + no_italic = false, -- Force no italic + no_bold = false, -- Force no bold + no_underline = false, -- Force no underline + styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): + comments = { 'italic' }, -- Change the style of comments + conditionals = { 'italic' }, + loops = {}, + functions = {}, + keywords = {}, + strings = {}, + variables = {}, + numbers = {}, + booleans = {}, + properties = {}, + types = {}, + operators = {}, + -- miscs = {}, -- Uncomment to turn off hard-coded styles + }, + color_overrides = {}, + custom_highlights = {}, + default_integrations = true, + auto_integrations = false, + integrations = { + cmp = true, + gitsigns = true, + nvimtree = true, + treesitter = true, + notify = false, + mini = { + enabled = true, + indentscope_color = '', + }, + -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) }, } -- Load the colorscheme here. -- Like many other themes, this one has different styles, and you could load -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'tokyonight-night' + vim.cmd.colorscheme 'catppuccin' end, }, diff --git a/lazy-lock.json b/lazy-lock.json index 308e54b667b..faacccd3a88 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -11,13 +11,14 @@ "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, "mini.nvim": { "branch": "main", "commit": "ddb70da6ec6aa896cfde87350d1e8dffb57ddef0" }, + "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, + "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, - "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } From 5b5b80e4289e5c3c22b6136a9e115c847f8983d0 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Mon, 1 Sep 2025 20:40:23 -0400 Subject: [PATCH 03/18] file browser --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index daf1db402ef..a78b81957f6 100644 --- a/init.lua +++ b/init.lua @@ -1028,8 +1028,8 @@ require('lazy').setup({ -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', -- require 'kickstart.plugins.autopairs', - -- require 'kickstart.plugins.neo-tree', - -- require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.neo-tree', + require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. From d615138d4cd00ffc635eeae84d67d61982644962 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Mon, 1 Sep 2025 21:11:22 -0400 Subject: [PATCH 04/18] adding toggle term --- init.lua | 2 +- lazy-lock.json | 3 +++ lua/custom/plugins/init.lua | 1 + lua/custom/plugins/toggleterm.lua | 44 +++++++++++++++++++++++++++++++ 4 files changed, 49 insertions(+), 1 deletion(-) create mode 100644 lua/custom/plugins/toggleterm.lua diff --git a/init.lua b/init.lua index a78b81957f6..8c8afd9da24 100644 --- a/init.lua +++ b/init.lua @@ -1035,7 +1035,7 @@ require('lazy').setup({ -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.plugins' }, + { import = 'custom.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-๐Ÿ”Œ-plugin-spec` -- Or use telescope! diff --git a/lazy-lock.json b/lazy-lock.json index faacccd3a88..8392cbcec6e 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -11,6 +11,8 @@ "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, "mini.nvim": { "branch": "main", "commit": "ddb70da6ec6aa896cfde87350d1e8dffb57ddef0" }, + "neo-tree.nvim": { "branch": "main", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" }, + "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, @@ -20,5 +22,6 @@ "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..34bcd10acb8 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,5 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information + return {} diff --git a/lua/custom/plugins/toggleterm.lua b/lua/custom/plugins/toggleterm.lua new file mode 100644 index 00000000000..762a206c3fc --- /dev/null +++ b/lua/custom/plugins/toggleterm.lua @@ -0,0 +1,44 @@ +return { + 'akinsho/toggleterm.nvim', + version = '*', + config = function() + require('toggleterm').setup { + size = function(term) + if term.direction == 'horizontal' then + return 15 + elseif term.direction == 'vertical' then + return vim.o.columns * 0.4 + end + end, + open_mapping = [[]], + hide_numbers = true, + shade_filetypes = {}, + autochdir = false, + shade_terminals = true, + start_in_insert = true, + insert_mappings = true, + terminal_mappings = true, + persist_size = true, + persist_mode = true, + direction = 'float', + close_on_exit = true, + clear_env = false, + shell = 'zsh', + auto_scroll = true, + float_opts = { + border = 'single', + winblend = 0, + title_pos = 'left', + }, + winbar = { + enabled = false, + name_formatter = function(term) + return term.name + end, + }, + responsiveness = { + horizontal_breakpoint = 135, + }, + } + end, +} From 56db49b7fc904967a735d8f23fed4ee10a8a1f65 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Tue, 2 Sep 2025 00:00:19 -0400 Subject: [PATCH 05/18] fixing guess-indent --- init.lua | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 8c8afd9da24..33565490fb3 100644 --- a/init.lua +++ b/init.lua @@ -250,8 +250,12 @@ rtp:prepend(lazypath) -- NOTE: Here is where you install your plugins. require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). - 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically - + { + 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically + config = function () + require('guess-indent').setup {} + end + }, -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following -- keys can be used to configure plugin behavior/loading/etc. @@ -307,7 +311,7 @@ require('lazy').setup({ opts = { -- delay between pressing a key and opening which-key (milliseconds) -- this setting is independent of vim.o.timeoutlen - delay = 0, + delay = 500, icons = { -- set icon mappings to true if you have a Nerd Font mappings = vim.g.have_nerd_font, From 5fc968c00c7d5ecc6dbabbf514d08df08a0409d4 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Tue, 2 Sep 2025 00:14:14 -0400 Subject: [PATCH 06/18] adding auto pairs --- init.lua | 8 ++++---- lazy-lock.json | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/init.lua b/init.lua index 33565490fb3..532384a2d6f 100644 --- a/init.lua +++ b/init.lua @@ -252,9 +252,9 @@ require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). { 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically - config = function () - require('guess-indent').setup {} - end + config = function() + require('guess-indent').setup {} + end, }, -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following @@ -1031,7 +1031,7 @@ require('lazy').setup({ -- require 'kickstart.plugins.debug', -- require 'kickstart.plugins.indent_line', -- require 'kickstart.plugins.lint', - -- require 'kickstart.plugins.autopairs', + require 'kickstart.plugins.autopairs', require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps diff --git a/lazy-lock.json b/lazy-lock.json index 8392cbcec6e..a126ff197df 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -14,6 +14,7 @@ "neo-tree.nvim": { "branch": "main", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, From eb71d8be3e640826c5f6eb71a8a5148c6df5e421 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Wed, 3 Sep 2025 22:51:41 -0400 Subject: [PATCH 07/18] removing comment --- init.lua | 86 -------------------------------------------------- lazy-lock.json | 2 +- 2 files changed, 1 insertion(+), 87 deletions(-) diff --git a/init.lua b/init.lua index 532384a2d6f..e7808cc2a7d 100644 --- a/init.lua +++ b/init.lua @@ -1,89 +1,3 @@ ---[[ - -===================================================================== -==================== READ THIS BEFORE CONTINUING ==================== -===================================================================== -======== .-----. ======== -======== .----------------------. | === | ======== -======== |.-""""""""""""""""""-.| |-----| ======== -======== || || | === | ======== -======== || KICKSTART.NVIM || |-----| ======== -======== || || | === | ======== -======== || || |-----| ======== -======== ||:Tutor || |:::::| ======== -======== |'-..................-'| |____o| ======== -======== `"")----------------(""` ___________ ======== -======== /::::::::::| |::::::::::\ \ no mouse \ ======== -======== /:::========| |==hjkl==:::\ \ required \ ======== -======== '""""""""""""' '""""""""""""' '""""""""""' ======== -======== ======== -===================================================================== -===================================================================== - -What is Kickstart? - - Kickstart.nvim is *not* a distribution. - - Kickstart.nvim is a starting point 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 can start exploring, configuring and tinkering to - make Neovim your own! That might mean leaving Kickstart just the way it is for a while - or immediately breaking it into modular pieces. It's up to you! - - If you don't know anything about Lua, I recommend taking some time to read through - a guide. One possible example which will only take 10-15 minutes: - - https://learnxinyminutes.com/docs/lua/ - - After understanding a bit more about Lua, you can use `:help lua-guide` as a - reference for how Neovim integrates Lua. - - :help lua-guide - - (or HTML version): https://neovim.io/doc/user/lua-guide.html - -Kickstart Guide: - - TODO: The very first thing you should do is to run the command `:Tutor` in Neovim. - - If you don't know what this means, type the following: - - - - : - - Tutor - - - - (If you already know the Neovim basics, you can skip this step.) - - Once you've completed that, you can continue working through **AND READING** the rest - of the kickstart init.lua. - - Next, run AND READ `:help`. - This will open up a help window with some basic information - about reading, navigating and searching the builtin help documentation. - - This should be the first place you go to look when you're stuck or confused - with something. It's one of my favorite Neovim features. - - MOST IMPORTANTLY, we provide a keymap "sh" to [s]earch the [h]elp documentation, - which is very useful when you're not exactly sure of what you're looking for. - - I have left several `:help X` comments throughout the init.lua - These are hints about where to find more information about the relevant settings, - plugins or Neovim features used in Kickstart. - - NOTE: Look for lines like this - - Throughout the file. These are for you, the reader, to help you 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 Neovim config. - -If you experience any errors while trying to install kickstart, run `:checkhealth` for more info. - -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 loaded (otherwise wrong leader will be used) diff --git a/lazy-lock.json b/lazy-lock.json index a126ff197df..1f11fa90616 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -15,7 +15,7 @@ "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, - "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, + "nvim-lspconfig": { "branch": "master", "commit": "a3deebbd110016f50cc66b7b256120072f3804db" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, From 78251538e818231c59ec11acf21b9f8ac920da92 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Thu, 4 Sep 2025 16:02:53 -0400 Subject: [PATCH 08/18] updating readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 4113950550d..d54d12b2488 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ If you are experiencing issues, please make sure you have the latest versions. External Requirements: - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) +- For copying, one of `xclip`, `xsel`, or `wl-clipboard` to allow nvim to access the system clipboard - [ripgrep](https://github.com/BurntSushi/ripgrep#installation), [fd-find](https://github.com/sharkdp/fd#installation) - Clipboard tool (xclip/xsel/win32yank or other depending on the platform) From a9751b6c2d7e7765dd3b764a49466a24d08847d8 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Tue, 9 Sep 2025 21:58:30 -0400 Subject: [PATCH 09/18] adding rust finder --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index e7808cc2a7d..5cd2258206a 100644 --- a/init.lua +++ b/init.lua @@ -790,7 +790,7 @@ require('lazy').setup({ -- the rust implementation via `'prefer_rust_with_warning'` -- -- See :h blink-cmp-config-fuzzy for more information - fuzzy = { implementation = 'lua' }, + fuzzy = { implementation = 'rust' }, -- Shows a signature help window while you type arguments for a function signature = { enabled = true }, From b6b4e03afeee62b0ea177b540f2af33cf44256d6 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Sat, 13 Sep 2025 13:14:56 -0400 Subject: [PATCH 10/18] adding relative line numbers --- init.lua | 2 +- lazy-lock.json | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index 5cd2258206a..b05c801686b 100644 --- a/init.lua +++ b/init.lua @@ -16,7 +16,7 @@ vim.g.have_nerd_font = true vim.o.number = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.o.relativenumber = true +vim.o.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.o.mouse = 'a' diff --git a/lazy-lock.json b/lazy-lock.json index 1f11fa90616..7138322785c 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -3,21 +3,21 @@ "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" }, - "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, + "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "5e085efe67fccb13372d54331d849219662a7e93" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "7f9a39fcd2ac6e979001f857727d606888f5909c" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, - "mini.nvim": { "branch": "main", "commit": "ddb70da6ec6aa896cfde87350d1e8dffb57ddef0" }, + "mini.nvim": { "branch": "main", "commit": "d12b7c1b4dccc5245a3d2b7bc73da6dd910af2c0" }, "neo-tree.nvim": { "branch": "main", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, - "nvim-lspconfig": { "branch": "master", "commit": "a3deebbd110016f50cc66b7b256120072f3804db" }, + "nvim-lspconfig": { "branch": "master", "commit": "d89f4891f0720cd2598e4bdd60010d8784b2ac8a" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, + "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, From 0b62cac365c1513fa92f57ce5fd21ace5aea1f0f Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Sat, 22 Nov 2025 18:41:43 -0500 Subject: [PATCH 11/18] adding ability to paste without clobbering buffer --- init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/init.lua b/init.lua index b05c801686b..e22dc10bf32 100644 --- a/init.lua +++ b/init.lua @@ -24,6 +24,9 @@ vim.o.mouse = 'a' -- Don't show the mode, since it's already in the status line vim.o.showmode = false +-- Allow pasting without clobbering the buffer +vim.keymap.set('x', 'p', '"_dP') + -- Sync clipboard between OS and Neovim. -- Schedule the setting after `UiEnter` because it can increase startup-time. -- Remove this option if you want your OS clipboard to remain independent. From dbca87bca67e56f9f36c461feb98e5e1b96df303 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Wed, 12 Nov 2025 02:38:18 -0500 Subject: [PATCH 12/18] updates --- init.lua | 8 ++++++++ lazy-lock.json | 33 ++++++++++++++++--------------- lua/custom/plugins/toggleterm.lua | 2 +- 3 files changed, 26 insertions(+), 17 deletions(-) diff --git a/init.lua b/init.lua index e22dc10bf32..5e1c1bd6fda 100644 --- a/init.lua +++ b/init.lua @@ -171,6 +171,14 @@ require('lazy').setup({ 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically config = function() require('guess-indent').setup {} + + -- Customize indentation settings for C++ files + vim.cmd [[ + augroup cpp_indentation + autocmd! + autocmd FileType cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 + augroup END + ]] end, }, -- NOTE: Plugins can also be added by using a table, diff --git a/lazy-lock.json b/lazy-lock.json index 7138322785c..d18f21c64d6 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,28 +1,29 @@ { "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, - "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, - "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" }, - "gitsigns.nvim": { "branch": "main", "commit": "f780609807eca1f783a36a8a31c30a48fbe150c5" }, + "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, + "conform.nvim": { "branch": "master", "commit": "9fd3d5e0b689ec1bf400c53cbbec72c6fdf24081" }, + "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, + "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "7f9a39fcd2ac6e979001f857727d606888f5909c" }, + "lazy.nvim": { "branch": "main", "commit": "f0f5bbb9e5bfae5e6468f9359ffea3d151418176" }, + "lazydev.nvim": { "branch": "main", "commit": "371cd7434cbf95606f1969c2c744da31b77fcfa6" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, - "mini.nvim": { "branch": "main", "commit": "d12b7c1b4dccc5245a3d2b7bc73da6dd910af2c0" }, - "neo-tree.nvim": { "branch": "main", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" }, + "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, + "mini.nvim": { "branch": "main", "commit": "429e5f9dc9cd59bf76cd98b687300f0a384a7f52" }, + "neo-tree.nvim": { "branch": "main", "commit": "8cdd6b1940f333c1dd085526a9c45b30fb2dbf50" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, - "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, - "nvim-lspconfig": { "branch": "master", "commit": "d89f4891f0720cd2598e4bdd60010d8784b2ac8a" }, + "nvim": { "branch": "main", "commit": "234fc048de931a0e42ebcad675bf6559d75e23df" }, + "nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" }, + "nvim-lspconfig": { "branch": "master", "commit": "a89bfcfd0e44f898341ac8a80ba83ccf6218bef3" }, + "nvim-metals": { "branch": "main", "commit": "40f7b9ea6ded898319136f4d6a94da9487584309" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "6e51ca170563330e063720449c21f43e27ca0bc1" }, + "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, - "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "todo-comments.nvim": { "branch": "main", "commit": "411503d3bedeff88484de572f2509c248e499b38" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/custom/plugins/toggleterm.lua b/lua/custom/plugins/toggleterm.lua index 762a206c3fc..d15401fe628 100644 --- a/lua/custom/plugins/toggleterm.lua +++ b/lua/custom/plugins/toggleterm.lua @@ -20,7 +20,7 @@ return { terminal_mappings = true, persist_size = true, persist_mode = true, - direction = 'float', + direction = 'horizontal', close_on_exit = true, clear_env = false, shell = 'zsh', From d2c29206ba9829ecc5d5c9753e8b58ce0c9e23eb Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Sun, 14 Dec 2025 17:17:24 -0500 Subject: [PATCH 13/18] adding latex support --- lazy-lock.json | 31 ++++++++++++++++--------------- lua/custom/plugins/vimtex.lua | 8 ++++++++ 2 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 lua/custom/plugins/vimtex.lua diff --git a/lazy-lock.json b/lazy-lock.json index d18f21c64d6..747d02cbb05 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,29 +1,30 @@ { "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "blink.cmp": { "branch": "main", "commit": "327fff91fe6af358e990be7be1ec8b78037d2138" }, - "conform.nvim": { "branch": "master", "commit": "9fd3d5e0b689ec1bf400c53cbbec72c6fdf24081" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "conform.nvim": { "branch": "master", "commit": "16d35530db66ca64f81cb1a13a42afe5962edf34" }, "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, - "gitsigns.nvim": { "branch": "main", "commit": "20ad4419564d6e22b189f6738116b38871082332" }, + "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, - "lazy.nvim": { "branch": "main", "commit": "f0f5bbb9e5bfae5e6468f9359ffea3d151418176" }, - "lazydev.nvim": { "branch": "main", "commit": "371cd7434cbf95606f1969c2c744da31b77fcfa6" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "d7b5feb6e769e995f7fcf44d92f49f811c51d10c" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "c55bd8a8fb191e24176c206a7af1dd51ce7276a5" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "ad7146aa61dcaeb54fa900144d768f040090bff0" }, - "mini.nvim": { "branch": "main", "commit": "429e5f9dc9cd59bf76cd98b687300f0a384a7f52" }, - "neo-tree.nvim": { "branch": "main", "commit": "8cdd6b1940f333c1dd085526a9c45b30fb2dbf50" }, + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, + "mini.nvim": { "branch": "main", "commit": "6bd3a01aaf7d248aea1b78aacdd5d44bffa002c1" }, + "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim": { "branch": "main", "commit": "234fc048de931a0e42ebcad675bf6559d75e23df" }, - "nvim-autopairs": { "branch": "master", "commit": "7a2c97cccd60abc559344042fefb1d5a85b3e33b" }, - "nvim-lspconfig": { "branch": "master", "commit": "a89bfcfd0e44f898341ac8a80ba83ccf6218bef3" }, + "nvim": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" }, + "nvim-autopairs": { "branch": "master", "commit": "d9e44e54384e5b0f3536339c65484f2e41b528e3" }, + "nvim-lspconfig": { "branch": "master", "commit": "0044d0987ef7e624d04141d0f90d0481fd3c3663" }, "nvim-metals": { "branch": "main", "commit": "40f7b9ea6ded898319136f4d6a94da9487584309" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, - "todo-comments.nvim": { "branch": "main", "commit": "411503d3bedeff88484de572f2509c248e499b38" }, + "telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, + "vimtex": { "branch": "master", "commit": "6e1229e23c3bbe93487ef62458b1241a2d8ff6af" }, "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/custom/plugins/vimtex.lua b/lua/custom/plugins/vimtex.lua new file mode 100644 index 00000000000..2e1359c9136 --- /dev/null +++ b/lua/custom/plugins/vimtex.lua @@ -0,0 +1,8 @@ +return { + 'lervag/vimtex', + config = function() + vim.g.vimtex_view_method = 'zathura' + vim.g.vimtex_compiler_method = 'latexmk' + vim.g.vimtex_quickfix_mode = 0 + end, +} From d8c25ec4651e37328676ea2139b9eca563445378 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Wed, 28 Jan 2026 20:42:29 -0500 Subject: [PATCH 14/18] disabling block cursor in input mode for now --- init.lua | 2 +- lazy-lock.json | 37 ++++++++++++++++++------------------- 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/init.lua b/init.lua index 5e1c1bd6fda..e3910437aaf 100644 --- a/init.lua +++ b/init.lua @@ -76,7 +76,7 @@ vim.o.inccommand = 'split' vim.o.cursorline = true -- Define a block-style cursor -vim.opt.guicursor = 'n-v-c-sm:block,i-ci-ve:blinkwait700-blinkon400-blinkoff250,r-cr-o:blinkon0' +-- vim.opt.guicursor = 'n-v-c-sm:block,i-ci-ve:blinkwait700-blinkon400-blinkoff250,r-cr-o:blinkon0' -- Minimal number of screen lines to keep above and below the cursor. vim.o.scrolloff = 10 diff --git a/lazy-lock.json b/lazy-lock.json index 747d02cbb05..38ff59d6c75 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,30 +1,29 @@ { "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, - "conform.nvim": { "branch": "master", "commit": "16d35530db66ca64f81cb1a13a42afe5962edf34" }, - "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, - "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, + "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, + "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, + "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" }, + "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, - "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, - "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "c55bd8a8fb191e24176c206a7af1dd51ce7276a5" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "5e085efe67fccb13372d54331d849219662a7e93" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, - "mini.nvim": { "branch": "main", "commit": "6bd3a01aaf7d248aea1b78aacdd5d44bffa002c1" }, - "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, + "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, + "mini.nvim": { "branch": "main", "commit": "ddb70da6ec6aa896cfde87350d1e8dffb57ddef0" }, + "neo-tree.nvim": { "branch": "main", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim": { "branch": "main", "commit": "ce8d176faa4643e026e597ae3c31db59b63cef09" }, - "nvim-autopairs": { "branch": "master", "commit": "d9e44e54384e5b0f3536339c65484f2e41b528e3" }, - "nvim-lspconfig": { "branch": "master", "commit": "0044d0987ef7e624d04141d0f90d0481fd3c3663" }, - "nvim-metals": { "branch": "main", "commit": "40f7b9ea6ded898319136f4d6a94da9487584309" }, + "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, + "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, + "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, + "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" }, - "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, + "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, "vimtex": { "branch": "master", "commit": "6e1229e23c3bbe93487ef62458b1241a2d8ff6af" }, - "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } } From e577be0e7f03087afb4f7e4b2a12a0c2a36a5d15 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Wed, 28 Jan 2026 21:29:05 -0500 Subject: [PATCH 15/18] adding claudecode plugin --- lua/custom/plugins/claudecode.lua | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 lua/custom/plugins/claudecode.lua diff --git a/lua/custom/plugins/claudecode.lua b/lua/custom/plugins/claudecode.lua new file mode 100644 index 00000000000..9948796842b --- /dev/null +++ b/lua/custom/plugins/claudecode.lua @@ -0,0 +1,24 @@ +return { + 'coder/claudecode.nvim', + dependencies = { 'folke/snacks.nvim' }, + config = true, + keys = { + { 'a', nil, desc = 'AI/Claude Code' }, + { 'ac', 'ClaudeCode', desc = 'Toggle Claude' }, + { 'af', 'ClaudeCodeFocus', desc = 'Focus Claude' }, + { 'ar', 'ClaudeCode --resume', desc = 'Resume Claude' }, + { 'aC', 'ClaudeCode --continue', desc = 'Continue Claude' }, + { 'am', 'ClaudeCodeSelectModel', desc = 'Select Claude model' }, + { 'ab', 'ClaudeCodeAdd %', desc = 'Add current buffer' }, + { 'as', 'ClaudeCodeSend', mode = 'v', desc = 'Send to Claude' }, + { + 'as', + 'ClaudeCodeTreeAdd', + desc = 'Add file', + ft = { 'NvimTree', 'neo-tree', 'oil', 'minifiles', 'netrw' }, + }, + -- Diff management + { 'aa', 'ClaudeCodeDiffAccept', desc = 'Accept diff' }, + { 'ad', 'ClaudeCodeDiffDeny', desc = 'Deny diff' }, + }, +} From efcde1a0e7e6f211163d969ecb712c2f4ff2ee62 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Mon, 16 Feb 2026 17:08:49 -0500 Subject: [PATCH 16/18] stealing ryan config --- .github/ISSUE_TEMPLATE/bug_report.md | 35 --- .github/pull_request_template.md | 8 - .github/workflows/stylua.yml | 21 -- .gitignore | 6 - .stylua.toml | 6 - LICENSE.md | 19 -- README.md | 242 ------------------ doc/tags | 3 - init.lua | 357 ++++++++------------------- lazy-lock.json | 37 ++- lua/clipboard.lua | 39 +++ lua/custom/plugins/claudecode.lua | 24 -- lua/custom/plugins/toggleterm.lua | 93 ++++--- lua/custom/plugins/vimtex.lua | 8 - lua/kickstart/plugins/gitsigns.lua | 3 +- lua/local/README.md | 29 +++ lua/local/plugins/init.lua | 1 + 17 files changed, 239 insertions(+), 692 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug_report.md delete mode 100644 .github/pull_request_template.md delete mode 100644 .github/workflows/stylua.yml delete mode 100644 .gitignore delete mode 100644 .stylua.toml delete mode 100644 LICENSE.md delete mode 100644 README.md delete mode 100644 doc/tags create mode 100644 lua/clipboard.lua delete mode 100644 lua/custom/plugins/claudecode.lua delete mode 100644 lua/custom/plugins/vimtex.lua create mode 100644 lua/local/README.md create mode 100644 lua/local/plugins/init.lua diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md deleted file mode 100644 index 86598b8dc98..00000000000 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ /dev/null @@ -1,35 +0,0 @@ ---- -name: Bug report -about: Create a report to help us improve -title: '' -labels: '' -assignees: '' - ---- - - - -## Before Reporting an Issue -- I have read the kickstart.nvim README.md. -- I have read the appropriate plugin's documentation. -- I have searched that this issue has not been reported before. - -- [ ] **By checking this, I confirm that the above steps are completed. I understand leaving this unchecked will result in this report being closed immediately.** - -## Describe the bug - - -## To Reproduce - -1. ... - -## Desktop - -- OS: -- Terminal: - -## Neovim Version - - -``` -``` diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md deleted file mode 100644 index f401c9ffd9c..00000000000 --- a/.github/pull_request_template.md +++ /dev/null @@ -1,8 +0,0 @@ -*************************************************************************** -**NOTE** -Please verify that the `base repository` above has the intended destination! -Github by default opens Pull Requests against the parent of a forked repository. -If this is your personal fork and you didn't intend to open a PR for contribution -to the original project then adjust the `base repository` accordingly. -************************************************************************** - diff --git a/.github/workflows/stylua.yml b/.github/workflows/stylua.yml deleted file mode 100644 index 75db6c3355b..00000000000 --- a/.github/workflows/stylua.yml +++ /dev/null @@ -1,21 +0,0 @@ -# Check Lua Formatting -name: Check Lua Formatting -on: pull_request_target - -jobs: - stylua-check: - if: github.repository == 'nvim-lua/kickstart.nvim' - name: Stylua Check - runs-on: ubuntu-latest - steps: - - name: Checkout Code - uses: actions/checkout@v2 - with: - ref: ${{ github.event.pull_request.head.sha }} - - name: Stylua Check - uses: JohnnyMorganz/stylua-action@v3 - with: - token: ${{ secrets.GITHUB_TOKEN }} - version: latest - args: --check . - diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 8a192cab54d..00000000000 --- a/.gitignore +++ /dev/null @@ -1,6 +0,0 @@ -tags -test.sh -.luarc.json -nvim - -spell/ diff --git a/.stylua.toml b/.stylua.toml deleted file mode 100644 index 139e9397d90..00000000000 --- a/.stylua.toml +++ /dev/null @@ -1,6 +0,0 @@ -column_width = 160 -line_endings = "Unix" -indent_type = "Spaces" -indent_width = 2 -quote_style = "AutoPreferSingle" -call_parentheses = "None" diff --git a/LICENSE.md b/LICENSE.md deleted file mode 100644 index 9cf106272ac..00000000000 --- a/LICENSE.md +++ /dev/null @@ -1,19 +0,0 @@ -MIT License - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/README.md b/README.md deleted file mode 100644 index d54d12b2488..00000000000 --- a/README.md +++ /dev/null @@ -1,242 +0,0 @@ -# kickstart.nvim - -## Introduction - -A starting point for Neovim that is: - -* Small -* Single-file -* Completely Documented - -**NOT** a Neovim distribution, but instead a starting point for your configuration. - -## Installation - -### Install Neovim - -Kickstart.nvim targets *only* the latest -['stable'](https://github.com/neovim/neovim/releases/tag/stable) and latest -['nightly'](https://github.com/neovim/neovim/releases/tag/nightly) of Neovim. -If you are experiencing issues, please make sure you have the latest versions. - -### Install External Dependencies - -External Requirements: -- Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) -- For copying, one of `xclip`, `xsel`, or `wl-clipboard` to allow nvim to access the system clipboard -- [ripgrep](https://github.com/BurntSushi/ripgrep#installation), - [fd-find](https://github.com/sharkdp/fd#installation) -- Clipboard tool (xclip/xsel/win32yank or other depending on the platform) -- A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons - - if you have it set `vim.g.have_nerd_font` in `init.lua` to true -- Emoji fonts (Ubuntu only, and only if you want emoji!) `sudo apt install fonts-noto-color-emoji` -- Language Setup: - - If you want to write Typescript, you need `npm` - - If you want to write Golang, you will need `go` - - etc. - -> [!NOTE] -> See [Install Recipes](#Install-Recipes) for additional Windows and Linux specific notes -> and quick install snippets - -### Install Kickstart - -> [!NOTE] -> [Backup](#FAQ) your previous configuration (if any exists) - -Neovim's configurations are located under the following paths, depending on your OS: - -| OS | PATH | -| :- | :--- | -| Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | -| Windows (cmd)| `%localappdata%\nvim\` | -| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | - -#### Recommended Step - -[Fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo) this repo -so that you have your own copy that you can modify, then install by cloning the -fork to your machine using one of the commands below, depending on your OS. - -> [!NOTE] -> Your fork's URL will be something like this: -> `https://github.com//kickstart.nvim.git` - -You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file -too - it's ignored in the kickstart repo to make maintenance easier, but it's -[recommended to track it in version control](https://lazy.folke.io/usage/lockfile). - -#### Clone kickstart.nvim - -> [!NOTE] -> If following the recommended step above (i.e., forking the repo), replace -> `nvim-lua` with `` in the commands below - -
Linux and Mac - -```sh -git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HOME/.config}"/nvim -``` - -
- -
Windows - -If you're using `cmd.exe`: - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "%localappdata%\nvim" -``` - -If you're using `powershell.exe` - -``` -git clone https://github.com/nvim-lua/kickstart.nvim.git "${env:LOCALAPPDATA}\nvim" -``` - -
- -### Post Installation - -Start Neovim - -```sh -nvim -``` - -That's it! Lazy will install all the plugins you have. Use `:Lazy` to view -the current plugin status. Hit `q` to close the window. - -#### Read The Friendly Documentation - -Read through the `init.lua` file in your configuration folder for more -information about extending and exploring Neovim. That also includes -examples of adding popularly requested plugins. - -> [!NOTE] -> For more information about a particular plugin check its repository's documentation. - - -### Getting Started - -[The Only Video You Need to Get Started with Neovim](https://youtu.be/m8C0Cq9Uv9o) - -### FAQ - -* What should I do if I already have a pre-existing Neovim configuration? - * You should back it up and then delete all associated files. - * This includes your existing init.lua and the Neovim files in `~/.local` - which can be deleted with `rm -rf ~/.local/share/nvim/` -* Can I keep my existing configuration in parallel to kickstart? - * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` - to maintain multiple configurations. For example, you can install the kickstart - configuration in `~/.config/nvim-kickstart` and create an alias: - ``` - alias nvim-kickstart='NVIM_APPNAME="nvim-kickstart" nvim' - ``` - When you run Neovim using `nvim-kickstart` alias it will use the alternative - config directory and the matching local directory - `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim - distribution that you would like to try out. -* What if I want to "uninstall" this configuration: - * See [lazy.nvim uninstall](https://lazy.folke.io/usage#-uninstalling) information -* Why is the kickstart `init.lua` a single file? Wouldn't it make sense to split it into multiple files? - * The main purpose of kickstart is to serve as a teaching tool and a reference - configuration that someone can easily use to `git clone` as a basis for their own. - As you progress in learning Neovim and Lua, you might consider splitting `init.lua` - into smaller parts. A fork of kickstart that does this while maintaining the - same functionality is available here: - * [kickstart-modular.nvim](https://github.com/dam9000/kickstart-modular.nvim) - * Discussions on this topic can be found here: - * [Restructure the configuration](https://github.com/nvim-lua/kickstart.nvim/issues/218) - * [Reorganize init.lua into a multi-file setup](https://github.com/nvim-lua/kickstart.nvim/pull/473) - -### Install Recipes - -Below you can find OS specific install instructions for Neovim and dependencies. - -After installing all the dependencies continue with the [Install Kickstart](#Install-Kickstart) step. - -#### Windows Installation - -
Windows with Microsoft C++ Build Tools and CMake -Installation may require installing build tools and updating the run command for `telescope-fzf-native` - -See `telescope-fzf-native` documentation for [more details](https://github.com/nvim-telescope/telescope-fzf-native.nvim#installation) - -This requires: - -- Install CMake and the Microsoft C++ Build Tools on Windows - -```lua -{'nvim-telescope/telescope-fzf-native.nvim', build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build' } -``` -
-
Windows with gcc/make using chocolatey -Alternatively, one can install gcc and make which don't require changing the config, -the easiest way is to use choco: - -1. install [chocolatey](https://chocolatey.org/install) -either follow the instructions on the page or use winget, -run in cmd as **admin**: -``` -winget install --accept-source-agreements chocolatey.chocolatey -``` - -2. install all requirements using choco, exit the previous cmd and -open a new one so that choco path is set, and run in cmd as **admin**: -``` -choco install -y neovim git ripgrep wget fd unzip gzip mingw make -``` -
-
WSL (Windows Subsystem for Linux) - -``` -wsl --install -wsl -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
- -#### Linux Install -
Ubuntu Install Steps - -``` -sudo add-apt-repository ppa:neovim-ppa/unstable -y -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip neovim -``` -
-
Debian Install Steps - -``` -sudo apt update -sudo apt install make gcc ripgrep unzip git xclip curl - -# Now we install nvim -curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz -sudo rm -rf /opt/nvim-linux-x86_64 -sudo mkdir -p /opt/nvim-linux-x86_64 -sudo chmod a+rX /opt/nvim-linux-x86_64 -sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz - -# make it available in /usr/local/bin, distro installs to /usr/bin -sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ -``` -
-
Fedora Install Steps - -``` -sudo dnf install -y gcc make git ripgrep fd-find unzip neovim -``` -
- -
Arch Install Steps - -``` -sudo pacman -S --noconfirm --needed gcc make git ripgrep fd unzip neovim -``` -
- diff --git a/doc/tags b/doc/tags deleted file mode 100644 index 687ae7721d9..00000000000 --- a/doc/tags +++ /dev/null @@ -1,3 +0,0 @@ -kickstart-is kickstart.txt /*kickstart-is* -kickstart-is-not kickstart.txt /*kickstart-is-not* -kickstart.nvim kickstart.txt /*kickstart.nvim* diff --git a/init.lua b/init.lua index e3910437aaf..5e782eebe87 100644 --- a/init.lua +++ b/init.lua @@ -1,54 +1,35 @@ +pcall(require, 'local.prehook') + -- Set as the leader key -- See `:help mapleader` --- NOTE: Must happen before plugins are loaded (otherwise wrong leader will be used) vim.g.mapleader = ' ' vim.g.maplocalleader = ' ' --- Set to true if you have a Nerd Font installed and selected in the terminal +-- Set to true if you have a Nerd Font installed and selected in the terminal. vim.g.have_nerd_font = true -- [[ Setting options ]] -- See `:help vim.o` --- NOTE: You can change these options as you wish! --- For more options, you can see `:help option-list` --- Make line numbers default vim.o.number = true --- You can also add relative line numbers, to help with jumping. --- Experiment for yourself to see if you like it! vim.o.relativenumber = true --- Enable mouse mode, can be useful for resizing splits for example! +-- Enable mouse mode vim.o.mouse = 'a' --- Don't show the mode, since it's already in the status line +-- Don't show the mode, since it's already in the status line. vim.o.showmode = false --- Allow pasting without clobbering the buffer -vim.keymap.set('x', 'p', '"_dP') - --- Sync clipboard between OS and Neovim. --- Schedule the setting after `UiEnter` because it can increase startup-time. --- Remove this option if you want your OS clipboard to remain independent. --- See `:help 'clipboard'` -vim.schedule(function() - vim.o.clipboard = 'unnamedplus' -end) +require 'clipboard' --- Enable break indent vim.o.breakindent = true --- Save undo history vim.o.undofile = true --- Case-insensitive searching UNLESS \C or one or more capital letters in the search term vim.o.ignorecase = true vim.o.smartcase = true --- Keep signcolumn on by default vim.o.signcolumn = 'yes' - --- Decrease update time vim.o.updatetime = 250 -- Decrease mapped sequence wait time @@ -75,9 +56,6 @@ vim.o.inccommand = 'split' -- Show which line your cursor is on vim.o.cursorline = true --- Define a block-style cursor --- vim.opt.guicursor = 'n-v-c-sm:block,i-ci-ve:blinkwait700-blinkon400-blinkoff250,r-cr-o:blinkon0' - -- Minimal number of screen lines to keep above and below the cursor. vim.o.scrolloff = 10 @@ -86,10 +64,16 @@ vim.o.scrolloff = 10 -- See `:help 'confirm'` vim.o.confirm = true +-- Make all floating windows have a border. +vim.o.winborder = 'rounded' + +-- Make the command status bar only appear when necessary. +vim.o.cmdheight = 0 + -- [[ Basic Keymaps ]] -- See `:help vim.keymap.set()` --- Clear highlights on search when pressing in normal mode +-- Clear highlights on search when pressing in normal mode. -- See `:help hlsearch` vim.keymap.set('n', '', 'nohlsearch') @@ -119,11 +103,15 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) --- NOTE: Some terminals have colliding keymaps or are not able to send distinct keycodes --- vim.keymap.set("n", "", "H", { desc = "Move window to the left" }) --- vim.keymap.set("n", "", "L", { desc = "Move window to the right" }) --- vim.keymap.set("n", "", "J", { desc = "Move window to the lower" }) --- vim.keymap.set("n", "", "K", { desc = "Move window to the upper" }) +-- Exit insert mode easier +vim.keymap.set('i', 'jk', '', { desc = 'Exits insert mode' }) + +-- Keep cursor centered when navigating by half pages. +vim.keymap.set('n', '', 'zz', { desc = 'Move down by half a page and center the cursor' }) +vim.keymap.set('n', '', 'zz', { desc = 'Move down by half a page and center the cursor' }) + +-- Add the ability to paste over text without clobbering the paste register. +vim.keymap.set('x', 'p', '"_dP') -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -139,6 +127,13 @@ vim.api.nvim_create_autocmd('TextYankPost', { end, }) +local function opt_require(name) + local ok, mod = pcall(require, name) + if ok then + return mod + end +end + -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' @@ -168,19 +163,12 @@ rtp:prepend(lazypath) require('lazy').setup({ -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). { - 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically + 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically, config = function() require('guess-indent').setup {} - - -- Customize indentation settings for C++ files - vim.cmd [[ - augroup cpp_indentation - autocmd! - autocmd FileType cpp setlocal expandtab tabstop=4 shiftwidth=4 softtabstop=4 - augroup END - ]] end, }, + -- NOTE: Plugins can also be added by using a table, -- with the first argument being the link and the following -- keys can be used to configure plugin behavior/loading/etc. @@ -236,7 +224,7 @@ require('lazy').setup({ opts = { -- delay between pressing a key and opening which-key (milliseconds) -- this setting is independent of vim.o.timeoutlen - delay = 500, + delay = 250, icons = { -- set icon mappings to true if you have a Nerd Font mappings = vim.g.have_nerd_font, @@ -283,13 +271,6 @@ require('lazy').setup({ }, }, - -- NOTE: Plugins can specify dependencies. - -- - -- The dependencies are proper plugin specifications as well - anything - -- you do for a plugin at the top level, you can do for a dependency. - -- - -- Use the `dependencies` key to specify the dependencies of a particular plugin - { -- Fuzzy Finder (files, lsp, etc) 'nvim-telescope/telescope.nvim', event = 'VimEnter', @@ -335,22 +316,17 @@ require('lazy').setup({ -- [[ Configure Telescope ]] -- See `:help telescope` and `:help telescope.setup()` - require('telescope').setup { - -- You can put your default mappings / updates / etc. in here - -- All the info you're looking for is in `:help telescope.setup()` - -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, - -- pickers = {} + local overrides = opt_require 'local.overrides' or {} + local opts = { extensions = { ['ui-select'] = { require('telescope.themes').get_dropdown(), }, }, } + opts = vim.tbl_deep_extend('force', {}, opts, (overrides.telescope or {}).opts or {}) + + require('telescope').setup(opts) -- Enable Telescope extensions if they are installed pcall(require('telescope').load_extension, 'fzf') @@ -358,7 +334,9 @@ require('lazy').setup({ -- See `:help telescope.builtin` local builtin = require 'telescope.builtin' - vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) + vim.keymap.set('n', 'sh', function() + builtin.find_files { hidden = true } + end, { desc = '[S]earch [H]idden Files' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) @@ -389,7 +367,7 @@ require('lazy').setup({ -- Shortcut for searching your Neovim configuration files vim.keymap.set('n', 'sn', function() - builtin.find_files { cwd = vim.fn.stdpath 'config' } + builtin.find_files { cwd = vim.fn.stdpath 'config', hidden = true, no_ignore = true } end, { desc = '[S]earch [N]eovim files' }) end, }, @@ -413,10 +391,7 @@ require('lazy').setup({ dependencies = { -- Automatically install LSPs and related tools to stdpath for Neovim -- Mason must be loaded before its dependents so we need to set it up here. - -- NOTE: `opts = {}` is the same as calling `require('mason').setup({})` { 'mason-org/mason.nvim', opts = {} }, - 'mason-org/mason-lspconfig.nvim', - 'WhoIsSethDaniel/mason-tool-installer.nvim', -- Useful status updates for LSP. { 'j-hui/fidget.nvim', opts = {} }, @@ -425,43 +400,9 @@ require('lazy').setup({ 'saghen/blink.cmp', }, config = function() - -- Brief aside: **What is LSP?** - -- - -- LSP is an initialism you've probably heard, but might not understand what it is. - -- - -- LSP stands for Language Server Protocol. It's a protocol that helps editors - -- and language tooling communicate in a standardized fashion. - -- - -- In general, you have a "server" which is some tool built to understand a particular - -- language (such as `gopls`, `lua_ls`, `rust_analyzer`, etc.). These Language Servers - -- (sometimes called LSP servers, but that's kind of like ATM Machine) are standalone - -- processes that communicate with some "client" - in this case, Neovim! - -- - -- LSP provides Neovim with features like: - -- - Go to definition - -- - Find references - -- - Autocompletion - -- - Symbol Search - -- - and more! - -- - -- Thus, Language Servers are external tools that must be installed separately from - -- Neovim. This is where `mason` and related plugins come into play. - -- - -- If you're wondering about lsp vs treesitter, you can check out the wonderfully - -- and elegantly composed help section, `:help lsp-vs-treesitter` - - -- This function gets run when an LSP attaches to a particular buffer. - -- That is to say, every time a new file is opened that is associated with - -- an lsp (for example, opening `main.rs` is associated with `rust_analyzer`) this - -- function will be executed to configure the current buffer vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), callback = function(event) - -- NOTE: Remember that Lua is a real programming language, and as such it is possible - -- to define small helper and utility functions so you don't have to repeat yourself. - -- - -- In this case, we create a function that lets us more easily define mappings specific - -- for LSP related items. It sets the mode, buffer and description for us each time. local map = function(keys, func, desc, mode) mode = mode or 'n' vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) @@ -469,27 +410,27 @@ require('lazy').setup({ -- Rename the variable under your cursor. -- Most Language Servers support renaming across files, etc. - map('grn', vim.lsp.buf.rename, '[R]e[n]ame') + map('gn', vim.lsp.buf.rename, '[R]e[n]ame') -- Execute a code action, usually your cursor needs to be on top of an error -- or a suggestion from your LSP for this to activate. - map('gra', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) + map('ga', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) -- Find references for the word under your cursor. - map('grr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') -- Jump to the implementation of the word under your cursor. -- Useful when your language has ways of declaring types without an actual implementation. - map('gri', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + map('gi', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') -- Jump to the definition of the word under your cursor. -- This is where a variable was first declared, or where a function is defined, etc. -- To jump back, press . - map('grd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') - -- WARN: This is not Goto Definition, this is Goto Declaration. + -- This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. - map('grD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') + map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') -- Fuzzy find all the symbols in your current document. -- Symbols are things like variables, functions, types, etc. @@ -502,7 +443,7 @@ require('lazy').setup({ -- Jump to the type of the word under your cursor. -- Useful when you're not sure what type a variable is and you want to see -- the definition of its *type*, not where it was *defined*. - map('grt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition') + map('gt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition') -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) ---@param client vim.lsp.Client @@ -594,77 +535,31 @@ require('lazy').setup({ local capabilities = require('blink.cmp').get_lsp_capabilities() -- 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. Available keys are: - -- - cmd (table): Override the default command used to start the server - -- - filetypes (table): Override the default list of associated filetypes for the server - -- - capabilities (table): Override fields in capabilities. Can be used to disable certain LSP features. - -- - settings (table): Override the default settings passed when initializing the server. - -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { - -- clangd = {}, - -- gopls = {}, - -- pyright = {}, - -- rust_analyzer = {}, - -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs - -- - -- Some languages (like typescript) have entire language plugins that can be useful: - -- https://github.com/pmizio/typescript-tools.nvim - -- - -- But for many setups, the LSP (`ts_ls`) will work just fine - -- ts_ls = {}, - -- - + pyright = {}, + rust_analyzer = { + cmd = { 'rustup', 'run', 'stable', 'rust-analyzer' }, + }, lua_ls = { - -- cmd = { ... }, - -- filetypes = { ... }, - -- capabilities = {}, settings = { Lua = { completion = { callSnippet = 'Replace', }, - -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, }, }, }, } - -- Ensure the servers and tools above are installed - -- - -- To check the current status of installed tools and/or manually install - -- other tools, you can run - -- :Mason - -- - -- You can press `g?` for help in this menu. - -- - -- `mason` had to be setup earlier: to configure its options see the - -- `dependencies` table for `nvim-lspconfig` above. - -- - -- You can add other tools here that you want Mason to install - -- for you, so that they are available from within Neovim. - local ensure_installed = vim.tbl_keys(servers or {}) - vim.list_extend(ensure_installed, { - 'stylua', -- Used to format Lua code - }) - require('mason-tool-installer').setup { ensure_installed = ensure_installed } - - require('mason-lspconfig').setup { - ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) - automatic_installation = false, - handlers = { - function(server_name) - local server = servers[server_name] or {} - -- This handles overriding only values explicitly passed - -- by the server configuration above. Useful when disabling - -- certain features of an LSP (for example, turning off formatting for ts_ls) - server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) - require('lspconfig')[server_name].setup(server) - end, - }, - } + local servers_overrides = (opt_require 'local.overrides' or {}).lsp + servers = vim.tbl_deep_extend('force', {}, servers, servers_overrides or {}) + + -- Set up and enable servers. + for server_name, server_config in pairs(servers) do + server_config.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server_config.capabilities or {}) + vim.lsp.config(server_name, server_config) + vim.lsp.enable(server_name) + end end, }, @@ -700,6 +595,7 @@ require('lazy').setup({ end, formatters_by_ft = { lua = { 'stylua' }, + rust = { 'rustfmt' }, -- Conform can also run multiple formatters sequentially -- python = { "isort", "black" }, -- @@ -801,85 +697,34 @@ require('lazy').setup({ -- the rust implementation via `'prefer_rust_with_warning'` -- -- See :h blink-cmp-config-fuzzy for more information - fuzzy = { implementation = 'rust' }, + fuzzy = { implementation = 'prefer_rust_with_warning' }, -- Shows a signature help window while you type arguments for a function signature = { enabled = true }, }, }, - - { -- You can easily change to a different colorscheme. - -- Change the name of the colorscheme plugin below, and then - -- change the command in the config to whatever the name of that colorscheme is. - -- - -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. + { 'catppuccin/nvim', - priority = 1000, -- Make sure to load this before all the other start plugins. + name = 'catppuccin', + priority = 1000, config = function() - ---@diagnostic disable-next-line: missing-fields require('catppuccin').setup { - flavour = 'auto', -- latte, frappe, macchiato, mocha - background = { -- :h background - light = 'latte', - dark = 'mocha', - }, - transparent_background = false, -- disables setting the background color. float = { - transparent = false, -- enable transparent floating windows - solid = false, -- use solid styling for floating windows, see |winborder| - }, - show_end_of_buffer = false, -- shows the '~' characters after the end of buffers - term_colors = false, -- sets terminal colors (e.g. `g:terminal_color_0`) - dim_inactive = { - enabled = false, -- dims the background color of inactive window - shade = 'dark', - percentage = 0.15, -- percentage of the shade to apply to the inactive window - }, - no_italic = false, -- Force no italic - no_bold = false, -- Force no bold - no_underline = false, -- Force no underline - styles = { -- Handles the styles of general hi groups (see `:h highlight-args`): - comments = { 'italic' }, -- Change the style of comments - conditionals = { 'italic' }, - loops = {}, - functions = {}, - keywords = {}, - strings = {}, - variables = {}, - numbers = {}, - booleans = {}, - properties = {}, - types = {}, - operators = {}, - -- miscs = {}, -- Uncomment to turn off hard-coded styles - }, - color_overrides = {}, - custom_highlights = {}, - default_integrations = true, - auto_integrations = false, - integrations = { - cmp = true, - gitsigns = true, - nvimtree = true, - treesitter = true, - notify = false, - mini = { - enabled = true, - indentscope_color = '', - }, - -- For more plugins integrations please scroll down (https://github.com/catppuccin/nvim#integrations) + transparent = false, + solid = false, }, + auto_integrations = true, } - - -- Load the colorscheme here. - -- Like many other themes, this one has different styles, and you could load - -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. - vim.cmd.colorscheme 'catppuccin' + vim.cmd.colorscheme 'catppuccin-mocha' end, }, - -- Highlight todo, notes, etc in comments - { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, + { + 'folke/todo-comments.nvim', + event = 'VimEnter', + dependencies = { 'nvim-lua/plenary.nvim' }, + opts = { signs = false }, + }, { -- Collection of various small independent plugins/modules 'echasnovski/mini.nvim', @@ -921,50 +766,40 @@ require('lazy').setup({ { -- Highlight, edit, and navigate code 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', - main = 'nvim-treesitter.configs', -- Sets main module to use for opts - -- [[ Configure Treesitter ]] See `:help nvim-treesitter` - opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, - -- Autoinstall languages that are not installed - auto_install = true, - highlight = { - enable = true, - -- Some languages depend on vim's regex highlighting system (such as Ruby) for indent rules. - -- If you are experiencing weird indenting issues, add the language to - -- the list of additional_vim_regex_highlighting and disabled languages for indent. - additional_vim_regex_highlighting = { 'ruby' }, - }, - indent = { enable = true, disable = { 'ruby' } }, - }, + lazy = false, -- There are additional nvim-treesitter modules that you can use to interact -- with nvim-treesitter. You should go explore a few and see what interests you: -- -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects + config = function() + -- Auto start treesitter if a parser is available. + vim.api.nvim_create_autocmd('FileType', { + callback = function(args) + local ft = vim.bo[args.buf].filetype + -- TODO: add a file type to lang mapper here + local lang = ft + + -- Only start if a parser exists + if vim.treesitter.language.get_lang(lang) then + pcall(vim.treesitter.start, args.buf, lang) + end + end, + }) + end, }, - -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the - -- init.lua. If you want these files, they are in the repository, so you can just download them and - -- place them in the correct locations. - - -- NOTE: Next step on your Neovim journey: Add/Configure additional plugins for Kickstart - -- - -- Here are some example plugins that I've included in the Kickstart repository. - -- Uncomment any of the lines below to enable them (you will need to restart nvim). - -- - -- require 'kickstart.plugins.debug', - -- require 'kickstart.plugins.indent_line', - -- require 'kickstart.plugins.lint', - require 'kickstart.plugins.autopairs', require 'kickstart.plugins.neo-tree', require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps + require 'kickstart.plugins.autopairs', -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` -- This is the easiest way to modularize your config. -- -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. { import = 'custom.plugins' }, + { import = 'local.plugins' }, -- -- For additional information with loading, sourcing and examples see `:help lazy.nvim-๐Ÿ”Œ-plugin-spec` -- Or use telescope! @@ -992,5 +827,7 @@ require('lazy').setup({ }, }) +pcall(require, 'local.posthook') + -- 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 index 38ff59d6c75..8a5c906e889 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,29 +1,26 @@ { "LuaSnip": { "branch": "master", "commit": "458560534a73f7f8d7a11a146c801db00b081df0" }, - "blink.cmp": { "branch": "main", "commit": "bae4bae0eedd1fa55f34b685862e94a222d5c6f8" }, - "conform.nvim": { "branch": "master", "commit": "b4aab989db276993ea5dcb78872be494ce546521" }, - "fidget.nvim": { "branch": "main", "commit": "4d5858bd4c471c895060e1b9f3575f1551184dc5" }, - "gitsigns.nvim": { "branch": "main", "commit": "6e3c66548035e50db7bd8e360a29aec6620c3641" }, + "blink.cmp": { "branch": "main", "commit": "b19413d214068f316c78978b08264ed1c41830ec" }, + "catppuccin": { "branch": "main", "commit": "0a5de4da015a175f416d6ef1eda84661623e0500" }, + "conform.nvim": { "branch": "master", "commit": "16d35530db66ca64f81cb1a13a42afe5962edf34" }, + "fidget.nvim": { "branch": "main", "commit": "e32b672d8fd343f9d6a76944fedb8c61d7d8111a" }, + "gitsigns.nvim": { "branch": "main", "commit": "5813e4878748805f1518cee7abb50fd7205a3a48" }, "guess-indent.nvim": { "branch": "main", "commit": "84a4987ff36798c2fc1169cbaff67960aed9776f" }, - "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, - "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "5e085efe67fccb13372d54331d849219662a7e93" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "517ef5994ef9d6b738322664d5fdd948f0fdeb46" }, - "mason.nvim": { "branch": "main", "commit": "7dc4facca9702f95353d5a1f87daf23d78e31c2a" }, - "mini.nvim": { "branch": "main", "commit": "ddb70da6ec6aa896cfde87350d1e8dffb57ddef0" }, - "neo-tree.nvim": { "branch": "main", "commit": "f1deac7ecec88c28a250d890ba7bb35843e69cbd" }, + "lazy.nvim": { "branch": "main", "commit": "85c7ff3711b730b4030d03144f6db6375044ae82" }, + "lazydev.nvim": { "branch": "main", "commit": "5231c62aa83c2f8dc8e7ba957aa77098cda1257d" }, + "mason.nvim": { "branch": "main", "commit": "57e5a8addb8c71fb063ee4acda466c7cf6ad2800" }, + "mini.nvim": { "branch": "main", "commit": "6bd3a01aaf7d248aea1b78aacdd5d44bffa002c1" }, + "neo-tree.nvim": { "branch": "main", "commit": "f3df514fff2bdd4318127c40470984137f87b62e" }, "nui.nvim": { "branch": "main", "commit": "de740991c12411b663994b2860f1a4fd0937c130" }, - "nvim": { "branch": "main", "commit": "30fa4d122d9b22ad8b2e0ab1b533c8c26c4dde86" }, - "nvim-autopairs": { "branch": "master", "commit": "23320e75953ac82e559c610bec5a90d9c6dfa743" }, - "nvim-lspconfig": { "branch": "master", "commit": "cb4765526f7201ce4ff0c49888f80c18da614e68" }, + "nvim-autopairs": { "branch": "master", "commit": "d9e44e54384e5b0f3536339c65484f2e41b528e3" }, + "nvim-lspconfig": { "branch": "master", "commit": "0044d0987ef7e624d04141d0f90d0481fd3c3663" }, "nvim-treesitter": { "branch": "master", "commit": "42fc28ba918343ebfd5565147a42a26580579482" }, - "nvim-web-devicons": { "branch": "master", "commit": "f66cdfef5e84112045b9ebc3119fee9bddb3c687" }, + "nvim-web-devicons": { "branch": "master", "commit": "8dcb311b0c92d460fac00eac706abd43d94d68af" }, "plenary.nvim": { "branch": "master", "commit": "b9fd5226c2f76c951fc8ed5923d85e4de065e509" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "6fea601bd2b694c6f2ae08a6c6fab14930c60e2c" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, - "telescope.nvim": { "branch": "master", "commit": "b4da76be54691e854d3e0e02c36b0245f945c2c7" }, - "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "telescope.nvim": { "branch": "master", "commit": "e69b434b968a33815e2f02a5c7bd7b8dd4c7d4b2" }, + "todo-comments.nvim": { "branch": "main", "commit": "31e3c38ce9b29781e4422fc0322eb0a21f4e8668" }, "toggleterm.nvim": { "branch": "main", "commit": "50ea089fc548917cc3cc16b46a8211833b9e3c7c" }, - "vimtex": { "branch": "master", "commit": "6e1229e23c3bbe93487ef62458b1241a2d8ff6af" }, - "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } + "which-key.nvim": { "branch": "main", "commit": "3aab2147e74890957785941f0c1ad87d0a44c15a" } } diff --git a/lua/clipboard.lua b/lua/clipboard.lua new file mode 100644 index 00000000000..6625a102d91 --- /dev/null +++ b/lua/clipboard.lua @@ -0,0 +1,39 @@ +-- clipboard.lua +-- Sync clipboard between OS and Neovim. +-- Schedule the setting after `UiEnter` because it can increase startup-time. +if vim.env.SSH_CONNECTION ~= nil or vim.env.SSH_CLIENT ~= nil or vim.env.SSH_TTY ~= nil then + -- If running nvim over an ssh connection, try syncing the clipboard via OSC52. + if vim.env.ZELLIJ == nil then + -- If running outside of ZELLIJ, use OSC52 for both copy and paste. + vim.schedule(function() + vim.o.clipboard = 'unnamedplus' + vim.g.clipboard = 'osc52' + end) + else + -- If running over SSH *and* inside of zellij, use OSC52 only for copy. + vim.schedule(function() + vim.o.clipboard = 'unnamedplus' + vim.g.clipboard = { + name = 'OSC 52', + copy = { + ['+'] = require('vim.ui.clipboard.osc52').copy '+', + ['*'] = require('vim.ui.clipboard.osc52').copy '*', + }, + paste = { + ['+'] = function() + return vim.split(vim.fn.getreg '', '\n'), vim.fn.getregtype '' + end, + ['*'] = function() + return vim.split(vim.fn.getreg '', '\n'), vim.fn.getregtype '' + end, + }, + } + end) + end +else + -- If running on the host machine, try to sync the system clipboard using the system clipboard provider. + -- Schedule the setting after `UiEnter` because it can increase startup-time. + vim.schedule(function() + vim.o.clipboard = 'unnamedplus' + end) +end diff --git a/lua/custom/plugins/claudecode.lua b/lua/custom/plugins/claudecode.lua deleted file mode 100644 index 9948796842b..00000000000 --- a/lua/custom/plugins/claudecode.lua +++ /dev/null @@ -1,24 +0,0 @@ -return { - 'coder/claudecode.nvim', - dependencies = { 'folke/snacks.nvim' }, - config = true, - keys = { - { 'a', nil, desc = 'AI/Claude Code' }, - { 'ac', 'ClaudeCode', desc = 'Toggle Claude' }, - { 'af', 'ClaudeCodeFocus', desc = 'Focus Claude' }, - { 'ar', 'ClaudeCode --resume', desc = 'Resume Claude' }, - { 'aC', 'ClaudeCode --continue', desc = 'Continue Claude' }, - { 'am', 'ClaudeCodeSelectModel', desc = 'Select Claude model' }, - { 'ab', 'ClaudeCodeAdd %', desc = 'Add current buffer' }, - { 'as', 'ClaudeCodeSend', mode = 'v', desc = 'Send to Claude' }, - { - 'as', - 'ClaudeCodeTreeAdd', - desc = 'Add file', - ft = { 'NvimTree', 'neo-tree', 'oil', 'minifiles', 'netrw' }, - }, - -- Diff management - { 'aa', 'ClaudeCodeDiffAccept', desc = 'Accept diff' }, - { 'ad', 'ClaudeCodeDiffDeny', desc = 'Deny diff' }, - }, -} diff --git a/lua/custom/plugins/toggleterm.lua b/lua/custom/plugins/toggleterm.lua index d15401fe628..1242bd87a87 100644 --- a/lua/custom/plugins/toggleterm.lua +++ b/lua/custom/plugins/toggleterm.lua @@ -1,44 +1,59 @@ return { 'akinsho/toggleterm.nvim', version = '*', - config = function() - require('toggleterm').setup { - size = function(term) - if term.direction == 'horizontal' then - return 15 - elseif term.direction == 'vertical' then - return vim.o.columns * 0.4 - end + opts = { + -- size can be a number or function which is passed the current terminal + size = function(term) + if term.direction == 'horizontal' then + return 15 + elseif term.direction == 'vertical' then + return vim.o.columns * 0.4 + end + end, + open_mapping = [[]], -- or { [[]], [[]] } if you also use a Japanese keyboard. + hide_numbers = true, -- hide the number column in toggleterm buffers + shade_filetypes = {}, + autochdir = false, -- when neovim changes it current directory the terminal will change it's own when next it's opened + shade_terminals = true, -- NOTE: this option takes priority over highlights specified so if you specify Normal highlights you should set this to false + start_in_insert = true, + insert_mappings = true, -- whether or not the open mapping applies in insert mode + terminal_mappings = true, -- whether or not the open mapping applies in the opened terminals + persist_size = true, + persist_mode = true, -- if set to true (default) the previous terminal mode will be remembered + direction = 'float', + close_on_exit = true, -- close the terminal window when the process exits + clear_env = false, -- use only environmental variables from `env`, passed to jobstart() + -- Change the default shell. Can be a string or a function returning a string + shell = function() + if vim.fn.executable 'zsh' == 1 then + return 'zsh' + else + return 'bash' + end + end, + auto_scroll = true, -- automatically scroll to the bottom on terminal output + -- This field is only relevant if direction is set to 'float' + float_opts = { + -- The border key is *almost* the same as 'nvim_open_win' + -- see :h nvim_open_win for details on borders however + -- the 'curved' border is a custom border type + -- not natively supported but implemented in this plugin. + border = 'single', + -- like `size`, width, height, row, and col can be a number or function which is passed the current terminal + winblend = 0, + title_pos = 'left', + }, + winbar = { + enabled = false, + name_formatter = function(term) -- term: Terminal + return term.name end, - open_mapping = [[]], - hide_numbers = true, - shade_filetypes = {}, - autochdir = false, - shade_terminals = true, - start_in_insert = true, - insert_mappings = true, - terminal_mappings = true, - persist_size = true, - persist_mode = true, - direction = 'horizontal', - close_on_exit = true, - clear_env = false, - shell = 'zsh', - auto_scroll = true, - float_opts = { - border = 'single', - winblend = 0, - title_pos = 'left', - }, - winbar = { - enabled = false, - name_formatter = function(term) - return term.name - end, - }, - responsiveness = { - horizontal_breakpoint = 135, - }, - } - end, + }, + responsiveness = { + -- breakpoint in terms of `vim.o.columns` at which terminals will start to stack on top of each other + -- instead of next to each other + -- default = 0 which means the feature is turned off + horizontal_breakpoint = 135, + }, + }, } diff --git a/lua/custom/plugins/vimtex.lua b/lua/custom/plugins/vimtex.lua deleted file mode 100644 index 2e1359c9136..00000000000 --- a/lua/custom/plugins/vimtex.lua +++ /dev/null @@ -1,8 +0,0 @@ -return { - 'lervag/vimtex', - config = function() - vim.g.vimtex_view_method = 'zathura' - vim.g.vimtex_compiler_method = 'latexmk' - vim.g.vimtex_quickfix_mode = 0 - end, -} diff --git a/lua/kickstart/plugins/gitsigns.lua b/lua/kickstart/plugins/gitsigns.lua index cbbd22d24fc..73f0b7dbbab 100644 --- a/lua/kickstart/plugins/gitsigns.lua +++ b/lua/kickstart/plugins/gitsigns.lua @@ -47,14 +47,15 @@ return { map('n', 'hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) map('n', 'hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) map('n', 'hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) + map('n', 'hP', gitsigns.preview_hunk_inline, { desc = 'git [P]review hunk inline' }) map('n', 'hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) + map('n', 'hB', gitsigns.blame, { desc = 'git [B]lame file' }) map('n', 'hd', gitsigns.diffthis, { desc = 'git [d]iff against index' }) map('n', 'hD', function() gitsigns.diffthis '@' end, { desc = 'git [D]iff against last commit' }) -- Toggles map('n', 'tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) - map('n', 'tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' }) end, }, }, diff --git a/lua/local/README.md b/lua/local/README.md new file mode 100644 index 00000000000..188e114dfe7 --- /dev/null +++ b/lua/local/README.md @@ -0,0 +1,29 @@ +# Local Overrides + +Placing lua files in this folder gives you the power to provide overrides at various points during initialization. Files in this directory are not checked into source control, so feel free to include machine-specific configurations. + +## Local Plugins +Similar to `lua/custom`, you can add plugins under the `plugins` folder. + +## Override Default Plugin Options +To override plugin options (like telescope and lsp), create `overrides.lua` with a table of the settings you'd like to change. These will be merged during plugin initialization. For example +```lua +return { + telescope = { + opts = { + pickers = { + lsp_document_symbols = { + symbol_width = 40, + }, + }, + }, + }, + lsp = {}, +} +``` + +## Before init.lua +The file `prehook.lua` will be loaded and run before anything in `init.lua`. Here you can set various vim options or register callback functions. + +## After init.lua +The file `posthook.lua` will be loaded as the last step in `init.lua`, allowing you to override any of the default configuration in `init.lua`. diff --git a/lua/local/plugins/init.lua b/lua/local/plugins/init.lua new file mode 100644 index 00000000000..a564707544f --- /dev/null +++ b/lua/local/plugins/init.lua @@ -0,0 +1 @@ +return {} From 14a22f5b348e1b05d19f3bf05a56ea80730fcb10 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Mon, 16 Feb 2026 17:09:31 -0500 Subject: [PATCH 17/18] removing jk bind --- init.lua | 1415 +++++++++++++++++++++++++++--------------------------- 1 file changed, 712 insertions(+), 703 deletions(-) diff --git a/init.lua b/init.lua index 5e782eebe87..2ec18c93b55 100644 --- a/init.lua +++ b/init.lua @@ -1,9 +1,9 @@ -pcall(require, 'local.prehook') +pcall(require, "local.prehook") -- Set as the leader key -- See `:help mapleader` -vim.g.mapleader = ' ' -vim.g.maplocalleader = ' ' +vim.g.mapleader = " " +vim.g.maplocalleader = " " -- Set to true if you have a Nerd Font installed and selected in the terminal. vim.g.have_nerd_font = true @@ -15,12 +15,12 @@ vim.o.number = true vim.o.relativenumber = true -- Enable mouse mode -vim.o.mouse = 'a' +vim.o.mouse = "a" -- Don't show the mode, since it's already in the status line. vim.o.showmode = false -require 'clipboard' +require("clipboard") vim.o.breakindent = true @@ -29,7 +29,7 @@ vim.o.undofile = true vim.o.ignorecase = true vim.o.smartcase = true -vim.o.signcolumn = 'yes' +vim.o.signcolumn = "yes" vim.o.updatetime = 250 -- Decrease mapped sequence wait time @@ -48,10 +48,10 @@ vim.o.splitbelow = true -- See `:help lua-options` -- and `:help lua-options-guide` vim.o.list = true -vim.opt.listchars = { tab = 'ยป ', trail = 'ยท', nbsp = 'โฃ' } +vim.opt.listchars = { tab = "ยป ", trail = "ยท", nbsp = "โฃ" } -- Preview substitutions live, as you type! -vim.o.inccommand = 'split' +vim.o.inccommand = "split" -- Show which line your cursor is on vim.o.cursorline = true @@ -65,7 +65,7 @@ vim.o.scrolloff = 10 vim.o.confirm = true -- Make all floating windows have a border. -vim.o.winborder = 'rounded' +vim.o.winborder = "rounded" -- Make the command status bar only appear when necessary. vim.o.cmdheight = 0 @@ -75,10 +75,10 @@ vim.o.cmdheight = 0 -- Clear highlights on search when pressing in normal mode. -- See `:help hlsearch` -vim.keymap.set('n', '', 'nohlsearch') +vim.keymap.set("n", "", "nohlsearch") -- Diagnostic keymaps -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) +vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Open diagnostic [Q]uickfix list" }) -- Exit terminal mode in the builtin terminal with a shortcut that is a bit easier -- for people to discover. Otherwise, you normally need to press , which @@ -86,7 +86,7 @@ vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagn -- -- NOTE: This won't work in all terminal emulators/tmux/etc. Try your own mapping -- or just use to exit terminal mode -vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' }) +vim.keymap.set("t", "", "", { desc = "Exit terminal mode" }) -- TIP: Disable arrow keys in normal mode -- vim.keymap.set('n', '', 'echo "Use h to move!!"') @@ -98,20 +98,17 @@ vim.keymap.set('t', '', '', { desc = 'Exit terminal mode' } -- Use CTRL+ to switch between windows -- -- See `:help wincmd` for a list of all window commands -vim.keymap.set('n', '', '', { desc = 'Move focus to the left window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the right window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) -vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) - --- Exit insert mode easier -vim.keymap.set('i', 'jk', '', { desc = 'Exits insert mode' }) +vim.keymap.set("n", "", "", { desc = "Move focus to the left window" }) +vim.keymap.set("n", "", "", { desc = "Move focus to the right window" }) +vim.keymap.set("n", "", "", { desc = "Move focus to the lower window" }) +vim.keymap.set("n", "", "", { desc = "Move focus to the upper window" }) -- Keep cursor centered when navigating by half pages. -vim.keymap.set('n', '', 'zz', { desc = 'Move down by half a page and center the cursor' }) -vim.keymap.set('n', '', 'zz', { desc = 'Move down by half a page and center the cursor' }) +vim.keymap.set("n", "", "zz", { desc = "Move down by half a page and center the cursor" }) +vim.keymap.set("n", "", "zz", { desc = "Move down by half a page and center the cursor" }) -- Add the ability to paste over text without clobbering the paste register. -vim.keymap.set('x', 'p', '"_dP') +vim.keymap.set("x", "p", '"_dP') -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -119,30 +116,30 @@ vim.keymap.set('x', 'p', '"_dP') -- Highlight when yanking (copying) text -- Try it with `yap` in normal mode -- See `:help vim.hl.on_yank()` -vim.api.nvim_create_autocmd('TextYankPost', { - desc = 'Highlight when yanking (copying) text', - group = vim.api.nvim_create_augroup('kickstart-highlight-yank', { clear = true }), - callback = function() - vim.hl.on_yank() - end, +vim.api.nvim_create_autocmd("TextYankPost", { + desc = "Highlight when yanking (copying) text", + group = vim.api.nvim_create_augroup("kickstart-highlight-yank", { clear = true }), + callback = function() + vim.hl.on_yank() + end, }) local function opt_require(name) - local ok, mod = pcall(require, name) - if ok then - return mod - end + local ok, mod = pcall(require, name) + if ok then + return mod + end end -- [[ Install `lazy.nvim` plugin manager ]] -- See `:help lazy.nvim.txt` or https://github.com/folke/lazy.nvim for more info -local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' +local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepo = 'https://github.com/folke/lazy.nvim.git' - local out = vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath } - if vim.v.shell_error ~= 0 then - error('Error cloning lazy.nvim:\n' .. out) - end + local lazyrepo = "https://github.com/folke/lazy.nvim.git" + local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) + if vim.v.shell_error ~= 0 then + error("Error cloning lazy.nvim:\n" .. out) + end end ---@type vim.Option @@ -160,674 +157,686 @@ rtp:prepend(lazypath) -- :Lazy update -- -- NOTE: Here is where you install your plugins. -require('lazy').setup({ - -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). - { - 'NMAC427/guess-indent.nvim', -- Detect tabstop and shiftwidth automatically, - config = function() - require('guess-indent').setup {} - end, - }, - - -- NOTE: Plugins can also be added by using a table, - -- with the first argument being the link and the following - -- keys can be used to configure plugin behavior/loading/etc. - -- - -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. - -- - - -- Alternatively, use `config = function() ... end` for full control over the configuration. - -- If you prefer to call `setup` explicitly, use: - -- { - -- 'lewis6991/gitsigns.nvim', - -- config = function() - -- require('gitsigns').setup({ - -- -- Your gitsigns configuration here - -- }) - -- end, - -- } - -- - -- Here is a more advanced example where we pass configuration - -- options to `gitsigns.nvim`. - -- - -- See `:help gitsigns` to understand what the configuration keys do - { -- 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 = '~' }, - }, - }, - }, - - -- NOTE: Plugins can also be configured to run Lua code when they are loaded. - -- - -- This is often very useful to both group configuration, as well as handle - -- lazy loading plugins that don't need to be loaded immediately at startup. - -- - -- For example, in the following configuration, we use: - -- event = 'VimEnter' - -- - -- which loads which-key before all the UI elements are loaded. Events can be - -- normal autocommands events (`:help autocmd-events`). - -- - -- Then, because we use the `opts` key (recommended), the configuration runs - -- after the plugin has been loaded as `require(MODULE).setup(opts)`. - - { -- Useful plugin to show you pending keybinds. - 'folke/which-key.nvim', - event = 'VimEnter', -- Sets the loading event to 'VimEnter' - opts = { - -- delay between pressing a key and opening which-key (milliseconds) - -- this setting is independent of vim.o.timeoutlen - delay = 250, - icons = { - -- set icon mappings to true if you have a Nerd Font - mappings = vim.g.have_nerd_font, - -- If you are using a Nerd Font: set icons.keys to an empty table which will use the - -- default which-key.nvim defined Nerd Font icons, otherwise define a string table - keys = vim.g.have_nerd_font and {} or { - Up = ' ', - Down = ' ', - Left = ' ', - Right = ' ', - C = ' ', - M = ' ', - D = ' ', - S = ' ', - CR = ' ', - Esc = ' ', - ScrollWheelDown = ' ', - ScrollWheelUp = ' ', - NL = ' ', - BS = ' ', - Space = ' ', - Tab = ' ', - F1 = '', - F2 = '', - F3 = '', - F4 = '', - F5 = '', - F6 = '', - F7 = '', - F8 = '', - F9 = '', - F10 = '', - F11 = '', - F12 = '', - }, - }, - - -- Document existing key chains - spec = { - { 's', group = '[S]earch' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, - }, - }, - }, - - { -- Fuzzy Finder (files, lsp, etc) - 'nvim-telescope/telescope.nvim', - event = 'VimEnter', - dependencies = { - 'nvim-lua/plenary.nvim', - { -- If encountering errors, see telescope-fzf-native README for installation instructions - 'nvim-telescope/telescope-fzf-native.nvim', - - -- `build` is used to run some command when the plugin is installed/updated. - -- This is only run then, not every time Neovim starts up. - build = 'make', - - -- `cond` is a condition used to determine whether this plugin should be - -- installed and loaded. - cond = function() - return vim.fn.executable 'make' == 1 - end, - }, - { 'nvim-telescope/telescope-ui-select.nvim' }, - - -- Useful for getting pretty icons, but requires a Nerd Font. - { 'nvim-tree/nvim-web-devicons', enabled = vim.g.have_nerd_font }, - }, - config = function() - -- Telescope is a fuzzy finder that comes with a lot of different things that - -- it can fuzzy find! It's more than just a "file finder", it can search - -- many different aspects of Neovim, your workspace, LSP, and more! - -- - -- The easiest way to use Telescope, is to start by doing something like: - -- :Telescope help_tags - -- - -- After running this command, a window will open up and you're able to - -- type in the prompt window. You'll see a list of `help_tags` options and - -- a corresponding preview of the help. - -- - -- Two important keymaps to use while in Telescope are: - -- - Insert mode: - -- - Normal mode: ? - -- - -- This opens a window that shows you all of the keymaps for the current - -- Telescope picker. This is really useful to discover what Telescope can - -- do as well as how to actually do it! - - -- [[ Configure Telescope ]] - -- See `:help telescope` and `:help telescope.setup()` - local overrides = opt_require 'local.overrides' or {} - local opts = { - extensions = { - ['ui-select'] = { - require('telescope.themes').get_dropdown(), - }, - }, - } - opts = vim.tbl_deep_extend('force', {}, opts, (overrides.telescope or {}).opts or {}) - - require('telescope').setup(opts) - - -- Enable Telescope extensions if they are installed - pcall(require('telescope').load_extension, 'fzf') - pcall(require('telescope').load_extension, 'ui-select') - - -- See `:help telescope.builtin` - local builtin = require 'telescope.builtin' - vim.keymap.set('n', 'sh', function() - builtin.find_files { hidden = true } - end, { desc = '[S]earch [H]idden Files' }) - vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) - vim.keymap.set('n', 'sf', builtin.find_files, { desc = '[S]earch [F]iles' }) - vim.keymap.set('n', 'ss', builtin.builtin, { desc = '[S]earch [S]elect Telescope' }) - vim.keymap.set('n', 'sw', builtin.grep_string, { desc = '[S]earch current [W]ord' }) - vim.keymap.set('n', 'sg', builtin.live_grep, { desc = '[S]earch by [G]rep' }) - vim.keymap.set('n', 'sd', builtin.diagnostics, { desc = '[S]earch [D]iagnostics' }) - vim.keymap.set('n', 'sr', builtin.resume, { desc = '[S]earch [R]esume' }) - vim.keymap.set('n', 's.', builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) - vim.keymap.set('n', '', builtin.buffers, { desc = '[ ] Find existing buffers' }) - - -- Slightly advanced example of overriding default behavior and theme - vim.keymap.set('n', '/', function() - -- You can pass additional configuration to Telescope to change the theme, layout, etc. - builtin.current_buffer_fuzzy_find(require('telescope.themes').get_dropdown { - winblend = 10, - previewer = false, - }) - end, { desc = '[/] Fuzzily search in current buffer' }) - - -- It's also possible to pass additional configuration options. - -- See `:help telescope.builtin.live_grep()` for information about particular keys - vim.keymap.set('n', 's/', function() - builtin.live_grep { - grep_open_files = true, - prompt_title = 'Live Grep in Open Files', - } - end, { desc = '[S]earch [/] in Open Files' }) - - -- Shortcut for searching your Neovim configuration files - vim.keymap.set('n', 'sn', function() - builtin.find_files { cwd = vim.fn.stdpath 'config', hidden = true, no_ignore = true } - end, { desc = '[S]earch [N]eovim files' }) - end, - }, - - -- LSP Plugins - { - -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins - -- used for completion, annotations and signatures of Neovim apis - 'folke/lazydev.nvim', - ft = 'lua', - opts = { - library = { - -- Load luvit types when the `vim.uv` word is found - { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, - }, - }, - }, - { - -- Main LSP Configuration - 'neovim/nvim-lspconfig', - dependencies = { - -- Automatically install LSPs and related tools to stdpath for Neovim - -- Mason must be loaded before its dependents so we need to set it up here. - { 'mason-org/mason.nvim', opts = {} }, - - -- Useful status updates for LSP. - { 'j-hui/fidget.nvim', opts = {} }, - - -- Allows extra capabilities provided by blink.cmp - 'saghen/blink.cmp', - }, - config = function() - vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('kickstart-lsp-attach', { clear = true }), - callback = function(event) - local map = function(keys, func, desc, mode) - mode = mode or 'n' - vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = 'LSP: ' .. desc }) - end - - -- Rename the variable under your cursor. - -- Most Language Servers support renaming across files, etc. - map('gn', vim.lsp.buf.rename, '[R]e[n]ame') - - -- Execute a code action, usually your cursor needs to be on top of an error - -- or a suggestion from your LSP for this to activate. - map('ga', vim.lsp.buf.code_action, '[G]oto Code [A]ction', { 'n', 'x' }) - - -- Find references for the word under your cursor. - map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') - - -- Jump to the implementation of the word under your cursor. - -- Useful when your language has ways of declaring types without an actual implementation. - map('gi', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') - - -- Jump to the definition of the word under your cursor. - -- This is where a variable was first declared, or where a function is defined, etc. - -- To jump back, press . - map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') - - -- This is not Goto Definition, this is Goto Declaration. - -- For example, in C this would take you to the header. - map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') - - -- Fuzzy find all the symbols in your current document. - -- Symbols are things like variables, functions, types, etc. - map('gO', require('telescope.builtin').lsp_document_symbols, 'Open Document Symbols') - - -- Fuzzy find all the symbols in your current workspace. - -- Similar to document symbols, except searches over your entire project. - map('gW', require('telescope.builtin').lsp_dynamic_workspace_symbols, 'Open Workspace Symbols') - - -- Jump to the type of the word under your cursor. - -- Useful when you're not sure what type a variable is and you want to see - -- the definition of its *type*, not where it was *defined*. - map('gt', require('telescope.builtin').lsp_type_definitions, '[G]oto [T]ype Definition') - - -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) - ---@param client vim.lsp.Client - ---@param method vim.lsp.protocol.Method - ---@param bufnr? integer some lsp support methods only in specific files - ---@return boolean - local function client_supports_method(client, method, bufnr) - if vim.fn.has 'nvim-0.11' == 1 then - return client:supports_method(method, bufnr) - else - return client.supports_method(method, { bufnr = bufnr }) - end - end - - -- The following two autocommands are used to highlight references of the - -- word under your cursor when your cursor rests there for a little while. - -- See `:help CursorHold` for information about when this is executed - -- - -- When you move your cursor, the highlights will be cleared (the second autocommand). - local client = vim.lsp.get_client_by_id(event.data.client_id) - if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_documentHighlight, event.buf) then - local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) - vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { - buffer = event.buf, - group = highlight_augroup, - callback = vim.lsp.buf.document_highlight, - }) - - vim.api.nvim_create_autocmd({ 'CursorMoved', 'CursorMovedI' }, { - buffer = event.buf, - group = highlight_augroup, - callback = vim.lsp.buf.clear_references, - }) - - vim.api.nvim_create_autocmd('LspDetach', { - group = vim.api.nvim_create_augroup('kickstart-lsp-detach', { clear = true }), - callback = function(event2) - vim.lsp.buf.clear_references() - vim.api.nvim_clear_autocmds { group = 'kickstart-lsp-highlight', buffer = event2.buf } - end, - }) - end - - -- The following code creates a keymap to toggle inlay hints in your - -- code, if the language server you are using supports them - -- - -- This may be unwanted, since they displace some of your code - if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then - map('th', function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) - end, '[T]oggle Inlay [H]ints') - end - end, - }) - - -- Diagnostic Config - -- See :help vim.diagnostic.Opts - vim.diagnostic.config { - severity_sort = true, - float = { border = 'rounded', source = 'if_many' }, - underline = { severity = vim.diagnostic.severity.ERROR }, - signs = vim.g.have_nerd_font and { - text = { - [vim.diagnostic.severity.ERROR] = '๓ฐ…š ', - [vim.diagnostic.severity.WARN] = '๓ฐ€ช ', - [vim.diagnostic.severity.INFO] = '๓ฐ‹ฝ ', - [vim.diagnostic.severity.HINT] = '๓ฐŒถ ', - }, - } or {}, - virtual_text = { - source = 'if_many', - spacing = 2, - format = function(diagnostic) - local diagnostic_message = { - [vim.diagnostic.severity.ERROR] = diagnostic.message, - [vim.diagnostic.severity.WARN] = diagnostic.message, - [vim.diagnostic.severity.INFO] = diagnostic.message, - [vim.diagnostic.severity.HINT] = diagnostic.message, - } - return diagnostic_message[diagnostic.severity] - end, - }, - } - - -- LSP servers and clients are able to communicate to each other what features they support. - -- By default, Neovim doesn't support everything that is in the LSP specification. - -- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities. - -- So, we create new capabilities with blink.cmp, and then broadcast that to the servers. - local capabilities = require('blink.cmp').get_lsp_capabilities() - - -- Enable the following language servers - local servers = { - pyright = {}, - rust_analyzer = { - cmd = { 'rustup', 'run', 'stable', 'rust-analyzer' }, - }, - lua_ls = { - settings = { - Lua = { - completion = { - callSnippet = 'Replace', - }, - }, - }, - }, - } - - local servers_overrides = (opt_require 'local.overrides' or {}).lsp - servers = vim.tbl_deep_extend('force', {}, servers, servers_overrides or {}) - - -- Set up and enable servers. - for server_name, server_config in pairs(servers) do - server_config.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server_config.capabilities or {}) - vim.lsp.config(server_name, server_config) - vim.lsp.enable(server_name) - end - end, - }, - - { -- Autoformat - 'stevearc/conform.nvim', - event = { 'BufWritePre' }, - cmd = { 'ConformInfo' }, - keys = { - { - 'f', - function() - require('conform').format { async = true, lsp_format = 'fallback' } - end, - mode = '', - desc = '[F]ormat buffer', - }, - }, - opts = { - notify_on_error = false, - format_on_save = function(bufnr) - -- Disable "format_on_save lsp_fallback" for languages that don't - -- have a well standardized coding style. You can add additional - -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } - if disable_filetypes[vim.bo[bufnr].filetype] then - return nil - else - return { - timeout_ms = 500, - lsp_format = 'fallback', - } - end - end, - formatters_by_ft = { - lua = { 'stylua' }, - rust = { 'rustfmt' }, - -- Conform can also run multiple formatters sequentially - -- python = { "isort", "black" }, - -- - -- You can use 'stop_after_first' to run the first available formatter from the list - -- javascript = { "prettierd", "prettier", stop_after_first = true }, - }, - }, - }, - - { -- Autocompletion - 'saghen/blink.cmp', - event = 'VimEnter', - version = '1.*', - dependencies = { - -- Snippet Engine - { - 'L3MON4D3/LuaSnip', - version = '2.*', - build = (function() - -- Build Step is needed for regex support in snippets. - -- This step is not supported in many windows environments. - -- Remove the below condition to re-enable on windows. - if vim.fn.has 'win32' == 1 or vim.fn.executable 'make' == 0 then - return - end - return 'make install_jsregexp' - end)(), - dependencies = { - -- `friendly-snippets` contains a variety of premade snippets. - -- See the README about individual language/framework/plugin snippets: - -- https://github.com/rafamadriz/friendly-snippets - -- { - -- 'rafamadriz/friendly-snippets', - -- config = function() - -- require('luasnip.loaders.from_vscode').lazy_load() - -- end, - -- }, - }, - opts = {}, - }, - 'folke/lazydev.nvim', - }, - --- @module 'blink.cmp' - --- @type blink.cmp.Config - opts = { - keymap = { - -- 'default' (recommended) for mappings similar to built-in completions - -- to accept ([y]es) the completion. - -- This will auto-import if your LSP supports it. - -- This will expand snippets if the LSP sent a snippet. - -- 'super-tab' for tab to accept - -- 'enter' for enter to accept - -- 'none' for no mappings - -- - -- For an understanding of why the 'default' preset is recommended, - -- you will need to read `:help ins-completion` - -- - -- No, but seriously. Please read `:help ins-completion`, it is really good! - -- - -- All presets have the following mappings: - -- /: move to right/left of your snippet expansion - -- : Open menu or open docs if already open - -- / or /: Select next/previous item - -- : Hide menu - -- : Toggle signature help - -- - -- See :h blink-cmp-config-keymap for defining your own keymap - preset = 'default', - - -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: - -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps - }, - - appearance = { - -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' - -- Adjusts spacing to ensure icons are aligned - nerd_font_variant = 'mono', - }, - - completion = { - -- By default, you may press `` to show the documentation. - -- Optionally, set `auto_show = true` to show the documentation after a delay. - documentation = { auto_show = false, auto_show_delay_ms = 500 }, - }, - - sources = { - default = { 'lsp', 'path', 'snippets', 'lazydev' }, - providers = { - lazydev = { module = 'lazydev.integrations.blink', score_offset = 100 }, - }, - }, - - snippets = { preset = 'luasnip' }, - - -- Blink.cmp includes an optional, recommended rust fuzzy matcher, - -- which automatically downloads a prebuilt binary when enabled. - -- - -- By default, we use the Lua implementation instead, but you may enable - -- the rust implementation via `'prefer_rust_with_warning'` - -- - -- See :h blink-cmp-config-fuzzy for more information - fuzzy = { implementation = 'prefer_rust_with_warning' }, - - -- Shows a signature help window while you type arguments for a function - signature = { enabled = true }, - }, - }, - { - 'catppuccin/nvim', - name = 'catppuccin', - priority = 1000, - config = function() - require('catppuccin').setup { - float = { - transparent = false, - solid = false, - }, - auto_integrations = true, - } - vim.cmd.colorscheme 'catppuccin-mocha' - end, - }, - -- Highlight todo, notes, etc in comments - { - 'folke/todo-comments.nvim', - event = 'VimEnter', - dependencies = { 'nvim-lua/plenary.nvim' }, - opts = { signs = false }, - }, - - { -- Collection of various small independent plugins/modules - 'echasnovski/mini.nvim', - config = function() - -- Better Around/Inside textobjects - -- - -- Examples: - -- - va) - [V]isually select [A]round [)]paren - -- - yinq - [Y]ank [I]nside [N]ext [Q]uote - -- - ci' - [C]hange [I]nside [']quote - require('mini.ai').setup { n_lines = 500 } - - -- Add/delete/replace surroundings (brackets, quotes, etc.) - -- - -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren - -- - sd' - [S]urround [D]elete [']quotes - -- - sr)' - [S]urround [R]eplace [)] ['] - require('mini.surround').setup() - - -- Simple and easy statusline. - -- You could remove this setup call if you don't like it, - -- and try some other statusline plugin - local statusline = require 'mini.statusline' - -- set use_icons to true if you have a Nerd Font - statusline.setup { use_icons = vim.g.have_nerd_font } - - -- You can configure sections in the statusline by overriding their - -- default behavior. For example, here we set the section for - -- cursor location to LINE:COLUMN - ---@diagnostic disable-next-line: duplicate-set-field - statusline.section_location = function() - return '%2l:%-2v' - end - - -- ... and there is more! - -- Check out: https://github.com/echasnovski/mini.nvim - end, - }, - { -- Highlight, edit, and navigate code - 'nvim-treesitter/nvim-treesitter', - build = ':TSUpdate', - lazy = false, - -- There are additional nvim-treesitter modules that you can use to interact - -- with nvim-treesitter. You should go explore a few and see what interests you: - -- - -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` - -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context - -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects - config = function() - -- Auto start treesitter if a parser is available. - vim.api.nvim_create_autocmd('FileType', { - callback = function(args) - local ft = vim.bo[args.buf].filetype - -- TODO: add a file type to lang mapper here - local lang = ft - - -- Only start if a parser exists - if vim.treesitter.language.get_lang(lang) then - pcall(vim.treesitter.start, args.buf, lang) - end - end, - }) - end, - }, - - require 'kickstart.plugins.neo-tree', - require 'kickstart.plugins.gitsigns', -- adds gitsigns recommend keymaps - require 'kickstart.plugins.autopairs', - - -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` - -- This is the easiest way to modularize your config. - -- - -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - { import = 'custom.plugins' }, - { import = 'local.plugins' }, - -- - -- For additional information with loading, sourcing and examples see `:help lazy.nvim-๐Ÿ”Œ-plugin-spec` - -- Or use telescope! - -- In normal mode type `sh` then write `lazy.nvim-plugin` - -- you can continue same window with `sr` which resumes last telescope search +require("lazy").setup({ + -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). + { + "NMAC427/guess-indent.nvim", -- Detect tabstop and shiftwidth automatically, + config = function() + require("guess-indent").setup({}) + end, + }, + + -- NOTE: Plugins can also be added by using a table, + -- with the first argument being the link and the following + -- keys can be used to configure plugin behavior/loading/etc. + -- + -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. + -- + + -- Alternatively, use `config = function() ... end` for full control over the configuration. + -- If you prefer to call `setup` explicitly, use: + -- { + -- 'lewis6991/gitsigns.nvim', + -- config = function() + -- require('gitsigns').setup({ + -- -- Your gitsigns configuration here + -- }) + -- end, + -- } + -- + -- Here is a more advanced example where we pass configuration + -- options to `gitsigns.nvim`. + -- + -- See `:help gitsigns` to understand what the configuration keys do + { -- 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 = "~" }, + }, + }, + }, + + -- NOTE: Plugins can also be configured to run Lua code when they are loaded. + -- + -- This is often very useful to both group configuration, as well as handle + -- lazy loading plugins that don't need to be loaded immediately at startup. + -- + -- For example, in the following configuration, we use: + -- event = 'VimEnter' + -- + -- which loads which-key before all the UI elements are loaded. Events can be + -- normal autocommands events (`:help autocmd-events`). + -- + -- Then, because we use the `opts` key (recommended), the configuration runs + -- after the plugin has been loaded as `require(MODULE).setup(opts)`. + + { -- Useful plugin to show you pending keybinds. + "folke/which-key.nvim", + event = "VimEnter", -- Sets the loading event to 'VimEnter' + opts = { + -- delay between pressing a key and opening which-key (milliseconds) + -- this setting is independent of vim.o.timeoutlen + delay = 250, + icons = { + -- set icon mappings to true if you have a Nerd Font + mappings = vim.g.have_nerd_font, + -- If you are using a Nerd Font: set icons.keys to an empty table which will use the + -- default which-key.nvim defined Nerd Font icons, otherwise define a string table + keys = vim.g.have_nerd_font and {} or { + Up = " ", + Down = " ", + Left = " ", + Right = " ", + C = " ", + M = " ", + D = " ", + S = " ", + CR = " ", + Esc = " ", + ScrollWheelDown = " ", + ScrollWheelUp = " ", + NL = " ", + BS = " ", + Space = " ", + Tab = " ", + F1 = "", + F2 = "", + F3 = "", + F4 = "", + F5 = "", + F6 = "", + F7 = "", + F8 = "", + F9 = "", + F10 = "", + F11 = "", + F12 = "", + }, + }, + + -- Document existing key chains + spec = { + { "s", group = "[S]earch" }, + { "t", group = "[T]oggle" }, + { "h", group = "Git [H]unk", mode = { "n", "v" } }, + }, + }, + }, + + { -- Fuzzy Finder (files, lsp, etc) + "nvim-telescope/telescope.nvim", + event = "VimEnter", + dependencies = { + "nvim-lua/plenary.nvim", + { -- If encountering errors, see telescope-fzf-native README for installation instructions + "nvim-telescope/telescope-fzf-native.nvim", + + -- `build` is used to run some command when the plugin is installed/updated. + -- This is only run then, not every time Neovim starts up. + build = "make", + + -- `cond` is a condition used to determine whether this plugin should be + -- installed and loaded. + cond = function() + return vim.fn.executable("make") == 1 + end, + }, + { "nvim-telescope/telescope-ui-select.nvim" }, + + -- Useful for getting pretty icons, but requires a Nerd Font. + { "nvim-tree/nvim-web-devicons", enabled = vim.g.have_nerd_font }, + }, + config = function() + -- Telescope is a fuzzy finder that comes with a lot of different things that + -- it can fuzzy find! It's more than just a "file finder", it can search + -- many different aspects of Neovim, your workspace, LSP, and more! + -- + -- The easiest way to use Telescope, is to start by doing something like: + -- :Telescope help_tags + -- + -- After running this command, a window will open up and you're able to + -- type in the prompt window. You'll see a list of `help_tags` options and + -- a corresponding preview of the help. + -- + -- Two important keymaps to use while in Telescope are: + -- - Insert mode: + -- - Normal mode: ? + -- + -- This opens a window that shows you all of the keymaps for the current + -- Telescope picker. This is really useful to discover what Telescope can + -- do as well as how to actually do it! + + -- [[ Configure Telescope ]] + -- See `:help telescope` and `:help telescope.setup()` + local overrides = opt_require("local.overrides") or {} + local opts = { + extensions = { + ["ui-select"] = { + require("telescope.themes").get_dropdown(), + }, + }, + } + opts = vim.tbl_deep_extend("force", {}, opts, (overrides.telescope or {}).opts or {}) + + require("telescope").setup(opts) + + -- Enable Telescope extensions if they are installed + pcall(require("telescope").load_extension, "fzf") + pcall(require("telescope").load_extension, "ui-select") + + -- See `:help telescope.builtin` + local builtin = require("telescope.builtin") + vim.keymap.set("n", "sh", function() + builtin.find_files({ hidden = true }) + end, { desc = "[S]earch [H]idden Files" }) + vim.keymap.set("n", "sk", builtin.keymaps, { desc = "[S]earch [K]eymaps" }) + vim.keymap.set("n", "sf", builtin.find_files, { desc = "[S]earch [F]iles" }) + vim.keymap.set("n", "ss", builtin.builtin, { desc = "[S]earch [S]elect Telescope" }) + vim.keymap.set("n", "sw", builtin.grep_string, { desc = "[S]earch current [W]ord" }) + vim.keymap.set("n", "sg", builtin.live_grep, { desc = "[S]earch by [G]rep" }) + vim.keymap.set("n", "sd", builtin.diagnostics, { desc = "[S]earch [D]iagnostics" }) + vim.keymap.set("n", "sr", builtin.resume, { desc = "[S]earch [R]esume" }) + vim.keymap.set("n", "s.", builtin.oldfiles, { desc = '[S]earch Recent Files ("." for repeat)' }) + vim.keymap.set("n", "", builtin.buffers, { desc = "[ ] Find existing buffers" }) + + -- Slightly advanced example of overriding default behavior and theme + vim.keymap.set("n", "/", function() + -- You can pass additional configuration to Telescope to change the theme, layout, etc. + builtin.current_buffer_fuzzy_find(require("telescope.themes").get_dropdown({ + winblend = 10, + previewer = false, + })) + end, { desc = "[/] Fuzzily search in current buffer" }) + + -- It's also possible to pass additional configuration options. + -- See `:help telescope.builtin.live_grep()` for information about particular keys + vim.keymap.set("n", "s/", function() + builtin.live_grep({ + grep_open_files = true, + prompt_title = "Live Grep in Open Files", + }) + end, { desc = "[S]earch [/] in Open Files" }) + + -- Shortcut for searching your Neovim configuration files + vim.keymap.set("n", "sn", function() + builtin.find_files({ cwd = vim.fn.stdpath("config"), hidden = true, no_ignore = true }) + end, { desc = "[S]earch [N]eovim files" }) + end, + }, + + -- LSP Plugins + { + -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins + -- used for completion, annotations and signatures of Neovim apis + "folke/lazydev.nvim", + ft = "lua", + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = "${3rd}/luv/library", words = { "vim%.uv" } }, + }, + }, + }, + { + -- Main LSP Configuration + "neovim/nvim-lspconfig", + dependencies = { + -- Automatically install LSPs and related tools to stdpath for Neovim + -- Mason must be loaded before its dependents so we need to set it up here. + { "mason-org/mason.nvim", opts = {} }, + + -- Useful status updates for LSP. + { "j-hui/fidget.nvim", opts = {} }, + + -- Allows extra capabilities provided by blink.cmp + "saghen/blink.cmp", + }, + config = function() + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("kickstart-lsp-attach", { clear = true }), + callback = function(event) + local map = function(keys, func, desc, mode) + mode = mode or "n" + vim.keymap.set(mode, keys, func, { buffer = event.buf, desc = "LSP: " .. desc }) + end + + -- Rename the variable under your cursor. + -- Most Language Servers support renaming across files, etc. + map("gn", vim.lsp.buf.rename, "[R]e[n]ame") + + -- Execute a code action, usually your cursor needs to be on top of an error + -- or a suggestion from your LSP for this to activate. + map("ga", vim.lsp.buf.code_action, "[G]oto Code [A]ction", { "n", "x" }) + + -- Find references for the word under your cursor. + map("gr", require("telescope.builtin").lsp_references, "[G]oto [R]eferences") + + -- Jump to the implementation of the word under your cursor. + -- Useful when your language has ways of declaring types without an actual implementation. + map("gi", require("telescope.builtin").lsp_implementations, "[G]oto [I]mplementation") + + -- Jump to the definition of the word under your cursor. + -- This is where a variable was first declared, or where a function is defined, etc. + -- To jump back, press . + map("gd", require("telescope.builtin").lsp_definitions, "[G]oto [D]efinition") + + -- This is not Goto Definition, this is Goto Declaration. + -- For example, in C this would take you to the header. + map("gD", vim.lsp.buf.declaration, "[G]oto [D]eclaration") + + -- Fuzzy find all the symbols in your current document. + -- Symbols are things like variables, functions, types, etc. + map("gO", require("telescope.builtin").lsp_document_symbols, "Open Document Symbols") + + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. + map("gW", require("telescope.builtin").lsp_dynamic_workspace_symbols, "Open Workspace Symbols") + + -- Jump to the type of the word under your cursor. + -- Useful when you're not sure what type a variable is and you want to see + -- the definition of its *type*, not where it was *defined*. + map("gt", require("telescope.builtin").lsp_type_definitions, "[G]oto [T]ype Definition") + + -- This function resolves a difference between neovim nightly (version 0.11) and stable (version 0.10) + ---@param client vim.lsp.Client + ---@param method vim.lsp.protocol.Method + ---@param bufnr? integer some lsp support methods only in specific files + ---@return boolean + local function client_supports_method(client, method, bufnr) + if vim.fn.has("nvim-0.11") == 1 then + return client:supports_method(method, bufnr) + else + return client.supports_method(method, { bufnr = bufnr }) + end + end + + -- The following two autocommands are used to highlight references of the + -- word under your cursor when your cursor rests there for a little while. + -- See `:help CursorHold` for information about when this is executed + -- + -- When you move your cursor, the highlights will be cleared (the second autocommand). + local client = vim.lsp.get_client_by_id(event.data.client_id) + if + client + and client_supports_method( + client, + vim.lsp.protocol.Methods.textDocument_documentHighlight, + event.buf + ) + then + local highlight_augroup = + vim.api.nvim_create_augroup("kickstart-lsp-highlight", { clear = false }) + vim.api.nvim_create_autocmd({ "CursorHold", "CursorHoldI" }, { + buffer = event.buf, + group = highlight_augroup, + callback = vim.lsp.buf.document_highlight, + }) + + vim.api.nvim_create_autocmd({ "CursorMoved", "CursorMovedI" }, { + buffer = event.buf, + group = highlight_augroup, + callback = vim.lsp.buf.clear_references, + }) + + vim.api.nvim_create_autocmd("LspDetach", { + group = vim.api.nvim_create_augroup("kickstart-lsp-detach", { clear = true }), + callback = function(event2) + vim.lsp.buf.clear_references() + vim.api.nvim_clear_autocmds({ group = "kickstart-lsp-highlight", buffer = event2.buf }) + end, + }) + end + + -- The following code creates a keymap to toggle inlay hints in your + -- code, if the language server you are using supports them + -- + -- This may be unwanted, since they displace some of your code + if + client + and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) + then + map("th", function() + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled({ bufnr = event.buf })) + end, "[T]oggle Inlay [H]ints") + end + end, + }) + + -- Diagnostic Config + -- See :help vim.diagnostic.Opts + vim.diagnostic.config({ + severity_sort = true, + float = { border = "rounded", source = "if_many" }, + underline = { severity = vim.diagnostic.severity.ERROR }, + signs = vim.g.have_nerd_font and { + text = { + [vim.diagnostic.severity.ERROR] = "๓ฐ…š ", + [vim.diagnostic.severity.WARN] = "๓ฐ€ช ", + [vim.diagnostic.severity.INFO] = "๓ฐ‹ฝ ", + [vim.diagnostic.severity.HINT] = "๓ฐŒถ ", + }, + } or {}, + virtual_text = { + source = "if_many", + spacing = 2, + format = function(diagnostic) + local diagnostic_message = { + [vim.diagnostic.severity.ERROR] = diagnostic.message, + [vim.diagnostic.severity.WARN] = diagnostic.message, + [vim.diagnostic.severity.INFO] = diagnostic.message, + [vim.diagnostic.severity.HINT] = diagnostic.message, + } + return diagnostic_message[diagnostic.severity] + end, + }, + }) + + -- LSP servers and clients are able to communicate to each other what features they support. + -- By default, Neovim doesn't support everything that is in the LSP specification. + -- When you add blink.cmp, luasnip, etc. Neovim now has *more* capabilities. + -- So, we create new capabilities with blink.cmp, and then broadcast that to the servers. + local capabilities = require("blink.cmp").get_lsp_capabilities() + + -- Enable the following language servers + local servers = { + pyright = {}, + rust_analyzer = { + cmd = { "rustup", "run", "stable", "rust-analyzer" }, + }, + lua_ls = { + settings = { + Lua = { + completion = { + callSnippet = "Replace", + }, + }, + }, + }, + } + + local servers_overrides = (opt_require("local.overrides") or {}).lsp + servers = vim.tbl_deep_extend("force", {}, servers, servers_overrides or {}) + + -- Set up and enable servers. + for server_name, server_config in pairs(servers) do + server_config.capabilities = + vim.tbl_deep_extend("force", {}, capabilities, server_config.capabilities or {}) + vim.lsp.config(server_name, server_config) + vim.lsp.enable(server_name) + end + end, + }, + + { -- Autoformat + "stevearc/conform.nvim", + event = { "BufWritePre" }, + cmd = { "ConformInfo" }, + keys = { + { + "f", + function() + require("conform").format({ async = true, lsp_format = "fallback" }) + end, + mode = "", + desc = "[F]ormat buffer", + }, + }, + opts = { + notify_on_error = false, + format_on_save = function(bufnr) + -- Disable "format_on_save lsp_fallback" for languages that don't + -- have a well standardized coding style. You can add additional + -- languages here or re-enable it for the disabled ones. + local disable_filetypes = { c = true, cpp = true } + if disable_filetypes[vim.bo[bufnr].filetype] then + return nil + else + return { + timeout_ms = 500, + lsp_format = "fallback", + } + end + end, + formatters_by_ft = { + lua = { "stylua" }, + rust = { "rustfmt" }, + -- Conform can also run multiple formatters sequentially + -- python = { "isort", "black" }, + -- + -- You can use 'stop_after_first' to run the first available formatter from the list + -- javascript = { "prettierd", "prettier", stop_after_first = true }, + }, + }, + }, + + { -- Autocompletion + "saghen/blink.cmp", + event = "VimEnter", + version = "1.*", + dependencies = { + -- Snippet Engine + { + "L3MON4D3/LuaSnip", + version = "2.*", + build = (function() + -- Build Step is needed for regex support in snippets. + -- This step is not supported in many windows environments. + -- Remove the below condition to re-enable on windows. + if vim.fn.has("win32") == 1 or vim.fn.executable("make") == 0 then + return + end + return "make install_jsregexp" + end)(), + dependencies = { + -- `friendly-snippets` contains a variety of premade snippets. + -- See the README about individual language/framework/plugin snippets: + -- https://github.com/rafamadriz/friendly-snippets + -- { + -- 'rafamadriz/friendly-snippets', + -- config = function() + -- require('luasnip.loaders.from_vscode').lazy_load() + -- end, + -- }, + }, + opts = {}, + }, + "folke/lazydev.nvim", + }, + --- @module 'blink.cmp' + --- @type blink.cmp.Config + opts = { + keymap = { + -- 'default' (recommended) for mappings similar to built-in completions + -- to accept ([y]es) the completion. + -- This will auto-import if your LSP supports it. + -- This will expand snippets if the LSP sent a snippet. + -- 'super-tab' for tab to accept + -- 'enter' for enter to accept + -- 'none' for no mappings + -- + -- For an understanding of why the 'default' preset is recommended, + -- you will need to read `:help ins-completion` + -- + -- No, but seriously. Please read `:help ins-completion`, it is really good! + -- + -- All presets have the following mappings: + -- /: move to right/left of your snippet expansion + -- : Open menu or open docs if already open + -- / or /: Select next/previous item + -- : Hide menu + -- : Toggle signature help + -- + -- See :h blink-cmp-config-keymap for defining your own keymap + preset = "default", + + -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: + -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps + }, + + appearance = { + -- 'mono' (default) for 'Nerd Font Mono' or 'normal' for 'Nerd Font' + -- Adjusts spacing to ensure icons are aligned + nerd_font_variant = "mono", + }, + + completion = { + -- By default, you may press `` to show the documentation. + -- Optionally, set `auto_show = true` to show the documentation after a delay. + documentation = { auto_show = false, auto_show_delay_ms = 500 }, + }, + + sources = { + default = { "lsp", "path", "snippets", "lazydev" }, + providers = { + lazydev = { module = "lazydev.integrations.blink", score_offset = 100 }, + }, + }, + + snippets = { preset = "luasnip" }, + + -- Blink.cmp includes an optional, recommended rust fuzzy matcher, + -- which automatically downloads a prebuilt binary when enabled. + -- + -- By default, we use the Lua implementation instead, but you may enable + -- the rust implementation via `'prefer_rust_with_warning'` + -- + -- See :h blink-cmp-config-fuzzy for more information + fuzzy = { implementation = "prefer_rust_with_warning" }, + + -- Shows a signature help window while you type arguments for a function + signature = { enabled = true }, + }, + }, + { + "catppuccin/nvim", + name = "catppuccin", + priority = 1000, + config = function() + require("catppuccin").setup({ + float = { + transparent = false, + solid = false, + }, + auto_integrations = true, + }) + vim.cmd.colorscheme("catppuccin-mocha") + end, + }, + -- Highlight todo, notes, etc in comments + { + "folke/todo-comments.nvim", + event = "VimEnter", + dependencies = { "nvim-lua/plenary.nvim" }, + opts = { signs = false }, + }, + + { -- Collection of various small independent plugins/modules + "echasnovski/mini.nvim", + config = function() + -- Better Around/Inside textobjects + -- + -- Examples: + -- - va) - [V]isually select [A]round [)]paren + -- - yinq - [Y]ank [I]nside [N]ext [Q]uote + -- - ci' - [C]hange [I]nside [']quote + require("mini.ai").setup({ n_lines = 500 }) + + -- Add/delete/replace surroundings (brackets, quotes, etc.) + -- + -- - saiw) - [S]urround [A]dd [I]nner [W]ord [)]Paren + -- - sd' - [S]urround [D]elete [']quotes + -- - sr)' - [S]urround [R]eplace [)] ['] + require("mini.surround").setup() + + -- Simple and easy statusline. + -- You could remove this setup call if you don't like it, + -- and try some other statusline plugin + local statusline = require("mini.statusline") + -- set use_icons to true if you have a Nerd Font + statusline.setup({ use_icons = vim.g.have_nerd_font }) + + -- You can configure sections in the statusline by overriding their + -- default behavior. For example, here we set the section for + -- cursor location to LINE:COLUMN + ---@diagnostic disable-next-line: duplicate-set-field + statusline.section_location = function() + return "%2l:%-2v" + end + + -- ... and there is more! + -- Check out: https://github.com/echasnovski/mini.nvim + end, + }, + { -- Highlight, edit, and navigate code + "nvim-treesitter/nvim-treesitter", + build = ":TSUpdate", + lazy = false, + -- There are additional nvim-treesitter modules that you can use to interact + -- with nvim-treesitter. You should go explore a few and see what interests you: + -- + -- - Incremental selection: Included, see `:help nvim-treesitter-incremental-selection-mod` + -- - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context + -- - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects + config = function() + -- Auto start treesitter if a parser is available. + vim.api.nvim_create_autocmd("FileType", { + callback = function(args) + local ft = vim.bo[args.buf].filetype + -- TODO: add a file type to lang mapper here + local lang = ft + + -- Only start if a parser exists + if vim.treesitter.language.get_lang(lang) then + pcall(vim.treesitter.start, args.buf, lang) + end + end, + }) + end, + }, + + require("kickstart.plugins.neo-tree"), + require("kickstart.plugins.gitsigns"), -- adds gitsigns recommend keymaps + require("kickstart.plugins.autopairs"), + + -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` + -- This is the easiest way to modularize your config. + -- + -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. + { import = "custom.plugins" }, + { import = "local.plugins" }, + -- + -- For additional information with loading, sourcing and examples see `:help lazy.nvim-๐Ÿ”Œ-plugin-spec` + -- Or use telescope! + -- In normal mode type `sh` then write `lazy.nvim-plugin` + -- you can continue same window with `sr` which resumes last telescope search }, { - ui = { - -- If you are using a Nerd Font: set icons to an empty table which will use the - -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table - icons = vim.g.have_nerd_font and {} or { - cmd = 'โŒ˜', - config = '๐Ÿ› ', - event = '๐Ÿ“…', - ft = '๐Ÿ“‚', - init = 'โš™', - keys = '๐Ÿ—', - plugin = '๐Ÿ”Œ', - runtime = '๐Ÿ’ป', - require = '๐ŸŒ™', - source = '๐Ÿ“„', - start = '๐Ÿš€', - task = '๐Ÿ“Œ', - lazy = '๐Ÿ’ค ', - }, - }, + ui = { + -- If you are using a Nerd Font: set icons to an empty table which will use the + -- default lazy.nvim defined Nerd Font icons, otherwise define a unicode icons table + icons = vim.g.have_nerd_font and {} or { + cmd = "โŒ˜", + config = "๐Ÿ› ", + event = "๐Ÿ“…", + ft = "๐Ÿ“‚", + init = "โš™", + keys = "๐Ÿ—", + plugin = "๐Ÿ”Œ", + runtime = "๐Ÿ’ป", + require = "๐ŸŒ™", + source = "๐Ÿ“„", + start = "๐Ÿš€", + task = "๐Ÿ“Œ", + lazy = "๐Ÿ’ค ", + }, + }, }) -pcall(require, 'local.posthook') +pcall(require, "local.posthook") -- The line beneath this is called `modeline`. See `:help modeline` -- vim: ts=2 sts=2 sw=2 et From 111cea00ab27ec9cd5b9356fd47d001a02048505 Mon Sep 17 00:00:00 2001 From: Jason Stentz Date: Wed, 18 Feb 2026 00:39:56 -0500 Subject: [PATCH 18/18] fixing lua --- init.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/init.lua b/init.lua index 2ec18c93b55..99a10747ab9 100644 --- a/init.lua +++ b/init.lua @@ -551,6 +551,10 @@ require("lazy").setup({ lua_ls = { settings = { Lua = { + workspace = { + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, completion = { callSnippet = "Replace", },