Markdown & Lint
-
Hi all,
Are there any plugins or other tools that allow one to implement lint-style validation of files in Notepad. I’m particularly thinking of Markdown and markdownlint (https://github.com/DavidAnson/markdownlint).
Obviously this can be done on the server side, if using Notepad++ with GitHub that implements markdownlint. But would be usefully locally if not using GitHub or if you simply want to validate Markdown before checking it in.
A Google search hasn’t thrown up anything, but thought I’d ask just in case!
P.
-
There isn’t a linting plugin specifically for Markdown. (CSVLint is the only plugin I know whose primary purpose is linting, and that’s obviously for CSV. XML Tools also has validation for XML, but it goes way beyond just being a linter.)
I would suggest a general purpose solution, which runs an external linter depending on file-type. This post by @Michael-Vincenct shows a script for the NppExec plugin to run an external “code tidy” command based on filetype. The same logic could be used to run a code linter based on filetype.
-
If a language server implementing the Language Server Protocol can be found for Markdown, you could use NppLSPClient. IIRC VSCode has a Markdown language server that I quite like; maybe you could use that.
-
@Mark-Olson said in Markdown & Lint:
VSCode has a Markdown language server that I quite like; maybe you could use that.
I am afraid this is not possible because this extension uses node-ipc as a communication channel.
node-ipc: use node IPC communication between the client and the server. This is only supported if both client and server run under node.
If other LSP servers that use stdio or socket, i.e. tcp, are available, this would of course be an alternative.