Rust analyzer highlighting with nvim-lsp
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- neovim, rust, vim
Hướng nghiên cứu
Start by reproducing the Rust Analyzer documentation highlighting in Neovim 0.5 with nvim-lsp and nvim-completion, using the reported after/ftplugin/rust.vim configuration. Compare which Rust documentation tokens receive Markdown highlights and which do not; the issue says attempts in before/ftplugin/markdown.vim and before/syntax/markdown.vim had no effect. Done means identifying and fixing the missing highlighting behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
- rust.vim version: Downloaded October,15th 2020
Steps to reproduce:
- Running latest neovim 0.5
- Using nvim-lsp and nvim-completion
Rust analyzer documentation gets treat as markdown and is mostly able to highlighted as markdown

However as you can see somethings are not able to highlighted with markdown highlights
I am using this in my after/ftplugin/rust.vim
function s:rustdoclsphilight()
if &background ==# 'dark'
let l:color = '#5d4d7a'
else
let l:color = '#e2e0ea'
endif
exec 'hi markdownItalic guibg='.l:color
exec 'hi markdownAutomaticLink guibg='.l:color
exec 'hi markdownBlockquote guibg='.l:color
exec 'hi markdownBold guibg='.l:color
exec 'hi markdownBoldDelimiter guibg='.l:color
exec 'hi markdownBoldItalic guibg='.l:color
exec 'hi markdownBoldItalicDelimiter guibg='.l:color
exec 'hi markdownCode guibg='.l:color
exec 'hi markdownCodeBlock guibg='.l:color
exec 'hi markdownCodeDelimiter guibg='.l:color
exec 'hi markdownError guibg='.l:color
exec 'hi markdownEscape guibg='.l:color
exec 'hi markdownFootnote guibg='.l:color
exec 'hi markdownFootnoteDefinition guibg='.l:color
exec 'hi markdownH1 guibg='.l:color
exec 'hi markdownH2 guibg='.l:color
exec 'hi markdownH3 guibg='.l:color
exec 'hi markdownH4 guibg='.l:color
exec 'hi markdownH5 guibg='.l:color
exec 'hi markdownH6 guibg='.l:color
exec 'hi markdownHeadingDelimiter guibg='.l:color
exec 'hi markdownHeadingRule guibg='.l:color
exec 'hi markdownId guibg='.l:color
exec 'hi markdownIdDeclaration guibg='.l:color
exec 'hi markdownIdDelimiter guibg='.l:color
exec 'hi markdownItalic guibg='.l:color
exec 'hi markdownItalicDelimiter guibg='.l:color
exec 'hi markdownLineBreak guibg='.l:color
exec 'hi markdownLineStart guibg='.l:color
exec 'hi markdownLink guibg='.l:color
exec 'hi markdownLinkDelimiter guibg='.l:color
exec 'hi markdownLinkText guibg='.l:color
exec 'hi markdownLinkTextDelimiter guibg='.l:color
exec 'hi markdownListMarker guibg='.l:color
exec 'hi markdownOrderedListMarker guibg='.l:color
exec 'hi markdownRule guibg='.l:color
exec 'hi markdownUrl guibg='.l:color
exec 'hi markdownUrlDelimiter guibg='.l:color
exec 'hi markdownUrlTitle guibg='.l:color
exec 'hi markdownUrlTitleDelimiter guibg='.l:color
exec 'hi markdownUrlValid guibg='.l:color
endfunction!
call <SID>rustdoclsphilight()
I have tried adding syn keyword blocks in before/ftplugin/markdown.vim and before/syntax/markdown.vim but it doesn't seem to change anything.
- Ngôn ngữ chính
- Vim Script
- Star
- 4.2k
- Fork
- 323
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
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.
Issue khác của rust-lang/rust.vim
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 76/100
-
It's Dead, Jim!Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
-
Remove hard coded edition fallbackCó thể đã có người làm @alerque đã nhận 230 ngày trước. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 35/100
-
README.md syntastic to aleĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100