Giter Club home page Giter Club logo

Comments (4)

Bastien-mva avatar Bastien-mva commented on June 20, 2024 1

Thanks

I tried to debug it but did not found any clues. I re installed my lsp and it works vert fine now.

Thanks for this awesone plugin.

from goto-preview.

rmagatti avatar rmagatti commented on June 20, 2024

Please link or paste your setup function call. Also, please set debug to true and then paste or screenshot the result of :mess in here, that should give you more info on why nothing is happening.

ex:

require("goto-preview").setup {
  default_mappings = true,
  debug = true,
}

It's probably worth pointing out that this only really works with Neovim's native LSP, and that the specific LSP you are using needs to support the goto definition call (most do).

from goto-preview.

Bastien-mva avatar Bastien-mva commented on June 20, 2024

Hello, here is my setup calling. I just added default_mappings = true, debut = true} as advised:

use {'rmagatti/goto-preview', config = function() require('goto-preview').setup {default_mappings = true, debug = true}end }

Here is the output of :mess:

  border = { "↖", "─", "┐", "│", "┘", "─", "└", "│" },
  bufhidden = "wipe",
  debug = true,
  default_mappings = true,
  dismiss_on_move = false,
  focus_on_open = true,
  force_close = true,
  height = 15,
  lsp_configs = {
    get_config = <function 1>
  },
  references = {
    telescope = {
      border = true,
      borderchars = {
        preview = { "─", "│", "─", "│", "╭", "╮", "╯", "╰" },
        prompt = { "─", "│", " ", "│", "╭", "╮", "│", "│" },
        results = { "─", "│", "─", "│", "├", "┤", "╯", "╰" }
      },
      hide_preview = false,
      layout_config = {
        height = <function 2>,
        preview_cutoff = 1,
        width = <function 3>
      },
      layout_strategy = "center",
      results_title = false,
      sorting_strategy = "ascending",
      theme = "dropdown"
    }
  },
  resizing_mappings = false,
  stack_floating_preview_windows = true,
  width = 120
}
1 line less; before #1  1 second ago
Already at oldest change
goto-preview: calling new handler
Press ENTER or type command to continue

I am using cmp-nvim-lsp as LSP.

Now gpd shows

goto-preview: calling new handler

but still nothings happens.

from goto-preview.

rmagatti avatar rmagatti commented on June 20, 2024

From these logs, I can only assume your LSP is not returning any data on the textDocument/definition call.
The code in goto-preview where you're likely stopping:

local handle = function(result, opts)
if not result then
return
end

from goto-preview.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.