Skip to content

Commit d787248

Browse files
jonpspricrivetimihai
authored andcommitted
chore: add markdown config to nvim for LazyVim
Signed-off-by: Jonathan Springer <[email protected]>
1 parent cc401f2 commit d787248

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

.nvim.lua

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,34 @@
1-
21
-- Set colorcolumn to 200 for Python files only
32
vim.api.nvim_create_autocmd("FileType", {
4-
pattern = "python",
5-
callback = function()
6-
vim.opt_local.colorcolumn = "200"
7-
end,
3+
pattern = "python",
4+
callback = function()
5+
vim.opt_local.colorcolumn = "200"
6+
end,
7+
})
8+
9+
-- Set up for line formatting .md files to a 120-character limit
10+
vim.api.nvim_create_autocmd("FileType", {
11+
pattern = "markdown",
12+
callback = function()
13+
vim.opt_local.colorcolumn = "120"
14+
vim.opt_local.textwidth = 120
15+
end,
816
})
917

1018
--
1119
-- Project settings for ALE (Asynchronous Lint Engine)
1220
-- ALE is available at https://github.com/dense-analysis/ale
21+
--
1322
vim.g.ale_linters = {
14-
make = {},
15-
python = { "mypy", "ruff", "flake8", "pylint" },
16-
markdown = { "markdownlint" },
23+
make = {},
24+
python = { "mypy", "ruff", "flake8", "pylint" },
25+
markdown = { "markdownlint" },
1726
}
1827
vim.g.ale_python_auto_uv = 1
1928

20-
vim.g.ale_python_mypy_options='--no-pretty'
21-
vim.g.ale_python_ruff_options = '--extend-select I'
22-
vim.g.ale_markdown_markdownlint_executable = 'markdownlint-cli2'
29+
vim.g.ale_python_mypy_options = "--no-pretty"
30+
vim.g.ale_python_ruff_options = "--extend-select I"
31+
vim.g.ale_markdown_markdownlint_executable = "markdownlint-cli2"
2332

2433
vim.g.ale_fixers = {
2534
python = { "ruff", "black" },

0 commit comments

Comments
 (0)