feat: Updates lazyvim configuration, adds some configuration files.

This commit is contained in:
2025-03-31 13:18:07 -04:00
parent d8feb9535d
commit b627d68ae3
9 changed files with 91 additions and 54 deletions

View File

@@ -4,25 +4,25 @@ local spellGroup = vim.api.nvim_create_augroup("SpellGroup", defaultGroupOptions
local createCmd = vim.api.nvim_create_autocmd
-- Spell check
createCmd("BufEnter", {
pattern = { "*.md", "*.markdown", "*.txt", "*.tex" },
group = spellGroup,
callback = function(_)
vim.cmd.setlocal("textwidth=100")
vim.cmd.setlocal("spell spelllang=en_us")
end,
})
-- createCmd("BufEnter", {
-- pattern = { "*.md", "*.markdown", "*.txt", "*.tex" },
-- group = spellGroup,
-- callback = function(_)
-- vim.cmd.setlocal("textwidth=100")
-- vim.cmd.setlocal("spell spelllang=en_us")
-- end,
-- })
-- Markdown
createCmd("BufWritePost", {
pattern = { "*.md", "*.markdown" },
group = markdownGroup,
callback = function(_)
local cursor = vim.fn.getpos(".")
vim.cmd("FormatWrite")
vim.fn.setpos(".", cursor)
end,
})
-- createCmd("BufWritePost", {
-- pattern = { "*.md", "*.markdown" },
-- group = markdownGroup,
-- callback = function(_)
-- local cursor = vim.fn.getpos(".")
-- vim.cmd("FormatWrite")
-- vim.fn.setpos(".", cursor)
-- end,
-- })
-- Go
createCmd("BufWritePre", {

View File

@@ -5,7 +5,7 @@ if not (vim.uv or vim.loop).fs_stat(lazypath) then
if vim.v.shell_error ~= 0 then
vim.api.nvim_echo({
{ "Failed to clone lazy.nvim:\n", "ErrorMsg" },
{ out, "WarningMsg" },
{ out, "WarningMsg" },
{ "\nPress any key to exit..." },
}, true, {})
vim.fn.getchar()
@@ -18,6 +18,29 @@ require("lazy").setup({
spec = {
-- add LazyVim and import its plugins
{ "LazyVim/LazyVim", import = "lazyvim.plugins" },
-- { import = "lazyvim.plugins.extras.lang.ansible" },
-- { import = "lazyvim.plugins.extras.lang.cmake" },
-- { import = "lazyvim.plugins.extras.lang.docker" },
-- { import = "lazyvim.plugins.extras.lang.json" },
-- { import = "lazyvim.plugins.extras.lang.markdown" },
-- { import = "lazyvim.plugins.extras.lang.yaml" },
-- { import = "lazyvim.plugins.extras.coding.luasnip" },
{
import = "lazyvim.plugins.extras.editor.mini-files",
opts = {
options = {
use_as_default_explorer = true,
},
},
},
{
import = "lazyvim.plugins.extras.coding.blink",
keymap = {
preset = "enter",
["<C-y>"] = { "select_and_accept" },
},
},
-- import/override with your plugins
{ import = "plugins" },
},
@@ -34,7 +57,7 @@ require("lazy").setup({
checker = {
enabled = true, -- check for plugin updates periodically
notify = false, -- notify on update
}, -- automatically check for plugin updates
}, -- automatically check for plugin updates
performance = {
rtp = {
-- disable some rtp plugins