mirror of
https://github.com/tomru/nvim.git
synced 2026-03-02 22:17:13 +01:00
fix linting again in bcr 😓
This commit is contained in:
@@ -17,11 +17,21 @@ return {
|
||||
format_on_save = {
|
||||
timeout_ms = 500,
|
||||
lsp_format = 'fallback',
|
||||
async = true,
|
||||
},
|
||||
formatters = {
|
||||
eslint_d = {
|
||||
cwd = function() return vim.fn.getcwd() end,
|
||||
},
|
||||
},
|
||||
formatters_by_ft = {
|
||||
lua = { 'stylua' },
|
||||
css = { 'stylelint' },
|
||||
json = { 'eslint_d' },
|
||||
javascript = { 'eslint_d' },
|
||||
javascriptreact = { 'eslint_d' },
|
||||
typescript = { 'eslint_d' },
|
||||
typescriptreact = { 'eslint_d' },
|
||||
['*'] = { 'codespell', 'trim_whitespace' },
|
||||
},
|
||||
},
|
||||
|
||||
@@ -5,6 +5,10 @@ return {
|
||||
local lint = require 'lint'
|
||||
lint.linters_by_ft = {
|
||||
make = { 'checkmake' },
|
||||
javascript = { 'eslint' },
|
||||
javascriptreact = { 'eslint' },
|
||||
typescript = { 'eslint' },
|
||||
typescriptreact = { 'eslint' },
|
||||
}
|
||||
|
||||
-- Create autocommand which carries out the actual linting
|
||||
@@ -13,7 +17,7 @@ return {
|
||||
vim.api.nvim_create_autocmd({ 'BufEnter', 'BufWritePost', 'InsertLeave' }, {
|
||||
group = lint_augroup,
|
||||
callback = function()
|
||||
if vim.bo.modifiable then lint.try_lint(nil, { ignore_errors = false, cwd = vim.fn.getcwd() }) end
|
||||
if vim.bo.modifiable then lint.try_lint(nil, { ignore_errors = false }) end
|
||||
end,
|
||||
})
|
||||
end,
|
||||
|
||||
@@ -254,7 +254,7 @@ return {
|
||||
},
|
||||
},
|
||||
|
||||
eslint = { enable = true },
|
||||
rust_analyzer = { enable = true },
|
||||
bashls = { enable = true },
|
||||
cssls = { enable = true },
|
||||
html = { enable = true },
|
||||
|
||||
Reference in New Issue
Block a user