From 1f21101f97f2351e179720f73a710b76c028be9f Mon Sep 17 00:00:00 2001 From: Ralph Date: Fri, 5 Apr 2024 01:27:58 -0700 Subject: [PATCH] bunch of stuff --- lua/config/autocmds.lua | 13 ------------- lua/config/options.lua | 15 +++++++++++++++ lua/plugins/editor_mine.lua | 14 ++++++++++++++ lua/plugins/lsp.lua | 2 -- 4 files changed, 29 insertions(+), 15 deletions(-) diff --git a/lua/config/autocmds.lua b/lua/config/autocmds.lua index 3761a61..27e9e06 100644 --- a/lua/config/autocmds.lua +++ b/lua/config/autocmds.lua @@ -1,16 +1,3 @@ -- Autocmds are automatically loaded on the VeryLazy event -- Default autocmds that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua -- Add any additional autocmds here -local function augroup(name) - return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true }) -end - --- when available, auto update when vim starts -vim.api.nvim_create_autocmd("VimEnter", { - group = augroup("autoupdate"), - callback = function() - if require("lazy.status").has_updates() then - require("lazy").update({ show = true, }) - end - end, -}) diff --git a/lua/config/options.lua b/lua/config/options.lua index eb2851d..63edce1 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -14,3 +14,18 @@ opt.colorcolumn = "90,100" -- line length guideline opt.showbreak = " ↪ " -- show linebreak with arrow ↪ opt.linebreak = true -- break line on word, not char -- opt.wrap = true -- toggle with uw + +local function augroup(name) + return vim.api.nvim_create_augroup("lazyvim_" .. name, { clear = true }) +end + +-- when available, auto update when vim starts +-- as per discussion here: https://github.com/LazyVim/LazyVim/issues/2592#issuecomment-2015093693 +vim.api.nvim_create_autocmd("VimEnter", { + group = augroup("autoupdate"), + callback = function() + if require("lazy.status").has_updates() then + require("lazy").update({ show = true }) + end + end, +}) diff --git a/lua/plugins/editor_mine.lua b/lua/plugins/editor_mine.lua index 52b11e3..e98d11d 100644 --- a/lua/plugins/editor_mine.lua +++ b/lua/plugins/editor_mine.lua @@ -57,4 +57,18 @@ return { require("nvim-tree").setup(opts) end, }, + { + "rmagatti/goto-preview", + lazy = false, + dependencies = { + "neovim/nvim-lspconfig" + }, + opts = { + default_mappings = true, + resizing_mappings = true, + }, + config = function(_, opts) + require("goto-preview").setup(opts) + end, + }, } diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index abb6f0f..8be36dc 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -6,8 +6,6 @@ return { -- https://mason-registry.dev/registry/list ensure_installed = { "rubocop", - "stylua", - "shfmt", }, }, },