microsoft / microsoft/vscode-cpptools

Can not format via ssh: There is no formatter for 'cpp'-files installed

Open
#3,787 13 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug Feature: Code Formatting investigate: repro Language Service network drive
Dominant language
TypeScript
Stars
6.2k
Forks
1.7k
Avg merge
14h 46m
Merged PRs (30d)
61

Description

Hi,

C++ formatter on remote host

Describe the bug

  • OS and Version: Microsoft Windows 10 Enterprise (10.0.17763 N/A Build 17763)
  • VS Code Version: 1.35.1
  • C/C++ Extension Version: 023.1
  • Other extensions you installed (and if the issue persists after disabling them): "Kelvin Schoofs(SSH FS) version (1.16.2)
  • A clear and concise description of what the bug is:

I am using vscode for my C++ project, i installed the C++ extension (0.23.1) i works fine when i open the file from my local drive.

But i am using "Kelvin Schoofs(SSH FS) version (1.16.2) extension for my remote code on the Linux machine, after opening the C++ file from sshfs work-space, and trying to format my C++ document, it returns "There is no formatter for 'cpp'-files installed."

how can i fix this behavior for remote code "i mentioned again: formatting works properly for local files"

To Reproduce
Open the VSCODE and explore your files via the ssh (remote host)
install the "Kelvin Schoofs(SSH FS) and configure it to connect to the remote Linux host.
the open your files and try to format the document.

Expected behavior

Format the C++ Document.

Regards.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the formatting failure with the Kelvin Schoofs SSH FS extension on a remote Linux workspace, then compare it with formatting a local C++ file in VS Code. Investigate how the C/C++ extension registers its formatter for remote workspaces; done means Format Document works for the remote C++ file without reporting that no formatter is installed.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, vscode
Domain
developer-experience, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.