diff --git a/neovim/.config/nvim/lazy-lock.json b/neovim/.config/nvim/lazy-lock.json new file mode 100644 index 0000000..909f769 --- /dev/null +++ b/neovim/.config/nvim/lazy-lock.json @@ -0,0 +1,66 @@ +{ + "LuaSnip": { "branch": "master", "commit": "105b5f7f72c13e682a3aa5d29eac2408ae513b22" }, + "catppuccin": { "branch": "main", "commit": "c75562cbc954136f279ced91661251543b6f2a20" }, + "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "44b16d11215dce86f253ce0c30949813c0a90765" }, + "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" }, + "cmp-spell": { "branch": "master", "commit": "60584cb75e5e8bba5a0c9e4c3ab0791e0698bffa" }, + "cmp_luasnip": { "branch": "master", "commit": "18095520391186d634a0045dacaa346291096566" }, + "copilot-cmp": { "branch": "master", "commit": "c2cdb3c0f5078b0619055af192295830a7987790" }, + "copilot.lua": { "branch": "master", "commit": "e48bd7020a98be217d85c006a298656294fd6210" }, + "diffconflicts": { "branch": "master", "commit": "05e8d2e935a235b8f8e6d308a46a5f028ea5bf97" }, + "dressing.nvim": { "branch": "master", "commit": "e6eff7a5a950a853c3903d906dbcea03f778db5f" }, + "fidget.nvim": { "branch": "main", "commit": "0ba1e16d07627532b6cae915cc992ecac249fb97" }, + "gh.nvim": { "branch": "main", "commit": "2b5551656c1b896bf4ae06546eaaab00311f9a18" }, + "gitsigns.nvim": { "branch": "main", "commit": "dc2962f7fce953a2a98e7c6d3d7fc4c1d1f66758" }, + "lazy.nvim": { "branch": "main", "commit": "f8611632d0f9c6818e8eb54f9bcd1dad122b5a7f" }, + "litee.nvim": { "branch": "main", "commit": "bf366a1414fd0f9401631ac8884f2f9fa4bf18d2" }, + "lsp-trouble.nvim": { "branch": "main", "commit": "d99e2abd10808ef91738ce98a5c767e6a51df449" }, + "lspkind-nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" }, + "lualine.nvim": { "branch": "master", "commit": "05d78e9fd0cdfb4545974a5aa14b1be95a86e9c9" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "4f1c72767bec31397d59554f84096909b2887195" }, + "mason.nvim": { "branch": "main", "commit": "5ad3e113b0c3fde3caba8630599373046f6197e8" }, + "neoscroll.nvim": { "branch": "master", "commit": "d7601c26c8a183fa8994ed339e70c2d841253e93" }, + "nvim-cmp": { "branch": "main", "commit": "2743dd989e9b932e1b4813a4927d7b84272a14e2" }, + "nvim-dap": { "branch": "master", "commit": "bb1ddce6cd951ef3c1319e4fd8596131113163c3" }, + "nvim-lspconfig": { "branch": "master", "commit": "0011c435282f043a018e23393cae06ed926c3f4a" }, + "nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" }, + "nvim-treesitter": { "branch": "master", "commit": "896f2c76229f03d6978d29fa7b12421d7c18102f" }, + "nvim-treesitter-context": { "branch": "master", "commit": "63f3ffc50b0afc59be1015153d00922498085be8" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "52f1f3280d9092bfaee5c45be5962fabee3d9654" }, + "nvim-ufo": { "branch": "main", "commit": "43e39ec74cd57c45ca9d8229a796750f6083b850" }, + "nvim-web-devicons": { "branch": "master", "commit": "9ab9b0b894b2388a9dbcdee5f00ce72e25d85bf9" }, + "playground": { "branch": "master", "commit": "2b81a018a49f8e476341dfcb228b7b808baba68b" }, + "plenary.nvim": { "branch": "master", "commit": "102c02903c74b93c705406bf362049383abc87c8" }, + "popup.nvim": { "branch": "master", "commit": "b7404d35d5d3548a82149238289fa71f7f6de4ac" }, + "promise-async": { "branch": "main", "commit": "e94f35161b8c5d4a4ca3b6ff93dd073eb9214c0e" }, + "rust-tools.nvim": { "branch": "master", "commit": "71d2cf67b5ed120a0e31b2c8adb210dd2834242f" }, + "splitjoin.vim": { "branch": "main", "commit": "95a700875530a1ad87232e472fab307ee2a553ba" }, + "sql.nvim": { "branch": "master", "commit": "b7e28c8463254c46a8e61c52d27d6a2040492fc3" }, + "targets.vim": { "branch": "master", "commit": "642d3a4ce306264b05ea3219920b13ea80931767" }, + "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" }, + "telescope.nvim": { "branch": "master", "commit": "0e0600908d1ad5ac4992fa0ab578e23e9d9d6f37" }, + "textobj-word-column.vim": { "branch": "master", "commit": "cb40e1459817a7fa23741ff6df05e4481bde5a33" }, + "vim-abolish": { "branch": "master", "commit": "cb3dcb220262777082f63972298d57ef9e9455ec" }, + "vim-argwrap": { "branch": "master", "commit": "feaba6b8b6ca099d267c81ee2c4ba43ce6de8499" }, + "vim-better-whitespace": { "branch": "master", "commit": "1b22dc57a2751c7afbc6025a7da39b7c22db635d" }, + "vim-commentary": { "branch": "master", "commit": "e87cd90dc09c2a203e13af9704bd0ef79303d755" }, + "vim-dirvish": { "branch": "master", "commit": "bbf53b30ca1e718625b9b84b1d32379e470ddad7" }, + "vim-floaterm": { "branch": "master", "commit": "bd0aee3c861d613f56b85bd9eaffdcab459071fd" }, + "vim-ft-bzl": { "branch": "master", "commit": "6b41860d8418384926b338a8f19beb344c386f68" }, + "vim-fugitive": { "branch": "master", "commit": "43f18ab9155c853a84ded560c6104e6300ad41da" }, + "vim-go": { "branch": "master", "commit": "12de6c0bc0efce3cedc5e28d4fe0ecc3a4aaeb77" }, + "vim-indent-object": { "branch": "master", "commit": "5c5b24c959478929b54a9e831a8e2e651a465965" }, + "vim-javascript": { "branch": "master", "commit": "c470ce1399a544fe587eab950f571c83cccfbbdc" }, + "vim-jsonnet": { "branch": "master", "commit": "4ebc6619ddce5d032a985b42a9864154c3d20e4a" }, + "vim-jsx": { "branch": "master", "commit": "8879e0d9c5ba0e04ecbede1c89f63b7a0efa24af" }, + "vim-jumptoline": { "branch": "master", "commit": "1f95a52a4ca936591e2d42410d6519dac0b1346e" }, + "vim-pug": { "branch": "master", "commit": "ea39cd942cf3194230cf72bfb838901a5344d3b3" }, + "vim-repeat": { "branch": "master", "commit": "24afe922e6a05891756ecf331f39a1f6743d3d5a" }, + "vim-rhubarb": { "branch": "master", "commit": "ee69335de176d9325267b0fd2597a22901d927b1" }, + "vim-sneak": { "branch": "master", "commit": "93395f5b56eb203e4c8346766f258ac94ea81702" }, + "vim-test": { "branch": "master", "commit": "6fbfbfc434debf3d3e8676fad5041450615f2d5d" }, + "vim-unimpaired": { "branch": "master", "commit": "6d44a6dc2ec34607c41ec78acf81657248580bf1" }, + "vim-visual-multi": { "branch": "master", "commit": "724bd53adfbaf32e129b001658b45d4c5c29ca1a" }, + "vim-visual-star-search": { "branch": "master", "commit": "37259722f45996733fd309add61385a4ad88bdb9" } +} \ No newline at end of file diff --git a/neovim/.config/nvim/lua/plugins.lua b/neovim/.config/nvim/lua/plugins.lua index 4c6da62..fe3f11a 100644 --- a/neovim/.config/nvim/lua/plugins.lua +++ b/neovim/.config/nvim/lua/plugins.lua @@ -1,65 +1,40 @@ -local ensure_packer = function() - local fn = vim.fn - local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim' - if fn.empty(fn.glob(install_path)) > 0 then - fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path }) - vim.cmd [[packadd packer.nvim]] - return true - end - return false +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, + }) end +vim.opt.rtp:prepend(lazypath) -local packer_bootstrap = ensure_packer() - --- reload on save -local packer_group = vim.api.nvim_create_augroup('PackerUserRoh', { clear = true }) -vim.api.nvim_create_autocmd('BufWritePost', { - command = 'source | PackerCompile', - group = packer_group, - -- add the HOME prefix so it won't catch fugitive:/// style paths - pattern = { os.getenv('HOME') .. '/*/plugins.lua' }, -}) - -local ok, packer = pcall(require, 'packer') -if not ok then - error('packer install failed') -end - -packer.init { - display = { - open_fn = function() - return require("packer.util").float { border = "single" } - end, - prompt_border = "single", - }, - git = { - clone_timeout = 600, - }, - auto_clean = true, - compile_on_sync = false, -} - -packer.startup(function(use) - -- Packer can manage itself - use 'wbthomason/packer.nvim' - +local plugins = { -- Navigation - use 'justinmk/vim-dirvish' - use 'rbtnn/vim-jumptoline' + 'justinmk/vim-dirvish', + 'rbtnn/vim-jumptoline', -- Git - use { + { 'lewis6991/gitsigns.nvim', - config = [[require('settings.gitsigns')]], - } - use { + config = function() + require('settings.gitsigns') + end, + }, + { 'tpope/vim-fugitive', - requires = { 'tpope/vim-rhubarb' }, - config = [[vim.cmd("runtime lua/settings/vim-fugitive.vim")]] - } - use { + dependencies = { 'tpope/vim-rhubarb' }, + keys = { + { [[u]], [[:GBrowse!]], mode = { 'n', 'x' } }, + }, + -- non-lazy needed to get various keymaps + lazy = false, + }, + { 'ldelossa/gh.nvim', - requires = { { 'ldelossa/litee.nvim' } }, + dependencies = { 'ldelossa/litee.nvim' }, config = function() require('litee.lib').setup() require('litee.gh').setup({ @@ -69,11 +44,11 @@ packer.startup(function(use) map_resize_keys = false, -- do not map any keys inside any gh.nvim buffers. disable_keymaps = false, - -- the icon set to use. + -- the icon set to . icon_set = "default", - -- any custom icons to use. + -- any custom icons to . icon_set_custom = nil, - -- whether to register the @username and #issue_number omnifunc completion + -- whether to register the @rname and #issue_number omnifunc completion -- in buffers which start with .git/ git_buffer_completion = true, -- defines keymaps in gh.nvim buffers. @@ -100,53 +75,55 @@ packer.startup(function(use) -- inside a thread convo buffer, resolve the thread. resolve_thread = "", -- inside a gh.nvim panel, if possible, open the node's web URL in your - -- browser. useful particularily for digging into external failed CI + -- browser. ful particularily for digging into external failed CI -- checks. goto_web = "gx" - } + }, }) end, - } + }, -- Go - use { + { 'fatih/vim-go', -- this installs it's own version of gopls; we want mason -- managed one -- run = ':GoUpdateBinaries', - config = [[vim.cmd("runtime lua/settings/vim-go.vim")]] - } + config = function() + vim.cmd("runtime lua/settings/vim-go.vim") + end, + }, -- react / js - use 'pangloss/vim-javascript' - use { + 'pangloss/vim-javascript', + { 'mxw/vim-jsx', - config = [[vim.cmd("runtime lua/settings/vim-jsx.vim")]] - } + config = function() vim.cmd("runtime lua/settings/vim-jsx.vim") end, + }, -- colorschemes - -- use 'frankier/neovim-colors-solarized-truecolor-only' - -- use 'justinmk/molokai' - -- use 'nanotech/jellybeans.vim' - -- use 'morhetz/gruvbox' - -- use 'romainl/flattened' - -- use 'whatyouhide/vim-gotham' - -- use 'NLKNguyen/papercolor-theme' - -- use 'rakr/vim-one' - -- use 'rakr/vim-two-firewatch' - -- use 'mhartington/oceanic-next' - -- use 'joshdick/onedark.vim' - -- use 'KeitaNakamura/neodark.vim' - -- use 'neutaaaaan/iosvkem' - -- use 'chriskempson/base16-vim' - -- use 'ayu-theme/ayu-vim' - -- use 'drewtempelmeyer/palenight.vim' - -- use 'NieTiger/halcyon-neovim' - -- use { 'embark-theme/vim', as = 'embark' } - -- use 'tiagovla/tokyodark.nvim' - -- use 'folke/tokyonight.nvim' - -- use 'yashguptaz/calvera-dark.nvim' - -- use { + -- 'frankier/neovim-colors-solarized-truecolor-only' + -- 'justinmk/molokai' + -- 'nanotech/jellybeans.vim' + -- 'morhetz/gruvbox' + -- 'romainl/flattened' + -- 'whatyouhide/vim-gotham' + -- 'NLKNguyen/papercolor-theme' + -- 'rakr/vim-one' + -- 'rakr/vim-two-firewatch' + -- 'mhartington/oceanic-next' + -- 'joshdick/onedark.vim' + -- 'KeitaNakamura/neodark.vim' + -- 'neutaaaaan/iosvkem' + -- 'chriskempson/base16-vim' + -- 'ayu-theme/ayu-vim' + -- 'drewtempelmeyer/palenight.vim' + -- 'NieTiger/halcyon-neovim' + -- { 'embark-theme/vim', as = 'embark' }, + -- 'tiagovla/tokyodark.nvim' + -- 'folke/tokyonight.nvim' + -- 'yashguptaz/calvera-dark.nvim' + -- { -- 'EdenEast/nightfox.nvim', -- config = function() -- local nightfox = require('nightfox') @@ -166,8 +143,8 @@ packer.startup(function(use) -- }) -- vim.cmd('colorscheme duskfox') -- end, - -- } - -- use { + -- }, + -- { -- 'rebelot/kanagawa.nvim', -- config = function() -- require('kanagawa').setup { @@ -183,13 +160,13 @@ packer.startup(function(use) -- transparent = false, -- do not set background color -- colors = {}, -- overrides = {}, - -- } + -- }, -- vim.cmd("colorscheme kanagawa") -- end, - -- } - use { + -- }, + { 'catppuccin/nvim', - as = 'catppuccin', + name = 'catppuccin', config = function() local catppuccin = require("catppuccin") vim.g.catppuccin_flavour = "mocha" -- latte, frappe, macchiato, mocha @@ -207,13 +184,13 @@ packer.startup(function(use) }) vim.cmd [[colorscheme catppuccin]] end, - } + }, - use { + { 'nvim-lualine/lualine.nvim', -- after = 'nightfox.nvim', - requires = { - { 'kyazdani42/nvim-web-devicons', opt = true }, + dependencies = { + { 'kyazdani42/nvim-web-devicons' }, }, config = function() require('lualine').setup { @@ -247,17 +224,16 @@ packer.startup(function(use) }, } end - } + }, -- Editing - - use 'ntpeters/vim-better-whitespace' - use { + 'ntpeters/vim-better-whitespace', + { "kylechui/nvim-surround", - tag = "*", -- Use for stability; omit to use `main` branch for the latest features + version = "*", -- Use for stability; omit to `main` branch for the latest features config = function() require("nvim-surround").setup({ - -- Configuration here, or leave empty to use defaults + -- Configuration here, or leave empty to defaults keymaps = { insert = "", insert_line = "", @@ -274,33 +250,33 @@ packer.startup(function(use) -- emulate a shortcut from vim-surround vim.keymap.set("i", "", "}", { remap = true, silent = true }) end - } - use 'tpope/vim-unimpaired' - use 'tpope/vim-abolish' - use 'tpope/vim-repeat' - use 'tpope/vim-commentary' - use 'michaeljsmith/vim-indent-object' - use 'coderifous/textobj-word-column.vim' - use 'AndrewRadev/splitjoin.vim' - use 'wellle/targets.vim' - use { + }, + 'tpope/vim-unimpaired', + 'tpope/vim-abolish', + 'tpope/vim-repeat', + 'tpope/vim-commentary', + 'michaeljsmith/vim-indent-object', + 'coderifous/textobj-word-column.vim', + 'AndrewRadev/splitjoin.vim', + 'wellle/targets.vim', + { 'justinmk/vim-sneak', - config = [[vim.cmd("runtime lua/settings/vim-sneak.vim")]] - } - use { + config = function() vim.cmd("runtime lua/settings/vim-sneak.vim") end, + }, + { 'FooSoft/vim-argwrap', - config = [[vim.cmd("runtime lua/settings/vim-argwrap.vim")]] - } - use 'whiteinge/diffconflicts' + config = function() vim.cmd("runtime lua/settings/vim-argwrap.vim") end, + }, + 'whiteinge/diffconflicts', -- search visual selected contents with '*' and '#' - use 'nelstrom/vim-visual-star-search' + 'nelstrom/vim-visual-star-search', -- multiple cursors - use 'mg979/vim-visual-multi' + 'mg979/vim-visual-multi', -- Jsonnet - use { + { 'google/vim-jsonnet', - config = function() + init = function() -- autofmt messes with jsonnet-fmt vim.g.jsonnet_fmt_on_save = 0 local group = vim.api.nvim_create_augroup('jsonnet-mods', { clear = true }) @@ -314,48 +290,48 @@ packer.startup(function(use) end, }) end, - } + }, -- Bazel - use 'bazelbuild/vim-ft-bzl' + 'bazelbuild/vim-ft-bzl', -- terminal - use { + { 'voldikss/vim-floaterm', - config = function() + init = function() vim.g.floaterm_keymap_toggle = [[t]] vim.cmd [[highlight link FloatermBorder FloatBorder]] end, - } + }, -- testing - use { + { 'vim-test/vim-test', - config = [[vim.cmd("runtime lua/settings/vim-test.vim")]] - } + config = function() vim.cmd("runtime lua/settings/vim-test.vim") end, + }, -- fuzzy finding - use { + { 'nvim-telescope/telescope.nvim', - requires = { + dependencies = { 'nvim-lua/popup.nvim', 'nvim-lua/plenary.nvim', - { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }, + { 'nvim-telescope/telescope-fzf-native.nvim', build = 'make' }, }, - config = [[require('settings.telescope')]] - } + config = function() require('settings.telescope') end, + }, - use 'tami5/sql.nvim' + 'tami5/sql.nvim', - use { + { 'L3MON4D3/LuaSnip', - config = [[require('settings.luasnip')]], - } + config = function() require('settings.luasnip') end, + }, -- autocomplete - use { + { 'hrsh7th/nvim-cmp', - requires = { + dependencies = { 'f3fora/cmp-spell', 'hrsh7th/cmp-buffer', 'hrsh7th/cmp-nvim-lsp', @@ -363,19 +339,19 @@ packer.startup(function(use) 'saadparwaiz1/cmp_luasnip', }, config = function() require('settings.nvim_cmp') end, - } - use { + }, + { "williamboman/mason.nvim", - requires = { + dependencies = { "williamboman/mason-lspconfig.nvim", 'neovim/nvim-lspconfig', }, config = function() require('settings.lsp') end, - } + }, - use { + { 'onsails/lspkind-nvim', config = function() local lspkind = require("lspkind") @@ -386,20 +362,20 @@ packer.startup(function(use) }) vim.api.nvim_set_hl(0, "CmpItemKindCopilot", { fg = "#6CC644" }) end - } + }, -- provides lsp progress notification toasts - use { + { 'j-hui/fidget.nvim', tag = 'legacy', config = function() - require('fidget').setup {} + require('fidget').setup({}) end, - } + }, - use { + { 'folke/lsp-trouble.nvim', - requires = "kyazdani42/nvim-web-devicons", + dependencies = "kyazdani42/nvim-web-devicons", config = function() require('trouble').setup() vim.api.nvim_set_keymap( @@ -409,9 +385,9 @@ packer.startup(function(use) { noremap = true } ) end - } + }, - use { + { "zbirenbaum/copilot.lua", config = function() require("copilot").setup({ @@ -419,49 +395,43 @@ packer.startup(function(use) panel = { enabled = false }, }) end, - } - use { + }, + { "zbirenbaum/copilot-cmp", - after = { "copilot.lua" }, + dependencies = { "copilot.lua" }, config = function() require("copilot_cmp").setup() end - } + }, - use { + { 'nvim-treesitter/nvim-treesitter', - run = ':TSUpdateSync', - config = [[require('settings.treesitter')]] - } - use { + -- build = ':TSUpdateSync', + config = function() require('settings.treesitter') end, + }, + { 'nvim-treesitter/playground', - requires = { - 'nvim-treesitter/nvim-treesitter', - }, - } - use { + dependencies = { 'nvim-treesitter/nvim-treesitter' }, + }, + { 'nvim-treesitter/nvim-treesitter-textobjects', - requires = { - 'nvim-treesitter/nvim-treesitter', - }, - } - use { + dependencies = { 'nvim-treesitter/nvim-treesitter' }, + }, + { 'nvim-treesitter/nvim-treesitter-context', - requires = { - 'nvim-treesitter/nvim-treesitter', - }, + dependencies = { 'nvim-treesitter/nvim-treesitter' }, config = function() require 'treesitter-context'.setup {} end, - } + }, -- diagnostics - use 'kyazdani42/nvim-web-devicons' + 'kyazdani42/nvim-web-devicons', -- rust specific - use 'simrat39/rust-tools.nvim' + 'simrat39/rust-tools.nvim', -- debugging - use { + { 'mfussenegger/nvim-dap', config = function() local spawn_dlv = function(spawn_opts) @@ -508,12 +478,12 @@ packer.startup(function(use) port = port, } end - local last_user_input + local last_r_input local dap = require('dap') dap.adapters.go_with_args = function(callback, config) local on_confirm = function(main_pkg_and_args) if not main_pkg_and_args then - -- user canceled + -- r canceled return end local it = main_pkg_and_args:gmatch("%S+") @@ -525,12 +495,12 @@ packer.startup(function(use) config.args = args local resolved_adapter = spawn_dlv({ cwd = main_pkg_path }) vim.defer_fn(function() callback(resolved_adapter) end, 100) - last_user_input = main_pkg_and_args + last_r_input = main_pkg_and_args end vim.ui.input({ prompt = 'main package path and args: ', - default = last_user_input or vim.fn.expand('%:h'), + default = last_r_input or vim.fn.expand('%:h'), kind = 'dap_args', }, on_confirm) end @@ -588,7 +558,7 @@ packer.startup(function(use) name = "Debug w/ args", request = "launch", program = "./", - prompt_user_for_args = true, + prompt_r_for_args = true, }, } @@ -607,12 +577,12 @@ packer.startup(function(use) vim.api.nvim_set_keymap('n', 'dR', "lua require'dap'.repl.toggle()", opts) vim.api.nvim_set_keymap('n', 'dq', "lua require'dap'.terminate()", opts) end, - } + }, -- vim.ui enhancements - use { + { 'stevearc/dressing.nvim', - requires = { + dependencies = { 'nvim-telescope/telescope.nvim', }, config = function() @@ -637,7 +607,7 @@ packer.startup(function(use) }) end, - use { + { "karb94/neoscroll.nvim", cond = function() -- only enable smooth scroll outside of Neovide. neovide @@ -651,12 +621,12 @@ packer.startup(function(use) end, }, - use 'digitaltoad/vim-pug', + 'digitaltoad/vim-pug', -- better looking folds - use { + { 'kevinhwang91/nvim-ufo', - requires = 'kevinhwang91/promise-async', + dependencies = 'kevinhwang91/promise-async', config = function() local handler = function(virtText, lnum, endLnum, width, truncate) local newVirtText = {} @@ -692,11 +662,13 @@ packer.startup(function(use) fold_virt_text_handler = handler, } end, - } - } + }, + }, -- Automatically set up your configuration after cloning packer.nvim -- Put this at the end after all plugins - if packer_bootstrap then - require('packer').sync() - end -end) + -- if packer_bootstrap then + -- require('packer').sync() + -- end +} + +require("lazy").setup(plugins, {}) diff --git a/neovim/.config/nvim/lua/roh/editor.lua b/neovim/.config/nvim/lua/roh/editor.lua index 743d60a..103050f 100644 --- a/neovim/.config/nvim/lua/roh/editor.lua +++ b/neovim/.config/nvim/lua/roh/editor.lua @@ -65,6 +65,7 @@ vim.api.nvim_create_autocmd( desc = 'YAML indentation', } ) +vim.g.mapleader = [[\]] -- disable the built-in showing of mode in the command bar since airline will -- take care of that @@ -113,7 +114,7 @@ vim.o.mouse = 'a' -- persistent undo file vim.o.undofile = true --- the "//" at the end of each directory means that file names will be built +-- the ]//" at the end of each directory means that file names will be built -- from the complete path to the file with all path separators substituted to -- percent "%" sign. This will ensure file name uniqueness in the preserve -- directory. @@ -155,7 +156,8 @@ vim.o.showtabline = 2 -- use ripgrep, if available if vim.fn.executable('rg') == 1 then - vim.o.grepprg = [[rg --type-not=html --type-not=js --type-not=css --type-not=clojure --glob="!vendor/*" --vimgrep $*]] + vim.o.grepprg = + [[rg --type-not=html --type-not=js --type-not=css --type-not=clojure --glob="!vendor/*" --vimgrep $*]] vim.o.grepformat = "%f:%l:%c:%m" end @@ -173,7 +175,7 @@ local function xnoremap(lhs, rhs) end local function snoremap(lhs, rhs) - vim.keymap.set('s', lhs, rhs, {silent = true}) + vim.keymap.set('s', lhs, rhs, { silent = true }) end local function vmap(lhs, rhs) @@ -185,7 +187,7 @@ local function omap(lhs, rhs) end local function smap(lhs, rhs) - vim.keymap.set('s', lhs, rhs, {silent = true, remap = true}) + vim.keymap.set('s', lhs, rhs, { silent = true, remap = true }) end -- quick save diff --git a/neovim/.config/nvim/lua/settings/lsp.lua b/neovim/.config/nvim/lua/settings/lsp.lua index 6fe9399..5512e17 100644 --- a/neovim/.config/nvim/lua/settings/lsp.lua +++ b/neovim/.config/nvim/lua/settings/lsp.lua @@ -283,7 +283,7 @@ local function get_lsp_opts(lang) -- Tell the language server which version of Lua you're using (most likely LuaJIT in the case of Neovim) version = 'LuaJIT', -- Setup your lua path - path = runtime_path, + -- path = runtime_path, }, diagnostics = { -- Get the language server to recognize the `vim` global @@ -291,7 +291,7 @@ local function get_lsp_opts(lang) }, workspace = { -- Make the server aware of Neovim runtime files - library = vim.api.nvim_get_runtime_file('', true), + -- library = vim.api.nvim_get_runtime_file('', true), }, -- Do not send telemetry data containing a randomized but unique identifier telemetry = { @@ -345,7 +345,7 @@ vim.api.nvim_create_autocmd('BufWritePre', { pattern = { '*.py', '*.rs', '*.lua', '*.go', '*.jsonnet', '*.libsonnet' }, callback = function(ev) local function ends_with(str, ending) - return ending == "" or str:sub( -#ending) == ending + return ending == "" or str:sub(- #ending) == ending end local timeout_ms = 1000 diff --git a/neovim/.config/nvim/lua/settings/vim-fugitive.vim b/neovim/.config/nvim/lua/settings/vim-fugitive.vim deleted file mode 100644 index edcacc1..0000000 --- a/neovim/.config/nvim/lua/settings/vim-fugitive.vim +++ /dev/null @@ -1,3 +0,0 @@ -" copy Github url to clipboard -nnoremap u :GBrowse! -xnoremap u :GBrowse! diff --git a/neovim/.config/nvim/packer.snapshot.lua b/neovim/.config/nvim/packer.snapshot.lua deleted file mode 100644 index 4b56cfe..0000000 --- a/neovim/.config/nvim/packer.snapshot.lua +++ /dev/null @@ -1 +0,0 @@ -{"vim-ft-bzl": {"commit": "6b41860"}, "litee.nvim": {"commit": "bf366a1"}, "nvim-dap": {"commit": "56118ce"}, "telescope-fzf-native.nvim": {"commit": "580b6c4"}, "vim-javascript": {"commit": "c470ce1"}, "packer.nvim": {"commit": "1d0cf98"}, "catppuccin": {"commit": "8338b02"}, "nvim-lspconfig": {"commit": "6f1d124"}, "playground": {"commit": "2b81a01"}, "vim-abolish": {"commit": "cb3dcb2"}, "rust-tools.nvim": {"commit": "71d2cf6"}, "vim-jsx": {"commit": "8879e0d"}, "vim-visual-multi": {"commit": "724bd53"}, "vim-argwrap": {"commit": "feaba6b"}, "lualine.nvim": {"commit": "05d78e9"}, "gh.nvim": {"commit": "2b55516"}, "nvim-treesitter-textobjects": {"commit": "35a60f0"}, "vim-visual-star-search": {"commit": "3725972"}, "cmp_luasnip": {"commit": "1809552"}, "vim-better-whitespace": {"commit": "1b22dc5"}, "vim-test": {"commit": "08250c5"}, "vim-fugitive": {"commit": "5f0d280"}, "gitsigns.nvim": {"commit": "c18b7ca"}, "dressing.nvim": {"commit": "66e4990"}, "nvim-ufo": {"commit": "45aede6"}, "lspkind-nvim": {"commit": "57610d5"}, "vim-jsonnet": {"commit": "4ebc661"}, "diffconflicts": {"commit": "05e8d2e"}, "telescope.nvim": {"commit": "40c31fd"}, "vim-sneak": {"commit": "93395f5"}, "vim-dirvish": {"commit": "6233243"}, "cmp-spell": {"commit": "60584cb"}, "mason.nvim": {"commit": "08b2fd30"}, "vim-unimpaired": {"commit": "6d44a6d"}, "promise-async": {"commit": "e94f351"}, "vim-jumptoline": {"commit": "1f95a52"}, "cmp-nvim-lsp": {"commit": "0e6b2ed"}, "vim-go": {"commit": "2a874910"}, "LuaSnip": {"commit": "2f78933"}, "popup.nvim": {"commit": "b7404d3"}, "vim-commentary": {"commit": "e87cd90"}, "nvim-web-devicons": {"commit": "986875b"}, "vim-repeat": {"commit": "24afe92"}, "nvim-treesitter": {"commit": "3d5fe8ca"}, "mason-lspconfig.nvim": {"commit": "c55d18f"}, "neoscroll.nvim": {"commit": "d7601c2"}, "vim-indent-object": {"commit": "5c5b24c"}, "vim-rhubarb": {"commit": "ee69335"}, "lsp-trouble.nvim": {"commit": "2173dff"}, "targets.vim": {"commit": "642d3a4"}, "fidget.nvim": {"commit": "0ba1e16"}, "sql.nvim": {"commit": "b7e28c8"}, "plenary.nvim": {"commit": "9ac3e95"}, "nvim-surround": {"commit": "e604712"}, "nvim-cmp": {"commit": "3ac8d6c"}, "nvim-treesitter-context": {"commit": "c8f3a62"}, "textobj-word-column.vim": {"commit": "cb40e14"}, "vim-pug": {"commit": "ea39cd9"}, "vim-floaterm": {"commit": "bd0aee3"}, "splitjoin.vim": {"commit": "c00fa51"}, "cmp-nvim-lua": {"commit": "f12408b"}, "cmp-buffer": {"commit": "3022dbc"}}