Comments (10)
Yes there isn't any solution to that yet, I will work on it
from lsp-ui.
For now I add a function to my config that detects the width of windows and toggles doc and side line.
One problem is that setting lsp-ui-doc-enable
to nil
doesn't stop it from showing doc. How should I apply the changes?
from lsp-ui.
You can call (lsp-ui-doc-enable t)
and (lsp-ui-doc-enable nil)
.
Sorry I'm on holiday now I will fix that in 2 weeks
from lsp-ui.
No no, There isn't any problem. I'm saying simply setting the variable doesn't apply changes. I should express that clearer. 😄
from lsp-ui.
Do we also want to cancel the auto-enabling when the height is too small? Are there other packages having similar window configuration needs that lsp-ui-doc can take an example from?
from lsp-ui.
I tried to make sure childframe's width is always small enough so the current cursor position is not covered.
P.S. This is just a test version. We can make sure the word at point is not covered by calculating word's length and count it in.
But there isn't any effect that I expected. Nothing really changed.
(defun get-cursor-column ()
(let ((inhibit-message t))
(string-to-number
(substring-no-properties
(what-cursor-position)
(+ 7 (string-match "column=.+" (what-cursor-position)))
))))
(defun lsp-ui-doc-max-width ()
(- (window-width) (get-cursor-column)))
(defun lsp-ui-doc--resize-buffer ()
"If the buffer's width is larger than the current window, resize it."
(let* ((window-width (window-width))
(fill-column (min (lsp-ui-doc-max-width) (- window-width 5))))
(message (format "max width: %d" (lsp-ui-doc-max-width)))
(message (format "win width: %d" (window-width)))
(when (> (lsp-ui-doc--buffer-width) (min (lsp-ui-doc-max-width) window-width))
(lsp-ui-doc--with-buffer
(fill-region (point-min) (point-max))))))
Any idea?
from lsp-ui.
Some commit between emacs-mirror/emacs@1bc998f and
emacs-mirror/emacs@a8be860 breaks the width of the child frame.
With a8be860e17e2a737bda7a4c5075b71f0fb627a92,
The width is good with 1bc998f98f937ee82e29d80e19fda7c32632501a
from lsp-ui.
@MaskRay Thanks, I have reported the bug:
http://lists.gnu.org/archive/html/bug-gnu-emacs/2018-03/msg00376.html
from lsp-ui.
@casouri e7257c9 should improve the situation
from lsp-ui.
Cool, I think that should work for most of the cases. Thanks 😄
from lsp-ui.
Related Issues (20)
- Changing semantic token face category of specific tokens? HOT 1
- doc-render issue in 29 HOT 6
- Long file paths in lsp-ui-peek-find show only prefix HOT 1
- lsp-ui-sideline pop message break line on emacs 29.0.60 HOT 11
- webkit lsp-ui-doc popup not showing up in emacs HOT 1
- lsp-ui-doc overlaps with completion-at-point popup and lsp-ui-doc-position not working
- lsp-ui breaks C-x 1
- lsp-ui-sideline no diagnostics HOT 1
- lsp-ui-doc-hide make emacs not responding unless press a arrow key HOT 2
- lsp-lens crashes, and get wrong-type-argument message HOT 1
- Add HTML space rendering to lsp-ui-doc
- LSP signature when typing function args HOT 2
- lsp-ui-doc-position 'at-point not working on terminal Emacs HOT 1
- code actions shown for entire line instead of only for issue at point HOT 1
- Bug: Warnings "Invalid face reference: lsp-flycheck-info-unnecessary" when using lsp-ui-sideline HOT 1
- Flymake support HOT 1
- Wrong key bindings in LSP UI flycheck <M-return> <return> HOT 1
- Another lsp-ui-doc markdown issue (lists) HOT 2
- lsp-ui-doc uses obsolete variable 'inhibit-point-motion-hooks'
- Show diagnostics for all lines in lsp-ui-sideline HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lsp-ui.