Git Product home page Git Product logo

Comments (15)

redtide avatar redtide commented on September 16, 2024 1

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.

jgmdev avatar jgmdev commented on September 16, 2024

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.

VarLad avatar VarLad commented on September 16, 2024

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.

jgmdev avatar jgmdev commented on September 16, 2024

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.

jgmdev avatar jgmdev commented on September 16, 2024

For the moment I implemented a basic markdown to plain text function and this is the result:

Before:
2021-06-25_02:15:57

After:
2021-06-25_02:12:44

So until a proper markdown renderer is implemented this will do.

from lite-xl-lsp.

jgmdev avatar jgmdev commented on September 16, 2024

Leaving this here for reference https://github.com/jgm/lunamark

from lite-xl-lsp.

VarLad avatar VarLad commented on September 16, 2024

Any way we can get code highlighting here? Stuff like bold and italics

from lite-xl-lsp.

jgmdev avatar jgmdev commented on September 16, 2024

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.

redtide avatar redtide commented on September 16, 2024

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.

VarLad avatar VarLad commented on September 16, 2024

@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.

VarLad avatar VarLad commented on September 16, 2024

@jgmdev
If possible, can you implement the pane for now?
We can work on pretty printing of markdown later

from lite-xl-lsp.

VarLad avatar VarLad commented on September 16, 2024

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.

VarLad avatar VarLad commented on September 16, 2024

Also, @redtide @jgmdev
Anyway we can get highlighting from liteXL into the docs?

from lite-xl-lsp.

redtide avatar redtide commented on September 16, 2024

I'm not working on this, just an user like you.

from lite-xl-lsp.

jgmdev avatar jgmdev commented on September 16, 2024

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:

lsp-help-tab

Since it is just a read only docview it should allow searching, scrolling, etc...

from lite-xl-lsp.

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.