From 7d19a076cf7e54eb39c19450069823605b982753 Mon Sep 17 00:00:00 2001 From: Youwen Wu Date: Sun, 19 May 2024 01:40:48 -0700 Subject: [PATCH] remove many manual configuration options to stay upstream with lazyim --- lazy-lock.json | 85 ++++++++++++++---------------- lazyvim.json | 9 +++- lua/plugins/copilot.lua | 34 ------------ lua/plugins/lsp.lua | 114 +--------------------------------------- lua/plugins/ui.lua | 29 ---------- 5 files changed, 48 insertions(+), 223 deletions(-) delete mode 100644 lua/plugins/copilot.lua diff --git a/lazy-lock.json b/lazy-lock.json index 0d5dd2d..e3123c8 100644 --- a/lazy-lock.json +++ b/lazy-lock.json @@ -1,74 +1,69 @@ { - "LazyVim": { "branch": "main", "commit": "cfe87ba894b6c2c961827de45c55b57b1183865c" }, - "LuaSnip": { "branch": "master", "commit": "b152822e1a4bafb6bdf11a16cc26525cbd95ee00" }, - "SchemaStore.nvim": { "branch": "main", "commit": "35a0998728380a17b8590447e8207391411c667a" }, + "LazyVim": { "branch": "main", "commit": "b0128b60bffd0d6a97ddd99af6179ebcd8a5096f" }, + "LuaSnip": { "branch": "master", "commit": "de1a287c9cb525ae52bc846e8f6207e5ef1da5ac" }, + "SchemaStore.nvim": { "branch": "main", "commit": "953dc9a37f646a7f0420c41394f716f0dddf5687" }, "bufferline.nvim": { "branch": "main", "commit": "73540cb95f8d95aa1af3ed57713c6720c78af915" }, "catppuccin": { "branch": "main", "commit": "d97387aea8264f484bb5d5e74f2182a06c83e0d8" }, "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" }, - "cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" }, + "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" }, "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" }, "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" }, - "conform.nvim": { "branch": "master", "commit": "dc950e5717f1da65b1fcd986b1bbff0d6bd0e2ee" }, + "conform.nvim": { "branch": "master", "commit": "00f9d91391b04b1935e2f15948bd96cc111e7d3a" }, "copilot-cmp": { "branch": "master", "commit": "72fbaa03695779f8349be3ac54fa8bd77eed3ee3" }, "copilot.lua": { "branch": "master", "commit": "f7612f5af4a7d7615babf43ab1e67a2d790c13a6" }, - "crates.nvim": { "branch": "main", "commit": "7d8541ec0e3b30ac2c43864d3ee13a632e1231ed" }, - "dashboard-nvim": { "branch": "master", "commit": "a0a78099658c7d4be3714f657b18ca8285d5d106" }, - "dressing.nvim": { "branch": "master", "commit": "5162edb1442a729a885c45455a07e9a89058be2f" }, - "elixir-tools.nvim": { "branch": "main", "commit": "51eddb03a7a8c9f00d6415b356a4d3b75d8e75b6" }, - "flash.nvim": { "branch": "main", "commit": "7bb4a9c75d1e20cd24185afedeaa11681829ba23" }, - "friendly-snippets": { "branch": "main", "commit": "3e9a3f5a0cfcef1741e352c37bda4e82e5eb846a" }, + "crates.nvim": { "branch": "main", "commit": "d556c00d60c9421c913ee54ff690df2a34f6264e" }, + "dashboard-nvim": { "branch": "master", "commit": "5182c09ac8085dc73b78ad0ea9f5479c9a866fc4" }, + "dressing.nvim": { "branch": "master", "commit": "572314728cb1ce012e825fd66331f52c94acac12" }, + "flash.nvim": { "branch": "main", "commit": "11a2e667d19d8f48c93c6ed2e2e525ac6b1b79be" }, + "friendly-snippets": { "branch": "main", "commit": "dd2fd1281d4b22e7b4a5bfafa3e142d958e251f2" }, "gitsigns.nvim": { "branch": "main", "commit": "805610a9393fa231f2c2b49cb521bfa413fadb3d" }, - "haskell-snippets.nvim": { "branch": "master", "commit": "89a4f683b83a656e6ccb4ad0db97ad8863037f5d" }, + "haskell-snippets.nvim": { "branch": "master", "commit": "b00139b127f775f481f434bf9c60957185c74e4c" }, "haskell-tools.nvim": { "branch": "master", "commit": "35ac2d964b004d0d0e0cc9bab039b70be36ca0f7" }, "headlines.nvim": { "branch": "master", "commit": "618ef1b2502c565c82254ef7d5b04402194d9ce3" }, - "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" }, + "indent-blankline.nvim": { "branch": "master", "commit": "ece00d5fb44d196680a81fd2761062d2fa44663b" }, "lazy.nvim": { "branch": "main", "commit": "758bb5de98b805acc5eeed8cdc8ac7f0bc4b0b86" }, "lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" }, "markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" }, - "mason-lspconfig.nvim": { "branch": "main", "commit": "9ae570e206360e47d30b4c35a4550c165f4ea7b7" }, - "mason.nvim": { "branch": "main", "commit": "1b3d60405d1d720b2c4927f19672e9479703b00f" }, - "mini.ai": { "branch": "main", "commit": "55e9b7217f29e62f734e239bfeed5731a065d801" }, + "mason-lspconfig.nvim": { "branch": "main", "commit": "a4caa0d083aab56f6cd5acf2d42331b74614a585" }, + "mason.nvim": { "branch": "main", "commit": "49ff59aded1047a773670651cfa40e76e63c6377" }, + "mini.ai": { "branch": "main", "commit": "a0262e61f79dfc7bb940d1719c00b0ede042ddd7" }, "mini.animate": { "branch": "main", "commit": "82519630b2760ffc516ebc387bef632f9c07b9f5" }, - "mini.bufremove": { "branch": "main", "commit": "931a3bb514147d9e812767275c4beba6b779b1d3" }, - "mini.comment": { "branch": "main", "commit": "f9f1a646fd3d9df7397aa1b9550a875fe8189eb0" }, - "mini.indentscope": { "branch": "main", "commit": "a8274b6ea2d868198d27bd91a31ed5ea3a6a5744" }, + "mini.comment": { "branch": "main", "commit": "6b6da2c272545ac6a201fb45af3aba66ef96d052" }, + "mini.hipatterns": { "branch": "main", "commit": "088bbfef23e17934080f125751a94a2758ba7fdf" }, "mini.pairs": { "branch": "main", "commit": "5c975d8f68dc1e11bf4b20ced71e7987ed782513" }, - "mini.surround": { "branch": "main", "commit": "eb89a88a51655e46a93595204a9251a012918883" }, + "mini.surround": { "branch": "main", "commit": "c52aa751daf62d4a9e6ee24c4a91882ef6842f99" }, "neo-tree.nvim": { "branch": "v3.x", "commit": "7aad1bf3f6b849cbf108e02c55ad4d701cb4d33a" }, - "neoconf.nvim": { "branch": "main", "commit": "bdd6c7dac2038d6495890dd84f451cf9f7425c50" }, + "neoconf.nvim": { "branch": "main", "commit": "0065de89c834e1090a847a9aa126af5dce1db4dc" }, "neodev.nvim": { "branch": "main", "commit": "ce9a2e8eaba5649b553529c5498acb43a6c317cd" }, - "noice.nvim": { "branch": "main", "commit": "09102ca2e9a3e9302119fdaf7a059a034e4a626d" }, - "nui.nvim": { "branch": "main", "commit": "a3597dc88b53489d3fddbddbbd13787355253bb0" }, - "nvim-cmp": { "branch": "main", "commit": "24122371810089d390847d8ba66325c1f1aa64c0" }, - "nvim-lint": { "branch": "master", "commit": "83ee4952a968d89329e5a49b4648831d98124783" }, - "nvim-lspconfig": { "branch": "master", "commit": "94513a5b246cf32a8f87ca714af50911df63351c" }, - "nvim-notify": { "branch": "master", "commit": "5371f4bfc1f6d3adf4fe9d62cd3a9d44356bfd15" }, - "nvim-spectre": { "branch": "master", "commit": "4651801ba37a9407b7257287aec45b6653ffc5e9" }, - "nvim-treesitter": { "branch": "master", "commit": "0d2c80b4d00c8f793e17d2d1d24d4aa5aaa88bc2" }, - "nvim-treesitter-context": { "branch": "master", "commit": "1e52a2c4223c1e7b0def9c76a1f3757d372196c3" }, - "nvim-treesitter-textobjects": { "branch": "master", "commit": "dfa4178c0cadb44f687603d72ad0908474c28dd9" }, - "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" }, - "nvim-ts-context-commentstring": { "branch": "main", "commit": "0bdccb9c67a42a5e2d99384dc9bfa29b1451528f" }, - "nvim-web-devicons": { "branch": "master", "commit": "5b9067899ee6a2538891573500e8fd6ff008440f" }, - "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" }, + "noice.nvim": { "branch": "main", "commit": "9f6f6ba74f8bfbf7e43d6302cf86b070362f6203" }, + "nui.nvim": { "branch": "main", "commit": "b1b3dcd6ed8f355c78bad3d395ff645be5f8b6ae" }, + "nvim-cmp": { "branch": "main", "commit": "5260e5e8ecadaf13e6b82cf867a909f54e15fd07" }, + "nvim-lint": { "branch": "master", "commit": "1f98d6c863f91706369d74aeb2eb3f02b2e96861" }, + "nvim-lspconfig": { "branch": "master", "commit": "6d2ae9fdc3111a6e8fd5db2467aca11737195a30" }, + "nvim-notify": { "branch": "master", "commit": "d333b6f167900f6d9d42a59005d82919830626bf" }, + "nvim-spectre": { "branch": "master", "commit": "50e96602153f14c913e1969aaf9720e080394eb3" }, + "nvim-treesitter": { "branch": "master", "commit": "ccfa76d4cb53224cb0ecefb12f79ecdbbf1fd62d" }, + "nvim-treesitter-context": { "branch": "master", "commit": "55e29081e73d2e4b2d62fb4dc3eebe21bf66a1e2" }, + "nvim-treesitter-textobjects": { "branch": "master", "commit": "5f9bf4b1ead7707e4e74e5319ee56bdc81fb73db" }, + "nvim-ts-autotag": { "branch": "main", "commit": "aeb7090098722ffce16597bd0331105495640153" }, + "nvim-ts-context-commentstring": { "branch": "main", "commit": "cbab9ad88036915beebd13b47e100743ff2ed2d5" }, + "nvim-web-devicons": { "branch": "master", "commit": "e37bb1feee9e7320c76050a55443fa843b4b6f83" }, + "persistence.nvim": { "branch": "main", "commit": "5fe077056c821aab41f87650bd6e1c48cd7dd047" }, "plenary.nvim": { "branch": "master", "commit": "08e301982b9a057110ede7a735dd1b5285eb341f" }, "presence.nvim": { "branch": "main", "commit": "87c857a56b7703f976d3a5ef15967d80508df6e6" }, "project.nvim": { "branch": "main", "commit": "8c6bad7d22eef1b71144b401c9f74ed01526a4fb" }, - "rustaceanvim": { "branch": "master", "commit": "1c3d3a75bebcb16df2a093b147ba498185e4ab17" }, - "sqlite.lua": { "branch": "master", "commit": "d0ffd703b56d090d213b497ed4eb840495f14a11" }, + "rustaceanvim": { "branch": "master", "commit": "66466d4fe0b8988ba9e2932d3c41782c2efb683b" }, "tailwind-fold.nvim": { "branch": "main", "commit": "4335dd915073fe3da43a85b06742d12626603973" }, "tailwindcss-colorizer-cmp.nvim": { "branch": "main", "commit": "3d3cd95e4a4135c250faf83dd5ed61b8e5502b86" }, "telescope-fzf-native.nvim": { "branch": "main", "commit": "9ef21b2e6bb6ebeaf349a0781745549bbb870d27" }, - "telescope.nvim": { "branch": "master", "commit": "02a60a83961cf9c80e471599171982a31d1cc853" }, + "telescope.nvim": { "branch": "master", "commit": "0c12735d5aff6a48ffd8111bf144dc2ff44e5975" }, "telescope_hoogle": { "branch": "master", "commit": "5c2ae51bcf905a7101134a597e6f7be2dc05f975" }, "todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" }, - "tokyonight.nvim": { "branch": "main", "commit": "67afeaf7fd6ebba000633e89f63c31694057edde" }, - "trouble.nvim": { "branch": "dev", "commit": "8d637fcc0c4a6d9e05162bd6b03b25695179ea2b" }, - "typescript-tools.nvim": { "branch": "master", "commit": "c43d9580c3ff5999a1eabca849f807ab33787ea7" }, - "vim-illuminate": { "branch": "master", "commit": "e522e0dd742a83506db0a72e1ced68c9c130f185" }, - "vim-startuptime": { "branch": "master", "commit": "ac2cccb5be617672add1f4f3c0a55ce99ba34e01" }, + "tokyonight.nvim": { "branch": "main", "commit": "350a6ec8310e84f130dbcd2c716f2a31f8a97842" }, + "trouble.nvim": { "branch": "dev", "commit": "578da6d9485b9a87bec5ba2b076141012cbb6c15" }, + "venv-selector.nvim": { "branch": "main", "commit": "6a1b15eb35bbb827b6db428055087e2dbf32838f" }, "vim-wakatime": { "branch": "master", "commit": "3cb40867cb5a3120f9bef76eff88edc7f1dc1a23" }, - "vimtex": { "branch": "master", "commit": "8ca74380935beb4ed5d213bb55b2380cc1a83bd6" }, + "vimtex": { "branch": "master", "commit": "9665df7f51ee24aa81dbd81782e0a22480209753" }, "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" }, - "yanky.nvim": { "branch": "main", "commit": "7c5cbf0122ff2dfbb6a92f14885894f65949cc8b" } + "yanky.nvim": { "branch": "main", "commit": "396ff7ed952a69549f299c7b6f64615a89836733" } } \ No newline at end of file diff --git a/lazyvim.json b/lazyvim.json index 7a3dde8..188e1bf 100644 --- a/lazyvim.json +++ b/lazyvim.json @@ -1,13 +1,16 @@ { "extras": [ "lazyvim.plugins.extras.coding.copilot", + "lazyvim.plugins.extras.coding.mini-surround", "lazyvim.plugins.extras.coding.yanky", "lazyvim.plugins.extras.editor.trouble-v3", "lazyvim.plugins.extras.formatting.black", "lazyvim.plugins.extras.formatting.prettier", + "lazyvim.plugins.extras.lang.elixir", "lazyvim.plugins.extras.lang.haskell", "lazyvim.plugins.extras.lang.json", "lazyvim.plugins.extras.lang.markdown", + "lazyvim.plugins.extras.lang.python", "lazyvim.plugins.extras.lang.rust", "lazyvim.plugins.extras.lang.tailwind", "lazyvim.plugins.extras.lang.tex", @@ -15,11 +18,13 @@ "lazyvim.plugins.extras.lang.yaml", "lazyvim.plugins.extras.linting.eslint", "lazyvim.plugins.extras.ui.mini-animate", + "lazyvim.plugins.extras.ui.treesitter-context", "lazyvim.plugins.extras.util.dot", + "lazyvim.plugins.extras.util.mini-hipatterns", "lazyvim.plugins.extras.util.project" ], "news": { - "NEWS.md": "3314" + "NEWS.md": "4944" }, - "version": 3 + "version": 4 } \ No newline at end of file diff --git a/lua/plugins/copilot.lua b/lua/plugins/copilot.lua deleted file mode 100644 index 6ed6640..0000000 --- a/lua/plugins/copilot.lua +++ /dev/null @@ -1,34 +0,0 @@ -return { - { - "zbirenbaum/copilot.lua", - cmd = "Copilot", - build = ":Copilot auth", - opts = { - suggestion = { enabled = false }, - panel = { enabled = false }, - filetypes = { - markdown = false, - help = true, - }, - }, - }, - { - "zbirenbaum/copilot-cmp", - dependencies = "copilot.lua", - opts = { - event = { "InsertEnter", "LspAttach" }, - fix_pairs = true, - }, - config = function(_, opts) - local copilot_cmp = require("copilot_cmp") - copilot_cmp.setup(opts) - -- attach cmp source whenever copilot attaches - -- fixes lazy-loading issues with the copilot cmp source - LazyVim.lsp.on_attach(function(client) - if client.name == "copilot" then - copilot_cmp._on_insert_enter({}) - end - end) - end, - }, -} diff --git a/lua/plugins/lsp.lua b/lua/plugins/lsp.lua index 7c8cb03..a564707 100644 --- a/lua/plugins/lsp.lua +++ b/lua/plugins/lsp.lua @@ -1,113 +1 @@ -return { - { - "pmizio/typescript-tools.nvim", - dependencies = { "nvim-lua/plenary.nvim", "neovim/nvim-lspconfig" }, - opts = {}, - }, - { - "elixir-tools/elixir-tools.nvim", - version = "*", - event = { "BufReadPre", "BufNewFile" }, - config = function() - local elixir = require("elixir") - local elixirls = require("elixir.elixirls") - - elixir.setup({ - nextls = { enable = true }, - credo = {}, - elixirls = { - enable = true, - settings = elixirls.settings({ - dialyzerEnabled = false, - enableTestLenses = false, - }), - on_attach = function(client, bufnr) - vim.keymap.set("n", "fp", ":ElixirFromPipe", { buffer = true, noremap = true }) - vim.keymap.set("n", "tp", ":ElixirToPipe", { buffer = true, noremap = true }) - vim.keymap.set("v", "em", ":ElixirExpandMacro", { buffer = true, noremap = true }) - end, - }, - }) - end, - dependencies = { - "nvim-lua/plenary.nvim", - }, - }, - { - "neovim/nvim-lspconfig", - opts = { - servers = { - tailwindcss = { - -- exclude a filetype from the default_config - filetypes_exclude = { "markdown" }, - -- add additional filetypes to the default_config - filetypes_include = { - "pcss", - }, - -- to fully override the default_config, change the below - -- filetypes = {} - }, - tsserver = { - handlers = { - ["textDocument/publishDiagnostics"] = function(...) end, - }, - }, - rust_analyzer = { - settings = { - ["rust-analyzer"] = { - checkOnSave = { - command = "clippy", - }, - }, - }, - }, - cssls = { - filetypes = { "css", "scss", "less", "pcss" }, - }, - clangd = { - cmd = { "clangd", "--offset-encoding=utf-16" }, - }, - }, - diagnostics = { - underline = true, - update_in_insert = false, - virtual_text = { - spacing = 4, - source = "if_many", - -- prefix = "●", - -- this will set set the prefix to a function that returns the diagnostics icon based on the severity - -- this only works on a recent 0.10.0 build. Will be set to "●" when not supported - prefix = "icons", - }, - severity_sort = true, - signs = { - text = { - [vim.diagnostic.severity.ERROR] = LazyVim.config.icons.diagnostics.Error, - [vim.diagnostic.severity.WARN] = LazyVim.config.icons.diagnostics.Warn, - [vim.diagnostic.severity.HINT] = LazyVim.config.icons.diagnostics.Hint, - [vim.diagnostic.severity.INFO] = LazyVim.config.icons.diagnostics.Info, - }, - }, - }, - setup = { - tailwindcss = function(_, opts) - local tw = require("lspconfig.server_configurations.tailwindcss") - opts.filetypes = opts.filetypes or {} - - -- Add default filetypes - vim.list_extend(opts.filetypes, tw.default_config.filetypes) - - -- Remove excluded filetypes - --- @param ft string - opts.filetypes = vim.tbl_filter(function(ft) - return not vim.tbl_contains(opts.filetypes_exclude or {}, ft) - end, opts.filetypes) - - -- Add additional filetypes - vim.list_extend(opts.filetypes, opts.filetypes_include or {}) - end, - }, - }, - }, - { "roobert/tailwindcss-colorizer-cmp.nvim", config = true }, -} +return {} diff --git a/lua/plugins/ui.lua b/lua/plugins/ui.lua index 7898285..6d469ec 100644 --- a/lua/plugins/ui.lua +++ b/lua/plugins/ui.lua @@ -17,35 +17,6 @@ return { opts = {}, -- merged with defaults from documentation }, }, - routes = { - { - filter = { - event = "msg_show", - any = { - { find = "%d+L, %d+B" }, - { find = "; after #%d+" }, - { find = "; before #%d+" }, - }, - }, - view = "mini", - }, - }, - presets = { - bottom_search = true, - command_palette = true, - long_message_to_split = true, - inc_rename = true, - }, }, - -- stylua: ignore - keys = { - { "", function() require("noice").redirect(vim.fn.getcmdline()) end, mode = "c", desc = "Redirect Cmdline" }, - { "snl", function() require("noice").cmd("last") end, desc = "Noice Last Message" }, - { "snh", function() require("noice").cmd("history") end, desc = "Noice History" }, - { "sna", function() require("noice").cmd("all") end, desc = "Noice All" }, - { "snd", function() require("noice").cmd("dismiss") end, desc = "Dismiss All" }, - { "", function() if not require("noice.lsp").scroll(4) then return "" end end, silent = true, expr = true, desc = "Scroll Forward", mode = {"i", "n", "s"} }, - { "", function() if not require("noice.lsp").scroll(-4) then return "" end end, silent = true, expr = true, desc = "Scroll Backward", mode = {"i", "n", "s"}}, - }, }, }