Skip to content
This repository was archived by the owner on Apr 8, 2024. It is now read-only.

Commit d5f02c5

Browse files
markdown: tools and config override
- Add markdown and markdown_inline Treesitter parsers - Add marksman language server Configure null-ls to use Practicalli .markdownlint.yaml configuration with more subtle rules configuration
1 parent d7cce54 commit d5f02c5

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

plugins/mason.lua

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ return {
77
opts = function(_, opts)
88
-- add more things to the ensure_installed table protecting against community packs modifying it
99
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
10-
"marksman", -- Markdown structure
10+
-- `community.lua` ensures language servers via their language packs
11+
"marksman", -- Markdown structure (also in markdown pack)
1112
"yamlls",
1213
})
1314
end,
@@ -19,9 +20,10 @@ return {
1920
opts = function(_, opts)
2021
-- add more things to the ensure_installed table protecting against community packs modifying it
2122
opts.ensure_installed = require("astronvim.utils").list_insert_unique(opts.ensure_installed, {
22-
-- "prettier",
23-
"alex", -- neutral language lint
24-
"markdownlint", -- markdown lint & format
23+
-- `community.lua` ensures lint and format tools via their language packs
24+
-- "prettier", -- too agressive
25+
"alex", -- neutral language lint
26+
"markdownlint", -- markdown lint & format (not in markdown pack)
2527
})
2628
end,
2729
},

plugins/null-ls.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ return {
22
"jose-elias-alvarez/null-ls.nvim",
33
opts = function(_, config)
44
-- config variable is the default configuration table for the setup function call
5-
-- local null_ls = require "null-ls"
5+
local null_ls = require "null-ls"
66

77
-- Check supported formatters and linters
88
-- https://github.com/jose-elias-alvarez/null-ls.nvim/tree/main/lua/null-ls/builtins/formatting
@@ -11,6 +11,14 @@ return {
1111
-- Set a formatter
1212
-- null_ls.builtins.formatting.stylua,
1313
-- null_ls.builtins.formatting.prettier,
14+
15+
null_ls.builtins.formatting.markdownlint.with {
16+
-- pass arguments to modify/override the null-ls builtin configuration
17+
args = {
18+
"--config ",
19+
"/home/practicalli/.markdownlint.yaml",
20+
},
21+
},
1422
}
1523
return config -- return final config table
1624
end,

0 commit comments

Comments
 (0)