Import file from other directory doesn't work for lsp mode

The following “test.sol” imports some file from other directory:

// SPDX-License-Identifier: MIT
pragma solidity > 0.8.0;

import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";

The @openzeppelin files exists under /usr/local/lib/node_modules/, it runs fine when compiled with command line:

solc --base-path . --include-path /usr/local/lib/node_modules/  test.sol

But when I try to use it as lsp server by adding parameter --lsp:

solc --lsp --base-path . --include-path /usr/local/lib/node_modules/

It shows error in vim:

Source “@openzeppelin/contracts/token/ERC20/ERC20.sol” not found: File not found. Searched the following locations: “/e/sol/1”, “/e/sol/1/node_modules”

Seems the --include-path doesn’t work in lsp mode, why is that?

I see in the CommandLineParser.cpp

	// ...
	if (m_options.input.mode == InputMode::LanguageServer)
		return;
	// ...
	if (m_args.count(g_strBasePath))
		// ...

	if (m_args.count(g_strIncludePath) > 0)
	{
		// ...
	}

It returns before processing --include-path if it’s lsp mode, so the --include-path doesn’t work for lsp mode.
Is there any way to import additional directory for lsp mode?

Hi @aj3423 thanks for bring this up. In fact the LSP mode still very experimental and most of its functionality is not yet implemented, thus the error you reported. We still need to discuss if we will or not continue with the effort to develop it further as a builtin Solidity language server.

@r0qs I see, thanks for the reply.