Comments (10)
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.
Ah I didn't know about the
[[id|title]]
syntax. Don't know ifzk
can even handle this syntax.
Yes it's supported.
from zk-nvim.
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.
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.
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.
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.
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.
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.
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.
not stale
from zk-nvim.
Related Issues (20)
- Looking for something like ZkOpen -- but only limited to current open buffers HOT 2
- Typo: nvim_add_user_command HOT 1
- Escape lua `special characters` in path name HOT 2
- Create a new note from selection without changing the selected text HOT 1
- Issues with creating note from selection HOT 17
- Emulate `zk list -i` / `zk edit -i` in nvim
- Link incorrectly formated after completion HOT 11
- Bug: `ZkNewFromTitleSelection` does not copy the last character correctly. HOT 1
- Link completion does not work with non-latin zettel name HOT 1
- Can't search/filter the LSP completion candidates HOT 3
- Imitate `zk edit --interactive` HOT 2
- Make Lsp check link validity relative to note instead of notebook
- completion only works with autocomplete, not via manual trigger (nvim-cmp) HOT 3
- LSP can't find a notebook HOT 5
- Incorrect "not found" diagnostic HOT 4
- `vim.lsp.get_active_clients()` is Deprecated HOT 7
- Error running zk commands - attempt to call field get_clients (a nil value) HOT 5
- doc: clarify non-requirement for lsp installation HOT 1
- `ZkNewFromTitleSelection` does not copy last character correctly if it's non-ascii HOT 4
- Finding references with the LSP in neovim only shows the first occurences of a note in each file HOT 2
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 zk-nvim.