Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not disable hover #317

Open
snomfake opened this issue Jun 11, 2024 · 0 comments
Open

Not disable hover #317

snomfake opened this issue Jun 11, 2024 · 0 comments

Comments

@snomfake
Copy link

I want to disable hover but for some reason the following error appears:

LSP[jedi_language_server]: Error ON_ATTACH_ERROR: "/home/darein/.config/nvim/lua/plugins/lspconfig.lua:11: attem
pt to index field 'resolved_capabilities' (a nil value)"

code

return {
  "neovim/nvim-lspconfig",
  dependencies = {
    "onsails/lspkind.nvim",
    "ray-x/lsp_signature.nvim",
    "williamboman/mason.nvim"
  },
  config = function()
    -- lspconfig
    local function on_attach(client, bufnr)
      client.resolved_capabilities.hover = false
      require("lsp_signature").on_attach(bufnr)
    end

    local capabilities = vim.lsp.protocol.make_client_capabilities()

    local lspconfig = require("lspconfig")
    lspconfig.jedi_language_server.setup({
      on_attach = on_attach,
      capabilities = capabilities,
      settings = {
        init_option = {
          completion = { disableSnippets = true },
          diagnostics = { enable = false },
          hover = { enable = false }
        }
      }
    })

    vim.lsp.handlers["textDocument/publishDiagnostics"] =
      vim.lsp.with(vim.lsp.diagnostic.on_publish_diagnostics, {
        update_in_insert = false
      })

    -- mason
    require("mason").setup({})
  end
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant