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

feat: lsp for org-babel #558

Merged
merged 2 commits into from Mar 8, 2023
Merged

Conversation

kongds
Copy link
Contributor

@kongds kongds commented Mar 8, 2023

Using lsp-bridge directly in babel. Enable by lsp-bridge-enable-org-babel.
2023-03-08 21 53 12

@manateelazycat
Copy link
Owner

@kongds 大佬, 能否简单的讲解一下补丁的原理, 最近比较忙, 理解能力下降了。

@kongds
Copy link
Contributor Author

kongds commented Mar 8, 2023

主要是根据光标的位置判断当前babel需要的lang,如果有file_change就会判断这个lang的server有没有在flieaction的org_lang_servers中,如果有的话就接着使用之前的,如果是新的lang就会创建一个对应的lsp。(移到block外就会禁用lsp-bridge-call-file-api)

另外如果移动到不同的babel,会调用lsp_server.send_whole_change_notification将整个block发送过去,来更新lsp的内容。

@manateelazycat manateelazycat merged commit 53d00df into manateelazycat:master Mar 8, 2023
2 checks passed
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.

None yet

2 participants