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

3
.markdownlint.jsonc Normal file
View File

@@ -0,0 +1,3 @@
{
"MD013": { "code_blocks": false }
}

2
.prettierrc.yaml Normal file
View File

@@ -0,0 +1,2 @@
proseWrap: always
printWidth: 80

View File

@@ -1,6 +1,24 @@
{
"extras": [
"lazyvim.plugins.extras.coding.mini-snippets",
"lazyvim.plugins.extras.coding.mini-surround",
"lazyvim.plugins.extras.editor.fzf",
"lazyvim.plugins.extras.editor.harpoon2",
"lazyvim.plugins.extras.formatting.prettier",
"lazyvim.plugins.extras.lang.ansible",
"lazyvim.plugins.extras.lang.clangd",
"lazyvim.plugins.extras.lang.cmake",
"lazyvim.plugins.extras.lang.docker",
"lazyvim.plugins.extras.lang.git",
"lazyvim.plugins.extras.lang.json",
"lazyvim.plugins.extras.lang.markdown",
"lazyvim.plugins.extras.lang.sql",
"lazyvim.plugins.extras.lang.tailwind",
"lazyvim.plugins.extras.lang.tex",
"lazyvim.plugins.extras.lang.toml",
"lazyvim.plugins.extras.lang.yaml",
"lazyvim.plugins.extras.util.project",
"lazyvim.plugins.extras.util.startuptime"
],
"install_version": 8,
"news": {

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

View File

@@ -6,7 +6,7 @@ return {
markdown = {
"prettier",
prepend_args = {
"--print-width", "100",
"--print-width", "80",
"--prose-wrap", "always",
"--parser", "markdown",
},

View File

@@ -1,32 +1,11 @@
-- Plugins that don't require much configuration are in here.
--
return {
{ 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,
},
},
},
{
"folke/snacks.nvim",
opts = {
indent = { enabled = false },
},
},
{
import = "lazyvim.plugins.extras.coding.blink",
keymap = {
preset = "enter",
["<C-y>"] = { "select_and_accept" },
},
},
}

View File

@@ -0,0 +1,12 @@
return {
{
"mfussenegger/nvim-lint",
opts = {
linters = {
markdownlint = {
args = { "--config", "~/.markdownlint.jsonc", "--" },
},
},
},
},
}

View File

@@ -8,17 +8,17 @@
#
function n() {
if [ -z "$1" ]; then
local gitdir=$(git rev-parse --show-toplevel 2> /dev/null)
[ -n "$gitdir" ] \
&& nvim -c ":Telescope git_files" \
&& return 0
[ -d "$1" ] \
&& nvim -c ":Telescope find_files" \
&& return 0
fi
# if [ -z "$1" ]; then
# local gitdir=$(git rev-parse --show-toplevel 2> /dev/null)
#
# [ -n "$gitdir" ] \
# && nvim -c ":Telescope git_files" \
# && return 0
#
# [ -d "$1" ] \
# && nvim -c ":Telescope find_files" \
# && return 0
# fi
nvim "$1"
}