lua.lua 388 B

123456789101112131415161718
  1. local cmd, b, o = vim.cmd, vim.b, vim.o
  2. -- stylua defaults to 4c wide tabs
  3. o.tabstop = 4
  4. o.softtabstop = 4
  5. o.shiftwidth = 4
  6. o.expandtab = false
  7. b.ale_linters = { "luacheck", "lua-language-server" }
  8. b.ale_fixers = { "stylua" }
  9. for _, x in ipairs({
  10. { "func", [[function()<CR>return<CR>end<Esc>2k_$hi]] },
  11. { "fn", [[function () end<Esc>3hi]] },
  12. }) do
  13. cmd.inoreabbrev({ args = x })
  14. end