|
1 | | - |
2 | 1 | -- Set colorcolumn to 200 for Python files only |
3 | 2 | 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, |
8 | 16 | }) |
9 | 17 |
|
10 | 18 | -- |
11 | 19 | -- Project settings for ALE (Asynchronous Lint Engine) |
12 | 20 | -- ALE is available at https://github.com/dense-analysis/ale |
| 21 | +-- |
13 | 22 | 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" }, |
17 | 26 | } |
18 | 27 | vim.g.ale_python_auto_uv = 1 |
19 | 28 |
|
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" |
23 | 32 |
|
24 | 33 | vim.g.ale_fixers = { |
25 | 34 | python = { "ruff", "black" }, |
|
0 commit comments