diff --git a/nvim.bak/init.lua b/nvim.bak/init.lua index b76568d..2a068c8 100644 --- a/nvim.bak/init.lua +++ b/nvim.bak/init.lua @@ -6,8 +6,8 @@ vim.opt.clipboard = "unnamedplus,unnamed" -- Spaces indentation vim.opt.expandtab = true -- converts tabs to spaces -vim.opt.tabstop = 4 -- tab equals 4 spaces -vim.opt.shiftwidth = 4 -- indent size in characters +vim.opt.tabstop = 4 -- tab equals 4 spaces +vim.opt.shiftwidth = 4 -- indent size in characters -- Show whitespace (:list) vim.opt.listchars = "eol:¬,tab:>-,trail:~,extends:>,precedes:<,space:·" @@ -40,158 +40,152 @@ vim.opt.directory = ".swp/," .. HOME .. "/.swp/,/tmp//" -- netrw -- This is the workspace file explorer -vim.g.netrw_winsize = 25 -- width of the file explorer +vim.g.netrw_winsize = 25 -- width of the file explorer vim.g.netrw_liststyle = 3 -- tree style listing -- Sane vim split naviagation (via Gaslight blog) -vim.keymap.set("n", "", "j", { noremap = true, desc = 'Go to window below' }) -vim.keymap.set("n", "", "k", { noremap = true, desc = 'Go to window above' }) -vim.keymap.set("n", "", "h", { noremap = true, desc = 'Go to window to the left' }) +vim.keymap.set("n", "", "j", { noremap = true, desc = "Go to window below" }) +vim.keymap.set("n", "", "k", { noremap = true, desc = "Go to window above" }) +vim.keymap.set("n", "", "h", { noremap = true, desc = "Go to window to the left" }) -- N.B. This conflicts with the NetRW directory refresh command. Use the alternative `:e .`. -- TODO: This seems not to work for netrw. -vim.keymap.set("n", "", "l", { noremap = true, desc = 'Go to window to the right' }) +vim.keymap.set("n", "", "l", { noremap = true, desc = "Go to window to the right" }) -vim.keymap.set("t", "", "j", { noremap = true, desc = 'Go to window below' }) -vim.keymap.set("t", "", "k", { noremap = true, desc = 'Go to window above' }) -vim.keymap.set("t", "", "h", { noremap = true, desc = 'Go to window to the left' }) -vim.keymap.set("t", "", "l", { noremap = true, desc = 'Go to window to the right' }) +vim.keymap.set("t", "", "j", { noremap = true, desc = "Go to window below" }) +vim.keymap.set("t", "", "k", { noremap = true, desc = "Go to window above" }) +vim.keymap.set("t", "", "h", { noremap = true, desc = "Go to window to the left" }) +vim.keymap.set("t", "", "l", { noremap = true, desc = "Go to window to the right" }) -vim.keymap.set( - { "n", "t" }, - "z", - function() - -- This restores the UI to the saved layout 'idelayout' (if it exists) - if vim.fn.exists("idelayout") ~= 0 then - vim.cmd("exec idelayout") - end - end, - { desc = "Revert window layout" } -) +vim.keymap.set({ "n", "t" }, "z", function() + -- This restores the UI to the saved layout 'idelayout' (if it exists) + if vim.fn.exists("idelayout") ~= 0 then + vim.cmd("exec idelayout") + end +end, { desc = "Revert window layout" }) local terminalgroup = vim.api.nvim_create_augroup("TerminalGroup", { clear = true }) -vim.api.nvim_create_autocmd( - { "TermOpen", "TermEnter" }, - { - group = terminalgroup, - pattern = "*", - command = "set nonumber" - } -) +vim.api.nvim_create_autocmd({ "TermOpen", "TermEnter" }, { + group = terminalgroup, + pattern = "*", + command = "set nonumber", +}) -- lazy.nvim local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" if not vim.loop.fs_stat(lazypath) then - vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "https://github.com/folke/lazy.nvim.git", - "--branch=stable", -- latest stable release - lazypath, - }) + vim.fn.system({ + "git", + "clone", + "--filter=blob:none", + "https://github.com/folke/lazy.nvim.git", + "--branch=stable", -- latest stable release + lazypath, + }) end vim.opt.rtp:prepend(lazypath) local js_based_languages = { "javascript", "typescript" } require("lazy").setup({ - { - "afair/vibrantink2", - priority = 1000, - config = function() - vim.cmd.colorscheme("vibrantink2") - end - }, - "nvim-lualine/lualine.nvim", - "nvim-tree/nvim-web-devicons", - { "echasnovski/mini.nvim", version = false }, - { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, - "neovim/nvim-lspconfig", - { - "kylechui/nvim-surround", - version = "*", -- Use for stability; omit to use `main` branch for the latest features - event = "VeryLazy", - config = function() - require("nvim-surround").setup({ - -- Configuration here, or leave empty to use defaults - }) - end - }, - { - "folke/which-key.nvim", - event = "VeryLazy", - -- init = function() - -- vim.o.timeout = true - -- -- N.B. Setting `timeoutlen` to 0 seems to break the plugin - -- vim.o.timeoutlen = 300 -- 0? 500? 300? - -- end, - opts = { - win = { - border = "single", - }, - }, - keys = { - { - "?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Local Keymaps (which-key)", - }, - }, - }, - { - "ray-x/lsp_signature.nvim", - event = "VeryLazy", - opts = {}, - config = function(_, opts) require 'lsp_signature'.setup(opts) end - }, - { - "folke/lazydev.nvim", - ft = "lua", -- only load on lua files - opts = { - library = { - -- See the configuration section for more details - -- Load luvit types when the `vim.uv` word is found - { path = "luvit-meta/library", words = { "vim%.uv" } }, - }, - }, - }, - { "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings - { -- optional completion source for require statements and module annotations - "hrsh7th/nvim-cmp", - opts = function(_, opts) - opts.sources = opts.sources or {} - table.insert(opts.sources, { - name = "lazydev", - group_index = 0, -- set group index to 0 to skip loading LuaLS completions - }) - end, - event = "InsertEnter", - dependencies = { - "hrsh7th/cmp-nvim-lsp", - "hrsh7th/cmp-buffer", - "hrsh7th/cmp-path", - "hrsh7th/cmp-cmdline", - "hrsh7th/cmp-vsnip", - "hrsh7th/vim-vsnip", - "hrsh7th/cmp-nvim-lsp-signature-help", - }, - }, - { - "rcarriga/nvim-dap-ui", - dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, - }, - { - "mfussenegger/nvim-dap", - event = "VeryLazy", - config = function() - local dap = require("dap") + { + "afair/vibrantink2", + priority = 1000, + config = function() + vim.cmd.colorscheme("vibrantink2") + end, + }, + "nvim-lualine/lualine.nvim", + "nvim-tree/nvim-web-devicons", + { "echasnovski/mini.nvim", version = false }, + { "nvim-treesitter/nvim-treesitter", build = ":TSUpdate" }, + "neovim/nvim-lspconfig", + { + "kylechui/nvim-surround", + version = "*", -- Use for stability; omit to use `main` branch for the latest features + event = "VeryLazy", + config = function() + require("nvim-surround").setup({ + -- Configuration here, or leave empty to use defaults + }) + end, + }, + { + "folke/which-key.nvim", + event = "VeryLazy", + -- init = function() + -- vim.o.timeout = true + -- -- N.B. Setting `timeoutlen` to 0 seems to break the plugin + -- vim.o.timeoutlen = 300 -- 0? 500? 300? + -- end, + opts = { + win = { + border = "single", + }, + }, + keys = { + { + "?", + function() + require("which-key").show({ global = false }) + end, + desc = "Buffer Local Keymaps (which-key)", + }, + }, + }, + { + "ray-x/lsp_signature.nvim", + event = "VeryLazy", + opts = {}, + config = function(_, opts) + require("lsp_signature").setup(opts) + end, + }, + { + "folke/lazydev.nvim", + ft = "lua", -- only load on lua files + opts = { + library = { + -- See the configuration section for more details + -- Load luvit types when the `vim.uv` word is found + { path = "luvit-meta/library", words = { "vim%.uv" } }, + }, + }, + }, + { "Bilal2453/luvit-meta", lazy = true }, -- optional `vim.uv` typings + { -- optional completion source for require statements and module annotations + "hrsh7th/nvim-cmp", + opts = function(_, opts) + opts.sources = opts.sources or {} + table.insert(opts.sources, { + name = "lazydev", + group_index = 0, -- set group index to 0 to skip loading LuaLS completions + }) + end, + event = "InsertEnter", + dependencies = { + "hrsh7th/cmp-nvim-lsp", + "hrsh7th/cmp-buffer", + "hrsh7th/cmp-path", + "hrsh7th/cmp-cmdline", + "hrsh7th/cmp-vsnip", + "hrsh7th/vim-vsnip", + "hrsh7th/cmp-nvim-lsp-signature-help", + }, + }, + { + "rcarriga/nvim-dap-ui", + dependencies = { "mfussenegger/nvim-dap", "nvim-neotest/nvim-nio" }, + }, + { + "mfussenegger/nvim-dap", + event = "VeryLazy", + config = function() + local dap = require("dap") - -- local Config = require("lazyvim.config") - vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" }) + -- local Config = require("lazyvim.config") + vim.api.nvim_set_hl(0, "DapStoppedLine", { default = true, link = "Visual" }) - --[[ + --[[ for name, sign in pairs(Config.icons.dap) do sign = type(sign) == "table" and sign or { sign } vim.fn.sign_define( @@ -201,196 +195,194 @@ require("lazy").setup({ end --]] - for _, language in ipairs({ "javascript", "typescript" }) do - dap.configurations[language] = { - -- Debug single nodejs files - { - type = "pwa-node", - request = "launch", - name = "Launch file", - program = "${file}", - cwd = vim.fn.getcwd(), - sourceMaps = true, - }, - -- Debug nodejs processes (make sure to add --inspect when you run the process) - { - type = "pwa-node", - request = "attach", - name = "Attach", - processId = require("dap.utils").pick_process, - cwd = vim.fn.getcwd(), - sourceMaps = true, - }, - -- Debug web applications (client side) - { - type = "pwa-chrome", - request = "launch", - name = "Launch & Debug Chrome", - url = function() - local co = coroutine.running() - return coroutine.create(function() - vim.ui.input({ - prompt = "Enter URL: ", - default = "http://localhost:3000", - }, function(url) - if url == nil or url == "" then - return - else - coroutine.resume(co, url) - end - end) - end) - end, - webRoot = vim.fn.getcwd(), - protocol = "inspector", - sourceMaps = true, - userDataDir = false, - }, - -- Divider for the launch.json derived configs - { - name = "----- ↓ launch.json configs ↓ -----", - type = "", - request = "launch", - }, - } - end - end, - keys = { - { - "dO", - function() - require("dap").step_out() - end, - desc = "DAP: Step Out", - }, - { - "do", - function() - require("dap").step_over() - end, - desc = "DAP: Step Over", - }, - { - "db", - function() - require("dap").toggle_breakpoint() - end, - desc = "DAP: Toggle breakpoint", - }, - { - "dc", - function() - require("dap").continue() - end, - desc = "DAP: Continue", - }, - { - "di", - function() - require("dap").step_into() - end, - desc = "DAP: Step Into", - }, - { - "da", - function() - if vim.fn.filereadable(".vscode/launch.json") then - local dap_vscode = require("dap.ext.vscode") - dap_vscode.load_launchjs(nil, { - ["pwa-node"] = js_based_languages, - ["chrome"] = js_based_languages, - ["pwa-chrome"] = js_based_languages, - }) - end - require("dap").continue() - end, - desc = "DAP: Run with Args", - }, - }, - dependencies = { - -- Install the vscode-js-debug adapter - { - "microsoft/vscode-js-debug", - -- After install, build it and rename the dist directory to out - build = - "npm install --legacy-peer-deps --no-save && npx gulp vsDebugServerBundle && rm -rf out && mv dist out", - version = "1.*", - }, - { - "mxsdev/nvim-dap-vscode-js", - config = function() - ---@diagnostic disable-next-line: missing-fields - require("dap-vscode-js").setup({ - -- Path of node executable. Defaults to $NODE_PATH, and then "node" - -- node_path = "node", + for _, language in ipairs({ "javascript", "typescript" }) do + dap.configurations[language] = { + -- Debug single nodejs files + { + type = "pwa-node", + request = "launch", + name = "Launch file", + program = "${file}", + cwd = vim.fn.getcwd(), + sourceMaps = true, + }, + -- Debug nodejs processes (make sure to add --inspect when you run the process) + { + type = "pwa-node", + request = "attach", + name = "Attach", + processId = require("dap.utils").pick_process, + cwd = vim.fn.getcwd(), + sourceMaps = true, + }, + -- Debug web applications (client side) + { + type = "pwa-chrome", + request = "launch", + name = "Launch & Debug Chrome", + url = function() + local co = coroutine.running() + return coroutine.create(function() + vim.ui.input({ + prompt = "Enter URL: ", + default = "http://localhost:3000", + }, function(url) + if url == nil or url == "" then + return + else + coroutine.resume(co, url) + end + end) + end) + end, + webRoot = vim.fn.getcwd(), + protocol = "inspector", + sourceMaps = true, + userDataDir = false, + }, + -- Divider for the launch.json derived configs + { + name = "----- ↓ launch.json configs ↓ -----", + type = "", + request = "launch", + }, + } + end + end, + keys = { + { + "dO", + function() + require("dap").step_out() + end, + desc = "DAP: Step Out", + }, + { + "do", + function() + require("dap").step_over() + end, + desc = "DAP: Step Over", + }, + { + "db", + function() + require("dap").toggle_breakpoint() + end, + desc = "DAP: Toggle breakpoint", + }, + { + "dc", + function() + require("dap").continue() + end, + desc = "DAP: Continue", + }, + { + "di", + function() + require("dap").step_into() + end, + desc = "DAP: Step Into", + }, + { + "da", + function() + if vim.fn.filereadable(".vscode/launch.json") then + local dap_vscode = require("dap.ext.vscode") + dap_vscode.load_launchjs(nil, { + ["pwa-node"] = js_based_languages, + ["chrome"] = js_based_languages, + ["pwa-chrome"] = js_based_languages, + }) + end + require("dap").continue() + end, + desc = "DAP: Run with Args", + }, + }, + dependencies = { + -- Install the vscode-js-debug adapter + { + "microsoft/vscode-js-debug", + -- After install, build it and rename the dist directory to out + build = "npm install --legacy-peer-deps --no-save && npx gulp vsDebugServerBundle && rm -rf out && mv dist out", + version = "1.*", + }, + { + "mxsdev/nvim-dap-vscode-js", + config = function() + ---@diagnostic disable-next-line: missing-fields + require("dap-vscode-js").setup({ + -- Path of node executable. Defaults to $NODE_PATH, and then "node" + -- node_path = "node", - -- Path to vscode-js-debug installation. - debugger_path = vim.fn.resolve(vim.fn.stdpath("data") .. "/lazy/vscode-js-debug"), + -- Path to vscode-js-debug installation. + debugger_path = vim.fn.resolve(vim.fn.stdpath("data") .. "/lazy/vscode-js-debug"), - -- Command to use to launch the debug server. Takes precedence over "node_path" and "debugger_path" - -- debugger_cmd = { "js-debug-adapter" }, + -- Command to use to launch the debug server. Takes precedence over "node_path" and "debugger_path" + -- debugger_cmd = { "js-debug-adapter" }, - -- which adapters to register in nvim-dap - adapters = { - "chrome", - "pwa-node", - "pwa-chrome", - "pwa-msedge", - "pwa-extensionHost", - "node-terminal", - }, + -- which adapters to register in nvim-dap + adapters = { + "chrome", + "pwa-node", + "pwa-chrome", + "pwa-msedge", + "pwa-extensionHost", + "node-terminal", + }, - -- Path for file logging - -- log_file_path = "(stdpath cache)/dap_vscode_js.log", + -- Path for file logging + -- log_file_path = "(stdpath cache)/dap_vscode_js.log", - -- Logging level for output to file. Set to false to disable logging. - -- log_file_level = false, + -- Logging level for output to file. Set to false to disable logging. + -- log_file_level = false, - -- Logging level for output to console. Set to false to disable console output. - -- log_console_level = vim.log.levels.ERROR, - }) - end, - }, - { - "Joakker/lua-json5", - build = "./install.sh", - }, - }, - }, - { "leoluz/nvim-dap-go", event = "VeryLazy" }, - { "williamboman/mason.nvim", event = "VeryLazy" }, - { "williamboman/mason-lspconfig.nvim", event = "VeryLazy" }, - { "nvimdev/lspsaga.nvim", event = "VeryLazy" }, - { - "nvim-telescope/telescope.nvim", - event = "VeryLazy", - branch = "0.1.x", - dependencies = { - "nvim-lua/plenary.nvim", - { - "nvim-telescope/telescope-fzf-native.nvim", - build = - "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", - }, - }, - }, - { "tpope/vim-fugitive", event = "VeryLazy" }, - { "lewis6991/gitsigns.nvim", event = "VeryLazy" }, - { - "pwntester/octo.nvim", - requires = { - "nvim-lua/plenary.nvim", - "nvim-telescope/telescope.nvim", - "nvim-tree/nvim-web-devicons", - }, - config = function() - require("octo").setup() - end, - event = "VeryLazy", - }, - { "famiu/bufdelete.nvim", event = "VeryLazy" }, - -- { "vlime/vlime", config = function() rtp = 'vim/' end }, - --[[ + -- Logging level for output to console. Set to false to disable console output. + -- log_console_level = vim.log.levels.ERROR, + }) + end, + }, + { + "Joakker/lua-json5", + build = "./install.sh", + }, + }, + }, + { "leoluz/nvim-dap-go", event = "VeryLazy" }, + { "williamboman/mason.nvim", event = "VeryLazy" }, + { "williamboman/mason-lspconfig.nvim", event = "VeryLazy" }, + { "nvimdev/lspsaga.nvim", event = "VeryLazy" }, + { + "nvim-telescope/telescope.nvim", + event = "VeryLazy", + branch = "0.1.x", + dependencies = { + "nvim-lua/plenary.nvim", + { + "nvim-telescope/telescope-fzf-native.nvim", + build = "cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build", + }, + }, + }, + { "tpope/vim-fugitive", event = "VeryLazy" }, + { "lewis6991/gitsigns.nvim", event = "VeryLazy" }, + { + "pwntester/octo.nvim", + requires = { + "nvim-lua/plenary.nvim", + "nvim-telescope/telescope.nvim", + "nvim-tree/nvim-web-devicons", + }, + config = function() + require("octo").setup() + end, + event = "VeryLazy", + }, + { "famiu/bufdelete.nvim", event = "VeryLazy" }, + -- { "vlime/vlime", config = function() rtp = 'vim/' end }, + --[[ { 'windwp/nvim-autopairs', event = "InsertEnter", @@ -399,22 +391,22 @@ require("lazy").setup({ -- this is equalent to setup({}) function }, --]] - --{ "bhurlow/vim-parinfer", event = "VeryLazy" }, - { "kovisoft/paredit" }, - --{ "monkoose/parsley", event = "VeryLazy" }, - { "monkoose/nvlime", ft = { "lisp" }, dependencies = { "monkoose/parsley" } }, - { - 'MeanderingProgrammer/markdown.nvim', - -- name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim - dependencies = { - 'nvim-treesitter/nvim-treesitter', -- Mandatory - 'nvim-tree/nvim-web-devicons', -- Optional but recommended - }, - config = function() - require('render-markdown').setup({}) - end, - }, - { "jparise/vim-graphql" }, + --{ "bhurlow/vim-parinfer", event = "VeryLazy" }, + { "kovisoft/paredit" }, + --{ "monkoose/parsley", event = "VeryLazy" }, + { "monkoose/nvlime", ft = { "lisp" }, dependencies = { "monkoose/parsley" } }, + { + "MeanderingProgrammer/markdown.nvim", + -- name = 'render-markdown', -- Only needed if you have another plugin named markdown.nvim + dependencies = { + "nvim-treesitter/nvim-treesitter", -- Mandatory + "nvim-tree/nvim-web-devicons", -- Optional but recommended + }, + config = function() + require("render-markdown").setup({}) + end, + }, + { "jparise/vim-graphql" }, }) --[[ mason @@ -422,94 +414,94 @@ Mason manages external editor plugins such as LSP servers, DAP servers, linters, and formatters. There are further recommended plugins for better integration. --]] -require('mason').setup() -require('mason-lspconfig').setup() +require("mason").setup() +require("mason-lspconfig").setup() --[[ lualine Lualine provides the status bar as well as the tabline. --]] -require('lualine').setup { - options = { theme = 'dracula' }, - tabline = { - lualine_a = { - { - 'buffers', - mode = 4, - }, - }, - }, -} +require("lualine").setup({ + options = { theme = "dracula" }, + tabline = { + lualine_a = { + { + "buffers", + mode = 4, + }, + }, + }, +}) --[[ Telescope Telescope provides lists, pickers, etc. This section includes just the functions bound to keymaps. --]] -local builtin = require('telescope.builtin') -vim.keymap.set('n', 'ff', builtin.find_files, { desc = 'Telescope: find files' }) -vim.keymap.set('n', 'fg', builtin.live_grep, { desc = 'Telescope: live grep' }) -vim.keymap.set('n', 'fb', builtin.buffers, { desc = 'Telescope: buffers' }) -vim.keymap.set('n', 'fh', builtin.help_tags, { desc = 'Telescope: help tags' }) +local builtin = require("telescope.builtin") +vim.keymap.set("n", "ff", builtin.find_files, { desc = "Telescope: find files" }) +vim.keymap.set("n", "fg", builtin.live_grep, { desc = "Telescope: live grep" }) +vim.keymap.set("n", "fb", builtin.buffers, { desc = "Telescope: buffers" }) +vim.keymap.set("n", "fh", builtin.help_tags, { desc = "Telescope: help tags" }) -require "lsp_signature".setup() +require("lsp_signature").setup() --[[ nvim-cmp nvim-cmp is a text completion engine. ]] -local cmp = require 'cmp' +local cmp = require("cmp") cmp.setup({ - snippet = { - -- REQUIRED - you must specify a snippet engine - expand = function(args) - vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. - end, - }, - window = { - completion = cmp.config.window.bordered(), - documentation = cmp.config.window.bordered(), - }, - mapping = cmp.mapping.preset.insert({ - [''] = cmp.mapping.scroll_docs(-4), - [''] = cmp.mapping.scroll_docs(4), - [''] = cmp.mapping.complete(), - [''] = cmp.mapping.abort(), - [''] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. - }), - sources = cmp.config.sources({ - { name = 'nvim_lsp' }, - { name = 'vsnip' }, -- For vsnip users. - }, { - { name = 'buffer' }, - { name = 'nvim_lsp_signature_help' }, - }) + snippet = { + -- REQUIRED - you must specify a snippet engine + expand = function(args) + vim.fn["vsnip#anonymous"](args.body) -- For `vsnip` users. + end, + }, + window = { + completion = cmp.config.window.bordered(), + documentation = cmp.config.window.bordered(), + }, + mapping = cmp.mapping.preset.insert({ + [""] = cmp.mapping.scroll_docs(-4), + [""] = cmp.mapping.scroll_docs(4), + [""] = cmp.mapping.complete(), + [""] = cmp.mapping.abort(), + [""] = cmp.mapping.confirm({ select = true }), -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items. + }), + sources = cmp.config.sources({ + { name = "nvim_lsp" }, + { name = "vsnip" }, -- For vsnip users. + }, { + { name = "buffer" }, + { name = "nvim_lsp_signature_help" }, + }), }) -- Set configuration for specific filetype. -cmp.setup.filetype('gitcommit', { - sources = cmp.config.sources({ - { name = 'git' }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). - }, { - { name = 'buffer' }, - }) +cmp.setup.filetype("gitcommit", { + sources = cmp.config.sources({ + { name = "git" }, -- You can specify the `git` source if [you were installed it](https://github.com/petertriho/cmp-git). + }, { + { name = "buffer" }, + }), }) -- Use buffer source for `/` and `?` (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline({ '/', '?' }, { - mapping = cmp.mapping.preset.cmdline(), - sources = { - { name = 'buffer' } - } +cmp.setup.cmdline({ "/", "?" }, { + mapping = cmp.mapping.preset.cmdline(), + sources = { + { name = "buffer" }, + }, }) -- Use cmdline & path source for ':' (if you enabled `native_menu`, this won't work anymore). -cmp.setup.cmdline(':', { - mapping = cmp.mapping.preset.cmdline(), - sources = cmp.config.sources({ - { name = 'path' } - }, { - { name = 'cmdline' } - }) +cmp.setup.cmdline(":", { + mapping = cmp.mapping.preset.cmdline(), + sources = cmp.config.sources({ + { name = "path" }, + }, { + { name = "cmdline" }, + }), }) --[[ nvim-lspconfig @@ -517,68 +509,66 @@ cmp.setup.cmdline(':', { -- Setup language servers. local lua_ls_setup = { - settings = { - Lua = { - runtime = { - -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) - version = "LuaJIT", - }, - diagnostics = { - -- Get the language server to recognize the `vim` global - globals = { "vim" }, - }, - workspace = { - -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file("", true), - checkThirdParty = false, - }, - -- Do not send telemetry data containing a randomized but unique identifier - telemetry = { - enable = false, - }, - }, - }, + settings = { + Lua = { + runtime = { + -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) + version = "LuaJIT", + }, + diagnostics = { + -- Get the language server to recognize the `vim` global + globals = { "vim" }, + }, + workspace = { + -- Make the server aware of Neovim runtime files + library = vim.api.nvim_get_runtime_file("", true), + checkThirdParty = false, + }, + -- Do not send telemetry data containing a randomized but unique identifier + telemetry = { + enable = false, + }, + }, + }, } -local capabilities = require('cmp_nvim_lsp').default_capabilities() +local capabilities = require("cmp_nvim_lsp").default_capabilities() -local lspconfig = require('lspconfig') -lspconfig.gopls.setup { capabilities = capabilities } +local lspconfig = require("lspconfig") +lspconfig.gopls.setup({ capabilities = capabilities }) lspconfig.lua_ls.setup(lua_ls_setup) -lspconfig.pyright.setup { capabilities = capabilities } +lspconfig.pyright.setup({ capabilities = capabilities }) -- lspconfig.tsserver.setup { capabilities = capabilities } -lspconfig.ts_ls.setup { capabilities = capabilities } -lspconfig.rust_analyzer.setup { - -- Server-specific settings. See `:help lspconfig-setup` - capabilities = capabilities, - settings = { - ['rust-analyzer'] = {}, - }, -} +lspconfig.ts_ls.setup({ capabilities = capabilities }) +lspconfig.rust_analyzer.setup({ + -- Server-specific settings. See `:help lspconfig-setup` + capabilities = capabilities, + settings = { + ["rust-analyzer"] = {}, + }, +}) -- Enable (broadcasting) snippet capability for completion local capabilities_html = vim.lsp.protocol.make_client_capabilities() capabilities_html.textDocument.completion.completionItem.snippetSupport = true -require 'lspconfig'.html.setup { - capabilities = capabilities_html, -} +require("lspconfig").html.setup({ + capabilities = capabilities_html, +}) -- Global mappings : Diagnostics -- See `:help vim.diagnostic.*` for documentation on any of the below functions -vim.keymap.set('n', 'e', vim.diagnostic.open_float, { desc = 'Diagnostic: open float' }) -vim.keymap.set('n', '[d', vim.diagnostic.goto_prev, { desc = 'Diagnostic: go to previous' }) -vim.keymap.set('n', ']d', vim.diagnostic.goto_next, { desc = 'Diagnostic: go to next' }) -vim.keymap.set('n', 'q', vim.diagnostic.setloclist, { desc = 'Diagnostic: set loclist' }) +vim.keymap.set("n", "e", vim.diagnostic.open_float, { desc = "Diagnostic: open float" }) +vim.keymap.set("n", "[d", vim.diagnostic.goto_prev, { desc = "Diagnostic: go to previous" }) +vim.keymap.set("n", "]d", vim.diagnostic.goto_next, { desc = "Diagnostic: go to next" }) +vim.keymap.set("n", "q", vim.diagnostic.setloclist, { desc = "Diagnostic: set loclist" }) -- Add a border to LSP windows local _border = "single" -vim.lsp.handlers["textDocument/hover"] = vim.lsp.with( - vim.lsp.handlers.hover, { - border = _border - } -) +vim.lsp.handlers["textDocument/hover"] = vim.lsp.with(vim.lsp.handlers.hover, { + border = _border, +}) -- TODO: Is this necessary? Or is signature help being handled with LSPSaga? --[[ @@ -589,163 +579,177 @@ vim.lsp.handlers["textDocument/signatureHelp"] = vim.lsp.with( ) --]] -vim.diagnostic.config { - float = { border = _border, max_width = 120 } -} +vim.diagnostic.config({ + float = { border = _border, max_width = 120 }, +}) -- Use LspAttach autocommand to only map the following keys -- after the language server attaches to the current buffer -vim.api.nvim_create_autocmd('LspAttach', { - group = vim.api.nvim_create_augroup('UserLspConfig', {}), - callback = function(ev) - -- Enable completion triggered by - vim.bo[ev.buf].omnifunc = 'v:lua.vim.lsp.omnifunc' +vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("UserLspConfig", {}), + callback = function(ev) + -- Enable completion triggered by + vim.bo[ev.buf].omnifunc = "v:lua.vim.lsp.omnifunc" - -- Buffer local mappings. - -- See `:help vim.lsp.*` for documentation on any of the below functions - local opts = function(desc) - return { buffer = ev.buf, desc = desc } - end - vim.keymap.set('n', 'gD', vim.lsp.buf.declaration, opts('LSP: go to declaration')) - vim.keymap.set('n', 'gd', vim.lsp.buf.definition, opts('LSP: go to definition')) - vim.keymap.set('n', 'K', vim.lsp.buf.hover, opts('LSP: hover')) - vim.keymap.set('n', 'gi', vim.lsp.buf.implementation, opts('LSP: go to implementation')) - -- This setting steps on my split navigation setting, so I changed it - -- to the probably harmless F9. - -- vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts('')) - vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts('LSP: signature help')) - vim.keymap.set('n', 'wa', vim.lsp.buf.add_workspace_folder, opts('LSP: add workspace folder')) - vim.keymap.set('n', 'wr', vim.lsp.buf.remove_workspace_folder, opts('LSP: remove workspace folder')) - vim.keymap.set('n', 'wl', function() - print(vim.inspect(vim.lsp.buf.list_workspace_folders())) - end, opts('LSP: list workspace folder')) - vim.keymap.set('n', 'D', vim.lsp.buf.type_definition, opts('LSP: go to type definition')) - vim.keymap.set('n', 'rn', vim.lsp.buf.rename, opts('LSP: rename token')) - vim.keymap.set({ 'n', 'v' }, 'ca', vim.lsp.buf.code_action, opts('LSP: code action')) - vim.keymap.set('n', 'gr', vim.lsp.buf.references, opts('LSP: go to references')) - vim.keymap.set('n', 'f', function() - vim.lsp.buf.format { async = true } - end, opts('LSP: format')) - end, + -- Buffer local mappings. + -- See `:help vim.lsp.*` for documentation on any of the below functions + local opts = function(desc) + return { buffer = ev.buf, desc = desc } + end + vim.keymap.set("n", "gD", vim.lsp.buf.declaration, opts("LSP: go to declaration")) + vim.keymap.set("n", "gd", vim.lsp.buf.definition, opts("LSP: go to definition")) + vim.keymap.set("n", "K", vim.lsp.buf.hover, opts("LSP: hover")) + vim.keymap.set("n", "gi", vim.lsp.buf.implementation, opts("LSP: go to implementation")) + -- This setting steps on my split navigation setting, so I changed it + -- to the probably harmless F9. + -- vim.keymap.set('n', '', vim.lsp.buf.signature_help, opts('')) + vim.keymap.set("n", "", vim.lsp.buf.signature_help, opts("LSP: signature help")) + vim.keymap.set("n", "wa", vim.lsp.buf.add_workspace_folder, opts("LSP: add workspace folder")) + vim.keymap.set("n", "wr", vim.lsp.buf.remove_workspace_folder, opts("LSP: remove workspace folder")) + vim.keymap.set("n", "wl", function() + print(vim.inspect(vim.lsp.buf.list_workspace_folders())) + end, opts("LSP: list workspace folder")) + vim.keymap.set("n", "D", vim.lsp.buf.type_definition, opts("LSP: go to type definition")) + vim.keymap.set("n", "rn", vim.lsp.buf.rename, opts("LSP: rename token")) + vim.keymap.set({ "n", "v" }, "ca", vim.lsp.buf.code_action, opts("LSP: code action")) + vim.keymap.set("n", "gr", vim.lsp.buf.references, opts("LSP: go to references")) + vim.keymap.set("n", "f", function() + vim.lsp.buf.format({ async = true }) + end, opts("LSP: format")) + end, }) -require('gitsigns').setup({ - signs = { - add = { text = '│' }, - change = { text = '│' }, - delete = { text = '_' }, - topdelete = { text = '‾' }, - changedelete = { text = '~' }, - untracked = { text = '┆' }, - }, - signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` - word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` - watch_gitdir = { - follow_files = true - }, - attach_to_untracked = true, - current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', -- 'eol' | 'overlay' | 'right_align' - delay = 1000, - ignore_whitespace = false, - }, - current_line_blame_formatter = ', - ', - sign_priority = 6, - update_debounce = 100, - status_formatter = nil, -- Use default - max_file_length = 40000, -- Disable if file is longer than this (in lines) - preview_config = { - -- Options passed to nvim_open_win - border = 'single', - style = 'minimal', - relative = 'cursor', - row = 0, - col = 1 - }, - -- [2024-09-10] This is invalid, suddenly. - -- yadm = { enable = false }, - on_attach = function(bufnr) - local gs = package.loaded.gitsigns +require("gitsigns").setup({ + signs = { + add = { text = "│" }, + change = { text = "│" }, + delete = { text = "_" }, + topdelete = { text = "‾" }, + changedelete = { text = "~" }, + untracked = { text = "┆" }, + }, + signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` + watch_gitdir = { + follow_files = true, + }, + attach_to_untracked = true, + current_line_blame = false, -- Toggle with `:Gitsigns toggle_current_line_blame` + current_line_blame_opts = { + virt_text = true, + virt_text_pos = "eol", -- 'eol' | 'overlay' | 'right_align' + delay = 1000, + ignore_whitespace = false, + }, + current_line_blame_formatter = ", - ", + sign_priority = 6, + update_debounce = 100, + status_formatter = nil, -- Use default + max_file_length = 40000, -- Disable if file is longer than this (in lines) + preview_config = { + -- Options passed to nvim_open_win + border = "single", + style = "minimal", + relative = "cursor", + row = 0, + col = 1, + }, + -- [2024-09-10] This is invalid, suddenly. + -- yadm = { enable = false }, + 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 + local function map(mode, l, r, opts) + opts = opts or {} + opts.buffer = bufnr + vim.keymap.set(mode, l, r, opts) + end - -- Navigation - map('n', ']c', function() - if vim.wo.diff then return ']c' end - vim.schedule(function() gs.next_hunk() end) - return '' - end, { expr = true, desc = 'GitSigns: go to next hunk' }) + -- Navigation + map("n", "]c", function() + if vim.wo.diff then + return "]c" + end + vim.schedule(function() + gs.next_hunk() + end) + return "" + end, { expr = true, desc = "GitSigns: go to next hunk" }) - map('n', '[c', function() - if vim.wo.diff then return '[c' end - vim.schedule(function() gs.prev_hunk() end) - return '' - end, { expr = true, desc = 'GitSigns: go to previous hunk' }) + map("n", "[c", function() + if vim.wo.diff then + return "[c" + end + vim.schedule(function() + gs.prev_hunk() + end) + return "" + end, { expr = true, desc = "GitSigns: go to previous hunk" }) - -- Actions - map('n', 'hs', gs.stage_hunk, { desc = 'GitSigns: stage hunk' }) - map('n', 'hr', gs.reset_hunk, { desc = 'GitSigns: reset hunk' }) - map('v', 'hs', function() gs.stage_hunk { vim.fn.line('.'), vim.fn.line('v') } end, - { desc = 'GitSigns: stage hunk' }) - map('v', 'hr', function() gs.reset_hunk { vim.fn.line('.'), vim.fn.line('v') } end, - { desc = 'GitSigns: reset hunk' }) - map('n', 'hS', gs.stage_buffer, { desc = 'GitSigns: stage buffer' }) - map('n', 'hu', gs.undo_stage_hunk, { desc = 'GitSigns: undo stage hunk' }) - map('n', 'hR', gs.reset_buffer, { desc = 'GitSigns: reset_buffer' }) - map('n', 'hp', gs.preview_hunk, { desc = 'GitSigns: preview hunk' }) - map('n', 'hb', function() gs.blame_line { full = true } end, { desc = 'GitSigns: blame line' }) - map('n', 'tb', gs.toggle_current_line_blame, { desc = 'GitSigns: toggle current line blame' }) - map('n', 'hd', gs.diffthis, { desc = 'GitSigns: diff this' }) - map('n', 'hD', function() gs.diffthis('~') end, { desc = 'GitSigns: diff this' }) - map('n', 'td', gs.toggle_deleted, { desc = 'GitSigns: toggle deleted' }) - end + -- Actions + map("n", "hs", gs.stage_hunk, { desc = "GitSigns: stage hunk" }) + map("n", "hr", gs.reset_hunk, { desc = "GitSigns: reset hunk" }) + map("v", "hs", function() + gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end, { desc = "GitSigns: stage hunk" }) + map("v", "hr", function() + gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) + end, { desc = "GitSigns: reset hunk" }) + map("n", "hS", gs.stage_buffer, { desc = "GitSigns: stage buffer" }) + map("n", "hu", gs.undo_stage_hunk, { desc = "GitSigns: undo stage hunk" }) + map("n", "hR", gs.reset_buffer, { desc = "GitSigns: reset_buffer" }) + map("n", "hp", gs.preview_hunk, { desc = "GitSigns: preview hunk" }) + map("n", "hb", function() + gs.blame_line({ full = true }) + end, { desc = "GitSigns: blame line" }) + map("n", "tb", gs.toggle_current_line_blame, { desc = "GitSigns: toggle current line blame" }) + map("n", "hd", gs.diffthis, { desc = "GitSigns: diff this" }) + map("n", "hD", function() + gs.diffthis("~") + end, { desc = "GitSigns: diff this" }) + map("n", "td", gs.toggle_deleted, { desc = "GitSigns: toggle deleted" }) + end, }) --[[ -- LSPSaga : provides a diverse basket of utilities --]] -require('lspsaga').setup({ - beacon = { - enable = true, - frequency = 7, - } +require("lspsaga").setup({ + beacon = { + enable = true, + frequency = 7, + }, }) -vim.keymap.set('n', 'si', 'Lspsaga incoming_calls') -vim.keymap.set('n', 'so', 'Lspsaga outgoing_calls') -vim.keymap.set('n', 'ca', 'Lspsaga code_action') -vim.keymap.set('n', 'sd', 'Lspsaga peek_definition') -vim.keymap.set('n', 'sp', 'Lspsaga peek_type_definition') -vim.keymap.set('n', 'sx', 'Lspsaga goto_definition') -vim.keymap.set('n', 'sg', 'Lspsaga goto_type_definition') -vim.keymap.set('n', '[e', 'Lspsaga diagnostic_jump_prev') -vim.keymap.set('n', ']e', 'Lspsaga diagnostic_jump_next') -vim.keymap.set('n', 'sK', 'Lspsaga hover_doc') -vim.keymap.set('n', 'sm', 'Lspsaga finder imp') -vim.keymap.set('n', 'sf', 'Lspsaga finder') -vim.keymap.set('n', 'sl', 'Lspsaga outline') -vim.keymap.set('n', 'rn', 'Lspsaga rename') -vim.keymap.set('n', 'st', 'Lspsaga term_toggle') +vim.keymap.set("n", "si", "Lspsaga incoming_calls") +vim.keymap.set("n", "so", "Lspsaga outgoing_calls") +vim.keymap.set("n", "ca", "Lspsaga code_action") +vim.keymap.set("n", "sd", "Lspsaga peek_definition") +vim.keymap.set("n", "sp", "Lspsaga peek_type_definition") +vim.keymap.set("n", "sx", "Lspsaga goto_definition") +vim.keymap.set("n", "sg", "Lspsaga goto_type_definition") +vim.keymap.set("n", "[e", "Lspsaga diagnostic_jump_prev") +vim.keymap.set("n", "]e", "Lspsaga diagnostic_jump_next") +vim.keymap.set("n", "sK", "Lspsaga hover_doc") +vim.keymap.set("n", "sm", "Lspsaga finder imp") +vim.keymap.set("n", "sf", "Lspsaga finder") +vim.keymap.set("n", "sl", "Lspsaga outline") +vim.keymap.set("n", "rn", "Lspsaga rename") +vim.keymap.set("n", "st", "Lspsaga term_toggle") -require('dap-go').setup() +require("dap-go").setup() local dap, dapui = require("dap"), require("dapui") dapui.setup() dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open() + dapui.open() end dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close() + dapui.close() end dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close() + dapui.close() end -- Handlebars: One way to get syntax highlighting in Handlebars files @@ -762,27 +766,39 @@ vim.api.nvim_create_autocmd( --]] -- Treesitter -require('nvim-treesitter.configs').setup({ - modules = {}, - highlight = { - enable = true, - loaded = true, - module_path = "nvim-treesitter.highlight", - additional_vim_regex_highlighting = true, - }, - indent = { - enable = true, - module_path = "nvim-treesitter.indent", - }, - ensure_installed = { "bash", "comment", "go", "html", "javascript", "json", "kdl", "lua", "python", "typescript", "yaml" }, - sync_install = false, - auto_install = false, - ignore_install = {}, +require("nvim-treesitter.configs").setup({ + modules = {}, + highlight = { + enable = true, + loaded = true, + module_path = "nvim-treesitter.highlight", + additional_vim_regex_highlighting = true, + }, + indent = { + enable = true, + module_path = "nvim-treesitter.indent", + }, + ensure_installed = { + "bash", + "comment", + "go", + "html", + "javascript", + "json", + "kdl", + "lua", + "python", + "typescript", + "yaml", + }, + sync_install = false, + auto_install = false, + ignore_install = {}, }) vim.treesitter.language.register("html", "handlebars") -require('mini.icons').setup() +require("mini.icons").setup() -- Tweak GitSigns blame color -- This differentiates the cursorline from the git blame text @@ -796,28 +812,22 @@ window and :Gvdiffsplit window(s). To kill the winbar (the top line where the breadcrumbs and this blame title live), enter `:set winbar&`. --]] local blamegroup = vim.api.nvim_create_augroup("fugitiveSagaBlameConflict", { clear = true }) -vim.api.nvim_create_autocmd( - 'FileType', - { - group = blamegroup, - pattern = 'fugitiveblame', - callback = function() - vim.api.nvim_set_option_value('winbar', 'fugitive', { scope = 'local' }) - end, - } -) +vim.api.nvim_create_autocmd("FileType", { + group = blamegroup, + pattern = "fugitiveblame", + callback = function() + vim.api.nvim_set_option_value("winbar", "fugitive", { scope = "local" }) + end, +}) local diffgroup = vim.api.nvim_create_augroup("fugitiveSagaDiffConflict", { clear = true }) -vim.api.nvim_create_autocmd( - 'BufReadCmd', - { - group = diffgroup, - pattern = "fugitive://*", - callback = function() - vim.api.nvim_set_option_value('winbar', 'fugitive', { scope = 'local' }) - end, - } -) +vim.api.nvim_create_autocmd("BufReadCmd", { + group = diffgroup, + pattern = "fugitive://*", + callback = function() + vim.api.nvim_set_option_value("winbar", "fugitive", { scope = "local" }) + end, +}) --[[ let g:nvlime_cl_impl = "ros" diff --git a/nvim/lazy-lock.json b/nvim/lazy-lock.json index 9520907..8139c31 100644 --- a/nvim/lazy-lock.json +++ b/nvim/lazy-lock.json @@ -1,166 +1,54 @@ { - "LazyVim": { - "branch": "main", - "commit": "45d94b3197eaf3f35754b8ecb7adebfcebe5160d" - }, - "SchemaStore.nvim": { - "branch": "main", - "commit": "97b08f928d355bd6d5dee595fdf667b5bfb6329f" - }, - "blink.cmp": { - "branch": "main", - "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" - }, - "bufferline.nvim": { - "branch": "main", - "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" - }, - "catppuccin": { - "branch": "main", - "commit": "0b2437bcc12b4021614dc41fcea9d0f136d94063" - }, - "conform.nvim": { - "branch": "master", - "commit": "8ed162b0637d4c4f69ebe3e8e49b35662a82e137" - }, - "crates.nvim": { - "branch": "main", - "commit": "1d92a7f449a2a76d8f4c3459bd98f450e76d2ea3" - }, - "flash.nvim": { - "branch": "main", - "commit": "3c942666f115e2811e959eabbdd361a025db8b63" - }, - "friendly-snippets": { - "branch": "main", - "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" - }, - "gitsigns.nvim": { - "branch": "main", - "commit": "2bc3b472bbc2484214549af4d9f38c127b886a55" - }, - "grug-far.nvim": { - "branch": "main", - "commit": "3a8690461afac34c0e5bacb0f7b4bc3066aab665" - }, - "lazy.nvim": { - "branch": "main", - "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" - }, - "lazydev.nvim": { - "branch": "main", - "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" - }, - "lualine.nvim": { - "branch": "master", - "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" - }, - "markdown-preview.nvim": { - "branch": "master", - "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" - }, - "mason-lspconfig.nvim": { - "branch": "main", - "commit": "a8e6efcf623b86bae6d2223eede7c43883329f80" - }, - "mason.nvim": { - "branch": "main", - "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" - }, - "mini.ai": { - "branch": "main", - "commit": "6e01c0e5a15554852546fac9853960780ac52ed4" - }, - "mini.icons": { - "branch": "main", - "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" - }, - "mini.pairs": { - "branch": "main", - "commit": "1a3e73649c0eaef2f6c48ce1e761c6f0a7c11918" - }, - "mini.surround": { - "branch": "main", - "commit": "f90069c7441a5fb04c3de42eacf93e16b64dd3eb" - }, - "noice.nvim": { - "branch": "main", - "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" - }, - "nui.nvim": { - "branch": "main", - "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" - }, - "nvim-lint": { - "branch": "master", - "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" - }, - "nvim-lspconfig": { - "branch": "master", - "commit": "31226f6736a8150e323b346e4748e3c9bdd6bef5" - }, - "nvim-treesitter": { - "branch": "master", - "commit": "80e6de9d24eec68d82d5f4e6feae94c9c753ebd6" - }, - "nvim-treesitter-textobjects": { - "branch": "master", - "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" - }, - "nvim-ts-autotag": { - "branch": "main", - "commit": "1cca23c9da708047922d3895a71032bc0449c52d" - }, - "nvlime": { - "branch": "master", - "commit": "228e4fa8c7d10b1ed07b1649a63743613b77a828" - }, - "paredit": { - "branch": "master", - "commit": "60203e50698ed2211b4434a66ab2258a1a6ac3b5" - }, - "parsley": { - "branch": "main", - "commit": "c4100aa449bfa971dcfc56ffe4206ba034db08cc" - }, - "persistence.nvim": { - "branch": "main", - "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" - }, - "plenary.nvim": { - "branch": "master", - "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" - }, - "render-markdown.nvim": { - "branch": "main", - "commit": "e05a9f22f31c088ece3fa5928daf546a015b66ee" - }, - "rustaceanvim": { - "branch": "master", - "commit": "f03035fa03ccb36cd26d0792c946fbacba1d1a39" - }, - "snacks.nvim": { - "branch": "main", - "commit": "eb81468b475f6251f5850ae956e19547e8f533ec" - }, - "todo-comments.nvim": { - "branch": "main", - "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" - }, - "tokyonight.nvim": { - "branch": "main", - "commit": "84ea0b5f4651afdf50ececaf6f110fe9d9dc9458" - }, - "trouble.nvim": { - "branch": "main", - "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" - }, - "ts-comments.nvim": { - "branch": "main", - "commit": "872dcfa0418f4a33b7437fb4d9f4e89f2f000d74" - }, - "which-key.nvim": { - "branch": "main", - "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" - } + "LazyVim": { "branch": "main", "commit": "45d94b3197eaf3f35754b8ecb7adebfcebe5160d" }, + "SchemaStore.nvim": { "branch": "main", "commit": "97b08f928d355bd6d5dee595fdf667b5bfb6329f" }, + "blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" }, + "bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" }, + "catppuccin": { "branch": "main", "commit": "0b2437bcc12b4021614dc41fcea9d0f136d94063" }, + "conform.nvim": { "branch": "master", "commit": "8ed162b0637d4c4f69ebe3e8e49b35662a82e137" }, + "crates.nvim": { "branch": "main", "commit": "1d92a7f449a2a76d8f4c3459bd98f450e76d2ea3" }, + "flash.nvim": { "branch": "main", "commit": "3c942666f115e2811e959eabbdd361a025db8b63" }, + "friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" }, + "fzf-lua": { "branch": "main", "commit": "8633175d4e74cd6013f75af7682c7e8ac133056a" }, + "gitsigns.nvim": { "branch": "main", "commit": "2bc3b472bbc2484214549af4d9f38c127b886a55" }, + "grug-far.nvim": { "branch": "main", "commit": "3a8690461afac34c0e5bacb0f7b4bc3066aab665" }, + "lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" }, + "lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" }, + "lualine.nvim": { "branch": "master", "commit": "f4f791f67e70d378a754d02da068231d2352e5bc" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a8e6efcf623b86bae6d2223eede7c43883329f80" }, + "mason-nvim-dap.nvim": { "branch": "main", "commit": "26ea08fd5c7028ea54a3347ac139fc916baf1aa9" }, + "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" }, + "mini.ai": { "branch": "main", "commit": "6e01c0e5a15554852546fac9853960780ac52ed4" }, + "mini.icons": { "branch": "main", "commit": "ec61af6e606fc89ee3b1d8f2f20166a3ca917a36" }, + "mini.pairs": { "branch": "main", "commit": "1a3e73649c0eaef2f6c48ce1e761c6f0a7c11918" }, + "mini.surround": { "branch": "main", "commit": "f90069c7441a5fb04c3de42eacf93e16b64dd3eb" }, + "neo-tree.nvim": { "branch": "main", "commit": "e96fd85bf18bc345dab332b345098fa5460dffac" }, + "neotest": { "branch": "master", "commit": "d66cf4e05a116957f0d3a7755a24291c7d1e1f72" }, + "neotest-golang": { "branch": "main", "commit": "131e0402e63966692d340861c58756853913ada3" }, + "neotest-python": { "branch": "master", "commit": "a2861ab3c9a0bf75a56b11835c2bfc8270f5be7e" }, + "noice.nvim": { "branch": "main", "commit": "0427460c2d7f673ad60eb02b35f5e9926cf67c59" }, + "nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" }, + "nvim-dap": { "branch": "master", "commit": "52302f02fea3a490e55475de52fa4deb8af2eb11" }, + "nvim-dap-go": { "branch": "main", "commit": "07739481317d36ddb3e3e8fbdfcd8f90b4167d73" }, + "nvim-dap-python": { "branch": "master", "commit": "34282820bb713b9a5fdb120ae8dd85c2b3f49b51" }, + "nvim-dap-ui": { "branch": "master", "commit": "bc81f8d3440aede116f821114547a476b082b319" }, + "nvim-dap-virtual-text": { "branch": "master", "commit": "df66808cd78b5a97576bbaeee95ed5ca385a9750" }, + "nvim-lint": { "branch": "master", "commit": "6e9dd545a1af204c4022a8fcd99727ea41ffdcc8" }, + "nvim-lspconfig": { "branch": "master", "commit": "31226f6736a8150e323b346e4748e3c9bdd6bef5" }, + "nvim-nio": { "branch": "master", "commit": "21f5324bfac14e22ba26553caf69ec76ae8a7662" }, + "nvim-treesitter": { "branch": "master", "commit": "80e6de9d24eec68d82d5f4e6feae94c9c753ebd6" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" }, + "nvim-ts-autotag": { "branch": "main", "commit": "1cca23c9da708047922d3895a71032bc0449c52d" }, + "nvlime": { "branch": "master", "commit": "228e4fa8c7d10b1ed07b1649a63743613b77a828" }, + "one-small-step-for-vimkind": { "branch": "main", "commit": "b9def31568d20b16f7da9479a4174d165046fe8a" }, + "paredit": { "branch": "master", "commit": "60203e50698ed2211b4434a66ab2258a1a6ac3b5" }, + "parsley": { "branch": "main", "commit": "c4100aa449bfa971dcfc56ffe4206ba034db08cc" }, + "persistence.nvim": { "branch": "main", "commit": "f6aad7dde7fcf54148ccfc5f622c6d5badd0cc3d" }, + "plenary.nvim": { "branch": "master", "commit": "857c5ac632080dba10aae49dba902ce3abf91b35" }, + "rustaceanvim": { "branch": "master", "commit": "f03035fa03ccb36cd26d0792c946fbacba1d1a39" }, + "snacks.nvim": { "branch": "main", "commit": "eb81468b475f6251f5850ae956e19547e8f533ec" }, + "todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" }, + "tokyonight.nvim": { "branch": "main", "commit": "84ea0b5f4651afdf50ececaf6f110fe9d9dc9458" }, + "trouble.nvim": { "branch": "main", "commit": "85bedb7eb7fa331a2ccbecb9202d8abba64d37b3" }, + "ts-comments.nvim": { "branch": "main", "commit": "872dcfa0418f4a33b7437fb4d9f4e89f2f000d74" }, + "which-key.nvim": { "branch": "main", "commit": "0e76a87ac51772569aec678dc74baa8e2a86100c" } } diff --git a/nvim/lazyvim.json b/nvim/lazyvim.json index f71d558..26ba6bc 100644 --- a/nvim/lazyvim.json +++ b/nvim/lazyvim.json @@ -1,13 +1,15 @@ { "extras": [ "lazyvim.plugins.extras.coding.mini-surround", + "lazyvim.plugins.extras.dap.core", + "lazyvim.plugins.extras.dap.nlua", "lazyvim.plugins.extras.lang.git", "lazyvim.plugins.extras.lang.go", - "lazyvim.plugins.extras.lang.markdown", "lazyvim.plugins.extras.lang.python", "lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.lang.toml", "lazyvim.plugins.extras.lang.yaml", + "lazyvim.plugins.extras.test.core", "lazyvim.plugins.extras.vscode" ], "news": { diff --git a/zsh/.zshrc b/zsh/.zshrc index 581e0d0..d530083 100644 --- a/zsh/.zshrc +++ b/zsh/.zshrc @@ -158,3 +158,10 @@ rga-fzf() { xdg-open "$file" } +# ssh-agent +if ! pgrep -u "$USER" ssh-agent > /dev/null; then + ssh-agent -t 1h > "$XDG_RUNTIME_DIR/ssh-agent.env" +fi +if [[ ! -f "$SSH_AUTH_SOCK" ]]; then + source "$XDG_RUNTIME_DIR/ssh-agent.env" >/dev/null +fi