question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to use completion root without relative pathing

See original GitHub issue

What is the problem?

Can’t seem to configure the new markdown.extension.completion.root to what I expect. I want to set the path to match how the image will be served on the live site. Since I’m building this using Nuxt, the static folder is automatically configured to serve any file in there. I don’t want my markdown files in the same folder because I use the Webpack Markdown loader to parse it and template the content before rendering HTML.

When I saw this new setting released I assumed it was to help with this situation. I also tried playing with the "markdown.extension.print.absoluteImgPath" setting in conjunction with this but couldn’t get anything to change.

This is what the autocompletion looks like to me no matter what my settings: Screen Shot 2019-11-04 at 9 31 19 AM

How can I reproduce it?

In some project, create one folder that has markdown files and another static folder that has images. Mine looks like this:

content/
  guide/
    index.md
static/
  img/
    my-pic.jpg

Set "markdown.extension.completion.root": "/static" or "static", neither makes any difference.

In index.md start creating an image ![](, check the autocompletion path

Expected: /img/my-pic.jpg

Result: ../../static/img/my-pic.jpg

Is there any error message in the console?

No errors

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
cvharriscommented, Nov 5, 2019

I see it, that will clean up the results, thanks for adding that so quickly! It filters out relative results as soon as you type ‘/’.

1reaction
yzhang-ghcommented, Nov 5, 2019

It should be improved in the dev build.

Read more comments on GitHub >

github_iconTop Results From Across the Web

get path relative to executable in bash auto completion
The path to the command being completed is in ${COMP_WORDS[0]} (the same way the word under the cursor is in ${COMP_WORDS[COMP_CWORD]} ).
Read more >
How to avoid relative paths in Javascript import autocompletion?
Hi guys,. how can we change the javascript import autocompletion on IntelliJ to use the "sources root" folder instead of relative paths?
Read more >
nvim-compe path completion from working directory : r/neovim
For now, path completion will trigger if I type "/" offering completion from the root or if I type "./" offering completion relative...
Read more >
Navigating the filesystem with relative paths at the command line
With auto-completion, typing a full path can be as quick as using a relative path, especially with autocompletion. That said, relative paths ......
Read more >
Bash completion won't work if calling application with the ...
Not knowing why, but the bash completion won't work if I call application in the absolute path. For example, I have file1 &...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found