Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LSP go to definition includes top frontmatter fences in Telescope results #447

Open
1 of 2 tasks
tjex opened this issue Aug 17, 2024 · 0 comments
Open
1 of 2 tasks
Labels
bug Something isn't working

Comments

@tjex
Copy link
Member

tjex commented Aug 17, 2024

Check if applicable

  • I have searched the existing issues (required)
  • I'm willing to help fix the problem and contribute a pull request

Describe the bug

I'm considering this a zk bug as if I execute :lua vim.lsp.buf.definition() manually, there is no confusion shown via the quickfix list or similar.

This occurs whether there is a title field in the frontmatter or not.

How to reproduce?

Set keymap if not already set:

			vim.keymap.set({ "n",
				"gd",
				function()
					vim.cmd("norm! ml")
					require("telescope.builtin").lsp_definitions()
				end,
				bufopts,
			})

Open a link to a new document.

I see this:

  2 bar    ╭─────── LSP Definitions ────────╮
  1        │>                          2 / 2│
4   untitle╰────────────────────────────────╯
~          ╭────────────────────────────────╮
~          │> 5ovm.md:5:1:# untitled 2      │
~          │  5ovm.md:1:1:---               │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          │                                │
~          ╰────────────────────────────────╯
~
~
 main               [No Name] • 40 • (1/1)

zk configuration

default config from `zk init`

Environment

zk 0.14.1-11-g4a51e39
system: Darwin 23.4.0 arm64

Also tested on 0.14.1 from Homebrew.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant