merge latest kickstarter
This commit is contained in:
		
						commit
						2c4d4d33e5
					
				|  | @ -9,6 +9,13 @@ assignees: '' | ||||||
| 
 | 
 | ||||||
| <!-- Any bug report not following this template will be immediately closed. Thanks --> | <!-- Any bug report not following this template will be immediately closed. Thanks --> | ||||||
| 
 | 
 | ||||||
|  | ## 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 | ## Describe the bug | ||||||
| <!-- A clear and concise description of what the bug is. --> | <!-- A clear and concise description of what the bug is. --> | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
							
								
								
									
										34
									
								
								README.md
								
								
								
								
							
							
						
						
									
										34
									
								
								README.md
								
								
								
								
							|  | @ -24,9 +24,10 @@ If you are experiencing issues, please make sure you have the latest versions. | ||||||
| External Requirements: | External Requirements: | ||||||
| - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) | - Basic utils: `git`, `make`, `unzip`, C Compiler (`gcc`) | ||||||
| - [ripgrep](https://github.com/BurntSushi/ripgrep#installation) | - [ripgrep](https://github.com/BurntSushi/ripgrep#installation) | ||||||
| - Clipboard tool (xclip/xsel/win32yank or other depending on platform) | - Clipboard tool (xclip/xsel/win32yank or other depending on the platform) | ||||||
| - A [Nerd Font](https://www.nerdfonts.com/): optional, provides various icons | - 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 |   - 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: | - Language Setup: | ||||||
|   - If you want to write Typescript, you need `npm` |   - If you want to write Typescript, you need `npm` | ||||||
|   - If you want to write Golang, you will need `go` |   - If you want to write Golang, you will need `go` | ||||||
|  | @ -56,12 +57,12 @@ 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. | fork to your machine using one of the commands below, depending on your OS. | ||||||
| 
 | 
 | ||||||
| > **NOTE** | > **NOTE** | ||||||
| > Your fork's url will be something like this: | > Your fork's URL will be something like this: | ||||||
| > `https://github.com/<your_github_username>/kickstart.nvim.git` | > `https://github.com/<your_github_username>/kickstart.nvim.git` | ||||||
| 
 | 
 | ||||||
| You likely want to remove `lazy-lock.json` from your fork's `.gitignore` file | 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 | too - it's ignored in the kickstart repo to make maintenance easier, but it's | ||||||
| [recommmended to track it in version control](https://lazy.folke.io/usage/lockfile). | [recommended to track it in version control](https://lazy.folke.io/usage/lockfile). | ||||||
| 
 | 
 | ||||||
| #### Clone kickstart.nvim | #### Clone kickstart.nvim | ||||||
| > **NOTE** | > **NOTE** | ||||||
|  | @ -101,12 +102,17 @@ nvim | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| That's it! Lazy will install all the plugins you have. Use `:Lazy` to view | That's it! Lazy will install all the plugins you have. Use `:Lazy` to view | ||||||
| current plugin status. Hit `q` to close the window. | 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 | Read through the `init.lua` file in your configuration folder for more | ||||||
| information about extending and exploring Neovim. That also includes | information about extending and exploring Neovim. That also includes | ||||||
| examples of adding popularly requested plugins. | examples of adding popularly requested plugins. | ||||||
| 
 | 
 | ||||||
|  | > [!NOTE] | ||||||
|  | > For more information about a particular plugin check its repository's documentation. | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| ### Getting Started | ### Getting Started | ||||||
| 
 | 
 | ||||||
|  | @ -114,9 +120,9 @@ examples of adding popularly requested plugins. | ||||||
| 
 | 
 | ||||||
| ### FAQ | ### FAQ | ||||||
| 
 | 
 | ||||||
| * What should I do if I already have a pre-existing neovim configuration? | * What should I do if I already have a pre-existing Neovim configuration? | ||||||
|   * You should back it up and then delete all associated files. |   * You should back it up and then delete all associated files. | ||||||
|   * This includes your existing init.lua and the neovim files in `~/.local` |   * This includes your existing init.lua and the Neovim files in `~/.local` | ||||||
|     which can be deleted with `rm -rf ~/.local/share/nvim/` |     which can be deleted with `rm -rf ~/.local/share/nvim/` | ||||||
| * Can I keep my existing configuration in parallel to kickstart? | * 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` |   * Yes! You can use [NVIM_APPNAME](https://neovim.io/doc/user/starting.html#%24NVIM_APPNAME)`=nvim-NAME` | ||||||
|  | @ -130,7 +136,7 @@ examples of adding popularly requested plugins. | ||||||
|     `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim |     `~/.local/share/nvim-kickstart`. You can apply this approach to any Neovim | ||||||
|     distribution that you would like to try out. |     distribution that you would like to try out. | ||||||
| * What if I want to "uninstall" this configuration: | * What if I want to "uninstall" this configuration: | ||||||
|   * See [lazy.nvim uninstall](https://github.com/folke/lazy.nvim#-uninstalling) information |   * 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? | * 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 |   * 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. |     configuration that someone can easily use to `git clone` as a basis for their own. | ||||||
|  | @ -174,7 +180,7 @@ run in cmd as **admin**: | ||||||
| winget install --accept-source-agreements chocolatey.chocolatey | winget install --accept-source-agreements chocolatey.chocolatey | ||||||
| ``` | ``` | ||||||
| 
 | 
 | ||||||
| 2. install all requirements using choco, exit previous cmd and | 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**: | 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 | choco install -y neovim git ripgrep wget fd unzip gzip mingw make | ||||||
|  | @ -207,14 +213,14 @@ sudo apt update | ||||||
| sudo apt install make gcc ripgrep unzip git xclip curl | sudo apt install make gcc ripgrep unzip git xclip curl | ||||||
| 
 | 
 | ||||||
| # Now we install nvim | # Now we install nvim | ||||||
| curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux64.tar.gz | curl -LO https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz | ||||||
| sudo rm -rf /opt/nvim-linux64 | sudo rm -rf /opt/nvim-linux-x86_64 | ||||||
| sudo mkdir -p /opt/nvim-linux64 | sudo mkdir -p /opt/nvim-linux-x86_64 | ||||||
| sudo chmod a+rX /opt/nvim-linux64 | sudo chmod a+rX /opt/nvim-linux-x86_64 | ||||||
| sudo tar -C /opt -xzf nvim-linux64.tar.gz | sudo tar -C /opt -xzf nvim-linux-x86_64.tar.gz | ||||||
| 
 | 
 | ||||||
| # make it available in /usr/local/bin, distro installs to /usr/bin | # make it available in /usr/local/bin, distro installs to /usr/bin | ||||||
| sudo ln -sf /opt/nvim-linux64/bin/nvim /usr/local/bin/ | sudo ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/ | ||||||
| ``` | ``` | ||||||
| </details> | </details> | ||||||
| <details><summary>Fedora Install Steps</summary> | <details><summary>Fedora Install Steps</summary> | ||||||
|  |  | ||||||
							
								
								
									
										120
									
								
								init.lua
								
								
								
								
							
							
						
						
									
										120
									
								
								init.lua
								
								
								
								
							|  | @ -135,7 +135,6 @@ vim.opt.signcolumn = 'yes' | ||||||
| vim.opt.updatetime = 250 | vim.opt.updatetime = 250 | ||||||
| 
 | 
 | ||||||
| -- Decrease mapped sequence wait time | -- Decrease mapped sequence wait time | ||||||
| -- Displays which-key popup sooner |  | ||||||
| vim.opt.timeoutlen = 300 | vim.opt.timeoutlen = 300 | ||||||
| 
 | 
 | ||||||
| -- Configure how new splits should be opened | -- Configure how new splits should be opened | ||||||
|  | @ -239,7 +238,7 @@ require('lazy').setup({ | ||||||
|   -- with the first argument being the link and the following |   -- with the first argument being the link and the following | ||||||
|   -- keys can be used to configure plugin behavior/loading/etc. |   -- keys can be used to configure plugin behavior/loading/etc. | ||||||
|   -- |   -- | ||||||
|   -- Use `opts = {}` to force a plugin to be loaded. |   -- Use `opts = {}` to automatically pass options to a plugin's `setup()` function, forcing the plugin to be loaded. | ||||||
|   -- |   -- | ||||||
|   --  This is equivalent to: |   --  This is equivalent to: | ||||||
|   --    require('Comment').setup({}) |   --    require('Comment').setup({}) | ||||||
|  | @ -247,9 +246,19 @@ require('lazy').setup({ | ||||||
|   -- "gc" to comment visual regions/lines |   -- "gc" to comment visual regions/lines | ||||||
|   { 'numToStr/Comment.nvim', opts = {} }, |   { 'numToStr/Comment.nvim', opts = {} }, | ||||||
| 
 | 
 | ||||||
|  |   -- 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 |   -- Here is a more advanced example where we pass configuration | ||||||
|   -- options to `gitsigns.nvim`. This is equivalent to the following Lua: |   -- options to `gitsigns.nvim`. | ||||||
|   --    require('gitsigns').setup({ ... }) |  | ||||||
|   -- |   -- | ||||||
|   -- See `:help gitsigns` to understand what the configuration keys do |   -- See `:help gitsigns` to understand what the configuration keys do | ||||||
|   { -- Adds git related signs to the gutter, as well as utilities for managing changes |   { -- Adds git related signs to the gutter, as well as utilities for managing changes | ||||||
|  | @ -276,19 +285,21 @@ require('lazy').setup({ | ||||||
|   -- which loads which-key before all the UI elements are loaded. Events can be |   -- which loads which-key before all the UI elements are loaded. Events can be | ||||||
|   -- normal autocommands events (`:help autocmd-events`). |   -- normal autocommands events (`:help autocmd-events`). | ||||||
|   -- |   -- | ||||||
|   -- Then, because we use the `config` key, the configuration only runs |   -- Then, because we use the `opts` key (recommended), the configuration runs | ||||||
|   -- after the plugin has been loaded: |   -- after the plugin has been loaded as `require(MODULE).setup(opts)`. | ||||||
|   --  config = function() ... end |  | ||||||
| 
 | 
 | ||||||
|   { -- Useful plugin to show you pending keybinds. |   { -- Useful plugin to show you pending keybinds. | ||||||
|     'folke/which-key.nvim', |     'folke/which-key.nvim', | ||||||
|     event = 'VimEnter', -- Sets the loading event to 'VimEnter' |     event = 'VimEnter', -- Sets the loading event to 'VimEnter' | ||||||
|     opts = { |     opts = { | ||||||
|  |       -- delay between pressing a key and opening which-key (milliseconds) | ||||||
|  |       -- this setting is independent of vim.opt.timeoutlen | ||||||
|  |       delay = 0, | ||||||
|       icons = { |       icons = { | ||||||
|         -- set icon mappings to true if you have a Nerd Font |         -- set icon mappings to true if you have a Nerd Font | ||||||
|         mappings = vim.g.have_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 |         -- If you are using a Nerd Font: set icons.keys to an empty table which will use the | ||||||
|         -- default whick-key.nvim defined Nerd Font icons, otherwise define a string table |         -- default which-key.nvim defined Nerd Font icons, otherwise define a string table | ||||||
|         keys = vim.g.have_nerd_font and {} or { |         keys = vim.g.have_nerd_font and {} or { | ||||||
|           Up = '<Up> ', |           Up = '<Up> ', | ||||||
|           Down = '<Down> ', |           Down = '<Down> ', | ||||||
|  | @ -458,11 +469,10 @@ require('lazy').setup({ | ||||||
|     opts = { |     opts = { | ||||||
|       library = { |       library = { | ||||||
|         -- Load luvit types when the `vim.uv` word is found |         -- Load luvit types when the `vim.uv` word is found | ||||||
|         { path = 'luvit-meta/library', words = { 'vim%.uv' } }, |         { path = '${3rd}/luv/library', words = { 'vim%.uv' } }, | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|   { 'Bilal2453/luvit-meta', lazy = true }, |  | ||||||
|   { |   { | ||||||
|     -- Main LSP Configuration |     -- Main LSP Configuration | ||||||
|     'neovim/nvim-lspconfig', |     'neovim/nvim-lspconfig', | ||||||
|  | @ -471,12 +481,13 @@ require('lazy').setup({ | ||||||
|     -- }, |     -- }, | ||||||
|     dependencies = { |     dependencies = { | ||||||
|       -- Automatically install LSPs and related tools to stdpath for Neovim |       -- Automatically install LSPs and related tools to stdpath for Neovim | ||||||
|       { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants |       -- 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({})` | ||||||
|  |       { 'williamboman/mason.nvim', opts = {} }, | ||||||
|       'williamboman/mason-lspconfig.nvim', |       'williamboman/mason-lspconfig.nvim', | ||||||
|       'WhoIsSethDaniel/mason-tool-installer.nvim', |       'WhoIsSethDaniel/mason-tool-installer.nvim', | ||||||
| 
 | 
 | ||||||
|       -- Useful status updates for LSP. |       -- Useful status updates for LSP. | ||||||
|       -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` |  | ||||||
|       { 'j-hui/fidget.nvim', opts = {} }, |       { 'j-hui/fidget.nvim', opts = {} }, | ||||||
| 
 | 
 | ||||||
|       -- Allows extra capabilities provided by nvim-cmp |       -- Allows extra capabilities provided by nvim-cmp | ||||||
|  | @ -566,13 +577,26 @@ require('lazy').setup({ | ||||||
|           --  For example, in C this would take you to the header. |           --  For example, in C this would take you to the header. | ||||||
|           map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') |           map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') | ||||||
| 
 | 
 | ||||||
|  |           -- 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 |           -- The following two autocommands are used to highlight references of the | ||||||
|           -- word under your cursor when your cursor rests there for a little while. |           -- word under your cursor when your cursor rests there for a little while. | ||||||
|           --    See `:help CursorHold` for information about when this is executed |           --    See `:help CursorHold` for information about when this is executed | ||||||
|           -- |           -- | ||||||
|           -- When you move your cursor, the highlights will be cleared (the second autocommand). |           -- 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) |           local client = vim.lsp.get_client_by_id(event.data.client_id) | ||||||
|           if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then |           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 }) |             local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) | ||||||
|             vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { |             vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { | ||||||
|               buffer = event.buf, |               buffer = event.buf, | ||||||
|  | @ -599,7 +623,7 @@ require('lazy').setup({ | ||||||
|           -- code, if the language server you are using supports them |           -- code, if the language server you are using supports them | ||||||
|           -- |           -- | ||||||
|           -- This may be unwanted, since they displace some of your code |           -- This may be unwanted, since they displace some of your code | ||||||
|           if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then |           if client and client_supports_method(client, vim.lsp.protocol.Methods.textDocument_inlayHint, event.buf) then | ||||||
|             map('<leader>ih', function() |             map('<leader>ih', function() | ||||||
|               vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) |               vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) | ||||||
|             end, 'Toggle [I]nlay [H]ints') |             end, 'Toggle [I]nlay [H]ints') | ||||||
|  | @ -607,6 +631,35 @@ require('lazy').setup({ | ||||||
|         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. |       -- 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. |       --  By default, Neovim doesn't support everything that is in the LSP specification. | ||||||
|       --  When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. |       --  When you add nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. | ||||||
|  | @ -672,7 +725,7 @@ require('lazy').setup({ | ||||||
|         -- Some languages (like typescript) have entire language plugins that can be useful: |         -- Some languages (like typescript) have entire language plugins that can be useful: | ||||||
|         --    https://github.com/pmizio/typescript-tools.nvim |         --    https://github.com/pmizio/typescript-tools.nvim | ||||||
|         -- |         -- | ||||||
|         -- But for many setups, the LSP (`tsserver`) will work just fine |         -- But for many setups, the LSP (`ts_ls`) will work just fine | ||||||
|         ts_ls = { |         ts_ls = { | ||||||
|           javascript = { |           javascript = { | ||||||
|             inlayHints = { |             inlayHints = { | ||||||
|  | @ -717,13 +770,16 @@ require('lazy').setup({ | ||||||
|       } |       } | ||||||
| 
 | 
 | ||||||
|       -- Ensure the servers and tools above are installed |       -- Ensure the servers and tools above are installed | ||||||
|  |       -- | ||||||
|       -- To check the current status of installed tools and/or manually install |       -- To check the current status of installed tools and/or manually install | ||||||
|       -- other tools, you can run |       -- other tools, you can run | ||||||
|       --    :Mason |       --    :Mason | ||||||
|       -- |       -- | ||||||
|       -- You can press `g?` for help in this menu. |       -- You can press `g?` for help in this menu. | ||||||
|       require('mason').setup() |       -- | ||||||
| 
 |       -- `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 |       -- You can add other tools here that you want Mason to install | ||||||
|       -- for you, so that they are available from within Neovim. |       -- for you, so that they are available from within Neovim. | ||||||
|       local ensure_installed = vim.tbl_keys(servers or {}) |       local ensure_installed = vim.tbl_keys(servers or {}) | ||||||
|  | @ -733,6 +789,8 @@ require('lazy').setup({ | ||||||
|       require('mason-tool-installer').setup { ensure_installed = ensure_installed } |       require('mason-tool-installer').setup { ensure_installed = ensure_installed } | ||||||
| 
 | 
 | ||||||
|       require('mason-lspconfig').setup { |       require('mason-lspconfig').setup { | ||||||
|  |         ensure_installed = {}, -- explicitly set to an empty table (Kickstart populates installs via mason-tool-installer) | ||||||
|  |         automatic_installation = false, | ||||||
|         handlers = { |         handlers = { | ||||||
|           function(server_name) |           function(server_name) | ||||||
|             -- temporary solution based on https://github.com/neovim/nvim-lspconfig/pull/3232#issuecomment-2331025714 until things work correctly |             -- temporary solution based on https://github.com/neovim/nvim-lspconfig/pull/3232#issuecomment-2331025714 until things work correctly | ||||||
|  | @ -742,7 +800,7 @@ require('lazy').setup({ | ||||||
|             local server = servers[server_name] or {} |             local server = servers[server_name] or {} | ||||||
|             -- This handles overriding only values explicitly passed |             -- This handles overriding only values explicitly passed | ||||||
|             -- by the server configuration above. Useful when disabling |             -- by the server configuration above. Useful when disabling | ||||||
|             -- certain features of an LSP (for example, turning off formatting for tsserver) |             -- certain features of an LSP (for example, turning off formatting for ts_ls) | ||||||
|             server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) |             server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) | ||||||
|             require('lspconfig')[server_name].setup(server) |             require('lspconfig')[server_name].setup(server) | ||||||
|           end, |           end, | ||||||
|  | @ -797,7 +855,6 @@ require('lazy').setup({ | ||||||
|       }, |       }, | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
| 
 |  | ||||||
|   { -- Autocompletion |   { -- Autocompletion | ||||||
|     'hrsh7th/nvim-cmp', |     'hrsh7th/nvim-cmp', | ||||||
|     event = 'InsertEnter', |     event = 'InsertEnter', | ||||||
|  | @ -834,6 +891,7 @@ require('lazy').setup({ | ||||||
|       --  into multiple repos for maintenance purposes. |       --  into multiple repos for maintenance purposes. | ||||||
|       'hrsh7th/cmp-nvim-lsp', |       'hrsh7th/cmp-nvim-lsp', | ||||||
|       'hrsh7th/cmp-path', |       'hrsh7th/cmp-path', | ||||||
|  |       'hrsh7th/cmp-nvim-lsp-signature-help', | ||||||
|     }, |     }, | ||||||
|     config = function() |     config = function() | ||||||
|       -- See `:help cmp` |       -- See `:help cmp` | ||||||
|  | @ -910,11 +968,11 @@ require('lazy').setup({ | ||||||
|           { name = 'nvim_lsp' }, |           { name = 'nvim_lsp' }, | ||||||
|           { name = 'luasnip' }, |           { name = 'luasnip' }, | ||||||
|           { name = 'path' }, |           { name = 'path' }, | ||||||
|  |           { name = 'nvim_lsp_signature_help' }, | ||||||
|         }, |         }, | ||||||
|       } |       } | ||||||
|     end, |     end, | ||||||
|   }, |   }, | ||||||
| 
 |  | ||||||
|   { -- You can easily change to a different colorscheme. |   { -- You can easily change to a different colorscheme. | ||||||
|     -- Change the name of the colorscheme plugin below, and then |     -- Change the name of the colorscheme plugin below, and then | ||||||
|     -- change the command in the config to whatever the name of that colorscheme is. |     -- change the command in the config to whatever the name of that colorscheme is. | ||||||
|  | @ -922,20 +980,22 @@ require('lazy').setup({ | ||||||
|     -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. |     -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. | ||||||
|     'folke/tokyonight.nvim', |     'folke/tokyonight.nvim', | ||||||
|     priority = 1000, -- Make sure to load this before all the other start plugins. |     priority = 1000, -- Make sure to load this before all the other start plugins. | ||||||
|     init = function() |     config = function() | ||||||
|  |       ---@diagnostic disable-next-line: missing-fields | ||||||
|  |       require('tokyonight').setup { | ||||||
|  |         styles = { | ||||||
|  |           comments = { italic = false }, -- Disable italics in comments | ||||||
|  |         }, | ||||||
|  |       } | ||||||
|  | 
 | ||||||
|       -- Load the colorscheme here. |       -- Load the colorscheme here. | ||||||
|       -- Like many other themes, this one has different styles, and you could load |       -- Like many other themes, this one has different styles, and you could load | ||||||
|       -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. |       -- any other, such as 'tokyonight-storm', 'tokyonight-moon', or 'tokyonight-day'. | ||||||
|       vim.cmd.colorscheme 'tokyonight-night' |       vim.cmd.colorscheme 'tokyonight-night' | ||||||
| 
 |  | ||||||
|       -- You can configure highlights by doing something like: |  | ||||||
|       vim.cmd.hi 'Comment gui=none' |  | ||||||
|     end, |     end, | ||||||
|   }, |   }, | ||||||
| 
 |  | ||||||
|   -- Highlight todo, notes, etc in comments |   -- 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 |   { -- Collection of various small independent plugins/modules | ||||||
|     'echasnovski/mini.nvim', |     'echasnovski/mini.nvim', | ||||||
|     config = function() |     config = function() | ||||||
|  | @ -1001,8 +1061,7 @@ require('lazy').setup({ | ||||||
|     --    - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context |     --    - Show your current context: https://github.com/nvim-treesitter/nvim-treesitter-context | ||||||
|     --    - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects |     --    - Treesitter + textobjects: https://github.com/nvim-treesitter/nvim-treesitter-textobjects | ||||||
|   }, |   }, | ||||||
| 
 |   -- The following comments only work if you have downloaded the kickstart repo, not just copy pasted the | ||||||
|   -- The following two 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 |   -- 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. |   -- place them in the correct locations. | ||||||
| 
 | 
 | ||||||
|  | @ -1022,7 +1081,10 @@ require('lazy').setup({ | ||||||
|   --    This is the easiest way to modularize your config. |   --    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. |   --  Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. | ||||||
|   --    For additional information, see `:help lazy.nvim-lazy.nvim-structuring-your-plugins` |   -- For additional information with loading, sourcing and examples see `:help lazy.nvim-🔌-plugin-spec` | ||||||
|  |   -- Or use telescope! | ||||||
|  |   -- In normal mode type `<space>sh` then write `lazy.nvim-plugin` | ||||||
|  |   -- you can continue same window with `<space>sr` which resumes last telescope search | ||||||
|   { import = 'custom.plugins' }, |   { import = 'custom.plugins' }, | ||||||
| }, { | }, { | ||||||
|   ui = { |   ui = { | ||||||
|  |  | ||||||
|  | @ -1,50 +1,55 @@ | ||||||
| { | { | ||||||
|   "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, |   "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, | ||||||
|   "LuaSnip": { "branch": "master", "commit": "ce0a05ab4e2839e1c48d072c5236cce846a387bc" }, |   "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, | ||||||
|   "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, |   "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, | ||||||
|  |   "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" }, | ||||||
|   "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, |   "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, | ||||||
|   "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, |   "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, | ||||||
|   "conform.nvim": { "branch": "master", "commit": "310e2e95a4f832163f3f7a9fedebb1a4afc0db69" }, |   "conform.nvim": { "branch": "master", "commit": "db8a4a9edb217067b1d7a2e0362c74bfe9cc944d" }, | ||||||
|   "copilot.vim": { "branch": "release", "commit": "25f73977033c597d530c7ab0e211d99b60927d2d" }, |   "copilot.vim": { "branch": "release", "commit": "5015939f131627a6a332c9e3ecad9a7cb4c2e549" }, | ||||||
|   "fidget.nvim": { "branch": "main", "commit": "d855eed8a06531a7e8fd0684889b2943f373c469" }, |   "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, | ||||||
|   "gitsigns.nvim": { "branch": "main", "commit": "f4928ba14eb6c667786ac7d69927f6aee6719f1e" }, |   "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, | ||||||
|   "go.nvim": { "branch": "master", "commit": "033344ddfa3cd5cfd55037903264b2bb86691619" }, |   "gitsigns.nvim": { "branch": "main", "commit": "4c40357994f386e72be92a46f41fc1664c84c87d" }, | ||||||
|   "guihua.lua": { "branch": "master", "commit": "225db770e36aae6a1e9e3a65578095c8eb4038d3" }, |   "go.nvim": { "branch": "master", "commit": "6ad080424f4b96a584cf591721e8e13c102cce4e" }, | ||||||
|   "harpoon": { "branch": "master", "commit": "ccae1b9bec717ae284906b0bf83d720e59d12b91" }, |   "guihua.lua": { "branch": "master", "commit": "d783191eaa75215beae0c80319fcce5e6b3beeda" }, | ||||||
|  |   "harpoon": { "branch": "master", "commit": "1bc17e3e42ea3c46b33c0bbad6a880792692a1b3" }, | ||||||
|   "hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" }, |   "hydra.nvim": { "branch": "master", "commit": "55de54543d673824435930ecf533256eea2e565b" }, | ||||||
|   "lazy.nvim": { "branch": "main", "commit": "d731a6b005fd239e85e555bd57362382f6c1e461" }, |   "indent-blankline.nvim": { "branch": "master", "commit": "e10626f7fcd51ccd56d7ffc00883ba7e0aa28f78" }, | ||||||
|   "lualine.nvim": { "branch": "master", "commit": "544dd1583f9bb27b393f598475c89809c4d5e86b" }, |   "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, | ||||||
|   "mason-lspconfig.nvim": { "branch": "main", "commit": "37a336b653f8594df75c827ed589f1c91d91ff6c" }, |   "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, | ||||||
|   "mason-nvim-dap.nvim": { "branch": "main", "commit": "4ba55f9755ebe8297d92c419b90a946123292ae6" }, |   "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, | ||||||
|   "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, |   "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, | ||||||
|   "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, |   "mason-nvim-dap.nvim": { "branch": "main", "commit": "09220b99d63d5363f219daa2785242ee5fddba7f" }, | ||||||
|   "mini.nvim": { "branch": "main", "commit": "f20d8cd3a116ef65f022797de064a044b217ff53" }, |   "mason-tool-installer.nvim": { "branch": "main", "commit": "5639d58a3d11ff7c05c8e31e159bfedae55d7961" }, | ||||||
|   "multicursors.nvim": { "branch": "main", "commit": "782820896b1691ed664e4c24f1cd9793dcb33dfb" }, |   "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, | ||||||
|   "neo-tree.nvim": { "branch": "main", "commit": "8c75e8a2949cd6cd35525799200a8d34471ee9eb" }, |   "mini.nvim": { "branch": "main", "commit": "0a9259e95dbfcd07d5d506c56afd615e018acc4e" }, | ||||||
|   "nui.nvim": { "branch": "main", "commit": "61574ce6e60c815b0a0c4b5655b8486ba58089a1" }, |   "multicursors.nvim": { "branch": "main", "commit": "72225ea9e4443c3f4b9df91d0193e07c4ee8d382" }, | ||||||
|   "nvim": { "branch": "main", "commit": "7946d1a195c66fed38b3e34f9fa8e0c5a2da0700" }, |   "neo-tree.nvim": { "branch": "main", "commit": "16854ed5559b940f69a6f7138906ebb22c15c553" }, | ||||||
|   "nvim-autopairs": { "branch": "master", "commit": "78a4507bb9ffc9b00f11ae0ac48243d00cb9194d" }, |   "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, | ||||||
|   "nvim-cmp": { "branch": "main", "commit": "d818fd0624205b34e14888358037fb6f5dc51234" }, |   "nvim": { "branch": "main", "commit": "5b5e3aef9ad7af84f463d17b5479f06b87d5c429" }, | ||||||
|  |   "nvim-autopairs": { "branch": "master", "commit": "68f0e5c3dab23261a945272032ee6700af86227a" }, | ||||||
|  |   "nvim-cmp": { "branch": "main", "commit": "c27370703e798666486e3064b64d59eaf4bdc6d5" }, | ||||||
|   "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, |   "nvim-colorizer.lua": { "branch": "master", "commit": "a065833f35a3a7cc3ef137ac88b5381da2ba302e" }, | ||||||
|   "nvim-dap": { "branch": "master", "commit": "6f79b822997f2e8a789c6034e147d42bc6706770" }, |   "nvim-dap": { "branch": "master", "commit": "8228cb00ab0850e483f8d58cc39cc580c05738d6" }, | ||||||
|   "nvim-dap-go": { "branch": "main", "commit": "3999f0744e80d2dba5775189fc7c7a5e9846053e" }, |   "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, | ||||||
|   "nvim-dap-ui": { "branch": "master", "commit": "a5606bc5958db86f8d92803bea7400ee26a8d7e4" }, |   "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, | ||||||
|   "nvim-lspconfig": { "branch": "master", "commit": "01e08d4bf1c35e5126b2ad5209725e4c552289ab" }, |   "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, | ||||||
|   "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, |   "nvim-lspconfig": { "branch": "master", "commit": "fd26f8626c03b424f7140d454031d1dcb8d23513" }, | ||||||
|   "nvim-treesitter": { "branch": "master", "commit": "0d5e1214a5c386a168dc8e19d7da0ceb0e0bd6f2" }, |   "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, | ||||||
|   "nvim-treesitter-context": { "branch": "master", "commit": "2aba92ceb1479485953007f4d5adf34d0b66917e" }, |   "nvim-treesitter": { "branch": "master", "commit": "59573f96164ab3725a2358fe8ffe69e8291d9549" }, | ||||||
|   "nvim-ts-autotag": { "branch": "main", "commit": "1624866a1379fc1861797f0ed05899a9c1d2ff61" }, |   "nvim-treesitter-context": { "branch": "master", "commit": "198720b4016af04c9590f375d714d5bf8afecc1a" }, | ||||||
|   "nvim-web-devicons": { "branch": "master", "commit": "c0cfc1738361b5da1cd0a962dd6f774cc444f856" }, |   "nvim-ts-autotag": { "branch": "main", "commit": "a1d526af391f6aebb25a8795cbc05351ed3620b5" }, | ||||||
|   "plenary.nvim": { "branch": "master", "commit": "a3e3bc82a3f95c5ed0d7201546d5d2c19b20d683" }, |   "nvim-web-devicons": { "branch": "master", "commit": "9793801f974bba70e4ac5d7eae6c4f5659993d8e" }, | ||||||
|   "telescope-file-browser.nvim": { "branch": "master", "commit": "a7ab9a957b17199183388c6f357d614fcaa508e5" }, |   "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, | ||||||
|   "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, |   "telescope-file-browser.nvim": { "branch": "master", "commit": "626998e5c1b71c130d8bc6cf7abb6709b98287bb" }, | ||||||
|  |   "telescope-fzf-native.nvim": { "branch": "main", "commit": "2a5ceff981501cff8f46871d5402cd3378a8ab6a" }, | ||||||
|   "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, |   "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, | ||||||
|   "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, |   "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, | ||||||
|   "todo-comments.nvim": { "branch": "main", "commit": "96fee098a90e7c09c9811aa7df71d773ba8b9b53" }, |   "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, | ||||||
|   "tokyonight.nvim": { "branch": "main", "commit": "6adfcde66e8af2f22dd5d76060980abd8daa0df8" }, |   "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, | ||||||
|   "vim-fugitive": { "branch": "master", "commit": "8c8cdf4405cb8bdb70dd9812a33bb52363a87dbc" }, |   "vim-fugitive": { "branch": "master", "commit": "4a745ea72fa93bb15dd077109afbb3d1809383f2" }, | ||||||
|   "vim-prettier": { "branch": "master", "commit": "7dbdbb12c50a9f4ba72390cce2846248e4368fd0" }, |   "vim-prettier": { "branch": "master", "commit": "7dbdbb12c50a9f4ba72390cce2846248e4368fd0" }, | ||||||
|   "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, |   "vim-rhubarb": { "branch": "master", "commit": "386daa2e9d98e23e27ad089afcbe5c5a903e488d" }, | ||||||
|   "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, |   "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, | ||||||
|   "which-key.nvim": { "branch": "main", "commit": "bb4e82bdaff50a4a93867e4c90938d18e7615af6" } |   "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" } | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,6 +1,4 @@ | ||||||
| return { | return { | ||||||
|   'windwp/nvim-ts-autotag', |   'windwp/nvim-ts-autotag', | ||||||
|   config = function() |   opts = {}, | ||||||
|     require('nvim-ts-autotag').setup() |  | ||||||
|   end |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -1,6 +1,4 @@ | ||||||
| return { | return { | ||||||
|   'norcalli/nvim-colorizer.lua', |   'norcalli/nvim-colorizer.lua', | ||||||
|   config = function () |   opts = {}, | ||||||
|     require('colorizer').setup() |  | ||||||
|   end |  | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -5,9 +5,7 @@ return { | ||||||
|     'neovim/nvim-lspconfig', |     'neovim/nvim-lspconfig', | ||||||
|     'nvim-treesitter/nvim-treesitter', |     'nvim-treesitter/nvim-treesitter', | ||||||
|   }, |   }, | ||||||
|   config = function() |   opts = {}, | ||||||
|     require('go').setup() |  | ||||||
|   end, |  | ||||||
|   event = { 'CmdlineEnter' }, |   event = { 'CmdlineEnter' }, | ||||||
|   ft = { 'go', 'gomod' }, |   ft = { 'go', 'gomod' }, | ||||||
|   build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries |   build = ':lua require("go.install").update_all_sync()', -- if you need to install/update all binaries | ||||||
|  |  | ||||||
|  | @ -2,7 +2,7 @@ return { | ||||||
|   'smoka7/multicursors.nvim', |   'smoka7/multicursors.nvim', | ||||||
|   event = 'VeryLazy', |   event = 'VeryLazy', | ||||||
|   dependencies = { |   dependencies = { | ||||||
|     'smoka7/hydra.nvim', |     'nvimtools/hydra.nvim', | ||||||
|   }, |   }, | ||||||
|   opts = {}, |   opts = {}, | ||||||
|   cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' }, |   cmd = { 'MCstart', 'MCvisual', 'MCclear', 'MCpattern', 'MCvisualPattern', 'MCunderCursor' }, | ||||||
|  |  | ||||||
|  | @ -24,28 +24,59 @@ return { | ||||||
|     -- Add your own debuggers here |     -- Add your own debuggers here | ||||||
|     'leoluz/nvim-dap-go', |     'leoluz/nvim-dap-go', | ||||||
|   }, |   }, | ||||||
|   keys = function(_, keys) |   keys = { | ||||||
|     local dap = require 'dap' |  | ||||||
|     local dapui = require 'dapui' |  | ||||||
|     return { |  | ||||||
|     -- Basic debugging keymaps, feel free to change to your liking! |     -- Basic debugging keymaps, feel free to change to your liking! | ||||||
|       { '<F5>', dap.continue, desc = 'Debug: Start/Continue' }, |     { | ||||||
|       { '<F1>', dap.step_into, desc = 'Debug: Step Into' }, |       '<F5>', | ||||||
|       { '<F2>', dap.step_over, desc = 'Debug: Step Over' }, |       function() | ||||||
|       { '<F3>', dap.step_out, desc = 'Debug: Step Out' }, |         require('dap').continue() | ||||||
|       { '<leader>b', dap.toggle_breakpoint, desc = 'Debug: Toggle Breakpoint' }, |       end, | ||||||
|  |       desc = 'Debug: Start/Continue', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<F1>', | ||||||
|  |       function() | ||||||
|  |         require('dap').step_into() | ||||||
|  |       end, | ||||||
|  |       desc = 'Debug: Step Into', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<F2>', | ||||||
|  |       function() | ||||||
|  |         require('dap').step_over() | ||||||
|  |       end, | ||||||
|  |       desc = 'Debug: Step Over', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<F3>', | ||||||
|  |       function() | ||||||
|  |         require('dap').step_out() | ||||||
|  |       end, | ||||||
|  |       desc = 'Debug: Step Out', | ||||||
|  |     }, | ||||||
|  |     { | ||||||
|  |       '<leader>b', | ||||||
|  |       function() | ||||||
|  |         require('dap').toggle_breakpoint() | ||||||
|  |       end, | ||||||
|  |       desc = 'Debug: Toggle Breakpoint', | ||||||
|  |     }, | ||||||
|     { |     { | ||||||
|       '<leader>B', |       '<leader>B', | ||||||
|       function() |       function() | ||||||
|           dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') |         require('dap').set_breakpoint(vim.fn.input 'Breakpoint condition: ') | ||||||
|       end, |       end, | ||||||
|       desc = 'Debug: Set Breakpoint', |       desc = 'Debug: Set Breakpoint', | ||||||
|     }, |     }, | ||||||
|     -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. |     -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. | ||||||
|       { '<F7>', dapui.toggle, desc = 'Debug: See last session result.' }, |     { | ||||||
|       unpack(keys), |       '<F7>', | ||||||
|     } |       function() | ||||||
|  |         require('dapui').toggle() | ||||||
|       end, |       end, | ||||||
|  |       desc = 'Debug: See last session result.', | ||||||
|  |     }, | ||||||
|  |   }, | ||||||
|   config = function() |   config = function() | ||||||
|     local dap = require 'dap' |     local dap = require 'dap' | ||||||
|     local dapui = require 'dapui' |     local dapui = require 'dapui' | ||||||
|  | @ -90,6 +121,18 @@ return { | ||||||
|       }, |       }, | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     -- Change breakpoint icons | ||||||
|  |     -- vim.api.nvim_set_hl(0, 'DapBreak', { fg = '#e51400' }) | ||||||
|  |     -- vim.api.nvim_set_hl(0, 'DapStop', { fg = '#ffcc00' }) | ||||||
|  |     -- local breakpoint_icons = vim.g.have_nerd_font | ||||||
|  |     --     and { Breakpoint = '', BreakpointCondition = '', BreakpointRejected = '', LogPoint = '', Stopped = '' } | ||||||
|  |     --   or { Breakpoint = '●', BreakpointCondition = '⊜', BreakpointRejected = '⊘', LogPoint = '◆', Stopped = '⭔' } | ||||||
|  |     -- for type, icon in pairs(breakpoint_icons) do | ||||||
|  |     --   local tp = 'Dap' .. type | ||||||
|  |     --   local hl = (type == 'Stopped') and 'DapStop' or 'DapBreak' | ||||||
|  |     --   vim.fn.sign_define(tp, { text = icon, texthl = hl, numhl = hl }) | ||||||
|  |     -- end | ||||||
|  | 
 | ||||||
|     dap.listeners.after.event_initialized['dapui_config'] = dapui.open |     dap.listeners.after.event_initialized['dapui_config'] = dapui.open | ||||||
|     dap.listeners.before.event_terminated['dapui_config'] = dapui.close |     dap.listeners.before.event_terminated['dapui_config'] = dapui.close | ||||||
|     dap.listeners.before.event_exited['dapui_config'] = dapui.close |     dap.listeners.before.event_exited['dapui_config'] = dapui.close | ||||||
|  |  | ||||||
|  | @ -36,15 +36,15 @@ return { | ||||||
|         -- visual mode |         -- visual mode | ||||||
|         map('v', '<leader>hs', function() |         map('v', '<leader>hs', function() | ||||||
|           gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } |           gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } | ||||||
|         end, { desc = 'stage git hunk' }) |         end, { desc = 'git [s]tage hunk' }) | ||||||
|         map('v', '<leader>hr', function() |         map('v', '<leader>hr', function() | ||||||
|           gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } |           gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } | ||||||
|         end, { desc = 'reset git hunk' }) |         end, { desc = 'git [r]eset hunk' }) | ||||||
|         -- normal mode |         -- normal mode | ||||||
|         map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) |         map('n', '<leader>hs', gitsigns.stage_hunk, { desc = 'git [s]tage hunk' }) | ||||||
|         map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) |         map('n', '<leader>hr', gitsigns.reset_hunk, { desc = 'git [r]eset hunk' }) | ||||||
|         map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) |         map('n', '<leader>hS', gitsigns.stage_buffer, { desc = 'git [S]tage buffer' }) | ||||||
|         map('n', '<leader>hu', gitsigns.undo_stage_hunk, { desc = 'git [u]ndo stage hunk' }) |         map('n', '<leader>hu', gitsigns.stage_hunk, { desc = 'git [u]ndo stage hunk' }) | ||||||
|         map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) |         map('n', '<leader>hR', gitsigns.reset_buffer, { desc = 'git [R]eset buffer' }) | ||||||
|         map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) |         map('n', '<leader>hp', gitsigns.preview_hunk, { desc = 'git [p]review hunk' }) | ||||||
|         map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) |         map('n', '<leader>hb', gitsigns.blame_line, { desc = 'git [b]lame line' }) | ||||||
|  | @ -54,7 +54,7 @@ return { | ||||||
|         end, { desc = 'git [D]iff against last commit' }) |         end, { desc = 'git [D]iff against last commit' }) | ||||||
|         -- Toggles |         -- Toggles | ||||||
|         map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) |         map('n', '<leader>tb', gitsigns.toggle_current_line_blame, { desc = '[T]oggle git show [b]lame line' }) | ||||||
|         map('n', '<leader>tD', gitsigns.toggle_deleted, { desc = '[T]oggle git show [D]eleted' }) |         map('n', '<leader>tD', gitsigns.preview_hunk_inline, { desc = '[T]oggle git show [D]eleted' }) | ||||||
|       end, |       end, | ||||||
|     }, |     }, | ||||||
|   }, |   }, | ||||||
|  |  | ||||||
|  | @ -47,7 +47,12 @@ return { | ||||||
|       vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { |       vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, { | ||||||
|         group = lint_augroup, |         group = lint_augroup, | ||||||
|         callback = function() |         callback = function() | ||||||
|  |           -- Only run the linter in buffers that you can modify in order to | ||||||
|  |           -- avoid superfluous noise, notably within the handy LSP pop-ups that | ||||||
|  |           -- describe the hovered symbol using Markdown. | ||||||
|  |           if vim.opt_local.modifiable:get() then | ||||||
|             lint.try_lint() |             lint.try_lint() | ||||||
|  |           end | ||||||
|         end, |         end, | ||||||
|       }) |       }) | ||||||
|     end, |     end, | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue