diff --git a/nvim/lua/kickstart/plugins/lint.lua b/nvim/lua/kickstart/plugins/lint.lua index 7f0dc42..af11d0e 100644 --- a/nvim/lua/kickstart/plugins/lint.lua +++ b/nvim/lua/kickstart/plugins/lint.lua @@ -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