added markdown linting and formatting

This commit is contained in:
adollar 2025-06-29 19:42:27 +01:00
parent c35e42337a
commit fd43e168ee
6 changed files with 90 additions and 71 deletions

View file

@ -1,5 +0,0 @@
-- You can add your own plugins here or in other files in this directory!
-- I promise not to create any merge conflicts in this directory :)
--
-- See the kickstart.nvim README for more information
return {}

View file

@ -6,7 +6,13 @@ return {
config = function()
local lint = require 'lint'
lint.linters_by_ft = {
yaml = { 'yamllint' },
markdown = { 'markdownlint' },
typescript = { 'eslint_d' },
javascript = { 'eslint_d' },
vue = { 'eslint_d' },
--python = { 'ruff' } linting already provided by ruff,
json = { 'jsonlint' },
}
-- To allow other plugins to add linters to require('lint').linters_by_ft,

View file

@ -41,6 +41,7 @@ return { -- Autoformat
jsonc = { 'prettierd' },
yaml = { 'prettierd' },
go = { 'goimports', 'golines' },
markdown = { 'mdformat' },
},
},
}

View file

@ -219,9 +219,21 @@ return {
-- Some languages (like typescript) have entire language plugins that can be useful:
-- https://github.com/pmizio/typescript-tools.nvim
--
vue_ls = {},
-- But for many setups, the LSP (`ts_ls`) will work just fine
-- ts_ls = {},
--
ts_ls = {
filetypes = { 'typescript', 'javascript', 'javascriptreact', 'typescriptreact', 'vue' },
init_options = {
plugins = {
{
name = '@vue/typescript-plugin',
location = vim.fn.stdpath 'data' .. '/mason/packages/vue-language-server/node_modules/@vue/language-server',
languages = { 'vue' },
},
},
},
},
yamlls = {},
lua_ls = {
-- cmd = { ... },
-- filetypes = { ... },
@ -257,6 +269,11 @@ return {
'goimports',
'golines',
'prettierd',
'jsonlint',
'markdownlint',
'mdformat',
'yamllint',
'eslint_d',
})
require('mason-tool-installer').setup { ensure_installed = ensure_installed }