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 documentation not displayed for gleam #48

Closed
rawhat opened this issue Oct 8, 2024 · 2 comments
Closed

LSP documentation not displayed for gleam #48

rawhat opened this issue Oct 8, 2024 · 2 comments

Comments

@rawhat
Copy link

rawhat commented Oct 8, 2024

First off, thank you for the plugin :) excited to be trying it out. I see that you're inundated with issues, so really appreciate all the hard work you're doing.

I've been playing around in various different projects. For most of the LSPs I'm working with, it seems to handle completions / documentation really well. With gleam, however, (possibly others, but it worked for TS/rust) it doesn't seem to display anything for documentation. I tried poking around in the source and couldn't immediately see what the issue might be.

I'm using pretty standard config options. The gleam LSP sends back pretty standard LSP responses, e.g.

[DEBUG][2024-10-08 18:05:18] .../vim/lsp/rpc.lua:286	"rpc.send"
{
	id = 14,
	jsonrpc = "2.0",
	method = "completionItem/resolve",
	params = {
		client_id = 1,
		cursor_column = 3,
		detail = "fn(Result(Result(a, b), b)) -> Result(a, b)",
		documentation = {
			kind = "markdown",
			value = ' Merges a nested `Result` into a single layer.\n\n ## Examples\n\n ```gleam\n flatten(Ok(Ok(1)))\n // -> Ok(1)\n ```\n\n ```gleam\n flatten(Ok(Error("")))\n // -> Error("")\n ```\n\n ```gleam\n flatten(Error(Nil))\n // -> Error(Nil)\n ```\n\n',
		},
		kind = 3,
		label = "result.flatten",
		labelDetails = { description = "glisten" },
		score_offset = 0,
		sortText = "3_result.flatten",
		source = "blink.cmp.sources.lsp",
		textEdit = {
			newText = "result.flatten",
			range = { ["end"] = { character = 3, line = 399 }, start = { character = 2, line = 399 } },
		},
	},
}

(I ran this through a formatter so it was actually readable)

It does look like the code should handle markdown no problem, so I'm not sure why this wouldn't be working.

I'm happy to provide whatever other information you need! Thank you.

@Saghen Saghen closed this as completed in 957a57a Oct 9, 2024
@Saghen
Copy link
Owner

Saghen commented Oct 9, 2024

First off, thank you for the plugin :) excited to be trying it out. I see that you're inundated with issues, so really appreciate all the hard work you're doing.

❤️ thanks for the kind words!

lopi-py pushed a commit to lopi-py/blink.cmp that referenced this issue Oct 10, 2024
lopi-py pushed a commit to lopi-py/blink.cmp that referenced this issue Oct 10, 2024
@oysandvik94
Copy link
Contributor

I dont know if it's the same issue, but doesn't work for me with jdtls.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants