Add markdown lint; neotree hidden

This commit is contained in:
hlstwizard 2026-03-30 16:27:38 +08:00
parent 0ed7c56204
commit dced8c0e0b
4 changed files with 38 additions and 3 deletions

View File

@ -40,6 +40,7 @@ External Requirements:
- Language Setup:
- If you want to write Typescript, you need `npm`
- If you want to write Golang, you will need `go`
- If you want to lint Markdown, install `markdownlint-cli2` (via `npm i -g markdownlint-cli2` or Mason)
- etc.
> [!NOTE]

View File

@ -626,9 +626,10 @@ require('lazy').setup({
end
local config_path = vim.fn.stdpath 'config'
local runtime_files = vim.tbl_filter(function(file)
return file ~= config_path and file ~= (config_path .. '/after')
end, vim.api.nvim_get_runtime_file('', true))
local runtime_files = vim.tbl_filter(
function(file) return file ~= config_path and file ~= (config_path .. '/after') end,
vim.api.nvim_get_runtime_file('', true)
)
client.config.settings.Lua = vim.tbl_deep_extend('force', client.config.settings.Lua, {
runtime = {

View File

@ -0,0 +1,23 @@
return {
{
'mfussenegger/nvim-lint',
ft = { 'markdown' },
opts = {
linters = {
markdownlint = {
args = { '--disable', 'MD013', '--' },
},
['markdownlint-cli2'] = {
prepend_args = { '--disable', 'MD013', '--' },
},
},
},
config = function(_, opts)
local lint = require 'lint'
for linter_name, linter_config in pairs(opts.linters or {}) do
lint.linters[linter_name] = vim.tbl_deep_extend('force', lint.linters[linter_name] or {}, linter_config)
end
end,
},
}

View File

@ -23,9 +23,19 @@ return {
opts.filesystem = vim.tbl_deep_extend('force', opts.filesystem or {}, {
use_libuv_file_watcher = true,
follow_current_file = { enabled = true },
filtered_items = {
visible = false,
hide_dotfiles = true,
hide_gitignored = true,
hide_hidden = true,
always_show = {
'.github',
},
},
window = {
mappings = {
['R'] = 'refresh',
['H'] = 'toggle_hidden',
},
},
})