Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resolve include file suggestions relative to document #623

Closed
eiswind opened this issue Aug 15, 2022 · 1 comment
Closed

resolve include file suggestions relative to document #623

eiswind opened this issue Aug 15, 2022 · 1 comment

Comments

@eiswind
Copy link
Contributor

eiswind commented Aug 15, 2022

Description

autocomplete suggestions for include:: are currently resolved against the workspace root:

const workspace = vscode.workspace.getWorkspaceFolder(context.document.uri)
const rootPath = workspace?.uri.fsPath
const searchPath = getPathOfFolderToLookupFiles(
context.document.uri.fsPath,
path.join(rootPath, entryDir)
)

this works as long as all asciidoc files live in the root of the workspace. as soon as we place them in a subfolder, it is broken

Additional Context

I created a PR #618 that suggests resolving the files relative to the source document.

https://github.com/asciidoctor/asciidoctor-vscode/pull/618/files#diff-fb3632b9c41b259ca81bd1f9be15c3b88bd68efe5d88727117468c79e50fd720R53-R56

@ggrossetie
Copy link
Member

fixed in #618

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants