LuaLS / LuaLS/lua-language-server
Disable snippets via `capabilities`?
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Lua
- Star
- 4.4k
- Fork
- 442
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
How are you using the lua-language-server?
NeoVim
Which OS are you using?
MacOS
What is the issue affecting?
Completion
Expected Behaviour
According to the LSP spec, clients should be able to disable support for snippets by setting capabilities.textDocument.completion.completionItem.snippetSupport = false. However, lua-language-server seems to ignore this setting in favor of its own (non-standard?) settings (completion.callSnippet = "Disable" and completion.keywordSnippet = "Disable".
Actual Behaviour
Even if a user sets capabilities.textDocument.completion.completionItem.snippetSupport = false, snippets continue to be sent by the language server.
Reproduction steps
- Set
capabilities.textDocument.completion.completionItem.snippetSupport = false - Start typing
i...orfo.. - Snippets will be shown for
ifandfor.
Additional Notes
Since it seems standard to disable snippets using the capabilities setting, I'm hoping that lua-language-server can support that.
Log File
No response
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện tính năng hoàn thành cho if và for trong NeoVim với capabilities.textDocument.completion.completionItem.snippetSupport = false, sau đó theo dõi quá trình xử lý hoàn thành của language server. Công việc được xem là hoàn tất khi server tôn trọng capability đó và ngừng gửi snippet khi capability này bị vô hiệu hóa, mà không phụ thuộc vào các thiết lập riêng completion.callSnippet hoặc completion.keywordSnippet.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- lua, macos, neovim
- Lĩnh vực
- devtools
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100