Rust analyzer highlighting with nvim-lsp
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- Plutôt claire
- Activité
- À l'abandon
- Stack technique
- neovim, rust, vim
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
- 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.
- Langage dominant
- Vim Script
- Étoiles
- 4.2k
- Forks
- 323
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de rust-lang/rust.vim
-
Difficulté 1/5 1-3 heures Accessibilité débutants 76/100
-
It's Dead, Jim!Ouverte
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 15/100
-
Remove hard coded edition fallbackPeut-être pris @alerque l’a pris il y a 231 jours. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 35/100
-
README.md syntastic to aleOuverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 55/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 45/100