Neovim: Enable linters
This commit is contained in:
parent
81fe04dd51
commit
37e1f3ed8d
@ -5,14 +5,9 @@ return {
|
||||
event = { 'BufReadPre', 'BufNewFile' },
|
||||
config = function()
|
||||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
}
|
||||
|
||||
-- To allow other plugins to add linters to require('lint').linters_by_ft,
|
||||
-- instead set linters_by_ft like this:
|
||||
-- lint.linters_by_ft = lint.linters_by_ft or {}
|
||||
-- lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||
-- Defining in this format allows other plugins to define linters.
|
||||
-- require('lint').linters_by_ft
|
||||
--
|
||||
-- However, note that this will enable a set of default linters,
|
||||
-- which will cause errors unless these tools are available:
|
||||
@ -28,7 +23,10 @@ return {
|
||||
-- terraform = { "tflint" },
|
||||
-- text = { "vale" }
|
||||
-- }
|
||||
--
|
||||
lint.linters_by_ft['markdown'] = { 'markdownlint' }
|
||||
lint.linters_by_ft['typescript'] = { 'eslint' }
|
||||
lint.linters_by_ft['javascript'] = { 'eslint' }
|
||||
|
||||
-- You can disable the default linters by setting their filetypes to nil:
|
||||
-- lint.linters_by_ft['clojure'] = nil
|
||||
-- lint.linters_by_ft['dockerfile'] = nil
|
||||
|
Loading…
Reference in New Issue
Block a user