Giter Site home page Giter Site logo

Comments (5)

manateelazycat avatar manateelazycat commented on June 22, 2024

You can take a look at

(setq acm-menu-frame-popup-position
here

Did you use a centering plugin like olivetti?

from lsp-bridge.

eval-exec avatar eval-exec commented on June 22, 2024

I didn't use `centering plugin like olivetti or writeroom-mode.


If I hack acm-frame-get-popup-position to this, only change

(cons (+ x window-left)
          (+ y window-top offset-y))

to

(cons (+ x window-left 88)
          (+ y window-top offset-y))

then the popup menu looks align well...

(defun acm-frame-get-popup-position (frame-popup-point &optional line-bias)
  (let* ((edges (window-pixel-edges))
         (window-left (+ (nth 0 edges)
                         ;; We need adjust left margin for buffer centering module.
                         (/ (- (window-pixel-width)
                               (window-body-width nil t))
                            2)))
         (window-top (nth 1 edges))
         (pos (posn-x-y (posn-at-point frame-popup-point)))
         (x (car pos))
         (y (+ (cdr pos) (* (or line-bias 0) (line-pixel-height))))
         (offset-y
          ;; We need move down to skip tab-line and header-line.
          (if (version< emacs-version "27.0")
              (window-header-line-height)
            (+ (window-tab-line-height)
               (window-header-line-height)))))
    (cons (+ x window-left 88)
          (+ y window-top offset-y))))

from lsp-bridge.

eval-exec avatar eval-exec commented on June 22, 2024

@manateelazycat
What do you think using (window-absolute-pixel-position) to get the acm-frame-get-popup-position?
Ref: https://emacs.stackexchange.com/questions/19555/obtain-absolute-pixel-position-of-point

from lsp-bridge.

manateelazycat avatar manateelazycat commented on June 22, 2024

截图 2024-04-21 07-10-50

上面是我的截图, 你的Emacs不支持svg图标渲染, 还是你禁用了图标?

from lsp-bridge.

manateelazycat avatar manateelazycat commented on June 22, 2024

@eval-exec
I have push new patch 12302c7

This patch will adjust acm menu position follow option acm-enable-icon and acm-enable-quick-access.
截图 2024-04-21 07-39-19
截图 2024-04-21 07-39-02
截图 2024-04-21 07-38-53

Thanks for feedback

from lsp-bridge.

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.