- Notifications
You must be signed in to change notification settings - Fork102
Closed
Description
Bug report
- I confirm this is a bug with Supabase, not with my own application.
- I confirm I have searched theDocs, GitHubDiscussions, andDiscord.
Describe the bug
Hello! I have recently been experimenting with postgres-language-server in my neovim config on neovim 0.11.1, and MacOS Sequoia 15.5. I am usingvim-dadbod-ui to manage my database connections and nvim-lsp to run the postgres-language-server when I am editing a sql buffer. I started noticing excessive battery drain on my 2023 Macbook Pro, and I realized thepostgres-tools
process was consistently running at 100% CPU usage.
To Reproduce
- Setup vim dadbod and vim dadbod ui per the docs
- I have the following lsp lua config for postgres lsp:
localfunctionon_attach(client,bufnr)vim.api.nvim_buf_set_option(bufnr,'omnifunc','v:lua.vim.lsp.omnifunc')localfunctionbuf_keymap(mode,lhs,rhs)vim.keymap.set(mode,lhs,rhs, {buffer=true,silent=true })endifclient.name=='eslint'thenclient.server_capabilities.documentFormattingProvider=trueclient.server_capabilities.documentRangeFormattingProvider=trueendbuf_keymap('n','K',function()vim.lsp.buf.hover()end)buf_keymap('n','gd',function()vim.lsp.buf.definition()end)buf_keymap('n','1gd',function()vim.cmd('vsplit')vim.lsp.buf.definition()end)buf_keymap('n','<c-]>',function()vim.lsp.buf.declaration()end)buf_keymap('n','gD',function()vim.lsp.buf.implementation()end)buf_keymap('n','<c-k>',function()vim.lsp.buf.signature_help()end)buf_keymap('n','1gD',function()vim.lsp.buf.type_definition()end)buf_keymap('n','sr',function()vim.lsp.buf.references()end)buf_keymap('n','gW',function()vim.lsp.buf.workspace_symbol()end)buf_keymap('n','gA',function()vim.lsp.buf.code_action()end)buf_keymap('v','gA',function()vim.lsp.buf.range_code_action()end)buf_keymap('n','sd',function()vim.diagnostic.open_float()end)buf_keymap('n','<f4>',function()vim.lsp.buf.format({async=true,filter=function(client)returnclient.name~="typescript-tools"end })end)buf_keymap('v','<f4>',function()vim.lsp.buf.range_formatting({})end)buf_keymap('n','<f3>',function()vim.lsp.buf.rename()end)endlocalcapabilities=vim.lsp.protocol.make_client_capabilities()localservers= {'postgres_lsp'}localconfigs= {}for_,lspinipairs(servers)dolocalconfig=configs[lsp]or {}config.on_attach=on_attachconfig.capabilities=capabilitiesvim.lsp.config[lsp]=configvim.lsp.enable(lsp)end
- Add a database connection via vim-dadbod-ui and open a new sql buffer
System information
MacOS Sequoia 15.5, 2023 Macbook Pro, Neovim 11.1