neovim configuration using rocks.nvim plugin manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

fix: safely run nvim-lint

+8 -4
+8 -4
lua/plugins/nvim-lint.lua
··· 2 2 3 3 local lint = require("lint") 4 4 5 + local function if_executable(cmd) 6 + return vim.fn.executeable(cmd) == 1 and { cmd } 7 + end 8 + 5 9 lint.linters_by_ft = { 6 - dockerfile = { "hadolint" }, 7 - editorconfig = { "editorconfig-checker" }, 8 - fish = { "fish" }, 9 - -- lua = { "luacheck" }, 10 + dockerfile = if_executable("hadolint"), 11 + editorconfig = if_executable("editorconfig-checker"), 12 + fish = if_executable("fish"), 13 + lua = if_executable("luacheck"), 10 14 } 11 15 12 16 vim.api.nvim_create_autocmd({ "BufWritePost", "BufReadPost", "InsertLeave" }, {