Giter Site home page Giter Site logo

Comments (8)

sebastiencs avatar sebastiencs commented on August 23, 2024

I think the defaults should provide the best experience with lsp-ui, lsp-ui-peek is intended to replace xref so remapping those keybinding is the behavior I would expect as user.
Nothing stop you from using helm-xref, does it ?

from lsp-ui.

MaskRay avatar MaskRay commented on August 23, 2024

A little tricky... helm-xref does not provide entries like lsp-ui-peek-find-definitions, instead it hijects xref-show-xrefs-function and relies on xref-find-definitions/references

(require 'helm-xref)
(setq xref-show-xrefs-function 'helm-xref-show-xrefs)

helm-resume is useful and I think I may still use helm-xref occasionally (and for workspace/symbol)

from lsp-ui.

kvaneesh avatar kvaneesh commented on August 23, 2024

Another reason to not overload xref function is to make xref-find-definitions go to the definition and we may want peek interface to just peek the definition and not necessarily visit the file.

from lsp-ui.

kvaneesh avatar kvaneesh commented on August 23, 2024

i removed the remap, but then lsp-ui-peek-jump-backward doesn't work after that. Maybe we need to override then such that we can have a single interface to go back and forward the stack?

from lsp-ui.

MaskRay avatar MaskRay commented on August 23, 2024

@kvaneesh lsp-ui-peek-jump-backward works by injecting jump points into lsp-ui-peek--find-xrefs.

(defun lsp-ui-peek--find-xrefs (input kind &optional request param)
  "Find INPUT references.
KIND is 'references, 'definitions or a custom kind.
REQUEST PARAM."
;; ................
    (when (featurep 'evil-jumps)
      (lsp-ui-peek--with-evil-jumps (evil-set-jump)))

You need to inject it into xref--find-xrefs if you also use xref-find-*

from lsp-ui.

phst avatar phst commented on August 23, 2024

Minor modes should generally not rebind key bindings that aren't specifically reserved to them. See https://www.gnu.org/software/emacs/manual/html_node/elisp/Key-Binding-Conventions.html. It's OK to document how to rebind the XRef keys, but lsp-ui shouldn't do so by default.

from lsp-ui.

MaskRay avatar MaskRay commented on August 23, 2024

I hope you would not blame me.. Documented in README.md

from lsp-ui.

MaskRay avatar MaskRay commented on August 23, 2024

And FYI, I made up my mind to create a LSP layer for spacemacs. syl20bnr/spacemacs#10211 But my elisp skill is incapable to make it nice.

I believe there will be helm-xref or ivy-xref users.

from lsp-ui.

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.