Skip to content

Commit

Permalink
feat(commands): add helpful command for eslint
Browse files Browse the repository at this point in the history
This command pipe eslint to vim's make which ensures that the process
runs on all files & dumps error output to the quickfix list
  • Loading branch information
vinnyA3 committed Feb 17, 2024
1 parent 0097d2a commit d2fc90b
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lua/vin/commands.lua
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
-- Plugin Dependent User Commands
-- run :make to run typescript compiler on all project files & pipe errors to QL
local augroup = vim.api.nvim_create_augroup("strdr4605", { clear = true })

vim.api.nvim_create_autocmd("FileType", {
pattern = "typescript,typescriptreact",
group = augroup,
command = "compiler tsc | setlocal makeprg=npx\\ tsc",
})

-- Plugin Dependent User Commands
-- Load Snippets (requires luasnip)
vim.api.nvim_create_user_command(
'Snippets',
'lua require("luasnip.loaders.from_snipmate").load()',
{}
)

0 comments on commit d2fc90b

Please sign in to comment.