Comments (15)
I didn't mean to exclude the doc pane, but having also the brief information of a function in suggestions, so not forcing people to open a pane.
from lite-xl-lsp.
The doc pane sounds like a good option to have (maybe display it at the bottom of the editor view), but I would still prefer to have rapid access to docs on the selected autocomplete item side by side without affecting the whole document view.
As for the docs pane, using something like https://github.com/Orange-OpenSource/pandoc-terminal-writer to render the md
Implementing a markdown renderer in lite should be possible and maybe not too difficult and it could be used on the description tooltip (or documentation pane if implemented)
Another idea can be to write (something like) https://github.com/ttscoff/mdless in Lua
That would be the quickest solution, to convert the markdown to plaintext, all we would need is a strip_markdown(text) function until a proper markdown renderer is written.
from lite-xl-lsp.
maybe display it at the bottom of the editor view
Yeah, many editors employ this and it works
Also, we can give an option to switch as well between live and in the pane.
My main concern being, I've seen the docs consume the entire program space making it really annoying. With a pane at the bottom, we can have a scroll bar as well. Also, having the pane gives us better options over the md display and the opportunity to make a docs-search bar where users can search for docs of a specific function without the autocomplete. Also, making the pane hide/unhide is a good option so users can just hide it when they only want autocomplete and no docs.
Default behavior can be to display the docs of the keyword the cursor is currently at if its found.
from lite-xl-lsp.
I've seen the docs consume the entire program space making it really annoying.
True, really bad on long documentation comments, perhaps also implement a scrollable tooltip, but now that you mention this the pane makes more sense and if done using the docview api may be easier to do, maybe also add a button to tooltip that says "view more" and opens the pane.
from lite-xl-lsp.
For the moment I implemented a basic markdown to plain text function and this is the result:
So until a proper markdown renderer is implemented this will do.
from lite-xl-lsp.
Leaving this here for reference https://github.com/jgm/lunamark
from lite-xl-lsp.
Any way we can get code highlighting here? Stuff like bold and italics
from lite-xl-lsp.
Any way we can get code highlighting here? Stuff like bold and italics
Yeah, it is possible, but first we would need for lite to support that and there is discussion about implementing support for italic and bold fonts using the agg library.
With current lite-xl functionality one could implement a syntax highlighter every time that code sections are found as change the color and size of text depending on the kind of markdown element it is, but that requires using a proper markdown parser like the one shared above and a description popup with better encapsulated functionality as maybe what described on lite-xl overlay system
For the moment I will focus on the more easy things like:
- Accent active parameter and signature
- Be able to search workspace symbols 'workspace/symbol'
- Add symbol renaming support 'textDocument/rename'
- etc...
from lite-xl-lsp.
FWIW I'm currently using qtcreator, which uses both docs in suggestions and has a documentation pane.
To me the "brief" documentation in suggestions is enough, usually I read the documentation in a separate context (local or website documentation) only when needed.
from lite-xl-lsp.
@redtide
The documentation pane would help in not opening a browser
Also, we can search docs with a pane without suggestions
Again, I think, a pane should be implemented, with an option to switch between
docs in suggestions and docs in a pane
from lite-xl-lsp.
@jgmdev
If possible, can you implement the pane for now?
We can work on pretty printing of markdown later
from lite-xl-lsp.
The pane must have a separate search bar
And hovering upon the suggestions from autocomplete should display docs in the pane as well
from lite-xl-lsp.
Also, @redtide @jgmdev
Anyway we can get highlighting from liteXL into the docs?
from lite-xl-lsp.
I'm not working on this, just an user like you.
from lite-xl-lsp.
Mouse hover is implemented and just pushed a change to allow opening a symbol hover information on a separate pane when pressing alt+shift+a
or by executing lsp:show-symbol-info-in-tab
or right clicking and selection it from context menu:
Since it is just a read only docview it should allow searching, scrolling, etc...
from lite-xl-lsp.
Related Issues (20)
- No feedback when definition doesn't exist. HOT 2
- Rendering issues for inline diagnostics HOT 7
- Julia support HOT 3
- [Bug] Error windows cover right click context menu with no way to make the context menu visible again.
- [Bug] Autocomplete insertions randomly happen twice
- [Bug] Autocomplete insertions don't work for multiple cursors
- [BUG] Cannot see LSP Tooltip because warning/error tooltip covers it.
- [BUG] LSP Sees completely different input than what's being shown in the editor. HOT 1
- `util.doc_is_open` preforms case sensitive comparisent on windows HOT 3
- Add format on save
- feature: labelDetails support
- [Bug] High CPU usage when moving mouse around HOT 9
- [Bug] High CPU usage after closing file, with "stop_unneeded_servers" set to "true" HOT 9
- [Error] Attempted to index a nil value (field 'proc') HOT 22
- [Bug] Wrong line number gets sent to the LSP server, resulting in errors HOT 16
- Click to Goto Definition? HOT 2
- Autocomplete entries need to be truncated HOT 1
- allow overriding PATH HOT 3
- Formatting fails with pylsp HOT 12
- [Request] Easier configuring LSP server after initialization HOT 3
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 lite-xl-lsp.