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

fix: choose lanugage id based on extension when using css lsp #754

Closed
wants to merge 2 commits into from

Conversation

braineo
Copy link
Contributor

@braineo braineo commented Oct 30, 2023

@manateelazycat if lsp-bridge/langserver/vscode-css-language-server.json was in Python, then the server specific code can live in each config file. But here is the most reasonable place to add the fix atm.

@@ -500,6 +511,7 @@ def handle_workspace_configuration_request(self, name, request_id, params):
sessionSettings = settings.get(section, {})

if self.server_info["name"] == "vscode-eslint-language-server":
sessionSettings = copy.copy(settings)
Copy link
Owner

@manateelazycat manateelazycat Oct 30, 2023

Choose a reason for hiding this comment

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

why need copy here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not sure if somewhere else will modify workspace config, resulting in changing the server info secretly. It is just defensive — we can remove it if not needed.

@manateelazycat
Copy link
Owner

I have push new commit 086a363

In new commit, we check extension in languageIds first, avoid write lsp server name in lspserver.py

@braineo
Copy link
Contributor Author

braineo commented Oct 30, 2023

I have push new commit 086a363

In new commit, we check extension in languageIds first, avoid write lsp server name in lspserver.py

Thank you. How about the commit fixing eslint server? I meant we can take out the copy.copy but the whole workspace setting needs to be filled.

@manateelazycat
Copy link
Owner

I have push new commit 086a363我已经推送了新的提交 086a363
In new commit, we check extension in languageIds first, avoid write lsp server name in lspserver.py在新提交中,我们首先检查languageIds中的扩展,避免在 lspserver.py 中写入lsp服务器名称

Thank you. How about the commit fixing eslint server? I meant we can take out the copy.copy but the whole workspace setting needs to be filled.谢谢。提交修复 eslint 服务器怎么样?我的意思是我们可以取出 copy.copy,但需要填写整个工作区设置。

Please send new PR if have issue on eslint server. ;)

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.

2 participants