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