kristijanhusak / vim-dadbod-ui

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

using Dictionary as a String #147

Closed antosha417 closed 2 years ago

antosha417 commented 2 years ago

Hey! I started to see these error messages when i execute queries. I don't know vim script and can't make seance of the error. Could you please help? I'm using NVIM v0.8.1

Error detected while processing function <SNR>113_method[2]..66[9]..68[15]..db#execute_command[137]..function <SNR>113_method[2]..66[9]..68[15].
.db#execute_command[126]..BufReadPost Autocommands for "*.dbout"..function db_ui#save_dbout[2]..8[14]..39[2]..38[7]..BufEnter Autocommands for "
<buffer=11>"..function <SNR>106_method[5]..39[34]..42[49]..43:
line    5:
E731: using Dictionary as a String
E116: Invalid arguments for function 41
Error detected while processing function <SNR>113_method[2]..66[9]..68:
line   15:
E171: Missing :endif
Error detected while processing function <SNR>113_method[2]..66:
line    9:
E171: Missing :endif
Error detected while processing function <SNR>113_method:
line    2:
E171: Missing :endif
kristijanhusak commented 2 years ago

Do you maybe use vim-dadbod-completion? I got similar report here https://github.com/kristijanhusak/vim-dadbod-completion/issues/40

antosha417 commented 2 years ago

I'm using cmp. I commented out autocmd for completion in sql. And still see the error.

vim.api.nvim_create_autocmd("filetype", {
  pattern = { 'sql', 'mysql', 'plsql' },
  callback = function()
    vim.schedule(function()
      cmp.setup.buffer({ sources = { { name = 'vim-dadbod-completion' } } })
    end)
  end
})
kristijanhusak commented 2 years ago

Can you tell me which database are you using, and if you are maybe using multiple (postgres, mysql), does it happen on all of them?

antosha417 commented 2 years ago

I see this error only for mysql. I also tried postgres and redis, they seem to work fine for me.

kristijanhusak commented 2 years ago

Can you try pulling latest change on https://github.com/kristijanhusak/vim-dadbod-completion and see if issue is gone?

antosha417 commented 2 years ago

The issue is still there

kristijanhusak commented 2 years ago

Can you please try one more time to pull latest vim-dadbod-completion and give it a try? If it doesn't work, can you uninstall the vim-dadbod-completion and see if the issue persists?

antosha417 commented 2 years ago

Thank you a hole lot @kristijanhusak . You fixed the issue. I don't see the error anymore!