kristijanhusak / vim-dadbod-ui

Simple UI for https://github.com/tpope/vim-dadbod
MIT License
1.54k stars 94 forks source link

[Feature] Add option to automatically expand query results #203

Closed nangchan closed 5 months ago

nangchan commented 1 year ago

Currently there's not an option to automatically expand the sql result in the dbout buffer. I tried setting the fold method to manual for "dbout" but that didn't work:

autocmd FileType dbout set foldmethod=manual

Hence I added an option g:db_ui_expand_query_results that adds prevents automatic folding and I updated the documentation accordingly.

kristijanhusak commented 1 year ago

Did you try this autocmd?

autocmd FileType dbout setlocal nofoldenable

From my tests it seems to be working.

rwese commented 5 months ago

Did you try this autocmd?

autocmd FileType dbout setlocal nofoldenable

From my tests it seems to be working.

in neovim I now use this:

vim.api.nvim_create_autocmd('FileType', {
  pattern = { 'dbout' },
  callback = function()
    vim.opt.foldenable = false
  end,
})