update
This commit is contained in:
@@ -1,2 +1 @@
|
||||
require("lsp-format").setup {}
|
||||
require("lspconfig").gopls.setup { on_attach = require("lsp-format").on_attach }
|
||||
|
||||
21
plugin-confs/nvim-lint.lua
Normal file
21
plugin-confs/nvim-lint.lua
Normal file
@@ -0,0 +1,21 @@
|
||||
require('lint').linters_by_ft = {
|
||||
markdown = { 'markdownlint' },
|
||||
lua = { 'luacheck', 'luac' },
|
||||
vim = { 'vint' },
|
||||
sh = { 'shellcheck' },
|
||||
pyton = { 'pycodestyle', 'black', 'pydocstyle', 'pylint' },
|
||||
json = { 'jsonlint' },
|
||||
yaml = { 'yamllint' }
|
||||
}
|
||||
|
||||
vim.api.nvim_create_autocmd({ "BufWritePost" }, {
|
||||
callback = function()
|
||||
-- try_lint without arguments runs the linters defined in `linters_by_ft`
|
||||
-- for the current filetype
|
||||
require("lint").try_lint()
|
||||
|
||||
-- You can call `try_lint` with a linter name or a list of names to always
|
||||
-- run specific linters, independent of the `linters_by_ft` configuration
|
||||
-- require("lint").try_lint("cspell")
|
||||
end,
|
||||
})
|
||||
Reference in New Issue
Block a user