Error formatting on save when opened file is a relative path

オープン
#433 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
47/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
vim
領域
tooling

調査の方向性

The report reproduces this with g:rustfmt_autosave enabled when Vim opens ../a.rs from a subdirectory; :w reports that -stdin- cannot be opened, while :RustFmt produces no output. Start by tracing the rustfmt autosave formatting path and how it passes the current file path to the formatter. Done when saving a relative-path file formats it successfully without the -stdin- write error.

索引モデルが issue の本文から書いたものです。

説明

  • rust.vim version: Using vim-plug; rust.vim master

Steps to reproduce:

.vimrc:

let g:rustfmt_autosave = 1
~ 
❯ mkdir -p foo/bar && cd foo

~/foo 
❯ touch a.rs

~/foo via 🦀 v1.48.0 
❯ cd bar

~/foo/bar 
❯ vim ../a.rs

:w

"-stdin-"
"-stdin-" E212: Can't open file for writing
Press ENTER or type command to continue

:w

"~/foo/a.rs" 1L, 1B written

Opening the file the same way and just doing :RustFmt produces no output.

主要言語
Vim Script
スター
4.2k
フォーク
323
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

rust-lang/rust.vim のほかの issue

rust-lang/rust.vim の issue をすべて見る

似ている issue

DevTools の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。