You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched the existing issues of neoconf.nvim
I have searched the existing issues of plugins related to this issue
Neovim version (nvim -v)
0.9.1
Operating system/version
Linux or MacOS
Describe the bug
Relative paths in values within .vscode/settings.json files don't work if being pulled from a parent directory outside the scope/folder currently being opened in nvim.
My particular issue context
I have a nested folder structure containing multiple "projects" with the top-level containing a .vscode/settings.json file.
There is a setting for rust analyzer that goes into vscode's settings.json called LinkedProjects where you put an array of relative paths for vscode to pick up your projects properly.
This essentially keeps vscode working as expected when you have one or more rust projects not at the root folder.
How it's breaking
When opening one of these in nvim so that a single rust project is essentially the root folder, it breaks rust analyzer (oddly just all proc macros) with a pretty much un-Googleable error:
proc macro main not expanded: proc macro crate is missing dylib
This is due to it going up beyond the root folder being opened, finding a .vscode/settings.json file up in a parent folder somewhere and applying those settings relative to the folder you have opened in nvim NOT relative to the .vscode folder it found the settings in.
Workaround
My current workaround after realising what was breaking it was to just have a .neoconf.json file inside each subfolder setting import -> vscode to false:
{
"import": {
"vscode": false
}
}
Not great if you actually need other settings from vscode's settings but at the moment I don't.
Steps To Reproduce
I imagine there is a much simpler way to reproduce the underlying issue but in my specific case:
Install rust with rustup.
Install nvim (I used LazyVim this time but all others I tried such as Astro etc all reproduced it).
Add rust-analyzer with Mason.
Quit nvim.
Create a new folder to act as the root folder and within it create the following .vscode/settings.json file:
Now the hierarchy should look like: /.vscode/settings.json /stuff/Cargo.toml /stuff/src/main.rs
other files created automatically by cargo new omitted.
cd into stuff and run:
nvim .
Go into main.rs, wait for rust-analyzer to index and be greeted with an error on the #[tokio::main] line.
Expected Behavior
Ideally either:
do not load .vscode/settings.json files from a parent outside the current folder scope.
if loading values that are relative paths, change them to still be correct (maybe prepend /../ as needed).
Repro
Iusedthecurrentout-the-boxLazyVim
The text was updated successfully, but these errors were encountered:
Did you check docs and existing issues?
Neovim version (nvim -v)
0.9.1
Operating system/version
Linux or MacOS
Describe the bug
Relative paths in values within
.vscode/settings.json
files don't work if being pulled from a parent directory outside the scope/folder currently being opened in nvim.My particular issue context
I have a nested folder structure containing multiple "projects" with the top-level containing a
.vscode/settings.json
file.There is a setting for rust analyzer that goes into vscode's settings.json called
LinkedProjects
where you put an array of relative paths for vscode to pick up your projects properly.This essentially keeps vscode working as expected when you have one or more rust projects not at the root folder.
How it's breaking
When opening one of these in nvim so that a single rust project is essentially the root folder, it breaks rust analyzer (oddly just all proc macros) with a pretty much un-Googleable error:
This is due to it going up beyond the root folder being opened, finding a
.vscode/settings.json
file up in a parent folder somewhere and applying those settings relative to the folder you have opened in nvim NOT relative to the.vscode
folder it found the settings in.Workaround
My current workaround after realising what was breaking it was to just have a
.neoconf.json
file inside each subfolder setting import -> vscode to false:Not great if you actually need other settings from vscode's settings but at the moment I don't.
Steps To Reproduce
I imagine there is a much simpler way to reproduce the underlying issue but in my specific case:
Install rust with rustup.
Install nvim (I used LazyVim this time but all others I tried such as Astro etc all reproduced it).
Add rust-analyzer with Mason.
Quit nvim.
Create a new folder to act as the root folder and within it create the following
.vscode/settings.json
file:cargo new stuff
Cargo.toml
file, ie:src/main.rs
:Now the hierarchy should look like:
/.vscode/settings.json
/stuff/Cargo.toml
/stuff/src/main.rs
other files created automatically by
cargo new
omitted.cd
intostuff
and run:nvim .
main.rs
, wait for rust-analyzer to index and be greeted with an error on the#[tokio::main]
line.Expected Behavior
Ideally either:
Repro
The text was updated successfully, but these errors were encountered: