skynet/nvim/lua/autocmd.lua

15 lines
558 B
Lua
Raw Normal View History

2022-04-03 21:05:52 -05:00
-- launch file browser when opening on a directory
vim.api.nvim_command('au VimEnter * lua require("userfuncs").browse_if_dir()')
-- recognize csx files as csharp
vim.api.nvim_command('au BufRead,BufNewFile *.csx set filetype=cs')
-- enable dadbod completion for sql files
vim.api.nvim_command("au FileType sql let b:db = exists('*DotenvGet') ? DotenvGet('DATABASE_URL') : eval('$DATABASE_URL')")
vim.api.nvim_command([[au FileType sql lua require'cmp'.setup.buffer {
sources = {
{ name = 'vim-dadbod-completion' },
{ name = 'buffer' },
}}
]])