[nvim] Leaning into LazyVim

This commit is contained in:
Adam Cooper 2025-01-25 19:47:20 -05:00
parent be71f3ade0
commit 2c2b870a2b
5 changed files with 296 additions and 0 deletions

46
nvim/lazy-lock.json Normal file
View file

@ -0,0 +1,46 @@
{
"LazyVim": { "branch": "main", "commit": "2bea40c447b72e54ffb2d5cddc98d7798990796f" },
"SchemaStore.nvim": { "branch": "main", "commit": "bb52c530698654355bbddb9f0035dc35cea401a5" },
"blink.cmp": { "branch": "main", "commit": "b6f11a0aa33e601c469a126e3ed6e35208fe3ea3" },
"bufferline.nvim": { "branch": "main", "commit": "655133c3b4c3e5e05ec549b9f8cc2894ac6f51b3" },
"catppuccin": { "branch": "main", "commit": "f67b886d65a029f12ffa298701fb8f1efd89295d" },
"conform.nvim": { "branch": "master", "commit": "363243c03102a531a8203311d4f2ae704c620d9b" },
"crates.nvim": { "branch": "main", "commit": "bd35b13e94a292ee6e32c351e05ca2202dc9f070" },
"flash.nvim": { "branch": "main", "commit": "34c7be146a91fec3555c33fe89c7d643f6ef5cf1" },
"friendly-snippets": { "branch": "main", "commit": "efff286dd74c22f731cdec26a70b46e5b203c619" },
"fzf-lua": { "branch": "main", "commit": "e68d21bf23f27fae4bb395760e3eb10b8768ea2c" },
"gitsigns.nvim": { "branch": "main", "commit": "d8918f06624dd53b9a82bd0e29c31bcfd541b40d" },
"grug-far.nvim": { "branch": "main", "commit": "635e69adf3a714621bd0a289314bc23c5848babb" },
"lazy.nvim": { "branch": "main", "commit": "7e6c863bc7563efbdd757a310d17ebc95166cef3" },
"lazydev.nvim": { "branch": "main", "commit": "a1b78b2ac6f978c72e76ea90ae92a94edf380cfc" },
"lualine.nvim": { "branch": "master", "commit": "2a5bae925481f999263d6f5ed8361baef8df4f83" },
"markdown-preview.nvim": { "branch": "master", "commit": "a923f5fc5ba36a3b17e289dc35dc17f66d0548ee" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "e942edf5c85b6a2ab74059ea566cac5b3e1514a4" },
"mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
"mini.ai": { "branch": "main", "commit": "ebb04799794a7f94628153991e6334c3304961b8" },
"mini.icons": { "branch": "main", "commit": "910db5df9724d65371182948f921fce23c2c881e" },
"mini.pairs": { "branch": "main", "commit": "7e834c5937d95364cc1740e20d673afe2d034cdb" },
"mini.starter": { "branch": "main", "commit": "a816f50ac99a6fa1f21e0f07ee13f975444dd4a1" },
"mini.surround": { "branch": "main", "commit": "aa5e245829dd12d8ff0c96ef11da28681d6049aa" },
"neo-tree.nvim": { "branch": "main", "commit": "e752d224f914f1ffa18260fecfbfac233d3ca461" },
"noice.nvim": { "branch": "main", "commit": "eaed6cc9c06aa2013b5255349e4f26a6b17ab70f" },
"nui.nvim": { "branch": "main", "commit": "53e907ffe5eedebdca1cd503b00aa8692068ca46" },
"nvim-lint": { "branch": "master", "commit": "789b7ada1b4f00e08d026dffde410dcfa6a0ba87" },
"nvim-lspconfig": { "branch": "master", "commit": "b4d65bce97795438ab6e1974b3672c17a4865e3c" },
"nvim-treesitter": { "branch": "master", "commit": "f3d7c0dafcbc86c4d63f765649c884a03bc1360a" },
"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": "3707cdb1e43f5cea73afb6037e6494e7ce847a66" },
"render-markdown.nvim": { "branch": "main", "commit": "ad055861d17afe058bd835e82292e14a64b51b1d" },
"rustaceanvim": { "branch": "master", "commit": "e15c262f81e8adb139ef3e3de775493d377919a2" },
"snacks.nvim": { "branch": "main", "commit": "b96bd540f785c725289f9f15f0147b1b2dac5a35" },
"todo-comments.nvim": { "branch": "main", "commit": "304a8d204ee787d2544d8bc23cd38d2f929e7cc5" },
"tokyonight.nvim": { "branch": "main", "commit": "c3ab53c3f544e4a04f2a05d43451fd9bedff51b4" },
"trouble.nvim": { "branch": "main", "commit": "50481f414bd3c1a40122c1d759d7e424d5fafe84" },
"ts-comments.nvim": { "branch": "main", "commit": "872dcfa0418f4a33b7437fb4d9f4e89f2f000d74" },
"which-key.nvim": { "branch": "main", "commit": "6cebd86917df559a88de0f806b2989799c6e6423" }
}

16
nvim/lazyvim.json Normal file
View file

@ -0,0 +1,16 @@
{
"extras": [
"lazyvim.plugins.extras.coding.mini-surround",
"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.vscode"
],
"news": {
"NEWS.md": "10960"
},
"version": 7
}

View file

@ -1,3 +1,4 @@
-- Options are automatically loaded before lazy.nvim startup
-- Default options that are always set: https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/options.lua
-- Add any additional options here
vim.g.mapleader = "\\"

View file

@ -148,6 +148,20 @@ return {
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
})
end,
},

View file

@ -0,0 +1,219 @@
-- since this is just an example spec, don't actually load anything here and return an empty spec
-- stylua: ignore
-- if true then return {} end
-- every spec file under the "plugins" directory will be loaded automatically by lazy.nvim
--
-- In your plugin files, you can:
-- * add extra plugins
-- * disable/enabled LazyVim plugins
-- * override the configuration of LazyVim plugins
return {
"kovisoft/paredit",
{
"monkoose/nvlime",
event = "VeryLazy",
dependencies = {
"monkoose/parsley"
}
},
-- add gruvbox
-- { "ellisonleao/gruvbox.nvim" },
-- Configure LazyVim to load gruvbox
-- {
-- "LazyVim/LazyVim",
-- opts = {
-- colorscheme = "gruvbox",
-- },
-- },
-- change trouble config
-- {
-- "folke/trouble.nvim",
-- -- opts will be merged with the parent spec
-- opts = { use_diagnostic_signs = true },
-- },
-- disable trouble
-- { "folke/trouble.nvim", enabled = false },
-- override nvim-cmp and add cmp-emoji
-- {
-- "hrsh7th/nvim-cmp",
-- dependencies = { "hrsh7th/cmp-emoji" },
-- ---@param opts cmp.ConfigSchema
-- opts = function(_, opts)
-- table.insert(opts.sources, { name = "emoji" })
-- end,
-- },
-- change some telescope options and a keymap to browse plugin files
-- {
-- "nvim-telescope/telescope.nvim",
-- keys = {
-- -- add a keymap to browse plugin files
-- -- stylua: ignore
-- {
-- "<leader>fp",
-- function() require("telescope.builtin").find_files({ cwd = require("lazy.core.config").options.root }) end,
-- desc = "Find Plugin File",
-- },
-- },
-- -- change some options
-- opts = {
-- defaults = {
-- layout_strategy = "horizontal",
-- layout_config = { prompt_position = "top" },
-- sorting_strategy = "ascending",
-- winblend = 0,
-- },
-- },
-- },
-- add pyright to lspconfig
-- {
-- "neovim/nvim-lspconfig",
-- ---@class PluginLspOpts
-- opts = {
-- ---@type lspconfig.options
-- servers = {
-- -- pyright will be automatically installed with mason and loaded with lspconfig
-- pyright = {},
-- },
-- },
-- },
-- add tsserver and setup with typescript.nvim instead of lspconfig
-- {
-- "neovim/nvim-lspconfig",
-- dependencies = {
-- "jose-elias-alvarez/typescript.nvim",
-- init = function()
-- require("lazyvim.util").lsp.on_attach(function(_, buffer)
-- -- stylua: ignore
-- vim.keymap.set( "n", "<leader>co", "TypescriptOrganizeImports", { buffer = buffer, desc = "Organize Imports" })
-- vim.keymap.set("n", "<leader>cR", "TypescriptRenameFile", { desc = "Rename File", buffer = buffer })
-- end)
-- end,
-- },
-- ---@class PluginLspOpts
-- opts = {
-- ---@type lspconfig.options
-- servers = {
-- -- tsserver will be automatically installed with mason and loaded with lspconfig
-- tsserver = {},
-- },
-- -- you can do any additional lsp server setup here
-- -- return true if you don't want this server to be setup with lspconfig
-- ---@type table<string, fun(server:string, opts:_.lspconfig.options):boolean?>
-- setup = {
-- -- example to setup with typescript.nvim
-- tsserver = function(_, opts)
-- require("typescript").setup({ server = opts })
-- return true
-- end,
-- -- Specify * to use this function as a fallback for any server
-- -- ["*"] = function(server, opts) end,
-- },
-- },
-- },
-- for typescript, LazyVim also includes extra specs to properly setup lspconfig,
-- treesitter, mason and typescript.nvim. So instead of the above, you can use:
{ import = "lazyvim.plugins.extras.lang.typescript" },
-- add more treesitter parsers
-- {
-- "nvim-treesitter/nvim-treesitter",
-- opts = {
-- ensure_installed = {
-- "bash",
-- "html",
-- "javascript",
-- "json",
-- "lua",
-- "markdown",
-- "markdown_inline",
-- "python",
-- "query",
-- "regex",
-- "tsx",
-- "typescript",
-- "vim",
-- "yaml",
-- },
-- },
-- },
-- since `vim.tbl_deep_extend`, can only merge tables and not lists, the code above
-- would overwrite `ensure_installed` with the new value.
-- If you'd rather extend the default config, use the code below instead:
{
"nvim-treesitter/nvim-treesitter",
opts = function(_, opts)
-- add tsx and treesitter
vim.list_extend(opts.ensure_installed, {
"tsx",
"typescript",
"bash",
"html",
"javascript",
"json",
"lua",
"markdown",
"markdown_inline",
"python",
"query",
"regex",
"tsx",
"typescript",
"vim",
"yaml",
})
end,
},
-- the opts function can also be used to change the default opts:
-- {
-- "nvim-lualine/lualine.nvim",
-- event = "VeryLazy",
-- opts = function(_, opts)
-- table.insert(opts.sections.lualine_x, {
-- function()
-- return "😄"
-- end,
-- })
-- end,
-- },
-- or you can return new options to override all the defaults
-- {
-- "nvim-lualine/lualine.nvim",
-- event = "VeryLazy",
-- opts = function()
-- return {
-- --[[add your custom lualine config here]]
-- }
-- end,
-- },
-- use mini.starter instead of alpha
{ import = "lazyvim.plugins.extras.ui.mini-starter" },
-- add jsonls and schemastore packages, and setup treesitter for json, json5 and jsonc
{ import = "lazyvim.plugins.extras.lang.json" },
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
opts = {
ensure_installed = {
"stylua",
"shellcheck",
"shfmt",
"flake8",
},
},
},
}