Code Monkey home page Code Monkey logo

Comments (10)

mickael-menu avatar mickael-menu commented on August 24, 2024 1

Did you try setting the LSP diagnostics in zk's config? It should display the note title next to a link.

https://github.com/mickael-menu/zk/blob/main/docs/config-lsp.md#diagnostics

[lsp.diagnostics]
# Report titles of wiki-links as hints.
wiki-title = "hint"
# Warn for dead links between notes.
dead-link = "error"

from zk-nvim.

mickael-menu avatar mickael-menu commented on August 24, 2024 1

Ah I didn't know about the [[id|title]] syntax. Don't know if zk can even handle this syntax.

Yes it's supported.

from zk-nvim.

kabouzeid avatar kabouzeid commented on August 24, 2024 1

There's no good way to do this right now. The virtual text can't add or remove any columns.

References:
neovim/neovim#15706
neovim/neovim#9496

from zk-nvim.

mickael-menu avatar mickael-menu commented on August 24, 2024 1

I don't think we can implement this currently in NeoVim. Personally I'm not a fan of the result with https://github.com/pyrho/nerveux.nvim as the titles are cropped when they exceed the length of the link. I assume it's also awkward when it's too short.

The feature itself is handled with LSP diagnostics which show the full title.

We can reopen this issue if there's a better way to answer this need.

from zk-nvim.

kabouzeid avatar kabouzeid commented on August 24, 2024

I guess what is meant here is showing the note title instead (as an overlay "on top") of the link as virtual text.
Like this: https://raw.githubusercontent.com/pyrho/static-imgs/c4ed4fd7844b2306d228128540dc290e75b221ff/nerveux.jpeg

Might be worth exploring.

from zk-nvim.

kabouzeid avatar kabouzeid commented on August 24, 2024

For what it's worth, I'm currently using the [title](noteid) syntax + vim's conceal feature to display it as just title.
The added benefit is that I can make the title something different than the literal note title, which often reads better. Wikipedia pages also do this.

See also: https://github.com/mickael-menu/zk-nvim#syntax-highlighting-tips


Handling this at the plugin level with virtual text like nerveux does would be even better though because it would also work for [[wikilinks]] and plays nicer with treesitter highlighting.

from zk-nvim.

voidus avatar voidus commented on August 24, 2024

I missed the config setting, so this definitely helps with my ux need. That said, I think this can be left open, because the virtual text.

The conceal setting looks nice, I use wiki links for neuron/emanote compatibility though. I think it should still be possible with [[file|link title]] syntax, maybe I'll look into that at some point.

Thanks a lot for the quick replies!

from zk-nvim.

kabouzeid avatar kabouzeid commented on August 24, 2024

Ah I didn't know about the [[id|title]] syntax. Don't know if zk can even handle this syntax.

I'll look into the virtual text feature once I find some time.

from zk-nvim.

github-actions avatar github-actions commented on August 24, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs in the next 5 days.

from zk-nvim.

voidus avatar voidus commented on August 24, 2024

not stale

from zk-nvim.

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.