Slint LSP vs additional include paths #9135
-
In my project I added "ui" folder as an include path for Slint files. I modified the fn main() {
let mut ui_dir = env::current_dir().unwrap();
ui_dir.push("ui");
let config = CompilerConfiguration::new().with_include_paths(vec![ui_dir]);
slint_build::compile_with_config("ui/main_window.slint", config).expect("Slint build failed");
} and it works. So when a component file is located directly in the
I can just do
and it compiles just fine. The LSP, however, is not fine and says that it cannot find this file. I'm pretty sure that's because I'm adding the include path at build time. Do you know if there's any way of notifying the LSP about the include paths? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You can configure that by passing |
Beta Was this translation helpful? Give feedback.
You can configure that by passing
-I...
to the command line arguments ofslint-lsp
In VSCode, this can also be done in the settings with the
slint.includePaths
setting.