Re-learning Vim (5)

Date: 2022/07/29 (initial publish), 2023/11/12 (last update)

Source: en/note-00032.md

Previous Post Top Next Post

TOC

Revisit syntax checkers and beyond

Let me revisit recent situation over static syntax checkers mentioned in Re-learning Vim (2).

Under NeoVim (>0.7) with Lua, LSP ecosystem around nvim-lspconfig can be used to access local syntax checkers and code style formatter using null-ls.nvim.

Many required packages for this seem to be compiled and installed by

Shell with LS

# SC2006: Use $(...) notation instead of legacy backticked `...`.
disable=SC2006

Python

My old ways

[pycodestyle]
count = False
ignore = E203,E226,E302,E41
max-line-length = 160
statistics = True

My new ways with LS

Independent reformatter

I also use an independent code re-formatter package: black.

One more tool is isort for import.

Lua with LS

column_width = 120
line_endings = "Unix"
indent_type = "Spaces"
indent_width = 2
quote_style = "AutoPreferDouble"
no_call_parentheses = true
collapse_simple_statement = "Always"

Others with LS

It seems there are supports not only on HTML but also markdown etc.

External linter of interest

For Perl, perltidy looks interesting. See how Debian devscripts source uses it.

Previous Post Top Next Post