feat: More lazyvim configuration changes.

This commit is contained in:
2025-03-31 15:23:21 -04:00
parent b627d68ae3
commit 6c6c5c507d
5 changed files with 31 additions and 31 deletions

View File

@@ -1,28 +1,29 @@
local defaultGroupOptions = { clear = true }
local markdownGroup = vim.api.nvim_create_augroup("MyMarkdownGroup", defaultGroupOptions)
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",
group = markdownGroup,
callback = function(_)
-- HACK: Set filetype to markdown for '.md' files.
-- Not sure why it doesn't detect these as markdown files, but this fixes the issue.
vim.cmd.setlocal("filetype=markdown")
vim.cmd.setlocal("textwidth=80")
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

@@ -18,13 +18,6 @@ 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 = {

View File

@@ -0,0 +1,8 @@
return {
"saghen/blink.cmp",
opts = {
keymap = {
preset = "default"
}
}
}

View File

@@ -6,9 +6,7 @@ return {
markdown = {
"prettier",
prepend_args = {
"--print-width", "80",
"--prose-wrap", "always",
"--parser", "markdown",
"--config", "~/.prettierrc.yaml"
},
},
swift = { "swiftformat" },