From 5e431230615836ee3f365fb8a1894364cf0440e6 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 26 Jun 2024 09:20:13 +0300 Subject: [PATCH 01/44] Added relative line number --- init.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/init.lua b/init.lua index 88658ef3033..a0576bfa985 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.opt` @@ -100,9 +100,9 @@ vim.g.have_nerd_font = false -- Make line numbers default vim.opt.number = true +vim.opt.relativenumber = true -- You can also add relative line numbers, to help with jumping. -- Experiment for yourself to see if you like it! --- vim.opt.relativenumber = true -- Enable mouse mode, can be useful for resizing splits for example! vim.opt.mouse = 'a' From 2b354c018810b5e27483d7e61bf68533ace318f4 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 26 Jun 2024 11:31:33 +0300 Subject: [PATCH 02/44] Added custom config file --- init.lua | 9 +++-- lua/custom/plugins/init.lua | 71 ++++++++++++++++++++++++++++++++++++- 2 files changed, 74 insertions(+), 6 deletions(-) diff --git a/init.lua b/init.lua index a0576bfa985..0e463f37728 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,4 @@ --[[ - ===================================================================== ==================== READ THIS BEFORE CONTINUING ==================== ===================================================================== @@ -42,7 +41,6 @@ What is Kickstart? - (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: @@ -162,8 +160,6 @@ vim.opt.hlsearch = true vim.keymap.set('n', '', 'nohlsearch') -- Diagnostic keymaps -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Go to previous [D]iagnostic message' }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Go to next [D]iagnostic message' }) vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Show diagnostic [E]rror messages' }) vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Open diagnostic [Q]uickfix list' }) @@ -222,9 +218,12 @@ vim.opt.rtp:prepend(lazypath) -- -- To update plugins you can run -- :Lazy update --- + +local custom_plugins = require 'custom.plugins.init' + -- NOTE: Here is where you install your plugins. require('lazy').setup({ + custom_plugins, -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index be0eb9d8d7a..51801b95d55 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -2,4 +2,73 @@ -- I promise not to create any merge conflicts in this directory :) -- -- See the kickstart.nvim README for more information -return {} +return { + { + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v2.x', + dependencies = { + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', + }, + config = function() + -- require('neo-tree').setup { + -- -- your config options here + -- filesystem = { + -- follow_current_file = true, + -- hijack_netrw_behavior = 'open_default', + -- use_libuv_file_watcher = true, + -- }, + -- } + end, + }, + { + 'neovim/nvim-lspconfig', + dependencies = { + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + 'lvimuser/lsp-inlayhints.nvim', + }, + config = function() + -- Set up mason + require('mason').setup() + require('mason-lspconfig').setup { + ensure_installed = { 'rust_analyzer' }, -- Add other LSP servers here + } + + local lspconfig = require 'lspconfig' + local inlayhints = require 'lsp-inlayhints' + + -- Enable inlay hints for Rust Analyzer + lspconfig.rust_analyzer.setup { + settings = { + ['rust-analyzer'] = { + inlayHints = { + enable = true, + typeHints = true, + parameterHints = true, + chainingHints = true, + }, + }, + }, + on_attach = function(client, bufnr) + inlayhints.on_attach(client, bufnr) + end, + } + + -- Add additional LSP server configurations here + + -- Enable inlay hints for other servers if supported + vim.api.nvim_create_autocmd('LspAttach', { + group = vim.api.nvim_create_augroup('UserLspConfig', {}), + callback = function(args) + local client = vim.lsp.get_client_by_id(args.data.client_id) + if client.server_capabilities.inlayHintProvider then + vim.lsp.inlay_hint(args.buf, true) + end + -- other lsp configurations you might want + end, + }) + end, + }, +} From 84275d1303fde0f5ae0c5efb852f9075020a88c1 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Fri, 28 Jun 2024 10:04:20 +0300 Subject: [PATCH 03/44] Added code completion on Enter + Neotree command --- init.lua | 2 +- lua/custom/plugins/init.lua | 22 ++++++++++++++-------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index 0e463f37728..f47cac19b5a 100644 --- a/init.lua +++ b/init.lua @@ -728,7 +728,7 @@ require('lazy').setup({ -- Accept ([y]es) the completion. -- This will auto-import if your LSP supports it. -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, + [''] = cmp.mapping.confirm { select = true }, -- If you prefer more traditional completion keymaps, -- you can uncomment the following lines diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 51801b95d55..ebbcaa1255a 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -12,14 +12,20 @@ return { 'MunifTanjim/nui.nvim', }, config = function() - -- require('neo-tree').setup { - -- -- your config options here - -- filesystem = { - -- follow_current_file = true, - -- hijack_netrw_behavior = 'open_default', - -- use_libuv_file_watcher = true, - -- }, - -- } + require('neo-tree').setup { + -- your config options here + filesystem = { + follow_current_file = true, + hijack_netrw_behavior = 'open_default', + use_libuv_file_watcher = true, + }, + } + vim.api.nvim_set_keymap( + 'n', -- normal mode + 'ft', -- leader + f + t + ':Neotree toggle', -- command to toggle Neo-tree + { noremap = true, silent = true } -- options: no remapping, silent + ) end, }, { From ce6a4595f9229336549cb1ae1929f771b2b4d6d9 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 8 Jul 2024 17:16:25 +0300 Subject: [PATCH 04/44] Added neotree to be opened with float mode --- lua/custom/plugins/init.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index ebbcaa1255a..54530fd3732 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -19,6 +19,9 @@ return { hijack_netrw_behavior = 'open_default', use_libuv_file_watcher = true, }, + window = { + position = 'float', + }, } vim.api.nvim_set_keymap( 'n', -- normal mode From 524543cecbcfa2a00dcd29019d1f42c15dc8194d Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Tue, 9 Jul 2024 10:05:20 +0300 Subject: [PATCH 05/44] Added web devicons --- lua/custom/plugins/init.lua | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 54530fd3732..ecd864dcfd6 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -31,6 +31,12 @@ return { ) end, }, + { + 'kyazdani42/nvim-web-devicons', + config = function() + require('nvim-web-devicons').setup { default = true } + end, + }, { 'neovim/nvim-lspconfig', dependencies = { From a965cc86a8541c164eb499845a20c597d9038216 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 10 Jul 2024 08:00:38 +0300 Subject: [PATCH 06/44] Added LazyGit --- lua/custom/plugins/init.lua | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index ecd864dcfd6..88319e73c92 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -37,6 +37,19 @@ return { require('nvim-web-devicons').setup { default = true } end, }, + { + dependencies = { 'nvim-lua/plenary.nvim' }, + keys = { + { 'lg', 'LazyGit', desc = 'LazyGit' }, + }, + config = function() + vim.g.lazygit_floating_window_winblend = 0 -- transparency of floating window + vim.g.lazygit_floating_window_scaling_factor = 0.9 -- scaling factor for floating window + vim.g.lazygit_floating_window_border_chars = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' } -- border characters + vim.g.lazygit_floating_window_use_plenary = 0 -- use plenary.nvim to manage floating window if available + vim.g.lazygit_use_neovim_remote = 1 -- use neovim-remote if available + end, + }, { 'neovim/nvim-lspconfig', dependencies = { From 7b83929482dc23ea30562c7b54efeb296fb22a26 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 10 Jul 2024 08:26:02 +0300 Subject: [PATCH 07/44] Fixed LazyGit --- lua/custom/plugins/init.lua | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 88319e73c92..b37c6904bbd 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -1,7 +1,3 @@ --- You can add your own plugins here or in other files in this directory! --- I promise not to create any merge conflicts in this directory :) --- --- See the kickstart.nvim README for more information return { { 'nvim-neo-tree/neo-tree.nvim', @@ -37,19 +33,6 @@ return { require('nvim-web-devicons').setup { default = true } end, }, - { - dependencies = { 'nvim-lua/plenary.nvim' }, - keys = { - { 'lg', 'LazyGit', desc = 'LazyGit' }, - }, - config = function() - vim.g.lazygit_floating_window_winblend = 0 -- transparency of floating window - vim.g.lazygit_floating_window_scaling_factor = 0.9 -- scaling factor for floating window - vim.g.lazygit_floating_window_border_chars = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' } -- border characters - vim.g.lazygit_floating_window_use_plenary = 0 -- use plenary.nvim to manage floating window if available - vim.g.lazygit_use_neovim_remote = 1 -- use neovim-remote if available - end, - }, { 'neovim/nvim-lspconfig', dependencies = { @@ -63,10 +46,8 @@ return { require('mason-lspconfig').setup { ensure_installed = { 'rust_analyzer' }, -- Add other LSP servers here } - local lspconfig = require 'lspconfig' local inlayhints = require 'lsp-inlayhints' - -- Enable inlay hints for Rust Analyzer lspconfig.rust_analyzer.setup { settings = { @@ -83,9 +64,7 @@ return { inlayhints.on_attach(client, bufnr) end, } - -- Add additional LSP server configurations here - -- Enable inlay hints for other servers if supported vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('UserLspConfig', {}), @@ -99,4 +78,19 @@ return { }) end, }, + { + 'kdheepak/lazygit.nvim', + requires = { 'nvim-lua/plenary.nvim' }, + cmd = { 'LazyGit', 'LazyGitConfig', 'LazyGitCurrentFile', 'LazyGitFilter', 'LazyGitFilterCurrentFile' }, + keys = { + { 'lg', 'LazyGit', desc = 'LazyGit' }, + }, + config = function() + vim.g.lazygit_floating_window_winblend = 0 -- transparency of floating window + vim.g.lazygit_floating_window_scaling_factor = 0.9 -- scaling factor for floating window + vim.g.lazygit_floating_window_border_chars = { '╭', '─', '╮', '│', '╯', '─', '╰', '│' } -- border characters + vim.g.lazygit_floating_window_use_plenary = 0 -- use plenary.nvim to manage floating window if available + vim.g.lazygit_use_neovim_remote = 1 -- use neovim-remote if available + end, + }, } From 1deb634df2fc6e4bb9e3ec0450967b81d755f396 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 10 Jul 2024 08:38:38 +0300 Subject: [PATCH 08/44] Added first commit for rust debugging --- lua/custom/plugins/init.lua | 89 +++++++++++++++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index b37c6904bbd..317e074e829 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -93,4 +93,93 @@ return { vim.g.lazygit_use_neovim_remote = 1 -- use neovim-remote if available end, }, + { + 'mfussenegger/nvim-dap', + config = function() + local dap = require 'dap' + dap.adapters.lldb = { + type = 'executable', + command = '/usr/bin/lldb-vscode', -- Adjust to your lldb-vscode path + name = 'lldb', + } + dap.configurations.rust = { + { + name = 'Launch', + type = 'lldb', + request = 'launch', + program = function() + return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') + end, + cwd = '${workspaceFolder}', + stopOnEntry = false, + args = {}, + runInTerminal = false, + }, + } + vim.fn.sign_define('DapBreakpoint', { text = '🔴', texthl = '', linehl = '', numhl = '' }) + + -- Keybindings for nvim-dap + vim.api.nvim_set_keymap('n', '', 'lua require("dap").continue()', { noremap = true, silent = true }) + vim.api.nvim_set_keymap('n', '', 'lua require("dap").step_over()', { noremap = true, silent = true }) + vim.api.nvim_set_keymap('n', '', 'lua require("dap").step_into()', { noremap = true, silent = true }) + vim.api.nvim_set_keymap('n', '', 'lua require("dap").step_out()', { noremap = true, silent = true }) + vim.api.nvim_set_keymap('n', 'b', 'lua require("dap").toggle_breakpoint()', { noremap = true, silent = true }) + vim.api.nvim_set_keymap( + 'n', + 'B', + 'lua require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))', + { noremap = true, silent = true } + ) + vim.api.nvim_set_keymap( + 'n', + 'lp', + 'lua require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: "))', + { noremap = true, silent = true } + ) + vim.api.nvim_set_keymap('n', 'dr', 'lua require("dap").repl.open()', { noremap = true, silent = true }) + vim.api.nvim_set_keymap('n', 'dl', 'lua require("dap").run_last()', { noremap = true, silent = true }) + end, + }, + { 'nvim-neotest/nvim-nio' }, + { + 'rcarriga/nvim-dap-ui', + requires = { + 'mfussenegger/nvim-dap', + 'nvim-neotest/nvim-nio', -- Add nvim-nio as a dependency + }, + config = function() + local dap, dapui = require 'dap', require 'dapui' + dapui.setup() + dap.listeners.after.event_initialized['dapui_config'] = function() + dapui.open() + end + dap.listeners.before.event_terminated['dapui_config'] = function() + dapui.close() + end + dap.listeners.before.event_exited['dapui_config'] = function() + dapui.close() + end + end, + }, + { + 'simrat39/rust-tools.nvim', + requires = { 'neovim/nvim-lspconfig', 'mfussenegger/nvim-dap' }, + config = function() + local rt = require 'rust-tools' + rt.setup { + server = { + on_attach = function(_, bufnr) + vim.keymap.set('n', '', rt.hover_actions.hover_actions, { buffer = bufnr }) + vim.keymap.set('n', 'a', rt.code_action_group.code_action_group, { buffer = bufnr }) + end, + }, + dap = { + adapter = require('rust-tools.dap').get_codelldb_adapter( + '/path/to/codelldb', -- Path to codelldb executable + '/path/to/lldb/lib/liblldb.so' -- Path to liblldb shared library + ), + }, + } + end, + }, } From 93b8e48d5740251ca27ea4f06b69c4116c268ebe Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 10 Jul 2024 10:00:15 +0300 Subject: [PATCH 09/44] Added plugin for easier terminal usage --- lua/custom/plugins/init.lua | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 317e074e829..f09a8a68f12 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -182,4 +182,38 @@ return { } end, }, + { + 'akinsho/toggleterm.nvim', + config = function() + require('toggleterm').setup { + size = function(term) + if term.direction == 'horizontal' then + return vim.o.lines * 0.5 + elseif term.direction == 'vertical' then + return vim.o.columns * 0.5 + end + end, + open_mapping = [[]], + hide_numbers = true, + shade_filetypes = {}, + shade_terminals = true, + shading_factor = '1', + start_in_insert = true, + insert_mappings = true, + persist_size = true, + direction = 'vertical', + close_on_exit = true, + shell = vim.o.shell, + float_opts = { + border = 'curved', + winblend = 0, + highlights = { + border = 'Normal', + background = 'Normal', + }, + }, + } + vim.api.nvim_set_keymap('n', '', 'ToggleTerm direction=float', { noremap = true, silent = true }) + end, + }, } From cc1c80caac84bb3b8d3888d9055c0be316932886 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Fri, 12 Jul 2024 14:46:44 +0300 Subject: [PATCH 10/44] test commit Signed-off-by: Andrei Baltariu --- init.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/init.lua b/init.lua index f47cac19b5a..76f561f0987 100644 --- a/init.lua +++ b/init.lua @@ -19,8 +19,6 @@ ===================================================================== ===================================================================== -What is Kickstart? - Kickstart.nvim is *not* a distribution. Kickstart.nvim is a starting point for your own configuration. From 5ffef98955219aac55b45d596474d02530b82dbc Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Thu, 18 Jul 2024 00:18:39 +0300 Subject: [PATCH 11/44] Updated key mappings Signed-off-by: Andrei Baltariu --- init.lua | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/init.lua b/init.lua index 76f561f0987..12d372f8bcf 100644 --- a/init.lua +++ b/init.lua @@ -278,17 +278,24 @@ require('lazy').setup({ -- Document existing key chains require('which-key').register { - ['c'] = { name = '[C]ode', _ = 'which_key_ignore' }, - ['d'] = { name = '[D]ocument', _ = 'which_key_ignore' }, - ['r'] = { name = '[R]ename', _ = 'which_key_ignore' }, - ['s'] = { name = '[S]earch', _ = 'which_key_ignore' }, - ['w'] = { name = '[W]orkspace', _ = 'which_key_ignore' }, - ['t'] = { name = '[T]oggle', _ = 'which_key_ignore' }, - ['h'] = { name = 'Git [H]unk', _ = 'which_key_ignore' }, + { 'c', group = '[C]ode' }, + { 'c_', hidden = true }, + { 'd', group = '[D]ocument' }, + { 'd_', hidden = true }, + { 'h', group = 'Git [H]unk' }, + { 'h_', hidden = true }, + { 'r', group = '[R]ename' }, + { 'r_', hidden = true }, + { 's', group = '[S]earch' }, + { 's_', hidden = true }, + { 't', group = '[T]oggle' }, + { 't_', hidden = true }, + { 'w', group = '[W]orkspace' }, + { 'w_', hidden = true }, } -- visual mode require('which-key').register({ - ['h'] = { 'Git [H]unk' }, + { 'h', desc = 'Git [H]unk', mode = 'v' }, }, { mode = 'v' }) end, }, From 676582e593aad73050a3702fd8e4727896498a07 Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Tue, 16 Jul 2024 18:05:40 +0200 Subject: [PATCH 12/44] which-key v3 update (#1022) * which-key v3 update * remove unneeded brackets from which-key registration --- init.lua | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/init.lua b/init.lua index 12d372f8bcf..c0f72b4e6a5 100644 --- a/init.lua +++ b/init.lua @@ -277,26 +277,15 @@ require('lazy').setup({ require('which-key').setup() -- Document existing key chains - require('which-key').register { + require('which-key').add { { 'c', group = '[C]ode' }, - { 'c_', hidden = true }, { 'd', group = '[D]ocument' }, - { 'd_', hidden = true }, - { 'h', group = 'Git [H]unk' }, - { 'h_', hidden = true }, { 'r', group = '[R]ename' }, - { 'r_', hidden = true }, { 's', group = '[S]earch' }, - { 's_', hidden = true }, - { 't', group = '[T]oggle' }, - { 't_', hidden = true }, { 'w', group = '[W]orkspace' }, - { 'w_', hidden = true }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, } - -- visual mode - require('which-key').register({ - { 'h', desc = 'Git [H]unk', mode = 'v' }, - }, { mode = 'v' }) end, }, From 959a163e01b11c8e788e9ec8cd4a4841d892962c Mon Sep 17 00:00:00 2001 From: Folke Lemaitre Date: Tue, 16 Jul 2024 18:06:47 +0200 Subject: [PATCH 13/44] fix(lazy): added error handling for bootstrap (#1001) --- init.lua | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index c0f72b4e6a5..74b37f35671 100644 --- a/init.lua +++ b/init.lua @@ -203,7 +203,10 @@ vim.api.nvim_create_autocmd('TextYankPost', { local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim' if not vim.loop.fs_stat(lazypath) then local lazyrepo = 'https://github.com/folke/lazy.nvim.git' - vim.fn.system { 'git', 'clone', '--filter=blob:none', '--branch=stable', lazyrepo, lazypath } + 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 ---@diagnostic disable-next-line: undefined-field vim.opt.rtp:prepend(lazypath) From 1b18689c23e48dad2a1c3002022c624cd80dc018 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Thu, 18 Jul 2024 17:43:57 +0300 Subject: [PATCH 14/44] Added window picker and another theme Signed-off-by: Andrei Baltariu --- init.lua | 10 +++++++++- lua/custom/plugins/init.lua | 9 +++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 74b37f35671..8d303dc262a 100644 --- a/init.lua +++ b/init.lua @@ -786,7 +786,15 @@ require('lazy').setup({ vim.cmd.hi 'Comment gui=none' end, }, - + -- { + -- 'bluz71/vim-moonfly-colors', + -- name = 'moonfly', + -- lazy = false, + -- priority = 1000, + -- config = function() + -- vim.cmd 'colorscheme moonfly' + -- end, + -- }, -- Highlight todo, notes, etc in comments { 'folke/todo-comments.nvim', event = 'VimEnter', dependencies = { 'nvim-lua/plenary.nvim' }, opts = { signs = false } }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index f09a8a68f12..8acef5b34f7 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -216,4 +216,13 @@ return { vim.api.nvim_set_keymap('n', '', 'ToggleTerm direction=float', { noremap = true, silent = true }) end, }, + { + 's1n7ax/nvim-window-picker', + name = 'window-picker', + event = 'VeryLazy', + version = '2.*', + config = function() + require('window-picker').setup() + end, + }, } From 702bf5c07446693d611e2cc4f4235dc62cd51013 Mon Sep 17 00:00:00 2001 From: TJ DeVries Date: Wed, 17 Jul 2024 21:37:31 -0400 Subject: [PATCH 15/44] fix: add required parsers from nvim-treesitter --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 8d303dc262a..9640d961209 100644 --- a/init.lua +++ b/init.lua @@ -839,7 +839,7 @@ require('lazy').setup({ 'nvim-treesitter/nvim-treesitter', build = ':TSUpdate', opts = { - ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'vim', 'vimdoc' }, + ensure_installed = { 'bash', 'c', 'diff', 'html', 'lua', 'luadoc', 'markdown', 'markdown_inline', 'query', 'vim', 'vimdoc' }, -- Autoinstall languages that are not installed auto_install = true, highlight = { From e4d3d47175c08fd74e58952e7c18bc654be48eaa Mon Sep 17 00:00:00 2001 From: Damjan 9000 Date: Sun, 21 Jul 2024 22:22:10 +0200 Subject: [PATCH 16/44] Fix neo-tree keymap description (#932) The lazy.nvim keys parameter does not need the `desc` to be inside a table in the way that vim.keymap.set() does. With this fix the keymap description will be properly shown for example in telescope keymap search --- lua/kickstart/plugins/neo-tree.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/kickstart/plugins/neo-tree.lua b/lua/kickstart/plugins/neo-tree.lua index c793b885bc6..f126d68af2c 100644 --- a/lua/kickstart/plugins/neo-tree.lua +++ b/lua/kickstart/plugins/neo-tree.lua @@ -11,7 +11,7 @@ return { }, cmd = 'Neotree', keys = { - { '\\', ':Neotree reveal', { desc = 'NeoTree reveal' } }, + { '\\', ':Neotree reveal', desc = 'NeoTree reveal' }, }, opts = { filesystem = { From 0d1379832f78f240f1d2c0a76202d7dee09b164e Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Sun, 21 Jul 2024 22:24:57 +0200 Subject: [PATCH 17/44] Make debug lazy loadable (#978) --- lua/kickstart/plugins/debug.lua | 35 +++++++++++++++++++++------------ 1 file changed, 22 insertions(+), 13 deletions(-) diff --git a/lua/kickstart/plugins/debug.lua b/lua/kickstart/plugins/debug.lua index 31dfecf5b38..196f2c6dbd6 100644 --- a/lua/kickstart/plugins/debug.lua +++ b/lua/kickstart/plugins/debug.lua @@ -24,6 +24,28 @@ return { -- Add your own debuggers here 'leoluz/nvim-dap-go', }, + keys = function(_, keys) + local dap = require 'dap' + local dapui = require 'dapui' + return { + -- Basic debugging keymaps, feel free to change to your liking! + { '', dap.continue, desc = 'Debug: Start/Continue' }, + { '', dap.step_into, desc = 'Debug: Step Into' }, + { '', dap.step_over, desc = 'Debug: Step Over' }, + { '', dap.step_out, desc = 'Debug: Step Out' }, + { 'b', dap.toggle_breakpoint, desc = 'Debug: Toggle Breakpoint' }, + { + 'B', + function() + dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') + end, + desc = 'Debug: Set Breakpoint', + }, + -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. + { '', dapui.toggle, desc = 'Debug: See last session result.' }, + unpack(keys), + } + end, config = function() local dap = require 'dap' local dapui = require 'dapui' @@ -45,16 +67,6 @@ return { }, } - -- Basic debugging keymaps, feel free to change to your liking! - vim.keymap.set('n', '', dap.continue, { desc = 'Debug: Start/Continue' }) - vim.keymap.set('n', '', dap.step_into, { desc = 'Debug: Step Into' }) - vim.keymap.set('n', '', dap.step_over, { desc = 'Debug: Step Over' }) - vim.keymap.set('n', '', dap.step_out, { desc = 'Debug: Step Out' }) - vim.keymap.set('n', 'b', dap.toggle_breakpoint, { desc = 'Debug: Toggle Breakpoint' }) - vim.keymap.set('n', 'B', function() - dap.set_breakpoint(vim.fn.input 'Breakpoint condition: ') - end, { desc = 'Debug: Set Breakpoint' }) - -- Dap UI setup -- For more information, see |:help nvim-dap-ui| dapui.setup { @@ -77,9 +89,6 @@ return { }, } - -- Toggle to see last session result. Without this, you can't see session output in case of unhandled exception. - vim.keymap.set('n', '', dapui.toggle, { desc = 'Debug: See last session result.' }) - dap.listeners.after.event_initialized['dapui_config'] = dapui.open dap.listeners.before.event_terminated['dapui_config'] = dapui.close dap.listeners.before.event_exited['dapui_config'] = dapui.close From 73247012b8c09f358b3a8c6211f3d8ff9f116140 Mon Sep 17 00:00:00 2001 From: Artyom <84637383+MZhuvka@users.noreply.github.com> Date: Sun, 21 Jul 2024 23:33:26 +0300 Subject: [PATCH 18/44] Update README.md | %userprofile%\appdata\local -> %localappdata% (#963) - Replace `%userprofile%\AppData\Local\nvim\` and `$env:USERPROFILE\AppData\Local\nvim` to `%localappdata%\nvim` and `$env:LOCALAPPDATA\nvim respectfully` --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index f445b65ecd5..3f19854cd20 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,8 @@ Neovim's configurations are located under the following paths, depending on your | OS | PATH | | :- | :--- | | Linux, MacOS | `$XDG_CONFIG_HOME/nvim`, `~/.config/nvim` | -| Windows (cmd)| `%userprofile%\AppData\Local\nvim\` | -| Windows (powershell)| `$env:USERPROFILE\AppData\Local\nvim\` | +| Windows (cmd)| `%localappdata%\nvim\` | +| Windows (powershell)| `$env:LOCALAPPDATA\nvim\` | #### Recommended Step @@ -77,13 +77,13 @@ git clone https://github.com/nvim-lua/kickstart.nvim.git "${XDG_CONFIG_HOME:-$HO If you're using `cmd.exe`: ``` -git clone https://github.com/nvim-lua/kickstart.nvim.git %userprofile%\AppData\Local\nvim\ +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:USERPROFILE\AppData\Local\nvim\ +git clone https://github.com/nvim-lua/kickstart.nvim.git $env:LOCALAPPDATA\nvim\ ``` From a7bb5ab8d8b47fc42f28f551b8a486c1c6f2e071 Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Sun, 21 Jul 2024 22:34:17 +0200 Subject: [PATCH 19/44] Make conform.nvim be lazy-loadable again (#977) The PR that disabled lazy loading (#818) was to fix plugin not being loaded before write. This sets up lazy to load conform before write. --- init.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 9640d961209..84d952e95d0 100644 --- a/init.lua +++ b/init.lua @@ -623,7 +623,8 @@ require('lazy').setup({ { -- Autoformat 'stevearc/conform.nvim', - lazy = false, + event = { 'BufWritePre' }, + cmd = { 'ConformInfo' }, keys = { { 'f', From cec70ef55c9716b3d1851ffd6a4d17d172d28210 Mon Sep 17 00:00:00 2001 From: Richard Macklin <1863540+rmacklin@users.noreply.github.com> Date: Sun, 21 Jul 2024 13:34:51 -0700 Subject: [PATCH 20/44] Fix comment about mini.ai example (#985) This example wasn't using `'` so this makes more sense --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 84d952e95d0..1c4a4afdf65 100644 --- a/init.lua +++ b/init.lua @@ -806,7 +806,7 @@ require('lazy').setup({ -- -- Examples: -- - va) - [V]isually select [A]round [)]paren - -- - yinq - [Y]ank [I]nside [N]ext [']quote + -- - yinq - [Y]ank [I]nside [N]ext [Q]uote -- - ci' - [C]hange [I]nside [']quote require('mini.ai').setup { n_lines = 500 } From aad214801d13ac347de481f65385ba88d0e65cdd Mon Sep 17 00:00:00 2001 From: Vladislav Grechannik <52157081+VlaDexa@users.noreply.github.com> Date: Mon, 22 Jul 2024 02:35:07 +0200 Subject: [PATCH 21/44] Neovim 0.10 updates (#936) * Neovim 0.10 updates Provide the buffer for which to enable inlay hints Co-authored-by: Matt Mirus * refactor: replace vim.loop with vim.uv * Upgrade folke/neodev (sunsetting) to folke/lazydev * Update checkhealth for 0.10 release --------- Co-authored-by: Matt Mirus Co-authored-by: mrr11k Co-authored-by: Seb Tomasini --- init.lua | 26 +++++++++++--------------- lua/kickstart/health.lua | 6 +++--- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index 1c4a4afdf65..037b1721f6a 100644 --- a/init.lua +++ b/init.lua @@ -201,7 +201,7 @@ vim.api.nvim_create_autocmd('TextYankPost', { -- [[ 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' -if not vim.loop.fs_stat(lazypath) then +if not vim.uv.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 @@ -234,11 +234,6 @@ require('lazy').setup({ -- -- Use `opts = {}` to force a plugin to be loaded. -- - -- This is equivalent to: - -- require('Comment').setup({}) - - -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, -- Here is a more advanced example where we pass configuration -- options to `gitsigns.nvim`. This is equivalent to the following Lua: @@ -416,9 +411,9 @@ require('lazy').setup({ -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` { 'j-hui/fidget.nvim', opts = {} }, - -- `neodev` configures Lua LSP for your Neovim config, runtime and plugins + -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- used for completion, annotations and signatures of Neovim apis - { 'folke/neodev.nvim', opts = {} }, + { 'folke/lazydev.nvim', ft = 'lua', opts = {} }, }, config = function() -- Brief aside: **What is LSP?** @@ -495,10 +490,6 @@ require('lazy').setup({ -- or a suggestion from your LSP for this to activate. map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction') - -- Opens a popup that displays documentation about the word under your cursor - -- See `:help K` for why this keymap. - map('K', vim.lsp.buf.hover, 'Hover Documentation') - -- WARN: This is not Goto Definition, this is Goto Declaration. -- For example, in C this would take you to the header. map('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') @@ -509,7 +500,7 @@ require('lazy').setup({ -- -- 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.server_capabilities.documentHighlightProvider then + if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_documentHighlight) then local highlight_augroup = vim.api.nvim_create_augroup('kickstart-lsp-highlight', { clear = false }) vim.api.nvim_create_autocmd({ 'CursorHold', 'CursorHoldI' }, { buffer = event.buf, @@ -536,9 +527,9 @@ require('lazy').setup({ -- 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.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then + if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) then map('th', function() - vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled()) + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled { bufnr = event.buf }) end, '[T]oggle Inlay [H]ints') end end, @@ -762,6 +753,11 @@ require('lazy').setup({ -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps }, sources = { + { + name = 'lazydev', + -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it + group_index = 0, + }, { name = 'nvim_lsp' }, { name = 'luasnip' }, { name = 'path' }, diff --git a/lua/kickstart/health.lua b/lua/kickstart/health.lua index 04df77b33e8..b59d08649af 100644 --- a/lua/kickstart/health.lua +++ b/lua/kickstart/health.lua @@ -6,13 +6,13 @@ --]] local check_version = function() - local verstr = string.format('%s.%s.%s', vim.version().major, vim.version().minor, vim.version().patch) - if not vim.version.cmp then + local verstr = tostring(vim.version()) + if not vim.version.ge then vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) return end - if vim.version.cmp(vim.version(), { 0, 9, 4 }) >= 0 then + if vim.version.ge(vim.version(), '0.10-dev') then vim.health.ok(string.format("Neovim version is: '%s'", verstr)) else vim.health.error(string.format("Neovim out of date: '%s'. Upgrade to latest stable or nightly", verstr)) From 97b988c786a272cc37c25fa7c96e1e18067bdc2f Mon Sep 17 00:00:00 2001 From: Richard Macklin <1863540+rmacklin@users.noreply.github.com> Date: Sun, 21 Jul 2024 19:08:09 -0700 Subject: [PATCH 22/44] Update lazydev config to fix "Undefined field `fs_stat`" LSP error (#1040) 7513ec8a7dd579957ce2d9b44e05c1da18d7d0e3 switched from neodev to lazydev, but in the process it introduced an LSP error in `init.lua`, which degrades the desired "first timer" experience of kickstart.nvim. This commit follows the configuration suggested in https://github.com/folke/lazydev.nvim/tree/6184ebbbc8045d70077659b7d30c705a588dc62f#-installation which resolves the LSP error. --- init.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 037b1721f6a..3a09d551480 100644 --- a/init.lua +++ b/init.lua @@ -413,7 +413,17 @@ require('lazy').setup({ -- `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 = {} }, + { + 'folke/lazydev.nvim', + ft = 'lua', + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = 'luvit-meta/library', words = { 'vim%.uv' } }, + }, + }, + }, + { 'Bilal2453/luvit-meta', lazy = true }, }, config = function() -- Brief aside: **What is LSP?** From 1ba8a789c60b13c80acff7bf81e3a93f6b374b12 Mon Sep 17 00:00:00 2001 From: srdtrk <59252793+srdtrk@users.noreply.github.com> Date: Mon, 22 Jul 2024 04:21:21 +0200 Subject: [PATCH 23/44] lint: fix lsp warning in `vim.lsp.inlay_hint.is_enabled` (#947) * fix: lsp warning * review suggestion Co-authored-by: Tom Kuson --------- Co-authored-by: Tom Kuson From c5904f25d8bd275ee27a2b366aa312bbd46d3a37 Mon Sep 17 00:00:00 2001 From: Richard Macklin <1863540+rmacklin@users.noreply.github.com> Date: Mon, 22 Jul 2024 10:00:35 -0700 Subject: [PATCH 24/44] Update comment about the toggle inlay hints keymap (#1041) --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 3a09d551480..31114294a03 100644 --- a/init.lua +++ b/init.lua @@ -533,7 +533,7 @@ require('lazy').setup({ }) end - -- The following autocommand is used to enable inlay hints in your + -- 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 From ab27c536ebf08d4308fed324ed265043247b5c02 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 31 Jul 2024 14:08:29 +0300 Subject: [PATCH 25/44] Added errors list message popup Signed-off-by: Andrei Baltariu --- init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/init.lua b/init.lua index 0127c787a5f..834c37907c7 100644 --- a/init.lua +++ b/init.lua @@ -162,6 +162,7 @@ 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', 'e', vim.diagnostic.open_float, { desc = 'Open [E]error messages 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 From 2ed1edfb6e34f42973cd2e4d1e24ca9dc66572eb Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Fri, 23 Aug 2024 10:01:29 +0300 Subject: [PATCH 26/44] Added plugin for markdown + gopls LSP Signed-off-by: Andrei Baltariu --- init.lua | 4 ++-- lua/custom/plugins/init.lua | 12 +++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/init.lua b/init.lua index 834c37907c7..367ea9f1504 100644 --- a/init.lua +++ b/init.lua @@ -583,7 +583,7 @@ require('lazy').setup({ -- For example, to see the options for `lua_ls`, you could go to: https://luals.github.io/wiki/settings/ local servers = { -- clangd = {}, - -- gopls = {}, + gopls = {}, -- pyright = {}, -- rust_analyzer = {}, -- ... etc. See `:help lspconfig-all` for a list of all the pre-configured LSPs @@ -605,7 +605,7 @@ require('lazy').setup({ callSnippet = 'Replace', }, -- You can toggle below to ignore Lua_LS's noisy `missing-fields` warnings - -- diagnostics = { disable = { 'missing-fields' } }, + diagnostics = { disable = { 'missing-fields' } }, }, }, }, diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 8acef5b34f7..22db575e8f4 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -44,10 +44,12 @@ return { -- Set up mason require('mason').setup() require('mason-lspconfig').setup { - ensure_installed = { 'rust_analyzer' }, -- Add other LSP servers here + ensure_installed = { 'rust_analyzer', 'gopls' }, -- Add other LSP servers here } + local lspconfig = require 'lspconfig' local inlayhints = require 'lsp-inlayhints' + -- Enable inlay hints for Rust Analyzer lspconfig.rust_analyzer.setup { settings = { @@ -224,5 +226,13 @@ return { config = function() require('window-picker').setup() end, + { + 'iamcco/markdown-preview.nvim', + build = 'cd app && npm install', + ft = 'markdown', + config = function() + vim.g.mkdp_auto_start = 1 + end, + }, }, } From 915136efd2fb5fe1ac4d30d3b9b581f04f50b4ee Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Sat, 5 Oct 2024 18:02:39 +0300 Subject: [PATCH 27/44] Added git-blame plugin Signed-off-by: Andrei Baltariu --- lua/custom/plugins/init.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 22db575e8f4..7b67f9b6e20 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -234,5 +234,22 @@ return { vim.g.mkdp_auto_start = 1 end, }, + { + "f-person/git-blame.nvim", + -- load the plugin at startup + event = "VeryLazy", + -- Because of the keys part, you will be lazy loading this plugin. + -- The plugin will only load once one of the keys is used. + -- If you want to load the plugin at startup, add something like event = "VeryLazy", + -- or lazy = false. One of both options will work. + opts = { + -- your configuration comes here + -- for example + enabled = true, -- if you want to enable the plugin + message_template = " • <>", -- template for the blame message, check the Message template section for more options + date_format = "%m-%d-%Y %H:%M:%S", -- template for the date, check Date format section for more options + virtual_text_column = 1, -- virtual text start column, check Start virtual text at column section for more options + }, }, + } } From d16907c738c7e36314b93afdaaf9d1fe504e0899 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Thu, 10 Oct 2024 13:17:56 +0300 Subject: [PATCH 28/44] Added clippy check in nvim Signed-off-by: Andrei Baltariu --- init.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 1e3c6f5ca43..fba2518fb04 100644 --- a/init.lua +++ b/init.lua @@ -224,10 +224,12 @@ vim.opt.rtp:prepend(lazypath) -- :Lazy update local custom_plugins = require 'custom.plugins.init' +local go_plugins = require 'custom.plugins.go' -- NOTE: Here is where you install your plugins. require('lazy').setup({ custom_plugins, + go_plugins, -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically @@ -621,7 +623,7 @@ require('lazy').setup({ -- clangd = {}, gopls = {}, -- pyright = {}, - -- rust_analyzer = {}, + 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: @@ -671,6 +673,20 @@ require('lazy').setup({ -- by the server configuration above. Useful when disabling -- certain features of an LSP (for example, turning off formatting for tsserver) server.capabilities = vim.tbl_deep_extend('force', {}, capabilities, server.capabilities or {}) + if server_name == 'rust_analyzer' then + server.settings = { + ['rust-analyzer'] = { + checkOnSave = { + command = 'clippy', -- Enable clippy diagnostics + }, + diagnostics = { + enable = true, + disabled = { 'unresolved-proc-macro' }, + enableExperimental = true, + }, + }, + } + end require('lspconfig')[server_name].setup(server) end, }, From f080cf057fa602c034106455aef8cf74ad8f5c81 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Thu, 10 Oct 2024 13:18:19 +0300 Subject: [PATCH 29/44] Added custom file for go Signed-off-by: Andrei Baltariu --- lua/custom/plugins/go.lua | 69 ++++++++++++++++++++++ lua/custom/plugins/init.lua | 114 ++++-------------------------------- 2 files changed, 82 insertions(+), 101 deletions(-) create mode 100644 lua/custom/plugins/go.lua diff --git a/lua/custom/plugins/go.lua b/lua/custom/plugins/go.lua new file mode 100644 index 00000000000..3a4f0ac1dc2 --- /dev/null +++ b/lua/custom/plugins/go.lua @@ -0,0 +1,69 @@ +return { + { + 'mfussenegger/nvim-dap', -- Core debugging support for Neovim + }, + { + 'leoluz/nvim-dap-go', -- Specific configuration and helpers for Go + dependencies = { 'mfussenegger/nvim-dap' }, + config = function() + require('dap-go').setup { + dap_configurations = { + { + type = 'go', + name = 'Debug Test File', + request = 'launch', + mode = 'test', + program = '${file}', + dlvToolPath = vim.fn.exepath 'dlv', + }, + { + type = 'go', + name = 'Debug Benchmark', + request = 'launch', + mode = 'test', + program = '${file}', + args = { '-bench', '.' }, + dlvToolPath = vim.fn.exepath 'dlv', + }, + }, + } + end, + }, + { + 'rcarriga/nvim-dap-ui', -- User interface for DAP for a better visual experience + dependencies = { 'mfussenegger/nvim-dap' }, + config = function() + require('dapui').setup() + local dap, dapui = require 'dap', require 'dapui' + dap.listeners.after.event_initialized['dapui_config'] = function() + dapui.open() + end + dap.listeners.before.event_terminated['dapui_config'] = function() + dapui.close() + end + dap.listeners.before.event_exited['dapui_config'] = function() + dapui.close() + end + + -- Set up debugging keybindings for Go + vim.keymap.set('n', '', function() + dap.continue() + end, { noremap = true, silent = true }) -- Start/Continue + vim.keymap.set('n', '', function() + dap.step_over() + end, { noremap = true, silent = true }) -- Step Over + vim.keymap.set('n', '', function() + dap.step_into() + end, { noremap = true, silent = true }) -- Step Into + vim.keymap.set('n', '', function() + dap.step_out() + end, { noremap = true, silent = true }) -- Step Out + vim.keymap.set('n', 'b', function() + dap.toggle_breakpoint() + end, { noremap = true, silent = true }) -- Toggle Breakpoint + vim.keymap.set('n', 'dr', function() + dap.repl.open() + end, { noremap = true, silent = true }) -- Open REPL + end, + }, +} diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 7b67f9b6e20..baf099b3f36 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -95,95 +95,7 @@ return { vim.g.lazygit_use_neovim_remote = 1 -- use neovim-remote if available end, }, - { - 'mfussenegger/nvim-dap', - config = function() - local dap = require 'dap' - dap.adapters.lldb = { - type = 'executable', - command = '/usr/bin/lldb-vscode', -- Adjust to your lldb-vscode path - name = 'lldb', - } - dap.configurations.rust = { - { - name = 'Launch', - type = 'lldb', - request = 'launch', - program = function() - return vim.fn.input('Path to executable: ', vim.fn.getcwd() .. '/', 'file') - end, - cwd = '${workspaceFolder}', - stopOnEntry = false, - args = {}, - runInTerminal = false, - }, - } - vim.fn.sign_define('DapBreakpoint', { text = '🔴', texthl = '', linehl = '', numhl = '' }) - - -- Keybindings for nvim-dap - vim.api.nvim_set_keymap('n', '', 'lua require("dap").continue()', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', '', 'lua require("dap").step_over()', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', '', 'lua require("dap").step_into()', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', '', 'lua require("dap").step_out()', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', 'b', 'lua require("dap").toggle_breakpoint()', { noremap = true, silent = true }) - vim.api.nvim_set_keymap( - 'n', - 'B', - 'lua require("dap").set_breakpoint(vim.fn.input("Breakpoint condition: "))', - { noremap = true, silent = true } - ) - vim.api.nvim_set_keymap( - 'n', - 'lp', - 'lua require("dap").set_breakpoint(nil, nil, vim.fn.input("Log point message: "))', - { noremap = true, silent = true } - ) - vim.api.nvim_set_keymap('n', 'dr', 'lua require("dap").repl.open()', { noremap = true, silent = true }) - vim.api.nvim_set_keymap('n', 'dl', 'lua require("dap").run_last()', { noremap = true, silent = true }) - end, - }, { 'nvim-neotest/nvim-nio' }, - { - 'rcarriga/nvim-dap-ui', - requires = { - 'mfussenegger/nvim-dap', - 'nvim-neotest/nvim-nio', -- Add nvim-nio as a dependency - }, - config = function() - local dap, dapui = require 'dap', require 'dapui' - dapui.setup() - dap.listeners.after.event_initialized['dapui_config'] = function() - dapui.open() - end - dap.listeners.before.event_terminated['dapui_config'] = function() - dapui.close() - end - dap.listeners.before.event_exited['dapui_config'] = function() - dapui.close() - end - end, - }, - { - 'simrat39/rust-tools.nvim', - requires = { 'neovim/nvim-lspconfig', 'mfussenegger/nvim-dap' }, - config = function() - local rt = require 'rust-tools' - rt.setup { - server = { - on_attach = function(_, bufnr) - vim.keymap.set('n', '', rt.hover_actions.hover_actions, { buffer = bufnr }) - vim.keymap.set('n', 'a', rt.code_action_group.code_action_group, { buffer = bufnr }) - end, - }, - dap = { - adapter = require('rust-tools.dap').get_codelldb_adapter( - '/path/to/codelldb', -- Path to codelldb executable - '/path/to/lldb/lib/liblldb.so' -- Path to liblldb shared library - ), - }, - } - end, - }, { 'akinsho/toggleterm.nvim', config = function() @@ -235,21 +147,21 @@ return { end, }, { - "f-person/git-blame.nvim", - -- load the plugin at startup - event = "VeryLazy", - -- Because of the keys part, you will be lazy loading this plugin. - -- The plugin will only load once one of the keys is used. - -- If you want to load the plugin at startup, add something like event = "VeryLazy", - -- or lazy = false. One of both options will work. - opts = { + 'f-person/git-blame.nvim', + -- load the plugin at startup + event = 'VeryLazy', + -- Because of the keys part, you will be lazy loading this plugin. + -- The plugin will only load once one of the keys is used. + -- If you want to load the plugin at startup, add something like event = "VeryLazy", + -- or lazy = false. One of both options will work. + opts = { -- your configuration comes here -- for example - enabled = true, -- if you want to enable the plugin - message_template = " • <>", -- template for the blame message, check the Message template section for more options - date_format = "%m-%d-%Y %H:%M:%S", -- template for the date, check Date format section for more options - virtual_text_column = 1, -- virtual text start column, check Start virtual text at column section for more options + enabled = true, -- if you want to enable the plugin + message_template = ' • <>', -- template for the blame message, check the Message template section for more options + date_format = '%m-%d-%Y %H:%M:%S', -- template for the date, check Date format section for more options + virtual_text_column = 1, -- virtual text start column, check Start virtual text at column section for more options + }, }, }, - } } From 7c012f76a1a8f5ba034826057c419d28fe754d8a Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Thu, 10 Oct 2024 17:49:24 +0300 Subject: [PATCH 30/44] Fixed contract module error Signed-off-by: Andrei Baltariu --- init.lua | 4 ++-- pack/plugins/start/nvim-dap | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) create mode 160000 pack/plugins/start/nvim-dap diff --git a/init.lua b/init.lua index fba2518fb04..1a5949a37e9 100644 --- a/init.lua +++ b/init.lua @@ -681,8 +681,8 @@ require('lazy').setup({ }, diagnostics = { enable = true, - disabled = { 'unresolved-proc-macro' }, - enableExperimental = true, + -- disabled = { 'unresolved-proc-macro' }, + -- enableExperimental = true, }, }, } diff --git a/pack/plugins/start/nvim-dap b/pack/plugins/start/nvim-dap new file mode 160000 index 00000000000..7ff6936010b --- /dev/null +++ b/pack/plugins/start/nvim-dap @@ -0,0 +1 @@ +Subproject commit 7ff6936010b7222fea2caea0f67ed77f1b7c60dd From f5fab624e7ef98c8c4fb972b16b9ce7ae104241f Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 18 Nov 2024 14:46:15 +0200 Subject: [PATCH 31/44] Fixed config Signed-off-by: Andrei Baltariu --- init.lua | 1694 ++++++++++++++++++++++++------------------------ lazy-lock.json | 74 ++- 2 files changed, 887 insertions(+), 881 deletions(-) diff --git a/init.lua b/init.lua index 3759d927ba8..84d15035ac6 100644 --- a/init.lua +++ b/init.lua @@ -34,7 +34,7 @@ are first encountering a few different constructs in your nvim config. I hope you enjoy your Neovim journey, - TJ -P.S. You can delete this when you're done too. It's your config now :) +P.S. You can delete this when you're done too. It's your config now :)custom --]] -- Set as the leader key @@ -177,935 +177,934 @@ vim.opt.rtp:prepend(lazypath) -- -- You can also configure plugins after the setup call, -- as they will be available in your neovim runtime. -require('lazy').setup({ +require('lazy').setup { -- NOTE: First, some plugins that don't require any configuration -{ - "junegunn/fzf", + { + 'junegunn/fzf', build = function() - vim.fn["fzf#install"]() + vim.fn['fzf#install']() end, }, { 'jose-elias-alvarez/null-ls.nvim', requires = { 'nvim-lua/plenary.nvim' }, config = function() - require("null-ls").setup({}) - - end + require('null-ls').setup {} + end, }, { - "linrongbin16/fzfx.nvim", - dependencies = { "nvim-tree/nvim-web-devicons", 'junegunn/fzf' }, - - -- 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 force a plugin to be loaded. - -- - - -- NOTE: This is where your plugins related to LSP can be installed. - -- The configuration is done below. Search for lspconfig to find it below. - { - -- LSP Configuration & Plugins - 'neovim/nvim-lspconfig', + 'kdheepak/lazygit.nvim', dependencies = { - -- Automatically install LSPs to stdpath for neovim - 'williamboman/mason.nvim', - 'williamboman/mason-lspconfig.nvim', - - -- Useful status updates for LSP - -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, - - -- Additional lua configuration, makes nvim stuff amazing! - 'folke/neodev.nvim', + 'nvim-lua/plenary.nvim', -- Ensure plenary is installed }, + cmd = 'LazyGit', }, - { - -- Autocompletion - 'hrsh7th/nvim-cmp', - dependencies = { - -- Snippet Engine & its associated nvim-cmp source - 'L3MON4D3/LuaSnip', - 'saadparwaiz1/cmp_luasnip', + 'linrongbin16/fzfx.nvim', + dependencies = { 'nvim-tree/nvim-web-devicons', 'junegunn/fzf' }, - -- Adds LSP completion capabilities - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-path', + -- 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 force a plugin to be loaded. + -- - -- Adds a number of user-friendly snippets - 'rafamadriz/friendly-snippets', + -- NOTE: This is where your plugins related to LSP can be installed. + -- The configuration is done below. Search for lspconfig to find it below. + { + -- LSP Configuration & Plugins + 'neovim/nvim-lspconfig', + dependencies = { + -- Automatically install LSPs to stdpath for neovim + 'williamboman/mason.nvim', + 'williamboman/mason-lspconfig.nvim', + + -- Useful status updates for LSP + -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` + { 'j-hui/fidget.nvim', opts = {} }, + }, }, - }, - { + { + -- Autocompletion + 'hrsh7th/nvim-cmp', + dependencies = { + -- Snippet Engine & its associated nvim-cmp source + 'L3MON4D3/LuaSnip', + 'saadparwaiz1/cmp_luasnip', + + -- Adds LSP completion capabilities + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-path', + + -- Adds a number of user-friendly snippets + 'rafamadriz/friendly-snippets', + }, + }, + { 's1n7ax/nvim-window-picker', name = 'window-picker', event = 'VeryLazy', version = '2.*', config = function() - require'window-picker'.setup() + require('window-picker').setup() end, - }, - -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, - { 'null-ls' }, - { - -- Adds git related signs to the gutter, as well as utilities for managing changes - 'lewis6991/gitsigns.nvim', - opts = { - -- See `:help gitsigns.txt` - signs = { - add = { text = '+' }, - change = { text = '~' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - }, - on_attach = function(bufnr) - local gs = package.loaded.gitsigns - - local function map(mode, l, r, opts) - opts = opts or {} - opts.buffer = bufnr - vim.keymap.set(mode, l, r, opts) - end + }, + -- Useful plugin to show you pending keybinds. + { 'folke/which-key.nvim', opts = {} }, + { + -- Adds git related signs to the gutter, as well as utilities for managing changes + 'lewis6991/gitsigns.nvim', + opts = { + -- See `:help gitsigns.txt` + signs = { + add = { text = '+' }, + change = { text = '~' }, + delete = { text = '_' }, + topdelete = { text = '‾' }, + changedelete = { text = '~' }, + }, + on_attach = function(bufnr) + local gs = package.loaded.gitsigns - vim.api.nvim_set_keymap('n', 'lg', "FzfxLiveGrep", { noremap = true, silent = true }) - -- Navigation - map({ 'n', 'v' }, ']c', function() - if vim.wo.diff then - return ']c' - end - vim.schedule(function() - gs.next_hunk() - end) - return '' - end, { expr = true, desc = 'Jump to next hunk' }) - - map({ 'n', 'v' }, '[c', function() - if vim.wo.diff then - return '[c' + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) end - vim.schedule(function() - gs.prev_hunk() - end) - return '' - end, { expr = true, desc = 'Jump to previous hunk' }) - - -- Actions - -- visual mode - map('v', 'hs', function() - gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'stage git hunk' }) - map('v', 'hr', function() - gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } - end, { desc = 'reset git hunk' }) - -- normal mode - map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) - map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) - map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) - map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) - map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) - map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) - map('n', 'hb', function() - gs.blame_line { full = false } - end, { desc = 'git blame line' }) - map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) - map('n', 'hD', function() - gs.diffthis '~' - end, { desc = 'git diff against last commit' }) - - -- Toggles - map('n', 'tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' }) - map('n', 'td', gs.toggle_deleted, { desc = 'toggle git show deleted' }) - - -- Text object - map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select git hunk' }) - end, + + -- Navigation + map({ 'n', 'v' }, ']c', function() + if vim.wo.diff then + return ']c' + end + vim.schedule(function() + gs.next_hunk() + end) + return '' + end, { expr = true, desc = 'Jump to next hunk' }) + + map({ 'n', 'v' }, '[c', function() + if vim.wo.diff then + return '[c' + end + vim.schedule(function() + gs.prev_hunk() + end) + return '' + end, { expr = true, desc = 'Jump to previous hunk' }) + + -- Actions + -- visual mode + map('v', 'hs', function() + gs.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'stage git hunk' }) + map('v', 'hr', function() + gs.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } + end, { desc = 'reset git hunk' }) + -- normal mode + map('n', 'hs', gs.stage_hunk, { desc = 'git stage hunk' }) + map('n', 'hr', gs.reset_hunk, { desc = 'git reset hunk' }) + map('n', 'hS', gs.stage_buffer, { desc = 'git Stage buffer' }) + map('n', 'hu', gs.undo_stage_hunk, { desc = 'undo stage hunk' }) + map('n', 'hR', gs.reset_buffer, { desc = 'git Reset buffer' }) + map('n', 'hp', gs.preview_hunk, { desc = 'preview git hunk' }) + map('n', 'hb', function() + gs.blame_line { full = false } + end, { desc = 'git blame line' }) + map('n', 'hd', gs.diffthis, { desc = 'git diff against index' }) + map('n', 'hD', function() + gs.diffthis '~' + end, { desc = 'git diff against last commit' }) + + -- Toggles + map('n', 'tb', gs.toggle_current_line_blame, { desc = 'toggle git blame line' }) + map('n', 'td', gs.toggle_deleted, { desc = 'toggle git show deleted' }) + + -- Text object + map({ 'o', 'x' }, 'ih', ':Gitsigns select_hunk', { desc = 'select git hunk' }) + end, + }, }, - }, - -- 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 `config` key, the configuration only runs - -- after the plugin has been loaded: - -- config = function() ... end - - { -- Useful plugin to show you pending keybinds. - 'folke/which-key.nvim', - event = 'VimEnter', -- Sets the loading event to 'VimEnter' - opts = { - 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 whick-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 = '', + -- 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 `config` key, the configuration only runs + -- after the plugin has been loaded: + -- config = function() ... end + + { -- Useful plugin to show you pending keybinds. + 'folke/which-key.nvim', + event = 'VimEnter', -- Sets the loading event to 'VimEnter' + opts = { + 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 whick-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 = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, - { 'd', group = '[D]ocument' }, - { 'r', group = '[R]ename' }, - { 's', group = '[S]earch' }, - { 'w', group = '[W]orkspace' }, - { 't', group = '[T]oggle' }, - { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + -- Document existing key chains + spec = { + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'd', group = '[D]ocument' }, + { 'r', group = '[R]ename' }, + { 's', group = '[S]earch' }, + { 'w', group = '[W]orkspace' }, + { 't', group = '[T]oggle' }, + { 'h', group = 'Git [H]unk', mode = { 'n', 'v' } }, + }, }, }, - }, - { - -- Set lualine as statusline - 'nvim-lualine/lualine.nvim', - -- See `:help lualine.txt` - opts = { - options = { - icons_enabled = true, - theme = 'onedark', - component_separators = '|', - section_separators = '', + { + -- Set lualine as statusline + 'nvim-lualine/lualine.nvim', + -- See `:help lualine.txt` + opts = { + options = { + icons_enabled = true, + theme = 'onedark', + component_separators = '|', + section_separators = '', + }, + sections = { + lualine_c = { { 'filename', path = 2 } }, + }, }, - sections = { - lualine_c = { {'filename', path = 2} }, - } }, - }, - { - -- Add indentation guides even on blank lines - 'lukas-reineke/indent-blankline.nvim', - -- Enable `lukas-reineke/indent-blankline.nvim` - -- See `:help ibl` - main = 'ibl', - opts = {}, - }, + { + -- Add indentation guides even on blank lines + 'lukas-reineke/indent-blankline.nvim', + -- Enable `lukas-reineke/indent-blankline.nvim` + -- See `:help ibl` + main = 'ibl', + opts = {}, + }, - -- "gc" to comment visual regions/lines - { 'numToStr/Comment.nvim', opts = {} }, - { - "nvim-neo-tree/neo-tree.nvim", - branch = "v3.x", + -- "gc" to comment visual regions/lines + { 'numToStr/Comment.nvim', opts = {} }, + { + 'nvim-neo-tree/neo-tree.nvim', + branch = 'v3.x', dependencies = { - "nvim-lua/plenary.nvim", - "nvim-tree/nvim-web-devicons", -- not strictly required, but recommended - "MunifTanjim/nui.nvim", + 'nvim-lua/plenary.nvim', + 'nvim-tree/nvim-web-devicons', -- not strictly required, but recommended + 'MunifTanjim/nui.nvim', -- "3rd/image.nvim", -- Optional image support in preview window: See `# Preview Mode` for more information - } - }, - -- Fuzzy Finder (files, lsp, etc) - { - 'nvim-telescope/telescope.nvim', - branch = '0.1.x', - dependencies = { - 'nvim-lua/plenary.nvim', - -- Fuzzy Finder Algorithm which requires local dependencies to be built. - -- Only load if `make` is available. Make sure you have the system - -- requirements installed. - { - 'nvim-telescope/telescope-fzf-native.nvim', - -- NOTE: If you are having trouble with this installation, - -- refer to the README for telescope-fzf-native for more instructions. - build = 'make', - cond = function() - return vim.fn.executable 'make' == 1 - 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()` - 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()` + -- Fuzzy Finder (files, lsp, etc) + { + 'nvim-telescope/telescope.nvim', + branch = '0.1.x', + dependencies = { + 'nvim-lua/plenary.nvim', + -- Fuzzy Finder Algorithm which requires local dependencies to be built. + -- Only load if `make` is available. Make sure you have the system + -- requirements installed. + { + 'nvim-telescope/telescope-fzf-native.nvim', + -- NOTE: If you are having trouble with this installation, + -- refer to the README for telescope-fzf-native for more instructions. + build = 'make', + cond = function() + return vim.fn.executable 'make' == 1 + 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: ? -- - -- defaults = { - -- mappings = { - -- i = { [''] = 'to_fuzzy_refine' }, - -- }, - -- }, - -- pickers = {} - extensions = { - ['ui-select'] = { - require('telescope.themes').get_dropdown(), + -- 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()` + 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 = {} + extensions = { + ['ui-select'] = { + require('telescope.themes').get_dropdown(), + }, }, - }, - } - - -- 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', builtin.help_tags, { desc = '[S]earch [H]elp' }) - 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' } - 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 = 'luvit-meta/library', words = { 'vim%.uv' } }, - }, + -- 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', builtin.help_tags, { desc = '[S]earch [H]elp' }) + vim.keymap.set('n', 'lg', ':LazyGit', { desc = 'Open LazyGit' }) + 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' } + end, { desc = '[S]earch [N]eovim files' }) + end, }, - }, - { 'Bilal2453/luvit-meta', lazy = true }, - { - -- Main LSP Configuration - 'neovim/nvim-lspconfig', - dependencies = { - -- Automatically install LSPs and related tools to stdpath for Neovim - { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants - 'williamboman/mason-lspconfig.nvim', - 'WhoIsSethDaniel/mason-tool-installer.nvim', - - -- Useful status updates for LSP. - -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` - { 'j-hui/fidget.nvim', opts = {} }, + -- 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 = 'luvit-meta/library', words = { 'vim%.uv' } }, - }, + 'folke/lazydev.nvim', + ft = 'lua', + opts = { + library = { + -- Load luvit types when the `vim.uv` word is found + { path = 'luvit-meta/library', words = { 'vim%.uv' } }, }, }, - { 'Bilal2453/luvit-meta', lazy = true }, - -- Allows extra capabilities provided by nvim-cmp - 'hrsh7th/cmp-nvim-lsp', }, - 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 }) - end - - -- Jump to the definition of the word under your cursor. - -- This is where a variable was first declared, or where a function is defined, etc. - -- To jump back, press . - map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') - - -- Find references for the word under your cursor. - map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') - - -- Jump to the implementation of the word under your cursor. - -- Useful when your language has ways of declaring types without an actual implementation. - map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') - - -- Jump to the type of the word under your cursor. - -- Useful when you're not sure what type a variable is and you want to see - -- the definition of its *type*, not where it was *defined*. - map('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') - - -- Fuzzy find all the symbols in your current document. - -- Symbols are things like variables, functions, types, etc. - map('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') - - -- Fuzzy find all the symbols in your current workspace. - -- Similar to document symbols, except searches over your entire project. - map('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') - - -- Rename the variable under your cursor. - -- Most Language Servers support renaming across files, etc. - map('rn', vim.lsp.buf.rename, '[R]e[n]ame') + { 'Bilal2453/luvit-meta', lazy = true }, + { + -- Main LSP Configuration + 'neovim/nvim-lspconfig', + dependencies = { + -- Automatically install LSPs and related tools to stdpath for Neovim + { 'williamboman/mason.nvim', config = true }, -- NOTE: Must be loaded before dependants + 'williamboman/mason-lspconfig.nvim', + 'WhoIsSethDaniel/mason-tool-installer.nvim', + + -- Useful status updates for LSP. + -- NOTE: `opts = {}` is the same as calling `require('fidget').setup({})` + { 'j-hui/fidget.nvim', opts = {} }, + + -- `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 = 'luvit-meta/library', words = { 'vim%.uv' } }, + }, + }, + }, + { 'Bilal2453/luvit-meta', lazy = true }, + -- Allows extra capabilities provided by nvim-cmp + 'hrsh7th/cmp-nvim-lsp', + }, + 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 }) + end - -- 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('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) + -- Jump to the definition of the word under your cursor. + -- This is where a variable was first declared, or where a function is defined, etc. + -- To jump back, press . + map('gd', require('telescope.builtin').lsp_definitions, '[G]oto [D]efinition') + + -- Find references for the word under your cursor. + map('gr', require('telescope.builtin').lsp_references, '[G]oto [R]eferences') + + -- Jump to the implementation of the word under your cursor. + -- Useful when your language has ways of declaring types without an actual implementation. + map('gI', require('telescope.builtin').lsp_implementations, '[G]oto [I]mplementation') + + -- Jump to the type of the word under your cursor. + -- Useful when you're not sure what type a variable is and you want to see + -- the definition of its *type*, not where it was *defined*. + map('D', require('telescope.builtin').lsp_type_definitions, 'Type [D]efinition') + + -- Fuzzy find all the symbols in your current document. + -- Symbols are things like variables, functions, types, etc. + map('ds', require('telescope.builtin').lsp_document_symbols, '[D]ocument [S]ymbols') + + -- Fuzzy find all the symbols in your current workspace. + -- Similar to document symbols, except searches over your entire project. + map('ws', require('telescope.builtin').lsp_dynamic_workspace_symbols, '[W]orkspace [S]ymbols') + + -- Rename the variable under your cursor. + -- Most Language Servers support renaming across files, etc. + map('rn', vim.lsp.buf.rename, '[R]e[n]ame') + + -- Execute a code action, usually your cursor needs to be on top of an error + -- or a suggestion from your LSP for this to activate. + map('ca', vim.lsp.buf.code_action, '[C]ode [A]ction', { 'n', 'x' }) + + -- WARN: 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') + + -- 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(vim.lsp.protocol.Methods.textDocument_documentHighlight) 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 - -- WARN: 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') + -- 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(vim.lsp.protocol.Methods.textDocument_inlayHint) 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, + }) - -- 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 + -- Change diagnostic symbols in the sign column (gutter) + -- if vim.g.have_nerd_font then + -- local signs = { Error = '', Warn = '', Hint = '', Info = '' } + -- for type, icon in pairs(signs) do + -- local hl = 'DiagnosticSign' .. type + -- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) + -- end + -- 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 nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. + -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. + local capabilities = vim.lsp.protocol.make_client_capabilities() + capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_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 -- - -- 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(vim.lsp.protocol.Methods.textDocument_documentHighlight) 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 + -- 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 = {}, -- - -- This may be unwanted, since they displace some of your code - if client and client.supports_method(vim.lsp.protocol.Methods.textDocument_inlayHint) 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, - }) - - -- Change diagnostic symbols in the sign column (gutter) - -- if vim.g.have_nerd_font then - -- local signs = { Error = '', Warn = '', Hint = '', Info = '' } - -- for type, icon in pairs(signs) do - -- local hl = 'DiagnosticSign' .. type - -- vim.fn.sign_define(hl, { text = icon, texthl = hl, numhl = hl }) - -- end - -- 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 nvim-cmp, luasnip, etc. Neovim now has *more* capabilities. - -- So, we create new capabilities with nvim cmp, and then broadcast that to the servers. - local capabilities = vim.lsp.protocol.make_client_capabilities() - capabilities = vim.tbl_deep_extend('force', capabilities, require('cmp_nvim_lsp').default_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 = {}, - -- - lua_ls = { - -- cmd = {...}, - -- filetypes = { ...}, - -- capabilities = {}, - settings = { - Lua = { - completion = { - callSnippet = 'Replace', + 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' } }, }, - -- 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. - require('mason').setup() - - -- 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 { - 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 {}) - if server_name == 'rust_analyzer' then - server.settings = { - ['rust-analyzer'] = { - checkOnSave = { - command = 'clippy', -- Enable clippy diagnostics - }, - diagnostics = { - enable = true, - -- disabled = { 'unresolved-proc-macro' }, - -- enableExperimental = true, + -- 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. + require('mason').setup() + + -- 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 { + 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 {}) + if server_name == 'rust_analyzer' then + server.settings = { + ['rust-analyzer'] = { + checkOnSave = { + command = 'clippy', -- Enable clippy diagnostics + }, + diagnostics = { + enable = true, + -- disabled = { 'unresolved-proc-macro' }, + -- enableExperimental = true, + }, }, - }, - } - end - require('lspconfig')[server_name].setup(server) - 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 } - local lsp_format_opt - if disable_filetypes[vim.bo[bufnr].filetype] then - lsp_format_opt = 'never' - else - lsp_format_opt = 'fallback' - end - return { - timeout_ms = 500, - lsp_format = lsp_format_opt, + } + end + require('lspconfig')[server_name].setup(server) + end, + }, } end, - formatters_by_ft = { - lua = { 'stylua' }, - -- 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 - 'hrsh7th/nvim-cmp', - event = 'InsertEnter', - dependencies = { - -- Snippet Engine & its associated nvim-cmp source - { - 'L3MON4D3/LuaSnip', - 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 + { -- 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 } + local lsp_format_opt + if disable_filetypes[vim.bo[bufnr].filetype] then + lsp_format_opt = 'never' + else + lsp_format_opt = 'fallback' 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, - -- }, + return { + timeout_ms = 500, + lsp_format = lsp_format_opt, + } + end, + formatters_by_ft = { + lua = { 'stylua' }, + -- 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 }, }, }, - 'saadparwaiz1/cmp_luasnip', - - -- Adds other completion capabilities. - -- nvim-cmp does not ship with all sources by default. They are split - -- into multiple repos for maintenance purposes. - 'hrsh7th/cmp-nvim-lsp', - 'hrsh7th/cmp-path', }, - config = function() - -- See `:help cmp` - local cmp = require 'cmp' - local luasnip = require 'luasnip' - luasnip.config.setup {} - - cmp.setup { - snippet = { - expand = function(args) - luasnip.lsp_expand(args.body) - end, - }, - completion = { completeopt = 'menu,menuone,noinsert' }, - -- For an understanding of why these mappings were - -- chosen, you will need to read `:help ins-completion` - -- - -- No, but seriously. Please read `:help ins-completion`, it is really good! - mapping = cmp.mapping.preset.insert { - -- Select the [n]ext item - [''] = cmp.mapping.select_next_item(), - -- Select the [p]revious item - [''] = cmp.mapping.select_prev_item(), - - -- Scroll the documentation window [b]ack / [f]orward - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - - -- Accept ([y]es) the completion. - -- This will auto-import if your LSP supports it. - -- This will expand snippets if the LSP sent a snippet. - [''] = cmp.mapping.confirm { select = true }, - - -- If you prefer more traditional completion keymaps, - -- you can uncomment the following lines - --[''] = cmp.mapping.confirm { select = true }, - --[''] = cmp.mapping.select_next_item(), - --[''] = cmp.mapping.select_prev_item(), - - -- Manually trigger a completion from nvim-cmp. - -- Generally you don't need this, because nvim-cmp will display - -- completions whenever it has completion options available. - [''] = cmp.mapping.complete {}, - - -- Think of as moving to the right of your snippet expansion. - -- So if you have a snippet that's like: - -- function $name($args) - -- $body - -- end - -- - -- will move you to the right of each of the expansion locations. - -- is similar, except moving you backwards. - [''] = cmp.mapping(function() - if luasnip.expand_or_locally_jumpable() then - luasnip.expand_or_jump() - end - end, { 'i', 's' }), - [''] = cmp.mapping(function() - if luasnip.locally_jumpable(-1) then - luasnip.jump(-1) + { -- Autocompletion + 'hrsh7th/nvim-cmp', + event = 'InsertEnter', + dependencies = { + -- Snippet Engine & its associated nvim-cmp source + { + 'L3MON4D3/LuaSnip', + 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 - end, { 'i', 's' }), - - -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: - -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps - }, - sources = { - { - name = 'lazydev', - -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it - group_index = 0, + 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, + -- }, }, - { name = 'nvim_lsp' }, - { name = 'luasnip' }, - { name = 'path' }, }, - } - end, - }, + 'saadparwaiz1/cmp_luasnip', - { -- You can easily change to a different colorscheme. - -- Change the name of the colorscheme plugin below, and then - -- change the command in the config to whatever the name of that colorscheme is. - -- - -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. - 'folke/tokyonight.nvim', - priority = 1000, -- Make sure to load this before all the other start plugins. - init = function() - -- 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' - - -- You can configure highlights by doing something like: - vim.cmd.hi 'Comment gui=none' - end, - }, - -- { - -- 'bluz71/vim-moonfly-colors', - -- name = 'moonfly', - -- lazy = false, - -- priority = 1000, - -- config = function() - -- vim.cmd 'colorscheme moonfly' - -- 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 } + -- Adds other completion capabilities. + -- nvim-cmp does not ship with all sources by default. They are split + -- into multiple repos for maintenance purposes. + 'hrsh7th/cmp-nvim-lsp', + 'hrsh7th/cmp-path', + }, + config = function() + -- See `:help cmp` + local cmp = require 'cmp' + local luasnip = require 'luasnip' + luasnip.config.setup {} + + cmp.setup { + snippet = { + expand = function(args) + luasnip.lsp_expand(args.body) + end, + }, + completion = { completeopt = 'menu,menuone,noinsert' }, + + -- For an understanding of why these mappings were + -- chosen, you will need to read `:help ins-completion` + -- + -- No, but seriously. Please read `:help ins-completion`, it is really good! + mapping = cmp.mapping.preset.insert { + -- Select the [n]ext item + [''] = cmp.mapping.select_next_item(), + -- Select the [p]revious item + [''] = cmp.mapping.select_prev_item(), + + -- Scroll the documentation window [b]ack / [f]orward + [''] = cmp.mapping.scroll_docs(-4), + [''] = cmp.mapping.scroll_docs(4), + + -- Accept ([y]es) the completion. + -- This will auto-import if your LSP supports it. + -- This will expand snippets if the LSP sent a snippet. + [''] = cmp.mapping.confirm { select = true }, + + -- If you prefer more traditional completion keymaps, + -- you can uncomment the following lines + --[''] = cmp.mapping.confirm { select = true }, + --[''] = cmp.mapping.select_next_item(), + --[''] = cmp.mapping.select_prev_item(), + + -- Manually trigger a completion from nvim-cmp. + -- Generally you don't need this, because nvim-cmp will display + -- completions whenever it has completion options available. + [''] = cmp.mapping.complete {}, + + -- Think of as moving to the right of your snippet expansion. + -- So if you have a snippet that's like: + -- function $name($args) + -- $body + -- end + -- + -- will move you to the right of each of the expansion locations. + -- is similar, except moving you backwards. + [''] = cmp.mapping(function() + if luasnip.expand_or_locally_jumpable() then + luasnip.expand_or_jump() + end + end, { 'i', 's' }), + [''] = cmp.mapping(function() + if luasnip.locally_jumpable(-1) then + luasnip.jump(-1) + end + end, { 'i', 's' }), + + -- For more advanced Luasnip keymaps (e.g. selecting choice nodes, expansion) see: + -- https://github.com/L3MON4D3/LuaSnip?tab=readme-ov-file#keymaps + }, + sources = { + { + name = 'lazydev', + -- set group index to 0 to skip loading LuaLS completions as lazydev recommends it + group_index = 0, + }, + { name = 'nvim_lsp' }, + { name = 'luasnip' }, + { name = 'path' }, + }, + } + end, + }, - -- Add/delete/replace surroundings (brackets, quotes, etc.) + { -- 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. -- - -- - 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 + -- If you want to see what colorschemes are already installed, you can use `:Telescope colorscheme`. + 'folke/tokyonight.nvim', + priority = 1000, -- Make sure to load this before all the other start plugins. + init = function() + -- 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' + + -- You can configure highlights by doing something like: + vim.cmd.hi 'Comment gui=none' + end, + }, + -- { + -- 'bluz71/vim-moonfly-colors', + -- name = 'moonfly', + -- lazy = false, + -- priority = 1000, + -- config = function() + -- vim.cmd 'colorscheme moonfly' + -- 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 } - -- ... and there is more! - -- Check out: https://github.com/echasnovski/mini.nvim - end, - }, - { -- 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' }, + -- 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', + 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' } }, }, - indent = { enable = true, disable = { 'ruby' } }, + -- 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 }, - -- 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 - }, - -- 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. + -- 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 - - -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` - -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping - -- up-to-date with whatever is in the kickstart repo. - -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- - -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. - -- { import = 'custom.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 = '💤 ', - }, + -- 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 + + -- NOTE: The import below can automatically add your own plugins, configuration, etc from `lua/custom/plugins/*.lua` + -- You can use this folder to prevent any conflicts with this init.lua if you're interested in keeping + -- up-to-date with whatever is in the kickstart repo. + -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. + -- + -- Uncomment the following line and add your plugins to `lua/custom/plugins/*.lua` to get going. + { import = 'custom.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 = '💤 ', + -- }, + -- }, }, } - --- Enable telescope fzf native, if installed -pcall(require('telescope').load_extension, 'fzf') - -- Telescope live_grep in git root -- Function to find the git root directory based on the current buffer's path local function find_git_root() @@ -1333,9 +1332,6 @@ local servers = { }, } --- Setup neovim lua configuration -require('neodev').setup() - -- nvim-cmp supports additional completion capabilities, so broadcast that to serversFont local capabilities = vim.lsp.protocol.make_client_capabilities() capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities) diff --git a/lazy-lock.json b/lazy-lock.json index cabc1daeb4b..784d7542afa 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,36 +1,46 @@ { - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" }, - "LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, + "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "fidget.nvim": { "branch": "main", "commit": "1ba38e4cbb24683973e00c2e36f53ae64da38ef5" }, - "friendly-snippets": { "branch": "main", "commit": "ea068f1becd91bcd4591fceb6420d4335e2e14d3" }, - "fzf": { "branch": "master", "commit": "f97d2754134607b24849fc4a2062dbfcaafddd6a" }, - "fzf.vim": { "branch": "master", "commit": "45d96c9cb1213204479593236dfabf911ff15443" }, - "fzfx.nvim": { "branch": "main", "commit": "be147216edf164a1739430c7fda210f9876cc430" }, - "gitsigns.nvim": { "branch": "main", "commit": "d96ef3bbff0bdbc3916a220f5c74a04c4db033f2" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, - "kanagawa": { "branch": "master", "commit": "bfa818c7bf6259152f1d89cf9fbfba3554c93695" }, - "lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" }, - "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" }, - "mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" }, - "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, - "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, - "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" }, + "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, + "conform.nvim": { "branch": "master", "commit": "023f795dbcf32d4351b6a9ed2e613d471b5bb812" }, + "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, + "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "fzf": { "branch": "master", "commit": "2b7f168571d53a19f4c60fcb6b3e20e2b688b28f" }, + "fzfx.nvim": { "branch": "main", "commit": "084f860c32f617be5513adcee961993435a2e5f3" }, + "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, + "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, + "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, + "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, + "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, + "lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" }, + "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, + "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, + "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.nvim": { "branch": "main", "commit": "b07157c51e52a1b004ec7959f9618e9bc24686d3" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, + "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" }, - "nvim-lspconfig": { "branch": "master", "commit": "da0b236ef3c7fdac8aec758fa88b028cd9358495" }, - "nvim-treesitter": { "branch": "master", "commit": "1ba86026f7d4650d98fb9d4c0f2ab409c428ae41" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "6e9bb569a510bdfab6095c217a2f714af7a3d116" }, - "nvim-web-devicons": { "branch": "master", "commit": "b3468391470034353f0e5110c70babb5c62967d3" }, - "plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "0.1.x", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" }, - "vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" }, - "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, - "vim-sleuth": { "branch": "master", "commit": "1cc4557420f215d02c4d2645a748a816c220e99b" }, - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, + "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, + "nvim-dap": { "branch": "master", "commit": "29d1f8814fa4fcc194ec574de998a42a22ebbe4a" }, + "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, + "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, + "nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" }, + "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, + "nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" }, + "nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" }, + "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, + "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, + "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, + "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, + "tokyonight.nvim": { "branch": "main", "commit": "9758827c3b380ba89da4a2212b6255d01afbcf08" }, + "which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }, "window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" } -} \ No newline at end of file +} From 19800a50fe4c94a1f06b9023ae59fb02dc33d20a Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 18 Nov 2024 15:41:40 +0200 Subject: [PATCH 32/44] WIP inlay hints Signed-off-by: Andrei Baltariu --- init.lua | 1 - lua/custom/plugins/init.lua | 32 ++++++++++++++++++++++++-------- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/init.lua b/init.lua index 84d15035ac6..7328dbb75ca 100644 --- a/init.lua +++ b/init.lua @@ -120,7 +120,6 @@ 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', 'e', vim.diagnostic.open_float, { desc = 'Open [E]error messages 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 -- is not what someone will guess without a bit more experience. diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index baf099b3f36..c3e9ae48f86 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -48,7 +48,24 @@ return { } local lspconfig = require 'lspconfig' - local inlayhints = require 'lsp-inlayhints' + + local my_lsp_config = { + inlay_hints = { enabled = true }, + } + + -- Function to toggle inlay_hints.enabled + function ToggleInlayHintsEnabled() + if my_lsp_config.inlay_hints.enabled then + my_lsp_config.inlay_hints.enabled = false + print 'Inlay hints disabled' + else + my_lsp_config.inlay_hints.enabled = true + print 'Inlay hints enabled' + end + end + + -- Key mapping to toggle inlay_hints.enabled + vim.keymap.set('n', 'ti', ToggleInlayHintsEnabled, { desc = 'Toggle Inlay Hints' }) -- Enable inlay hints for Rust Analyzer lspconfig.rust_analyzer.setup { @@ -62,18 +79,17 @@ return { }, }, }, - on_attach = function(client, bufnr) - inlayhints.on_attach(client, bufnr) - end, } - -- Add additional LSP server configurations here - -- Enable inlay hints for other servers if supported + + -- Autocommand to enable inlay hints on LSP attach if supported vim.api.nvim_create_autocmd('LspAttach', { group = vim.api.nvim_create_augroup('UserLspConfig', {}), callback = function(args) local client = vim.lsp.get_client_by_id(args.data.client_id) - if client.server_capabilities.inlayHintProvider then - vim.lsp.inlay_hint(args.buf, true) + if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then + vim.lsp.inlay_hint(args.buf, my_lsp_config.inlay_hints.enabled) + else + print 'Inlay hints are not supported in this version of Neovim or the server.' end -- other lsp configurations you might want end, From a0bce48514592c368de596d6d50aaee5b1510b09 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 18 Nov 2024 22:27:11 +0200 Subject: [PATCH 33/44] Added inlay hints Signed-off-by: Andrei Baltariu --- lua/custom/plugins/init.lua | 81 +++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 34 deletions(-) diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index c3e9ae48f86..7f114f204b1 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -33,6 +33,11 @@ return { require('nvim-web-devicons').setup { default = true } end, }, + -- { + -- 'mrcjkb/rustaceanvim', + -- version = '^5', -- Recommended + -- lazy = false, -- This plugin is already lazy + -- }, { 'neovim/nvim-lspconfig', dependencies = { @@ -49,51 +54,59 @@ return { local lspconfig = require 'lspconfig' - local my_lsp_config = { - inlay_hints = { enabled = true }, - } - - -- Function to toggle inlay_hints.enabled - function ToggleInlayHintsEnabled() - if my_lsp_config.inlay_hints.enabled then - my_lsp_config.inlay_hints.enabled = false - print 'Inlay hints disabled' - else - my_lsp_config.inlay_hints.enabled = true - print 'Inlay hints enabled' - end - end - -- Key mapping to toggle inlay_hints.enabled - vim.keymap.set('n', 'ti', ToggleInlayHintsEnabled, { desc = 'Toggle Inlay Hints' }) + -- vim.keymap.set('n', 'ti', ToggleInlayHintsEnabled, { desc = 'Toggle Inlay Hints' }) -- Enable inlay hints for Rust Analyzer + + require('lsp-inlayhints').setup() lspconfig.rust_analyzer.setup { settings = { ['rust-analyzer'] = { inlayHints = { - enable = true, - typeHints = true, - parameterHints = true, - chainingHints = true, + enabled = true, + bindingModeHints = { + enable = false, + }, + chainingHints = { + enable = true, + }, + closingBraceHints = { + enable = true, + minLines = 25, + }, + closureReturnTypeHints = { + enable = 'never', + }, + lifetimeElisionHints = { + enable = 'never', + useParameterNames = false, + }, + maxLength = 25, + parameterHints = { + enable = true, + }, + reborrowHints = { + enable = 'never', + }, + renderColons = true, + typeHints = { + enable = true, + hideClosureInitialization = false, + hideNamedConstructor = false, + }, }, }, }, } - - -- Autocommand to enable inlay hints on LSP attach if supported - vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(args) - local client = vim.lsp.get_client_by_id(args.data.client_id) - if client and client.server_capabilities.inlayHintProvider and vim.lsp.inlay_hint then - vim.lsp.inlay_hint(args.buf, my_lsp_config.inlay_hints.enabled) - else - print 'Inlay hints are not supported in this version of Neovim or the server.' - end - -- other lsp configurations you might want - end, - }) + end, + }, + { + 'MysticalDevil/inlay-hints.nvim', + event = 'LspAttach', + dependencies = { 'neovim/nvim-lspconfig' }, + config = function() + require('inlay-hints').setup() end, }, { From 5e6d489857945cc40b1970fdf5fe6122d9b2019f Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 18 Nov 2024 22:27:21 +0200 Subject: [PATCH 34/44] Added keymap for inlay hints Signed-off-by: Andrei Baltariu --- init.lua | 1 + lazy-lock.json | 2 ++ 2 files changed, 3 insertions(+) diff --git a/init.lua b/init.lua index 7328dbb75ca..5846b01aa31 100644 --- a/init.lua +++ b/init.lua @@ -504,6 +504,7 @@ require('lazy').setup { vim.keymap.set('n', 'sh', builtin.help_tags, { desc = '[S]earch [H]elp' }) vim.keymap.set('n', 'lg', ':LazyGit', { desc = 'Open LazyGit' }) vim.keymap.set('n', 'sk', builtin.keymaps, { desc = '[S]earch [K]eymaps' }) + vim.keymap.set('n', 'ti', ':InlayHintsToggle', { desc = 'Toggle Inlay Hints' }) 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' }) diff --git a/lazy-lock.json b/lazy-lock.json index 784d7542afa..8fe9a47a8fb 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -12,6 +12,7 @@ "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, + "inlay-hints.nvim": { "branch": "master", "commit": "af84dee42cd118af6d592b06c1c0e45d6432a6c0" }, "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, "lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" }, @@ -35,6 +36,7 @@ "nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" }, "nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, + "rustaceanvim": { "branch": "master", "commit": "8ece53be36515cb9e76f3d03511643636469502d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, From 2fb29ed9fe2c176583e1869f9f165e0730bc0e07 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 27 Nov 2024 12:58:43 +0200 Subject: [PATCH 35/44] Added comment Signed-off-by: Andrei Baltariu --- init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.lua b/init.lua index 5846b01aa31..e324f59876f 100644 --- a/init.lua +++ b/init.lua @@ -1267,7 +1267,7 @@ local on_attach = function(_, bufnr) -- See `:help K` for why this keymap nmap('K', vim.lsp.buf.hover, 'Hover Documentation') - nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') + -- nmap('', vim.lsp.buf.signature_help, 'Signature Documentation') -- Lesser used LSP functionality nmap('gD', vim.lsp.buf.declaration, '[G]oto [D]eclaration') From a6df9ca90e78544e6139a7934f1129f1221c1bd8 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 27 Nov 2024 12:58:51 +0200 Subject: [PATCH 36/44] Updated lock.json Signed-off-by: Andrei Baltariu --- lazy-lock.json | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 8fe9a47a8fb..f682d68acf3 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -4,45 +4,44 @@ "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "023f795dbcf32d4351b6a9ed2e613d471b5bb812" }, + "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, - "fzf": { "branch": "master", "commit": "2b7f168571d53a19f4c60fcb6b3e20e2b688b28f" }, - "fzfx.nvim": { "branch": "main", "commit": "084f860c32f617be5513adcee961993435a2e5f3" }, + "fzf": { "branch": "master", "commit": "7d9548919e9b1bb05bb95225275e34213a747cde" }, + "fzfx.nvim": { "branch": "main", "commit": "599b02392fa1140f0ea6255b8c4bed5816df2dad" }, "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, - "gitsigns.nvim": { "branch": "main", "commit": "ac5aba6dce8c06ea22bea2c9016f51a2dbf90dc7" }, + "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, "inlay-hints.nvim": { "branch": "master", "commit": "af84dee42cd118af6d592b06c1c0e45d6432a6c0" }, - "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" }, - "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" }, + "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, + "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, "lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" }, "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, - "luvit-meta": { "branch": "main", "commit": "ce76f6f6cdc9201523a5875a4471dcfe0186eb60" }, + "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "b07157c51e52a1b004ec7959f9618e9bc24686d3" }, + "mini.nvim": { "branch": "main", "commit": "c8922aef8207137e66c80acdb9523668599ba62a" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "f17d9b4394027ff4442b298398dfcaab97e40c4f" }, - "nvim-dap": { "branch": "master", "commit": "29d1f8814fa4fcc194ec574de998a42a22ebbe4a" }, + "nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" }, + "nvim-dap": { "branch": "master", "commit": "cc92b054720a96170eca6bd9bdedd43d2b0a7a8a" }, "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-lspconfig": { "branch": "master", "commit": "f012c1b176f0e3c71f40eb309bdec0316689462e" }, + "nvim-lspconfig": { "branch": "master", "commit": "5d8288c794de811d41490ed6f616d6271e2c1c98" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-treesitter": { "branch": "master", "commit": "37427012d1c77c544356bfff0c9acc88fd3256bc" }, - "nvim-web-devicons": { "branch": "master", "commit": "e87554285f581047b1bf236794b0eb812b444b87" }, + "nvim-treesitter": { "branch": "master", "commit": "cc292c869ff7d54cf4426b2fa5bbfb319cab20ee" }, + "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "rustaceanvim": { "branch": "master", "commit": "8ece53be36515cb9e76f3d03511643636469502d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, - "tokyonight.nvim": { "branch": "main", "commit": "9758827c3b380ba89da4a2212b6255d01afbcf08" }, - "which-key.nvim": { "branch": "main", "commit": "68e37e12913a66b60073906f5d3f14dee0de19f2" }, + "tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" }, + "which-key.nvim": { "branch": "main", "commit": "b9684c6ec54d8a8452bdcf0d613c7ad0223fc3fe" }, "window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" } } From 690598c53b8c0b3c9ad389f2bf0264bc4f4f2819 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Wed, 27 Nov 2024 13:03:58 +0200 Subject: [PATCH 37/44] Fixed error Signed-off-by: Andrei Baltariu --- init.lua | 20 ++++++++++---------- lazy-lock.json | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 83d5289d691..d5d1164b133 100644 --- a/init.lua +++ b/init.lua @@ -172,7 +172,7 @@ vim.opt.rtp:prepend(lazypath) -- [[ Configure plugins ]] -- NOTE: Here is where you install your plugins. -require('lazy').setup({ +require('lazy').setup { -- NOTE: Plugins can be added with a link (or for a github repo: 'owner/repo' link). 'tpope/vim-sleuth', -- Detect tabstop and shiftwidth automatically @@ -523,15 +523,15 @@ require('lazy').setup({ }, }, - -- Change diagnostic symbols in the sign column (gutter) - -- if vim.g.have_nerd_font then - -- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' } - -- local diagnostic_signs = {} - -- for type, icon in pairs(signs) do - -- diagnostic_signs[vim.diagnostic.severity[type]] = icon - -- end - -- vim.diagnostic.config { signs = { text = diagnostic_signs } } - -- end + -- Change diagnostic symbols in the sign column (gutter) + -- if vim.g.have_nerd_font then + -- local signs = { ERROR = '', WARN = '', INFO = '', HINT = '' } + -- local diagnostic_signs = {} + -- for type, icon in pairs(signs) do + -- diagnostic_signs[vim.diagnostic.severity[type]] = icon + -- end + -- vim.diagnostic.config { signs = { text = diagnostic_signs } } + -- end { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', diff --git a/lazy-lock.json b/lazy-lock.json index f682d68acf3..4832e17eb6f 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -7,7 +7,6 @@ "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, - "fzf": { "branch": "master", "commit": "7d9548919e9b1bb05bb95225275e34213a747cde" }, "fzfx.nvim": { "branch": "main", "commit": "599b02392fa1140f0ea6255b8c4bed5816df2dad" }, "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, @@ -42,6 +41,7 @@ "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, "tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" }, + "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, "which-key.nvim": { "branch": "main", "commit": "b9684c6ec54d8a8452bdcf0d613c7ad0223fc3fe" }, "window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" } } From bb18dfad13dc72d0f6f7c297bfa583561297ee88 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Tue, 3 Dec 2024 15:01:55 +0200 Subject: [PATCH 38/44] Lazy lock update Signed-off-by: Andrei Baltariu --- lazy-lock.json | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 4832e17eb6f..04da52db04b 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,12 +1,12 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "0f7bbce41ea152a94d12aea286f2ce98e63c0f58" }, + "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "a203480a350b03092e473bf3001733d547160a73" }, + "conform.nvim": { "branch": "master", "commit": "7a3d99eb151e636670ce4842ab073d7485f7bc61" }, "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, - "friendly-snippets": { "branch": "main", "commit": "de8fce94985873666bd9712ea3e49ee17aadb1ed" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "fzfx.nvim": { "branch": "main", "commit": "599b02392fa1140f0ea6255b8c4bed5816df2dad" }, "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, @@ -19,29 +19,29 @@ "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "43894adcf10bb1190c2184bd7c1750e8ea2b3dce" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "c8922aef8207137e66c80acdb9523668599ba62a" }, + "mini.nvim": { "branch": "main", "commit": "c6eede272cfdb9b804e40dc43bb9bff53f38ed8a" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "ed31156aa2cc14e3bc066c59357cc91536a2bc01" }, - "nvim-dap": { "branch": "master", "commit": "cc92b054720a96170eca6bd9bdedd43d2b0a7a8a" }, + "nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" }, + "nvim-dap": { "branch": "master", "commit": "0a0daa796a5919a51e5e5019ffa91219c94c4fef" }, "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-lspconfig": { "branch": "master", "commit": "5d8288c794de811d41490ed6f616d6271e2c1c98" }, + "nvim-lspconfig": { "branch": "master", "commit": "1aa9f36b6d542dafc0b4a38c48969d036003b00a" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-treesitter": { "branch": "master", "commit": "cc292c869ff7d54cf4426b2fa5bbfb319cab20ee" }, - "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" }, + "nvim-treesitter": { "branch": "master", "commit": "b31188671d8a060022dbbeb6905019e69e310108" }, + "nvim-web-devicons": { "branch": "master", "commit": "203da76ecfbb4b192cf830665b03eb651b635c94" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, - "tokyonight.nvim": { "branch": "main", "commit": "c2725eb6d086c8c9624456d734bd365194660017" }, + "tokyonight.nvim": { "branch": "main", "commit": "15d83cda572d7498b43bbdaa223bc75bf341183e" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "which-key.nvim": { "branch": "main", "commit": "b9684c6ec54d8a8452bdcf0d613c7ad0223fc3fe" }, + "which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }, "window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" } } From 7e815401791bd921821cf6dbd3105a4e1316e7d1 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 23 Dec 2024 16:29:47 +0200 Subject: [PATCH 39/44] Update lazy-lock Signed-off-by: Andrei Baltariu --- lazy-lock.json | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lazy-lock.json b/lazy-lock.json index 04da52db04b..3fe1b6e9b18 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,47 +1,47 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "7a3d99eb151e636670ce4842ab073d7485f7bc61" }, - "fidget.nvim": { "branch": "main", "commit": "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f" }, + "conform.nvim": { "branch": "master", "commit": "339b3e4519ec49312d34fcfa275aa15bfaa67025" }, + "fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "fzfx.nvim": { "branch": "main", "commit": "599b02392fa1140f0ea6255b8c4bed5816df2dad" }, + "fzfx.nvim": { "branch": "main", "commit": "b8cb930d24534dc52e155b22766bd943e79c70ce" }, "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, - "indent-blankline.nvim": { "branch": "master", "commit": "7871a88056f7144defca9c931e311a3134c5d509" }, - "inlay-hints.nvim": { "branch": "master", "commit": "af84dee42cd118af6d592b06c1c0e45d6432a6c0" }, - "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" }, - "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" }, - "lazygit.nvim": { "branch": "main", "commit": "56760339a81cd1540d5a72fd9d93010a2677b55d" }, + "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, + "inlay-hints.nvim": { "branch": "master", "commit": "3259b54f3b954b4d8260f3ee49ceabe978ea5636" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" }, + "lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" }, "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "8e46de9241d3997927af12196bd8faa0ed08c29a" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "2daa8921b7afdcfa47419a21ea343c3df6d74fa0" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "c6eede272cfdb9b804e40dc43bb9bff53f38ed8a" }, + "mini.nvim": { "branch": "main", "commit": "2011aff270bcd3e1f3ad088253ace2d574967bed" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, - "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "ca4d3330d386e76967e53b85953c170658255ecb" }, - "nvim-dap": { "branch": "master", "commit": "0a0daa796a5919a51e5e5019ffa91219c94c4fef" }, + "nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" }, + "nvim-dap": { "branch": "master", "commit": "a6070b4e9e9a8ff1bc513c3748eff27080b0f44a" }, "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-lspconfig": { "branch": "master", "commit": "1aa9f36b6d542dafc0b4a38c48969d036003b00a" }, + "nvim-lspconfig": { "branch": "master", "commit": "c580f34bc5fdca8aaf737a9ab8a5d775cb940e57" }, "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-treesitter": { "branch": "master", "commit": "b31188671d8a060022dbbeb6905019e69e310108" }, - "nvim-web-devicons": { "branch": "master", "commit": "203da76ecfbb4b192cf830665b03eb651b635c94" }, + "nvim-treesitter": { "branch": "master", "commit": "8119950998196021648eb140d58060038ae67afd" }, + "nvim-web-devicons": { "branch": "master", "commit": "15c7d0f616ebf88960ce5c4221828f62789d36d9" }, "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, - "tokyonight.nvim": { "branch": "main", "commit": "15d83cda572d7498b43bbdaa223bc75bf341183e" }, + "tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "which-key.nvim": { "branch": "main", "commit": "9b365a6428a9633e3eeb34dbef1b791511c54f70" }, + "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, "window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" } } From e999ab733412ac1506cd27b4cdfe500c1576e6ab Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 7 Apr 2025 11:05:20 +0300 Subject: [PATCH 40/44] Formatting + lock update --- init.lua | 20 ++++++++-------- lazy-lock.json | 64 +++++++++++++++++++++++++------------------------- 2 files changed, 42 insertions(+), 42 deletions(-) diff --git a/init.lua b/init.lua index 40a23a79f6d..e76a8760b22 100644 --- a/init.lua +++ b/init.lua @@ -224,7 +224,7 @@ require('lazy').setup { -- 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. + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' opts = { @@ -270,7 +270,7 @@ require('lazy').setup { -- Document existing key chains spec = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, { 'd', group = '[D]ocument' }, { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, @@ -310,7 +310,7 @@ require('lazy').setup { { '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 }, + { '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 @@ -458,7 +458,7 @@ require('lazy').setup { end, }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -613,7 +613,7 @@ require('lazy').setup { -- vim.diagnostic.config { signs = { text = diagnostic_signs } } -- end - { -- Useful plugin to show you pending keybinds. + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' opts = { @@ -656,7 +656,7 @@ require('lazy').setup { -- Document existing key chains spec = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, { 'd', group = '[D]ocument' }, { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, @@ -726,7 +726,7 @@ require('lazy').setup { { '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 }, + { '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 @@ -824,7 +824,7 @@ require('lazy').setup { }, }, }, - { 'Bilal2453/luvit-meta', lazy = true }, + { 'Bilal2453/luvit-meta', lazy = true }, { -- Main LSP Configuration 'neovim/nvim-lspconfig', @@ -836,7 +836,7 @@ require('lazy').setup { -- 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 = {} }, -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- used for completion, annotations and signatures of Neovim apis @@ -1588,7 +1588,7 @@ require('mason-lspconfig').setup() -- define the property 'filetypes' to the map in question. local servers = { -- clangd = {}, - gopls = {}, + -- gopls = {}, -- pyright = {}, rust_analyzer = {}, -- tsserver = {}, diff --git a/lazy-lock.json b/lazy-lock.json index 3fe1b6e9b18..c3469fcd501 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,47 +1,47 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, - "LuaSnip": { "branch": "master", "commit": "33b06d72d220aa56a7ce80a0dd6f06c70cd82b9d" }, + "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "339b3e4519ec49312d34fcfa275aa15bfaa67025" }, - "fidget.nvim": { "branch": "main", "commit": "9238947645ce17d96f30842e61ba81147185b657" }, + "conform.nvim": { "branch": "master", "commit": "b1a75324ddf96b7bb84963a297b1ed334db087c0" }, + "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, - "fzfx.nvim": { "branch": "main", "commit": "b8cb930d24534dc52e155b22766bd943e79c70ce" }, - "git-blame.nvim": { "branch": "master", "commit": "2883a7460f611c2705b23f12d58d398d5ce6ec00" }, - "gitsigns.nvim": { "branch": "main", "commit": "5f808b5e4fef30bd8aca1b803b4e555da07fc412" }, - "indent-blankline.nvim": { "branch": "master", "commit": "259357fa4097e232730341fa60988087d189193a" }, + "fzfx.nvim": { "branch": "main", "commit": "b786be453a4a1e6cb96d27dab6c0e951e3919f0a" }, + "git-blame.nvim": { "branch": "master", "commit": "b12da2156ec1c3f53f42c129201ff0bfed69c86e" }, + "gitsigns.nvim": { "branch": "main", "commit": "3c76f7fabac723aa682365ef782f88a83ccdb4ac" }, + "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "inlay-hints.nvim": { "branch": "master", "commit": "3259b54f3b954b4d8260f3ee49ceabe978ea5636" }, - "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, - "lazydev.nvim": { "branch": "main", "commit": "8620f82ee3f59ff2187647167b6b47387a13a018" }, - "lazygit.nvim": { "branch": "main", "commit": "77a0d42943d8265271e6e6beaed72da54eeb17e7" }, + "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, + "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, + "lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" }, "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, - "lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" }, - "luvit-meta": { "branch": "main", "commit": "57d464c4acb5c2e66bd4145060f5dc9e96a7bbb7" }, + "lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" }, + "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "2daa8921b7afdcfa47419a21ea343c3df6d74fa0" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "c5e07b8ff54187716334d585db34282e46fa2932" }, - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, - "mini.nvim": { "branch": "main", "commit": "2011aff270bcd3e1f3ad088253ace2d574967bed" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" }, + "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, + "mini.nvim": { "branch": "main", "commit": "d0464ced00abfd9bbed196fa36ccf3b1691c6b2c" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, - "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "b555203ce4bd7ff6192e759af3362f9d217e8c89" }, - "nvim-dap": { "branch": "master", "commit": "a6070b4e9e9a8ff1bc513c3748eff27080b0f44a" }, - "nvim-dap-go": { "branch": "main", "commit": "6aa88167ea1224bcef578e8c7160fe8afbb44848" }, - "nvim-dap-ui": { "branch": "master", "commit": "ffa89839f97bad360e78428d5c740fdad9a0ff02" }, - "nvim-lspconfig": { "branch": "master", "commit": "c580f34bc5fdca8aaf737a9ab8a5d775cb940e57" }, - "nvim-nio": { "branch": "master", "commit": "a428f309119086dc78dd4b19306d2d67be884eee" }, - "nvim-treesitter": { "branch": "master", "commit": "8119950998196021648eb140d58060038ae67afd" }, - "nvim-web-devicons": { "branch": "master", "commit": "15c7d0f616ebf88960ce5c4221828f62789d36d9" }, - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" }, - "telescope-fzf-native.nvim": { "branch": "main", "commit": "dae2eac9d91464448b584c7949a31df8faefec56" }, + "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, + "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, + "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, + "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-lspconfig": { "branch": "master", "commit": "ff6471d4f837354d8257dfa326b031dd8858b16e" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "master", "commit": "9be6836ebeb88a536055bf1ce0961eef68da4bc6" }, + "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, "telescope.nvim": { "branch": "0.1.x", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" }, - "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" }, - "toggleterm.nvim": { "branch": "main", "commit": "87b2d6a3cab8e2bd9a0255427074285f0365398d" }, - "tokyonight.nvim": { "branch": "main", "commit": "45d22cf0e1b93476d3b6d362d720412b3d34465c" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "toggleterm.nvim": { "branch": "main", "commit": "9a88eae817ef395952e08650b3283726786fb5fb" }, + "tokyonight.nvim": { "branch": "main", "commit": "057ef5d260c1931f1dffd0f052c685dcd14100a3" }, "vim-sleuth": { "branch": "master", "commit": "be69bff86754b1aa5adcbb527d7fcd1635a84080" }, - "which-key.nvim": { "branch": "main", "commit": "8ab96b38a2530eacba5be717f52e04601eb59326" }, - "window-picker": { "branch": "main", "commit": "41cfaa428577c53552200a404ae9b3a0b5719706" } + "which-key.nvim": { "branch": "main", "commit": "370ec46f710e058c9c1646273e6b225acf47cbed" }, + "window-picker": { "branch": "main", "commit": "6382540b2ae5de6c793d4aa2e3fe6dbb518505ec" } } From 44bf977161d2648a479edc3b31aa613e1a8376d9 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Mon, 7 Apr 2025 11:58:03 +0300 Subject: [PATCH 41/44] Added different status bar theme --- init.lua | 20 ++++++++++---------- lazy-lock.json | 22 +++++++++++----------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/init.lua b/init.lua index 500e1c96e88..c6d6d324059 100644 --- a/init.lua +++ b/init.lua @@ -235,7 +235,7 @@ require('lazy').setup { -- 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. + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' opts = { @@ -281,7 +281,7 @@ require('lazy').setup { -- Document existing key chains spec = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, { 'd', group = '[D]ocument' }, { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, @@ -321,7 +321,7 @@ require('lazy').setup { { '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 }, + { '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 @@ -469,7 +469,7 @@ require('lazy').setup { end, }, -- Useful plugin to show you pending keybinds. - { 'folke/which-key.nvim', opts = {} }, + { 'folke/which-key.nvim', opts = {} }, { -- Adds git related signs to the gutter, as well as utilities for managing changes 'lewis6991/gitsigns.nvim', @@ -624,7 +624,7 @@ require('lazy').setup { -- vim.diagnostic.config { signs = { text = diagnostic_signs } } -- end - { -- Useful plugin to show you pending keybinds. + { -- Useful plugin to show you pending keybinds. 'folke/which-key.nvim', event = 'VimEnter', -- Sets the loading event to 'VimEnter' opts = { @@ -667,7 +667,7 @@ require('lazy').setup { -- Document existing key chains spec = { - { 'c', group = '[C]ode', mode = { 'n', 'x' } }, + { 'c', group = '[C]ode', mode = { 'n', 'x' } }, { 'd', group = '[D]ocument' }, { 'r', group = '[R]ename' }, { 's', group = '[S]earch' }, @@ -685,7 +685,7 @@ require('lazy').setup { opts = { options = { icons_enabled = true, - theme = 'onedark', + theme = 'nightfly', component_separators = '|', section_separators = '', }, @@ -737,7 +737,7 @@ require('lazy').setup { { '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 }, + { '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 @@ -835,7 +835,7 @@ require('lazy').setup { }, }, }, - { 'Bilal2453/luvit-meta', lazy = true }, + { 'Bilal2453/luvit-meta', lazy = true }, { -- Main LSP Configuration 'neovim/nvim-lspconfig', @@ -847,7 +847,7 @@ require('lazy').setup { -- 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 = {} }, -- `lazydev` configures Lua LSP for your Neovim config, runtime and plugins -- used for completion, annotations and signatures of Neovim apis diff --git a/lazy-lock.json b/lazy-lock.json index c3469fcd501..d09e69f57f8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,38 +1,38 @@ { "Comment.nvim": { "branch": "master", "commit": "e30b7f2008e52442154b66f7c519bfd2f1e32acb" }, "LuaSnip": { "branch": "master", "commit": "c9b9a22904c97d0eb69ccb9bab76037838326817" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "99290b3ec1322070bcfb9e846450a46f6efa50f0" }, - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "a8912b88ce488f411177fc8aed358b04dc246d7b" }, + "cmp-path": { "branch": "main", "commit": "c6635aae33a50d6010bf1aa756ac2398a2d54c32" }, "cmp_luasnip": { "branch": "master", "commit": "98d9cb5c2c38532bd9bdb481067b20fea8f32e90" }, - "conform.nvim": { "branch": "master", "commit": "b1a75324ddf96b7bb84963a297b1ed334db087c0" }, + "conform.nvim": { "branch": "master", "commit": "eebc724d12c5579d733d1f801386e0ceb909d001" }, "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "fzfx.nvim": { "branch": "main", "commit": "b786be453a4a1e6cb96d27dab6c0e951e3919f0a" }, "git-blame.nvim": { "branch": "master", "commit": "b12da2156ec1c3f53f42c129201ff0bfed69c86e" }, - "gitsigns.nvim": { "branch": "main", "commit": "3c76f7fabac723aa682365ef782f88a83ccdb4ac" }, + "gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "inlay-hints.nvim": { "branch": "master", "commit": "3259b54f3b954b4d8260f3ee49ceabe978ea5636" }, "lazy.nvim": { "branch": "main", "commit": "6c3bda4aca61a13a9c63f1c1d1b16b9d3be90d7a" }, "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" }, "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, - "lualine.nvim": { "branch": "master", "commit": "1517caa8fff05e4b4999857319d3b0609a7f57fa" }, + "lualine.nvim": { "branch": "master", "commit": "834a5817f7e2be22a7062620032d49c600c35fab" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, - "mason-tool-installer.nvim": { "branch": "main", "commit": "98767d37f8e5255a5111fc1e3163232d4dc07bda" }, + "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.nvim": { "branch": "main", "commit": "d0464ced00abfd9bbed196fa36ccf3b1691c6b2c" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, + "mini.nvim": { "branch": "main", "commit": "e744b5dbb3158242af77124bd6763a8647ea82ed" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" }, "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, - "nvim-cmp": { "branch": "main", "commit": "1e1900b0769324a9675ef85b38f99cca29e203b3" }, + "nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" }, "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-lspconfig": { "branch": "master", "commit": "ff6471d4f837354d8257dfa326b031dd8858b16e" }, + "nvim-lspconfig": { "branch": "master", "commit": "d3ad666b7895f958d088cceb6f6c199672c404fe" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "master", "commit": "9be6836ebeb88a536055bf1ce0961eef68da4bc6" }, + "nvim-treesitter": { "branch": "master", "commit": "205faba1768a6e4c854f156bc6a21a41b242599c" }, "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, From 4de0c61fa2fa5d2cfeb67a6b0fcb5a3cab28f9dc Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Tue, 8 Apr 2025 11:45:41 +0300 Subject: [PATCH 42/44] Add noice nvim --- init.lua | 16 ++++++++++++++++ lazy-lock.json | 12 +++++++----- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index c6d6d324059..45b92dcab5e 100644 --- a/init.lua +++ b/init.lua @@ -459,6 +459,22 @@ require('lazy').setup { 'rafamadriz/friendly-snippets', }, }, + -- lazy.nvim + { + 'folke/noice.nvim', + event = 'VeryLazy', + opts = { + -- add any options here + }, + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + 'MunifTanjim/nui.nvim', + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + 'rcarriga/nvim-notify', + }, + }, { 's1n7ax/nvim-window-picker', name = 'window-picker', diff --git a/lazy-lock.json b/lazy-lock.json index d09e69f57f8..735c4a06398 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -22,18 +22,20 @@ "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.nvim": { "branch": "main", "commit": "e744b5dbb3158242af77124bd6763a8647ea82ed" }, - "neo-tree.nvim": { "branch": "v2.x", "commit": "9b5d67119c46e3262ffe1508fe6d8540b79ad75d" }, + "mini.nvim": { "branch": "main", "commit": "fe8a669078a5066220262f173bf901f322e39c05" }, + "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, + "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, "null-ls.nvim": { "branch": "main", "commit": "0010ea927ab7c09ef0ce9bf28c2b573fc302f5a7" }, "nvim-cmp": { "branch": "main", "commit": "059e89495b3ec09395262f16b1ad441a38081d04" }, "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-lspconfig": { "branch": "master", "commit": "d3ad666b7895f958d088cceb6f6c199672c404fe" }, + "nvim-lspconfig": { "branch": "master", "commit": "442e077e326ac467daf9cd63e72120fb450a850b" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, - "nvim-treesitter": { "branch": "master", "commit": "205faba1768a6e4c854f156bc6a21a41b242599c" }, - "nvim-web-devicons": { "branch": "master", "commit": "4c3a5848ee0b09ecdea73adcd2a689190aeb728c" }, + "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" }, + "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, + "nvim-web-devicons": { "branch": "master", "commit": "57dfa947cc88cdf1baa2c7e13ed31edddd8fb1d1" }, "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "1f08ed60cafc8f6168b72b80be2b2ea149813e55" }, "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" }, From f65babbda3632bc15308afb6a1239e89fb2265ec Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Thu, 10 Apr 2025 09:14:04 +0300 Subject: [PATCH 43/44] Added ignore file for telescope --- init.lua | 9 ++++++++- lazy-lock.json | 8 ++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/init.lua b/init.lua index 45b92dcab5e..ebcca02b4a1 100644 --- a/init.lua +++ b/init.lua @@ -780,7 +780,14 @@ require('lazy').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 = { + file_ignore_patterns = { + '%.target', + 'target', + '%.wasm', + }, + }, + -- defaults = { -- mappings = { -- i = { [''] = 'to_fuzzy_refine' }, diff --git a/lazy-lock.json b/lazy-lock.json index 735c4a06398..97802fac7b2 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -8,7 +8,7 @@ "fidget.nvim": { "branch": "main", "commit": "d9ba6b7bfe29b3119a610892af67602641da778e" }, "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, "fzfx.nvim": { "branch": "main", "commit": "b786be453a4a1e6cb96d27dab6c0e951e3919f0a" }, - "git-blame.nvim": { "branch": "master", "commit": "b12da2156ec1c3f53f42c129201ff0bfed69c86e" }, + "git-blame.nvim": { "branch": "master", "commit": "56c17cb28723abd637d8a5de005c4ffae48f3161" }, "gitsigns.nvim": { "branch": "main", "commit": "17ab794b6fce6fce768430ebc925347e349e1d60" }, "indent-blankline.nvim": { "branch": "master", "commit": "005b56001b2cb30bfa61b7986bc50657816ba4ba" }, "inlay-hints.nvim": { "branch": "master", "commit": "3259b54f3b954b4d8260f3ee49ceabe978ea5636" }, @@ -16,13 +16,13 @@ "lazydev.nvim": { "branch": "main", "commit": "2367a6c0a01eb9edb0464731cc0fb61ed9ab9d2c" }, "lazygit.nvim": { "branch": "main", "commit": "b9eae3badab982e71abab96d3ee1d258f0c07961" }, "lsp-inlayhints.nvim": { "branch": "main", "commit": "d981f65c9ae0b6062176f0accb9c151daeda6f16" }, - "lualine.nvim": { "branch": "master", "commit": "834a5817f7e2be22a7062620032d49c600c35fab" }, + "lualine.nvim": { "branch": "master", "commit": "0ea56f91b7f51a37b749c050a5e5dfdd56b302b3" }, "luvit-meta": { "branch": "main", "commit": "1df30b60b1b4aecfebc785aa98943db6c6989716" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, "mason-lspconfig.nvim": { "branch": "main", "commit": "1a31f824b9cd5bc6f342fc29e9a53b60d74af245" }, "mason-tool-installer.nvim": { "branch": "main", "commit": "1255518cb067e038a4755f5cb3e980f79b6ab89c" }, "mason.nvim": { "branch": "main", "commit": "fc98833b6da5de5a9c5b1446ac541577059555be" }, - "mini.nvim": { "branch": "main", "commit": "fe8a669078a5066220262f173bf901f322e39c05" }, + "mini.nvim": { "branch": "main", "commit": "a90045c8b2bc2bc8a8eeb8ab23cf8242dd9b16e7" }, "neo-tree.nvim": { "branch": "v2.x", "commit": "80dc74d081823649809f78370fa5b204aa9a853a" }, "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, "nui.nvim": { "branch": "main", "commit": "8d3bce9764e627b62b07424e0df77f680d47ffdb" }, @@ -31,7 +31,7 @@ "nvim-dap": { "branch": "master", "commit": "7aade9e99bef5f0735cf966e715b3ce45515d786" }, "nvim-dap-go": { "branch": "main", "commit": "8763ced35b19c8dc526e04a70ab07c34e11ad064" }, "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, - "nvim-lspconfig": { "branch": "master", "commit": "442e077e326ac467daf9cd63e72120fb450a850b" }, + "nvim-lspconfig": { "branch": "master", "commit": "94dda50b2d9a29d0b76562a9027029538840e2d7" }, "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, "nvim-notify": { "branch": "master", "commit": "22f29093eae7785773ee9d543f8750348b1a195c" }, "nvim-treesitter": { "branch": "master", "commit": "0e21ee8df6235511c02bab4a5b391d18e165a58d" }, From 7d9c9f913764349780eeab76a5c54383f15db219 Mon Sep 17 00:00:00 2001 From: Andrei Baltariu Date: Sun, 20 Apr 2025 15:01:17 +0300 Subject: [PATCH 44/44] Added lazy-lock in .gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index d699e1d68cc..ea93edad490 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ tags test.sh .luarc.json nvim +lazy-lock.json