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

plugins/lsp: Auto generate the list of lsp servers #2365

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

traxys
Copy link
Member

@traxys traxys commented Oct 5, 2024

This PR allows to auto-generate the list of all lsp servers from the plugin.
The approach taken mirrors the way upstream generates their documentation.

Closes #2163
Closes #2335

@traxys traxys requested a review from a team October 5, 2024 14:36
@traxys traxys force-pushed the all-lsp-servers branch 6 times, most recently from 860e331 to a1cb585 Compare October 5, 2024 16:51
This test is quite resource intensive, so let's split it to avoid
issues
@traxys traxys force-pushed the all-lsp-servers branch 4 times, most recently from d05afe4 to c90930c Compare October 5, 2024 17:22
@Eveeifyeve
Copy link

This solves: #2335

Copy link
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is an awesome job, this will reduce a lot of maintenance burden!

@@ -0,0 +1,3 @@
function Header(elem)
return pandoc.Strong(elem.content)
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wish inline lua in python didn't require an additional dependency...

update-scripts/nvim-lspconfig/default.nix Outdated Show resolved Hide resolved
info = sorted_map_table(configs, function(server_name, server_info)
local description = nil
if server_info.document_config.docs ~= nil then
description = server_info.document_config.docs.description
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do they provide any other metadata? Or does everything get thrown in here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No there is quite a lot of metadata, like the default values for root patterns, filetypes, or other configuration items.
I went with the minimal amount to replicate what we had

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, we can expand on this in future PRs if there's a need.

[
{
"cmd": ["als"],
"desc": "https://github.com/agda/agda-language-server\n\nLanguage Server for Agda.\n",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was just curious because I see they basically always have the website and then a description in here. Made me think about how we provide a link to upstream docs for the plugins and was curious if we could grab the url and strip it out to be used for the proper link instead of crowding the description with it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather to do that in another PR, but it would be better I agree

Copy link
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for tackling this!

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

Successfully merging this pull request may close these issues.

[PLUGIN REQUEST] lsp.mdx_analyzer [PLUGIN REQUEST] Add somesass_ls LSP server
4 participants